circle_api.h File Reference

General header for the STM32-circle projects. More...


Data Structures

struct  tMEMS_Info
 MEMS state description. More...
struct  tPointer_Info
 Pointer position description. More...
struct  tMenuItem
 Menu item description. More...
struct  tMenu
 Menu description. More...

Defines

#define RGB_MAKE(xR, xG, xB)
#define RGB_RED   0x00F8
#define RGB_BLACK   0x0000
#define RGB_WHITE   0xffff
#define RGB_BLUE   0x1F00
#define RGB_GREEN   0xE007
#define RGB_YELLOW   (RGB_GREEN|RGB_RED)
#define RGB_MAGENTA   (RGB_BLUE|RGB_RED)
#define RGB_LIGHTBLUE   (RGB_BLUE|RGB_GREEN)
#define RGB_ORANGE   (RGB_RED | 0xE001)
#define RGB_PINK   (RGB_MAGENTA | 0xE001)
#define BACKLIGHTMIN   0x1000
#define DEFAULT_CCR_BACKLIGHTSTART   0x8000
#define SCREEN_WIDTH   128
#define SCREEN_HEIGHT   128
#define CHIP_SCREEN_WIDTH   132
#define CHIP_SCREEN_HEIGHT   132
#define CHAR_WIDTH   7
#define CHAR_HEIGHT   14
#define REMOVE_MENU   0x01
#define APP_MENU   0x02
#define MENU_MAXITEM   8
#define BKP_SYS1   1
#define BKP_SYS2   2
#define BKP_SYS3   3
#define BKP_SYS4   4
#define BKP_SYS5   5
#define BKP_SYS6   6
#define BKP_USER1   7
#define BKP_USER2   8
#define BKP_USER3   9
#define BKP_USER4   10

Typedefs

typedef void(* tAppPtrMgr )(int, int)

Enumerations

enum  eSpeed {
  SPEED_VERY_LOW = 1, SPEED_LOW = 2, SPEED_MEDIUM = 3, SPEED_HIGH = 4,
  SPEED_VERY_HIGH = 5
}
 Clock speeds. More...
enum  eSchHandler {
  LED_SCHHDL_ID = 0, BUTTON_SCHHDL_ID = 1, BUZZER_SCHHDL_ID = 2, MENU_SCHHDL_ID = 3,
  POINTER_SCHHDL_ID = 4, LCD_SCHHDL_ID = 5, DRAW_SCHHDL_ID = 6, RTC_SCHHDL_ID = 7,
  UNUSED0_SCHHDL_ID = 8, UNUSED1_SCHHDL_ID = 9, UNUSED2_SCHHDL_ID = 10, UNUSED3_SCHHDL_ID = 11,
  UNUSED4_SCHHDL_ID = 12, UNUSED5_SCHHDL_ID = 13, UNUSED6_SCHHDL_ID = 14, UNUSED7_SCHHDL_ID = 15
}
enum  Rotate_H12_V_Match_TypeDef { V12 = 0, V3 = 1, V6 = 2, V9 = 3 }
enum  POINTER_mode {
  POINTER_UNDEF = -1, POINTER_OFF = 0, POINTER_ON = 1, POINTER_MENU = 2,
  POINTER_APPLICATION = 3, POINTER_RESTORE_LESS = 4
}
enum  POINTER_state { POINTER_S_UNDEF = -1, POINTER_S_DISABLED = 0, POINTER_S_ENABLED = 1 }
 The different pointer modes. More...
enum  BUTTON_mode { BUTTON_DISABLED = -1, BUTTON_ONOFF = 0, BUTTON_ONOFF_FORMAIN = 1, BUTTON_WITHCLICK = 2 }
enum  BUTTON_state {
  BUTTON_UNDEF = -1, BUTTON_RELEASED = 0, BUTTON_PUSHED = 1, BUTTON_PUSHED_FORMAIN = 2,
  BUTTON_CLICK = 3, BUTTON_DBLCLICK = 4
}
 CircleOS button states. More...
enum  BUZZER_mode {
  BUZZER_UNDEF = -1, BUZZER_OFF = 0, BUZZER_ON = 1, BUZZER_SHORTBEEP = 2,
  BUZZER_LONGBEEP = 3, BUZZER_PLAYMUSIC = 4
}
enum  MENU_code {
  MENU_LEAVE = 0, MENU_CONTINUE = 1, MENU_REFRESH = 2, MENU_CHANGE = 3,
  MENU_CONTINUE_COMMAND = 4
}
 Application return values. More...
enum  LED_mode {
  LED_UNDEF = -1, LED_OFF = 0, LED_ON = 1, LED_BLINKING_LF = 2,
  LED_BLINKING_HF = 3
}
enum  LED_id { LED_GREEN = 0, LED_RED = 1 }
 Available LEDs. More...

Variables

enum eSpeed CurrentSpeed


Detailed Description

Author:
FL
Date:
07/2007
Version:
1.2
Date:
10/2007
Version:
1.5 types of OutX_F64 and OutX_F256 changed to u32 (same for Y and Z)
Date:
10/2007
Version:
1.6 Add the IRQ handler replacement
It contains the list of the utilities functions organized by sections (MEMS, LCD, POINTER, ...)

Define Documentation

#define APP_MENU   0x02

Menu flag: item is an application.

#define BACKLIGHTMIN   0x1000

Minimal PWM rate.

#define BKP_SYS1   1

Backup register reserved for OS

#define BKP_SYS2   2

Backup register reserved for OS

#define BKP_SYS3   3

Backup register reserved for OS

#define BKP_SYS4   4

Backup register reserved for OS

#define BKP_SYS5   5

Backup register reserved for OS

#define BKP_SYS6   6

Backup register reserved for OS

#define BKP_USER1   7

Backup available for users application

#define BKP_USER2   8

Backup available for users application

#define BKP_USER3   9

Backup available for users application

#define BKP_USER4   10

Backup available for users application

#define CHAR_HEIGHT   14

Height of a character.

#define CHAR_WIDTH   7

Width of a character.

#define CHIP_SCREEN_HEIGHT   132

Height of screen driven by LCD controller in pixels.

#define CHIP_SCREEN_WIDTH   132

Width of screen driven by LCD controller in pixels.

#define DEFAULT_CCR_BACKLIGHTSTART   0x8000

Default PWM rate.

#define MENU_MAXITEM   8

Maximum number of item in a menu.

#define REMOVE_MENU   0x01

Menu flag: remove menu when item selected.

#define RGB_BLACK   0x0000

Predefined color.

#define RGB_BLUE   0x1F00

Predefined color.

#define RGB_GREEN   0xE007

Predefined color.

#define RGB_LIGHTBLUE   (RGB_BLUE|RGB_GREEN)

Predefined color.

#define RGB_MAGENTA   (RGB_BLUE|RGB_RED)

Predefined color.

#define RGB_MAKE ( xR,
xG,
xB   ) 

Value:

( ( (xG&0x07)<<13 ) + ( (xG)>>5 )  +      \
                                ( ((xB)>>3) << 8 )          +      \
                                ( ((xR)>>3) << 3 ) )
Macro to make a LCD compatible color format from RGB.

#define RGB_ORANGE   (RGB_RED | 0xE001)

Predefined color ( Green/2 + red ).

#define RGB_PINK   (RGB_MAGENTA | 0xE001)

Predefined color ( Green/2 + magenta ).

#define RGB_RED   0x00F8

Predefined color.

#define RGB_WHITE   0xffff

Predefined color.

#define RGB_YELLOW   (RGB_GREEN|RGB_RED)

Predefined color.

#define SCREEN_HEIGHT   128

Height of visible screen in pixels.

#define SCREEN_WIDTH   128

Width of visible screen in pixels.


Typedef Documentation

typedef void(* tAppPtrMgr)(int, int)


Enumeration Type Documentation

enum BUTTON_mode

Available button modes. List of all the available button mode in the CircleOS.

Enumerator:
BUTTON_DISABLED  No action on the button is detected.
BUTTON_ONOFF  Detect ON/OFF pression type.
BUTTON_ONOFF_FORMAIN  Special mode for main screen.
BUTTON_WITHCLICK  Currently unused.

enum BUTTON_state

Description of the button states provided by CircleOS.

Enumerator:
BUTTON_UNDEF  Undefined state.
BUTTON_RELEASED  Button is released.
BUTTON_PUSHED  Button was just pushed.
BUTTON_PUSHED_FORMAIN  Same as BUTTON_PUSHED when button mode is BUTTON_ONOFF_FORMAIN.
BUTTON_CLICK  Currently unused.
BUTTON_DBLCLICK  Currently unused.

enum BUZZER_mode

CircleOS buzzer modes. Without the undefined mode, the CircleOS provides 5 modes for its buzzer.

Enumerator:
BUZZER_UNDEF  undefined mode for buzzer
BUZZER_OFF  The buzzer is put off.
BUZZER_ON  The buzzer is put on.
BUZZER_SHORTBEEP  Make buzzer to bip for a short time
BUZZER_LONGBEEP  Make buzzer to bip for a long time
BUZZER_PLAYMUSIC  Make buzzer to play a music

enum eSchHandler

Enumerator:
LED_SCHHDL_ID 
BUTTON_SCHHDL_ID 
BUZZER_SCHHDL_ID 
MENU_SCHHDL_ID 
POINTER_SCHHDL_ID 
LCD_SCHHDL_ID 
DRAW_SCHHDL_ID 
RTC_SCHHDL_ID 
UNUSED0_SCHHDL_ID 
UNUSED1_SCHHDL_ID 
UNUSED2_SCHHDL_ID 
UNUSED3_SCHHDL_ID 
UNUSED4_SCHHDL_ID 
UNUSED5_SCHHDL_ID 
UNUSED6_SCHHDL_ID 
UNUSED7_SCHHDL_ID 

enum eSpeed

Available clock speeds.

Enumerator:
SPEED_VERY_LOW 
SPEED_LOW 
SPEED_MEDIUM 
SPEED_HIGH 
SPEED_VERY_HIGH 

enum LED_id

List of all the available LEDs.

Enumerator:
LED_GREEN  Green led id.
LED_RED  Red led id.

enum LED_mode

LED modes. LEDs may be on, off or blinking slowly or fastly!

Enumerator:
LED_UNDEF  Undefined led mode.
LED_OFF  Put off the led.
LED_ON  Put on the led.
LED_BLINKING_LF  Slow blinking led mode.
LED_BLINKING_HF  Fast blinking led mode.

enum MENU_code

List of all the codes available for CircleOS application return values.

Enumerator:
MENU_LEAVE  Leave application.
MENU_CONTINUE  Continue application.
MENU_REFRESH  Refresh current menu.
MENU_CHANGE  Change current menu.
MENU_CONTINUE_COMMAND  Sent by Ini functions.

enum POINTER_mode

Available pointer modes. Description of all the available pointer modes in CircleOS.

Enumerator:
POINTER_UNDEF  Pointer's mode is unknown!
POINTER_OFF  Pointer isn't managed and displayed.
POINTER_ON  Pointer mode used in main screen.
POINTER_MENU  Pointer management is used to select item menu (but pointer isn't displayed).
POINTER_APPLICATION  The managment of pointer depend of extern application.
POINTER_RESTORE_LESS  The background isn't restored (to go faster).

enum POINTER_state

Despite beeing in a undefined state, the pointer can be disabled or enable.

Enumerator:
POINTER_S_UNDEF  Pointer state is unknown!
POINTER_S_DISABLED  Pointer is disabled.
POINTER_S_ENABLED  Pointer is enabled.

enum Rotate_H12_V_Match_TypeDef

The 4 possible rotations. The 4 possible MEM rotations.

Enumerator:
V12  No rotation.
V3  Rotation to the right.
V6  Rotation to the left.
V9  Half a rotation.


Variable Documentation

enum eSpeed CurrentSpeed