48 #ifndef __CIRCLE_API_H
49 #define __CIRCLE_API_H
54 #include "circle_types.h"
100 typedef u32( *tCircleFunc0 )( void );
101 typedef u32( *tCircleFunc1 )( u32 param1 );
102 typedef u32( *tCircleFunc2 )( u32 param1, u32 param2 );
103 typedef u32( *tCircleFunc3 )( u32 param1, u32 param2, u32 param3 );
104 typedef u32( *tCircleFunc4 )( u32 param1, u32 param2, u32 param3, u32 param4 );
105 typedef u32( *tCircleFunc5 )( u32 param1, u32 param2, u32 param3, u32 param4, u32 param5 );
106 typedef u32( *tCircleFunc6 )( u32 param1, u32 param2, u32 param3, u32 param4, u32 param5, u32 param6 );
107 typedef u32( *tCircleFunc7 )( u32 param1, u32 param2, u32 param3, u32 param4, u32 param5, u32 param6, u32 param7 );
108 typedef u32( *tCircleFunc8 )( u32 param1, u32 param2, u32 param3, u32 param4, u32 param5, u32 param6, u32 param7, u32 param8 );
110 extern tCircleFunc0( *ptrCircle_API )[];
113 #define Circle_API (*ptrCircle_API)
115 #define POINTER_ID 0x00
119 #define TOUCHSCR_ID 0x61
120 #define TOOLBAR_ID 0x6A
122 #define BUTTON_ID 0x80
123 #define JOYSTICK_ID 0x84
125 #define BUZZER_ID 0x90
126 #define AUDIO_ID 0x93
130 #define AUDIO2_ID 0xC3
131 #define UTIL2_ID 0xC8
132 #define SHUTDOWN_ID 0xD0
136 #define UTIL_SET_PLL_ID (UTIL_ID + 0)
137 #define UTIL_GET_PLL_ID (UTIL_ID + 1)
138 #define UTIL_UINT2STR_ID (UTIL_ID + 2)
139 #define UTIL_INT2STR_ID (UTIL_ID + 3)
140 #define UTIL_GET_VERSION_ID (UTIL_ID + 4)
141 #define UTIL_READ_BACKUPREGISTER_ID (UTIL_ID + 5)
142 #define UTIL_WRITE_BACKUPREGISTER_ID (UTIL_ID + 6)
143 #define UTIL_GET_BAT_ID (UTIL_ID + 7)
144 #define UTIL_GET_USB_ID (UTIL_ID + 8)
145 #define UTIL_SET_IRQ_HANDLER_ID (UTIL_ID + 9)
146 #define UTIL_GET_IRQ_HANDLER_ID (UTIL_ID + 10)
147 #define UTIL_SET_SCH_HANDLER_ID (UTIL_ID + 11)
148 #define UTIL_GET_SCH_HANDLER_ID (UTIL_ID + 12)
149 #define UTIL_GET_TEMP_ID (UTIL_ID + 13)
150 #define UTIL_SET_TEMPMODE_ID (UTIL_ID + 14)
151 #define UTIL_GET_PRIMERTYPE_ID (UTIL_ID + 15)
152 #define UTIL_GET_APP_ADDRESS_ID (UTIL2_ID + 0)
153 #define UTIL_IS_STAND_ALONE_ID (UTIL2_ID + 1)
154 #define UTIL_SETTIMER_ID (UTIL2_ID + 2)
155 #define UTIL_GET_BATSTATUS_ID (UTIL2_ID + 3)
156 #define UTIL_SAVE_SCREEN_BMP_ID (UTIL2_ID + 4)
157 #define UTIL_SET_DIVIDER_HANDLER_ID (UTIL2_ID + 5)
158 #define UTIL_GET_DIVIDER_HANDLER_ID (UTIL2_ID + 6)
160 typedef void ( *tHandler )( void );
163 #define UTIL_SetPll(a) ( (tCircleFunc1)(Circle_API [UTIL_SET_PLL_ID])) ((u32)(a))
164 #define UTIL_GetPll() (u32) (((tCircleFunc0)(Circle_API [UTIL_GET_PLL_ID])) ())
165 #define UTIL_uint2str(a,b,c,d) ( (tCircleFunc4)(Circle_API [UTIL_UINT2STR_ID])) ((u32)(a),(u32)(b),(u32)(c),(u32)(d))
166 #define UTIL_int2str(a,b,c,d) ( (tCircleFunc4)(Circle_API [UTIL_INT2STR_ID])) ((u32)(a),(u32)(b),(u32)(c),(u32)(d))
167 #define UTIL_GetVersion() (const u8*) (((tCircleFunc0)(Circle_API [UTIL_GET_VERSION_ID])) ())
168 #define UTIL_ReadBackupRegister(a) (u32) (((tCircleFunc1)(Circle_API [UTIL_READ_BACKUPREGISTER_ID])) ((u32)(a)))
169 #define UTIL_WriteBackupRegister(a,b) ( (tCircleFunc2)(Circle_API [UTIL_WRITE_BACKUPREGISTER_ID])) ((u32)(a),(u32)(b))
170 #define UTIL_GetBat() (u32) (((tCircleFunc0)(Circle_API [UTIL_GET_BAT_ID])) ())
171 #define UTIL_GetUsb() (u32) (((tCircleFunc0)(Circle_API [UTIL_GET_USB_ID])) ())
172 #define UTIL_SetIrqHandler(a,b) (((tCircleFunc2)(Circle_API [UTIL_SET_IRQ_HANDLER_ID])) ((s32)a,(u32) b))
173 #define UTIL_GetIrqHandler(a) (u32) (((tCircleFunc1)(Circle_API [UTIL_GET_IRQ_HANDLER_ID])) ((s32)a))
174 #define UTIL_SetSchHandler(a,b) (((tCircleFunc2)(Circle_API [UTIL_SET_SCH_HANDLER_ID])) ((s32)a,(u32)b))
175 #define UTIL_GetSchHandler(a) (u32) (((tCircleFunc1)(Circle_API [UTIL_GET_SCH_HANDLER_ID])) ((s32)a))
176 #define UTIL_GetTemp() (u32) (((tCircleFunc0)(Circle_API [UTIL_GET_TEMP_ID])) ())
177 #define UTIL_SetTempMode(a) (((tCircleFunc1)(Circle_API [UTIL_SET_TEMPMODE_ID])) ((s32)a))
178 #define UTIL_GetPrimerType() (u32) (((tCircleFunc0)(Circle_API [UTIL_GET_PRIMERTYPE_ID])) ())
179 #define UTIL_GetAppAddress(a) (u32) (((tCircleFunc1)(Circle_API [UTIL_GET_APP_ADDRESS_ID])) ((u32)(a)))
180 #define UTIL_IsStandAloneMode() (u32) (((tCircleFunc0)(Circle_API [UTIL_IS_STAND_ALONE_ID])) ())
181 #define UTIL_SetTimer(a,b) (u32) (((tCircleFunc2)(Circle_API [UTIL_SETTIMER_ID])) ((u32)(a), (u32)(b)))
182 #define UTIL_GetBatStatus() (u16) (((tCircleFunc0)(Circle_API [UTIL_GET_BATSTATUS_ID])) ())
183 #define UTIL_SaveScreenBMP(a) (u32) (((tCircleFunc1)(Circle_API [UTIL_SAVE_SCREEN_BMP_ID])) ((u32)(a)))
184 #define UTIL_SetDividerHandler(a,b) (((tCircleFunc2)(Circle_API [UTIL_SET_DIVIDER_HANDLER_ID])) ((u32)(a), (u16)(b)))
185 #define UTIL_GetDividerHandler(a) (u16) (((tCircleFunc1)(Circle_API [UTIL_GET_DIVIDER_HANDLER_ID])) ((u32)(a)))
243 #define MEMS_GET_POSITION_ID (MEMS_ID + 0)
244 #define MEMS_GET_ROTATION_ID (MEMS_ID + 1)
245 #define MEMS_SET_NEUTRAL_ID (MEMS_ID + 2)
246 #define MEMS_GET_INFO_ID (MEMS_ID + 3)
249 #define MEMS_GetPosition(a,b) ((tCircleFunc2)(Circle_API [MEMS_GET_POSITION_ID])) ((u32)(a),(u32)(b))
250 #define MEMS_GetRotation(a) ((tCircleFunc1)(Circle_API [MEMS_GET_ROTATION_ID])) ((u32)(a))
251 #define MEMS_SetNeutral() ((tCircleFunc0)(Circle_API [MEMS_SET_ROTATION_ID])) ()
252 #define MEMS_GetInfo() ( (tMEMS_Info*) (((tCircleFunc0)(Circle_API [MEMS_GET_INFO_ID])) ()))
308 #define POINTER_WIDTH 7
311 #define POINTER_SET_RECT_ID (POINTER_ID + 0)
312 #define POINTER_SETRECTSCREEN_ID (POINTER_ID + 1)
313 #define POINTER_GETCURRENTANGLESTART_ID (POINTER_ID + 2)
314 #define POINTER_SETCURRENTANGLESTART_ID (POINTER_ID + 3)
315 #define POINTER_GETCURRENTSPEEDONANGLE_ID (POINTER_ID + 4)
316 #define POINTER_SETCURRENTSPEEDONANGLE_ID (POINTER_ID + 5)
317 #define POINTER_SETMODE_ID (POINTER_ID + 6)
318 #define POINTER_GETMODE_ID (POINTER_ID + 7)
319 #define POINTER_SETCURRENTPOINTER_ID (POINTER_ID + 8)
320 #define POINTER_GETSTATE_ID (POINTER_ID + 9)
321 #define POINTER_DRAW_ID (POINTER_ID + 10)
322 #define POINTER_SAVE_ID (POINTER_ID + 11)
323 #define POINTER_RESTORE_ID (POINTER_ID + 12)
324 #define POINTER_GETPOSITION_ID (POINTER_ID + 13)
325 #define POINTER_SETPOSITION_ID (POINTER_ID + 14)
326 #define POINTER_SETAPPLICATION_POINTER_MGR_ID (POINTER_ID + 15)
327 #define POINTER_SETCOLOR_ID (POINTER_ID + 16)
328 #define POINTER_GETCOLOR_ID (POINTER_ID + 17)
329 #define POINTER_GETINFO_ID (POINTER_ID + 18)
330 #define POINTER_SET_CURRENT_AREASTORE_ID (POINTER_ID + 19)
333 #define POINTER_SetRect(a,b,c,d) ((tCircleFunc4)(Circle_API [POINTER_SET_RECT_ID])) ((u32)(a),(u32)(b),(u32)(c),(u32)(d))
334 #define POINTER_SetRectScreen() ((tCircleFunc0)(Circle_API [POINTER_SETRECTSCREEN_ID])) ()
335 #define POINTER_GetCurrentAngleStart() (u16) (((tCircleFunc0)(Circle_API [POINTER_GETCURRENTANGLESTART_ID])) ())
336 #define POINTER_SetCurrentAngleStart(a) ((tCircleFunc1)(Circle_API [POINTER_SETCURRENTANGLESTART_ID])) ((u32)(a))
337 #define POINTER_GetCurrentSpeedOnAngle() (u16) (((tCircleFunc0)(Circle_API [POINTER_GETCURRENTSPEEDONANGLE_ID])) ())
338 #define POINTER_SetCurrentSpeedOnAngle(a) ((tCircleFunc1)(Circle_API [POINTER_SETCURRENTSPEEDONANGLE_ID])) ((u32)(a))
339 #define POINTER_SetMode(a) ((tCircleFunc1)(Circle_API [POINTER_SETMODE_ID])) ((u32)(a))
340 #define POINTER_GetMode() (enum POINTER_mode)(((tCircleFunc0)(Circle_API [POINTER_GETMODE_ID])) ())
341 #define POINTER_SetCurrentPointer(a,b,c) ((tCircleFunc3)(Circle_API [POINTER_SETCURRENTPOINTER_ID])) ((u32)(a),(u32)(b),(u32)(c))
342 #define POINTER_GetState() (enum POINTER_state)(((tCircleFunc0)(Circle_API [POINTER_GETSTATE_ID])) ())
343 #define POINTER_Draw(a,b,c,d,e) ((tCircleFunc5)(Circle_API [POINTER_DRAW_ID])) ((u32)(a),(u32)(b),(u32)(c),(u32)(d),(u32)(e))
344 #define POINTER_Save(a,b,c,d) ((tCircleFunc4)(Circle_API [POINTER_SAVE_ID])) ((u32)(a),(u32)(b),(u32)(c),(u32)(d))
345 #define POINTER_Restore(a,b,c,d) ((tCircleFunc4)(Circle_API [POINTER_RESTORE_ID])) ((u32)(a),(u32)(b),(u32)(c),(u32)(d))
346 #define POINTER_GetPos() (u16)(((tCircleFunc0)(Circle_API [POINTER_GETPOSITION_ID])) ())
347 #define POINTER_SetPos(a,b) ((tCircleFunc2)(Circle_API [POINTER_SETPOSITION_ID])) ((u32)(a),(u32)(b))
348 #define POINTER_SetApplication_Pointer_Mgr(a) ((tCircleFunc1)(Circle_API [POINTER_SETAPPLICATION_POINTER_MGR_ID])) ((u32)(a))
349 #define POINTER_SetColor(a) ((tCircleFunc1)(Circle_API [POINTER_SETCOLOR_ID])) ((u32)(a))
350 #define POINTER_GetColor() (u16)(((tCircleFunc0)(Circle_API [POINTER_GETCOLOR_ID])) ())
351 #define POINTER_GetInfo() (tPointer_Info*) (((tCircleFunc0)(Circle_API [POINTER_GETINFO_ID])) ())
352 #define POINTER_SetCurrentAreaStore(a) ((tCircleFunc1)(Circle_API [POINTER_SET_CURRENT_AREASTORE_ID])) ((u32)(a))
396 #define BUTTON_GETSTATE_ID (BUTTON_ID + 0)
397 #define BUTTON_SETMODE_ID (BUTTON_ID + 1)
398 #define BUTTON_GETMODE_ID (BUTTON_ID + 2)
399 #define BUTTON_WAITFORRELEASE_ID (BUTTON_ID + 3)
402 #define BUTTON_GetState() (enum BUTTON_state)(((tCircleFunc0)(Circle_API [BUTTON_GETSTATE_ID])) ())
403 #define BUTTON_SetMode(a) ((tCircleFunc1)(Circle_API [BUTTON_SETMODE_ID])) ((u32)(a))
404 #define BUTTON_GetMode() (enum BUTTON_mode)(((tCircleFunc0)(Circle_API [BUTTON_GETMODE_ID])) ())
405 #define BUTTON_WaitForRelease() ((tCircleFunc0)(Circle_API [BUTTON_WAITFORRELEASE_ID])) ()
438 #define JOYSTICK_GETSTATE_ID (JOYSTICK_ID + 0)
439 #define JOYSTICK_WAITFORRELEASE_ID (JOYSTICK_ID + 1)
442 #define JOYSTICK_GetState() (enum JOYSTICK_state) (((tCircleFunc0)(Circle_API [JOYSTICK_GETSTATE_ID])) ()) // enum JOYSTICK_state JOYSTICK_GetState(void);
443 #define JOYSTICK_WaitForRelease() ((tCircleFunc0)(Circle_API [JOYSTICK_WAITFORRELEASE_ID])) () // void JOYSTICK_WaitForRelease(void);
536 #define CX_GPIO_LOW (0)
537 #define CX_GPIO_HIGH (1)
539 #define CX_NO_ERROR 0
540 #define CX_USART_PARITYERR 0x01
541 #define CX_USART_FRAMEERR 0x02
542 #define CX_USART_NOISEERR 0x04
543 #define CX_USART_OVERRUN 0x08
545 #define CX_SPI_OVERRUN 0x20
546 #define CX_SPI_MODF 0x40
548 #define CX_SPI_MODE_SLAVE 0
549 #define CX_SPI_MODE_MASTER 1
550 #define CX_SPI_POL_LOW 0
551 #define CX_SPI_POL_HIGH 1
552 #define CX_SPI_PHA_FIRST 0
553 #define CX_SPI_PHA_SECOND 1
554 #define CX_SPI_MSBFIRST 0
555 #define CX_SPI_LSBFIRST 1
556 #define CX_SPI_8_Bits 0
557 #define CX_SPI_16_Bits 1
558 #define CX_SPI_Soft 0
559 #define CX_SPI_Hard 1
564 #define CX_CONFIGURE_ID (CX_ID + 0)
565 #define CX_WRITE_ID (CX_ID + 1)
566 #define CX_READ_ID (CX_ID + 2)
569 #define CX_Configure(a,b,c) (((tCircleFunc3)(Circle_API [CX_CONFIGURE_ID])) ((u32)(a),(u32)(b),(u32)(c))) // s32 CX_Configure ( tCX_ID what, s32 param1, s32 param2 );
570 #define CX_Write(a,b,c) (((tCircleFunc3)(Circle_API [CX_WRITE_ID])) ((u32)(a),(u32)(b),(u32)(c))) // s32 CX_Configure ( tCX_ID what, s32 param1, s32 param2 );
571 #define CX_Read(a,b,c) (((tCircleFunc3)(Circle_API [CX_READ_ID])) ((u32)(a),(u32)(b),(u32)(c))) // s32 CX_Configure ( tCX_ID what, s32 param1, s32 param2 );
579 #define RGB_MAKE(xR,xG,xB) ( ( (((xG)>>2)&0x07)<<13 ) + ( (xG)>>5 ) + \
580 ( ((xB)>>3) << 8 ) + \
583 // Major HTML Color codes
584 #define RGB_RED RGB_MAKE(0xFF, 0x00, 0x00) //0x00F8
585 #define RGB_GREEN RGB_MAKE(0x00, 0xFF, 0x00) //0xE007 (official name is PASTELGREEN)
586 #define RGB_PASTELGREEN RGB_MAKE(0x00, 0xFF, 0x00)
587 #define RGB_LIGHTBLUE RGB_MAKE(0x00, 0x00, 0xFF) //0x1F00 (was 0xFF07 in CircleOS 3)
588 #define RGB_BLUE RGB_MAKE(0x00, 0x00, 0xFF) //0x1F00 (official name is LIGHTBLUE)
589 #define RGB_BLACK RGB_MAKE(0x00, 0x00, 0x00) //0x0000
590 #define RGB_WHITE RGB_MAKE(0xFF, 0xFF, 0xFF) //0xFFFF
591 #define RGB_YELLOW RGB_MAKE(0xFF, 0xFF, 0x00) //0xE0FF
592 #define RGB_MAGENTA RGB_MAKE(0xFF, 0x00, 0xFF) //0x1FF8
593 #define RGB_TURQUOISE RGB_MAKE(0x00, 0xFF, 0xFF)
594 #define RGB_ORANGE RGB_MAKE(0xFF, 0x80, 0x40) //0x08FC (was 0xE0F9 in CircleOS 3)
595 #define RGB_PINK RGB_MAKE(0xFF, 0x3F, 0xFF) //0xFFF9
596 #define RGB_LIGHTGREY RGB_MAKE(0xC0, 0xC0, 0xC0)
597 #define RGB_DARKGREY RGB_MAKE(0x80, 0x80, 0x80)
598 #define RGB_DARKBLUE RGB_MAKE(0x00, 0x00, 0xA0)
599 #define RGB_LIGHTPURPLE RGB_MAKE(0xFF, 0x00, 0x80)
600 #define RGB_DARKPURPLE RGB_MAKE(0x80, 0x00, 0x80)
601 #define RGB_BROWN RGB_MAKE(0x80, 0x40, 0x00)
602 #define RGB_BURGUNDY RGB_MAKE(0x80, 0x00, 0x00)
603 #define RGB_FORESTGREEN RGB_MAKE(0x80, 0x80, 0x00)
604 #define RGB_GRASSGREEN RGB_MAKE(0x40, 0x80, 0x80)
607 #define BACKLIGHTMIN 0x1000
608 #define DEFAULT_CCR_BACKLIGHTSTART 0x8000
612 #define CHAR_HEIGHT 14
615 #define MAX_FONT_NB 20
648 #define LCD_SETRECTFORCMD_ID (LCD_ID + 0)
649 #define LCD_GETPIXEL_ID (LCD_ID + 1)
650 #define LCD_DRAWPIXEL_ID (LCD_ID + 2)
651 #define LCD_SENDLCDCMD_ID (LCD_ID + 3)
652 #define LCD_SENDLCDDATA_ID (LCD_ID + 4)
653 #define LCD_READLCDDATA_ID (LCD_ID + 5)
654 #define LCD_FILLRECT_ID (LCD_ID + 6)
655 #define LCD_DRAWRECT_ID (LCD_ID + 7)
656 #define LCD_DISPLAYCHAR_ID (LCD_ID + 8)
657 #define LCD_RECTREAD_ID (LCD_ID + 9)
658 #define LCD_SETBACKLIGHT_ID (LCD_ID + 10)
659 #define LCD_GETBACKLIGHT_ID (LCD_ID + 11)
660 #define LCD_SETROTATESCREEN_ID (LCD_ID + 12)
661 #define LCD_GETROTATESCREEN_ID (LCD_ID + 13)
662 #define LCD_SETSCREENORIENTATION_ID (LCD_ID + 14)
663 #define LCD_GETSCREENORIENTATION_ID (LCD_ID + 15)
664 #define LCD_SETBACKLIGHT_OFF_ID (LCD_ID + 16)
665 #define LCD_SETBACKLIGHT_ON_ID (LCD_ID + 17)
666 #define LCD_SETFONT_ID (LCD_ID + 18)
667 #define LCD_SETDEFAULT_ID (LCD_ID + 19)
668 #define LCD_SETOFFSET_ID (LCD_ID + 20)
669 #define LCD_GETSCREENWIDTH_ID (LCD_ID + 21)
670 #define LCD_GETSCREENHEIGHT_ID (LCD_ID + 22)
671 #define LCD_SETFONTDEF_ID (LCD_ID + 23)
672 #define LCD_GETFONTDEF_ID (LCD_ID + 24)
673 #define LCD_CHANGEFONT_ID (LCD_ID + 25)
674 #define LCD_SETTRANSPARENCY_ID (LCD_ID + 26)
675 #define LCD_GETTRANSPARENCY_ID (LCD_ID + 27)
676 #define LCD_FULLSCREEN_ID (LCD_ID + 28)
679 #define LCD_SetRect_For_Cmd(a,b,c,d) ((tCircleFunc4)(Circle_API [LCD_SETRECTFORCMD_ID])) ((u32)(a),(u32)(b),(u32)(c),(u32)(d))
680 #define LCD_GetPixel(a,b) (u16)(((tCircleFunc2)(Circle_API [LCD_GETPIXEL_ID])) ((u32)(a),(u32)(b)))
681 #define LCD_DrawPixel(a,b,c) ((tCircleFunc3)(Circle_API [LCD_DRAWPIXEL_ID])) ((u32)(a),(u32)(b),(u32)(c))
682 #define LCD_SendLCDCmd(a) ((tCircleFunc1)(Circle_API [LCD_SENDLCDCMD_ID])) ((u32)(a))
683 #define LCD_SendLCDData(a) ((tCircleFunc1)(Circle_API [LCD_SENDLCDDATA_ID])) ((u32)(a))
684 #define LCD_ReadLCDData() (u32)(((tCircleFunc0)(Circle_API [LCD_READLCDDATA_ID])) ())
685 #define LCD_FillRect(a,b,c,d,e) ((tCircleFunc5)(Circle_API [LCD_FILLRECT_ID])) ((u32)(a),(u32)(b),(u32)(c),(u32)(d),(u32)(e))
686 #define LCD_DrawRect(a,b,c,d,e) ((tCircleFunc5)(Circle_API [LCD_DRAWRECT_ID])) ((u32)(a),(u32)(b),(u32)(c),(u32)(d),(u32)(e))
687 #define LCD_DisplayChar(a,b,c,d,e,f) ((tCircleFunc6)(Circle_API [LCD_DISPLAYCHAR_ID])) ((u32)(a),(u32)(b),(u32)(c),(u32)(d),(u32)(e),(mag_t)(f))
688 #define LCD_RectRead(a,b,c,d,e) ((tCircleFunc5)(Circle_API [LCD_RECTREAD_ID])) ((u32)(a),(u32)(b),(u32)(c),(u32)(d),(u32)(e))
689 #define LCD_SetBackLight(a) ((tCircleFunc1)(Circle_API [LCD_SETBACKLIGHT_ID])) ((u32)(a))
690 #define LCD_GetBackLight() (u32)(((tCircleFunc0)(Circle_API [LCD_GETBACKLIGHT_ID])) ())
691 #define LCD_SetRotateScreen(a) ((tCircleFunc1)(Circle_API [LCD_SETROTATESCREEN_ID])) ((u32)(a))
692 #define LCD_GetRotateScreen() (u32)(((tCircleFunc0)(Circle_API [LCD_GETROTATESCREEN_ID])) ())
693 #define LCD_SetScreenOrientation(a) ((tCircleFunc1)(Circle_API [LCD_SETSCREENORIENTATION_ID])) ((u32)(a))
694 #define LCD_GetScreenOrientation() (u32)(((tCircleFunc0)(Circle_API [LCD_GETSCREENORIENTATION_ID])) ())
695 #define LCD_SetBackLightOff() ((tCircleFunc0)(Circle_API [LCD_SETBACKLIGHT_OFF_ID])) ()
696 #define LCD_SetBackLightOn() ((tCircleFunc0)(Circle_API [LCD_SETBACKLIGHT_ON_ID])) ()
697 #define LCD_SetFont(a) ((tCircleFunc1)(Circle_API [LCD_SETFONT_ID])) ((u32)(a))
698 #define LCD_SetDefaultFont() ((tCircleFunc0)(Circle_API [LCD_SETDEFAULT_ID])) ()
699 #define LCD_SetOffset(a) ((tCircleFunc1)(Circle_API [LCD_SETOFFSET_ID])) ((u32)(a))
700 #define LCD_GetScreenWidth() (s16)(((tCircleFunc0)(Circle_API [LCD_GETSCREENWIDTH_ID])) ())
701 #define LCD_GetScreenHeight() (s16)(((tCircleFunc0)(Circle_API [LCD_GETSCREENHEIGHT_ID])) ())
702 #define LCD_SetFontDef(a) ((tCircleFunc1)(Circle_API [LCD_SETFONTDEF_ID])) ((u32)(a))
703 #define LCD_GetFontDef(a) (tFontDef*)((tCircleFunc0)(Circle_API [LCD_GETFONTDEF_ID])) ()
704 #define LCD_ChangeFont(a) ((tCircleFunc1)(Circle_API [LCD_CHANGEFONT_ID])) ((u8)(a))
705 #define LCD_SetTransparency(a) ((tCircleFunc1)(Circle_API [LCD_SETTRANSPARENCY_ID])) ((bool)(a))
706 #define LCD_GetTransparency() (u8)(((tCircleFunc0)(Circle_API [LCD_GETTRANSPARENCY_ID])) ())
707 #define LCD_FullScreen(a) ((tCircleFunc1)(Circle_API [LCD_FULLSCREEN_ID])) ((u8)(a))
714 #define INVERTED_TEXT 1
715 #define NORMAL_TEXT 0
716 #define ALL_SCREEN -1
731 #define DRAW_SETDEFAULTCOLOR_ID (DRAW_ID + 0)
732 #define DRAW_CLEAR_ID (DRAW_ID + 1)
733 #define DRAW_SETIMAGE_ID (DRAW_ID + 2)
734 #define DRAW_SETIMAGEBW_ID (DRAW_ID + 3)
735 #define DRAW_SETLOGOBW_ID (DRAW_ID + 4)
736 #define DRAW_DISPLAYVBAT_ID (DRAW_ID + 5)
737 #define DRAW_DISPLAYTIME_ID (DRAW_ID + 6)
738 #define DRAW_DISPLAYSTRING_ID (DRAW_ID + 7)
739 #define DRAW_DISPLAYSTRINGINVERTED_ID (DRAW_ID + 8)
740 #define DRAW_GETCHARMAGNICOEFF_ID (DRAW_ID + 9)
741 #define DRAW_SETCHARMAGNICOEFF_ID (DRAW_ID + 10)
742 #define DRAW_GETTEXTCOLOR_ID (DRAW_ID + 11)
743 #define DRAW_SETTEXTCOLOR_ID (DRAW_ID + 12)
744 #define DRAW_GETBGNDCOLOR_ID (DRAW_ID + 13)
745 #define DRAW_SETBGNDCOLOR_ID (DRAW_ID + 14)
746 #define DRAW_LINE_ID (DRAW_ID + 15)
747 #define DRAW_SETIMAGESEL_ID (DRAW_ID + 16)
748 #define DRAW_PUTC_ID (DRAW_ID + 17)
749 #define DRAW_PUTS_ID (DRAW_ID + 18)
750 #define DRAW_SETCURSOR_POS_ID (DRAW_ID + 19)
751 #define DRAW_GETCURSOR_POS_ID (DRAW_ID + 20)
752 #define DRAW_SETCURSORMARGIN_ID (DRAW_ID + 21)
753 #define DRAW_GETCURSORMARGIN_ID (DRAW_ID + 22)
754 #define DRAW_DISPLAYSTRINGMODE_ID (DRAW_ID + 23)
755 #define DRAW_DRAW_CIRCLE_ID (DRAW_ID + 24)
756 #define DRAW_DRAW_ELLIPSE_ID (DRAW_ID + 25)
757 #define DRAW_DRAW_POLYGONE_ID (DRAW_ID + 26)
758 #define DRAW_DMA2D_DIPATCH_ID (DRAW_ID + 31)
761 #define DRAW_SetDefaultColor() ((tCircleFunc0)(Circle_API [DRAW_SETDEFAULTCOLOR_ID])) ()
762 #define DRAW_Clear() ((tCircleFunc0)(Circle_API [DRAW_CLEAR_ID])) ()
763 #define DRAW_SetImage(a,b,c,d,e) ((tCircleFunc5)(Circle_API [DRAW_SETIMAGE_ID])) ((u32)(a),(u32)(b),(u32)(c),(u32)(d),(u32)(e))
764 #define DRAW_SetImageBW(a,b,c,d,e) ((tCircleFunc5)(Circle_API [DRAW_SETIMAGEBW_ID])) ((u32)(a),(u32)(b),(u32)(c),(u32)(d),(u32)(e))
765 #define DRAW_SetLogoBW() ((tCircleFunc0)(Circle_API [DRAW_SETLOGOBW_ID])) ()
766 #define DRAW_DisplayVbat(a,b) ((tCircleFunc2)(Circle_API [DRAW_DISPLAYVBAT_ID])) ((u32)(a),(u32)(b))
767 #define DRAW_DisplayTime(a,b) ((tCircleFunc2)(Circle_API [DRAW_DISPLAYTIME_ID])) ((u32)(a),(u32)(b))
768 #define DRAW_DisplayString(a,b,c,d) ((tCircleFunc4)(Circle_API [DRAW_DISPLAYSTRING_ID])) ((u32)(a),(u32)(b),(u32)(c),(u32)(d))
769 #define DRAW_DisplayStringInverted(a,b,c,d) ((tCircleFunc4)(Circle_API [DRAW_DISPLAYSTRINGINVERTED_ID])) ((u32)(a),(u32)(b),(u32)(c),(u32)(d))
770 #define DRAW_GetCharMagniCoeff() (u16)(((tCircleFunc0)(Circle_API [DRAW_GETCHARMAGNICOEFF_ID])) ())
771 #define DRAW_SetCharMagniCoeff(a) ((tCircleFunc1)(Circle_API [DRAW_SETCHARMAGNICOEFF_ID])) ((u32)(a))
772 #define DRAW_GetTextColor() (u16)(((tCircleFunc0)(Circle_API [DRAW_GETTEXTCOLOR_ID])) ())
773 #define DRAW_SetTextColor(a) ((tCircleFunc1)(Circle_API [DRAW_SETTEXTCOLOR_ID])) ((u32)(a))
774 #define DRAW_GetBGndColor() (u16)(((tCircleFunc0)(Circle_API [DRAW_GETBGNDCOLOR_ID])) ())
775 #define DRAW_SetBGndColor(a) ((tCircleFunc1)(Circle_API [DRAW_SETBGNDCOLOR_ID])) ((u32)(a))
776 #define DRAW_Line(a,b,c,d,e) ((tCircleFunc5)(Circle_API [DRAW_LINE_ID])) ((u32)(a),(u32)(b),(u32)(c),(u32)(d),(u32)(e))
777 #define DRAW_SetImageSel(a,b,c,d,e,f,g) ((tCircleFunc7)(Circle_API [DRAW_SETIMAGESEL_ID])) ((u32)(a),(u32)(b),(u32)(c),(u32)(d),(u32)(e),(u32)(f),(u32)(g))
778 #define DRAW_Putc(a) ((tCircleFunc1)(Circle_API [DRAW_PUTC_ID])) ((u32)(a))
779 #define DRAW_Puts(a) ((tCircleFunc1)(Circle_API [DRAW_PUTS_ID])) ((u32)(a))
780 #define DRAW_SetCursorPos(a,b) ((tCircleFunc2)(Circle_API [DRAW_SETCURSOR_POS_ID])) ((u32)(a),(u32)(b))
781 #define DRAW_GetCursorPos() (u16)(((tCircleFunc0)(Circle_API [DRAW_GETCURSOR_POS_ID])) ())
782 #define DRAW_SetCursorMargin(a,b,c,d) ((tCircleFunc4)(Circle_API [DRAW_SETCURSORMARGIN_ID])) ((u32)(a),(u32)(b),(u32)(c),(u32)(d))
783 #define DRAW_GetCursorMargin(a,b,c,d) ((tCircleFunc4)(Circle_API [DRAW_GETCURSORMARGIN_ID])) ((u32)(a),(u32)(b),(u32)(c),(u32)(d))
784 #define DRAW_DisplayStringWithMode(a,b,c,d,e,f) ((tCircleFunc6)(Circle_API [DRAW_DISPLAYSTRINGMODE_ID])) ((u32)(a),(u32)(b),(u32)(c),(u32)(d),(u32)(e),(u32)(f))
785 #define DRAW_Circle(a,b,c,d,e,f,g) ((tCircleFunc7)(Circle_API [DRAW_DRAW_CIRCLE_ID])) ((u32)(a),(u32)(b),(u32)(c),(u32)(d),(u32)(e),(u32)(f),(u32)(g))
786 #define DRAW_Ellipse(a,b,c,d,e,f,g,h) ((tCircleFunc8)(Circle_API [DRAW_DRAW_ELLIPSE_ID])) ((u32)(a),(u32)(b),(u32)(c),(u32)(d),(u32)(e),(u32)(f),(u32)(g),(u32)(h))
787 #define DRAW_Polygon(a,b,c) ((tCircleFunc3)(Circle_API [DRAW_DRAW_POLYGONE_ID])) ((u32)(a),(u32)(b),(u32)(c))
790 #define DRAW_DMA2D_Dispatch(a,b,c,d) (u32) ((tCircleFunc4)(Circle_API [DRAW_DMA2D_DIPATCH_ID])) ((u32)(a),(u32)(b),(u32)(c),(u32)(d))
829 #define DMA2D_ScreenInit() DRAW_DMA2D_Dispatch(CD_SCREENINIT,0,0,0)
830 #define DMA2D_Update() DRAW_DMA2D_Dispatch(CD_UPDATE,0,0,0)
831 #define DMA2D_ScreenClear(screen,del) DRAW_DMA2D_Dispatch(CD_SCREENCLEAR,(u32)screen,(u32)del,0)
832 #define DMA2D_ScreenSelect(screen,mode) DRAW_DMA2D_Dispatch(CD_SCREENSELECT,screen, mode, 0)
833 #define DMA2D_ScreenSetDirty(screen) DRAW_DMA2D_Dispatch(CD_SCREENSETDIRTY,screen,0,0)
834 #define DMA2D_ScreenRedraw(screen) DRAW_DMA2D_Dispatch(CD_SCREENREDRAW,screen,0,0)
835 #define DMA2D_ScreenCopy(dest,src) DRAW_DMA2D_Dispatch(CD_SCREENCOPY,dest,src,0)
836 #define DMA2D_ObjectCreate(width,height,rdonly) (void*)DRAW_DMA2D_Dispatch(CD_OBJECTCREATE,width,height,rdonly)
837 #define DMA2D_ObjectDelete(obj) DRAW_DMA2D_Dispatch(CD_OBJECTDELETE,obj,0,0)
838 #define DMA2D_ObjectSetToScreen(obj,screen) DRAW_DMA2D_Dispatch(CD_OBJECTSETTOSCREEN,obj,screen,0)
839 #define DMA2D_ObjectAssignBitmap(obj,pbitmap,fbitmap0constant1) DRAW_DMA2D_Dispatch(CD_OBJECTASSIGNBITMAP,obj,pbitmap,fbitmap0constant1)
840 #define DMA2D_ObjectSetPartial(obj,width,height) DRAW_DMA2D_Dispatch(CD_OBJECTSETPARTIAL,obj,width,height)
841 #define DMA2D_ObjectSetOffset(obj,x,y) DRAW_DMA2D_Dispatch(CD_OBJECTSETOFFSET,obj,x,y)
842 #define DMA2D_ObjectMove(obj,x,y) DRAW_DMA2D_Dispatch(CD_OBJECTMOVE,obj,x,y)
843 #define DMA2D_ObjectSetVisible(obj,mode) DRAW_DMA2D_Dispatch(CD_OBJECTSETVISIBLE,obj,mode,0)
844 #define DMA2D_ObjectSelect(obj) DRAW_DMA2D_Dispatch(CD_OBJECTSELECT,obj,0,0)
845 #define DMA2D_ObjectSetTransparency(obj,transp) DRAW_DMA2D_Dispatch(CD_OBJECTSETTRANSPARENCY,obj,transp,0)
846 #define DMA2D_ObjectGetPixel(obj, x, y) DRAW_DMA2D_Dispatch(CD_OBJECTGETPIXEL,obj,x,y)
847 #define DMA2D_ObjectGetIntersection(screen,obj1, obj2) DRAW_DMA2D_Dispatch(CD_OBJECTGETINTERSECTION,screen,obj1,obj2)
848 #define DMA2D_ObjectGetPos(obj, screen) DRAW_DMA2D_Dispatch(CD_OBJECTGETPOS,obj,screen,0)
849 #define DMA2D_ObjectGetSize(obj) DRAW_DMA2D_Dispatch(CD_OBJECTGETSIZE,obj,0,0)
850 #define DMA2D_ObjectFind(screen,x,y) (void*)DRAW_DMA2D_Dispatch(CD_OBJECTFIND,screen,x,y)
851 #define DMA2D_ObjectGetImage(obj) (u32*)DRAW_DMA2D_Dispatch(CD_OBJECTGETIMAGE,obj,0,0)
852 #define DMA2D_ObjectPushZ(obj, screen) DRAW_DMA2D_Dispatch(CD_OBJECTPUSHZ,obj,screen,0)
853 #define DMA2D_ObjectPopZ(obj, screen) DRAW_DMA2D_Dispatch(CD_OBJECTPOPZ,obj,screen,0)
854 #define DMA2D_ObjectSetForeground(obj, screen) DRAW_DMA2D_Dispatch(CD_OBJECTSETFOREGROUND,obj,screen,0)
855 #define DMA2D_ObjectSetBackground(obj, screen) DRAW_DMA2D_Dispatch(CD_OBJECTSETBACKGROUND,obj,screen,0)
856 #define DMA2D_SetTransform(fct_X,fct_Y) DRAW_DMA2D_Dispatch(CD_SETTRANSFORM,fct_X,fct_Y,0)
857 #define DMA2D_ObjectTransform(obj_dest,obj_src,color) DRAW_DMA2D_Dispatch(CD_OBJECTTRANSFORM,obj_dest,obj_src,color)
858 #define DMA2D_ObjectTransformReverse(obj_dest,obj_src,fct) DRAW_DMA2D_Dispatch(CD_OBJECTTRANSFORMREVERSE,obj_dest,obj_src,fct)
886 #define BUZZER_BEEP BUZZER_SHORTBEEP
889 #define BUZZER_SETMODE_ID (BUZZER_ID + 0)
890 #define BUZZER_GETMODE_ID (BUZZER_ID + 1)
891 #define BUZZER_PLAY_MUSIC_ID (BUZZER_ID + 2)
894 #define BUZZER_SetMode(a) ((tCircleFunc1)(Circle_API [BUZZER_SETMODE_ID])) ((u32)(a))
895 #define BUZZER_GetMode() (enum BUZZER_mode)(((tCircleFunc0)(Circle_API [BUZZER_GETMODE_ID])) ())
896 #define BUZZER_PlayMusic(a) ((tCircleFunc1)(Circle_API [BUZZER_PLAY_MUSIC_ID])) ((u32)(a))
905 #define REMOVE_MENU 0x01
906 #define APP_MENU 0x02
907 #define MENU_MAXITEM 8
929 unsigned fdispTitle: 1;
963 #define MENU_SET_ID (MENU_ID + 0)
964 #define MENU_REMOVE_ID (MENU_ID + 1)
965 #define MENU_QUESTION_ID (MENU_ID + 2)
966 #define MENU_PRINT_ID (MENU_ID + 3)
967 #define MENU_CLEAR_CURRENT_COMMAND_ID (MENU_ID + 4)
968 #define MENU_SET_LEVELTITLE_ID (MENU_ID + 5)
969 #define MENU_SET_TEXTCOLOR_ID (MENU_ID + 6)
970 #define MENU_GET_TEXTCOLOR_ID (MENU_ID + 7)
971 #define MENU_SET_BGNDCOLOR_ID (MENU_ID + 8)
972 #define MENU_GET_BGNDCOLOR_ID (MENU_ID + 9)
973 #define MENU_QUIT_ID (MENU_ID + 10)
974 #define MENU_SET_LEVELINI_ID (MENU_ID + 11)
975 #define MENU_CLEAR_CURRENT_MENU_ID (MENU_ID + 12)
976 #define MENU_SET_LEVEL_MGR_ID (MENU_ID + 13)
977 #define MENU_SET_APP_DIVIDER_ID (MENU_ID + 14)
978 #define MENU_RESTORE_APP_DIVIDER_ID (MENU_ID + 15)
981 #define MENU_Set(a) ((tCircleFunc1)(Circle_API [MENU_SET_ID])) ((u32)(a))
982 #define MENU_Remove() ((tCircleFunc0)(Circle_API [MENU_REMOVE_ID])) ()
983 #define MENU_Question(a,b) ((tCircleFunc2)(Circle_API [MENU_QUESTION_ID])) ((u32)(a),(u32)(b))
984 #define MENU_Print(a) ((tCircleFunc1)(Circle_API [MENU_PRINT_ID])) ((u32)(a))
985 #define MENU_ClearCurrentCommand() ((tCircleFunc0)(Circle_API [MENU_CLEAR_CURRENT_COMMAND_ID])) ()
986 #define MENU_SetLevelTitle(a) ((tCircleFunc1)(Circle_API [MENU_SET_LEVELTITLE_ID])) ((u32)(a))
987 #define MENU_SetTextColor(a) ((tCircleFunc1)(Circle_API [MENU_SET_TEXTCOLOR_ID])) ((u32)(a))
988 #define MENU_GetTextColor() (color_t)(((tCircleFunc0)(Circle_API [MENU_GET_TEXTCOLOR_ID])) ())
989 #define MENU_SetBGndColor(a) ((tCircleFunc1)(Circle_API [MENU_SET_BGNDCOLOR_ID])) ((u32)(a))
990 #define MENU_GetBGndColor() (color_t)(((tCircleFunc0)(Circle_API [MENU_GET_BGNDCOLOR_ID])) ())
991 #define MENU_Quit() (enum MENU_code)(((tCircleFunc0)(Circle_API [MENU_QUIT_ID])) ())
992 #define MENU_SetLevel_Ini() (enum MENU_code)(((tCircleFunc0)(Circle_API [MENU_SET_LEVELINI_ID])) ())
993 #define MENU_ClearCurrentMenu() ((tCircleFunc0)(Circle_API [MENU_CLEAR_CURRENT_MENU_ID])) ()
994 #define MENU_SetLevel_Mgr(a,b) (enum MENU_code)((tCircleFunc2)(Circle_API [MENU_SET_LEVEL_MGR_ID])) ((u32)(a),(u32)(b))
995 #define MENU_SetAppliDivider(a) ((tCircleFunc1)(Circle_API [MENU_SET_APP_DIVIDER_ID])) ((u32)(a))
996 #define MENU_RestoreAppliDivider() ((tCircleFunc0)(Circle_API [MENU_RESTORE_APP_DIVIDER_ID])) ()
1036 #define LED_SET_ID (LED_ID + 0)
1039 #define LED_Set(a,b) ((tCircleFunc2)(Circle_API [LED_SET_ID])) ((u32)(a),(u32)(b))
1057 #define BKP_SYS10 14
1058 #define BKP_SYS11 15
1059 #define BKP_SYS12 16
1060 #define BKP_SYS13 17
1061 #define BKP_SYS14 18
1066 #define BKP_USER4 10
1071 #define RTC_SET_TIME_ID (RTC_ID + 0)
1072 #define RTC_GET_TIME_ID (RTC_ID + 1)
1073 #define RTC_DISPLAY_TIME_ID (RTC_ID + 2)
1076 #define RTC_SetTime(a,b,c) ((tCircleFunc3)(Circle_API [RTC_SET_TIME_ID])) ((u32)(a),(u32)(b),(u32)(c))
1077 #define RTC_GetTime(a,b,c) ((tCircleFunc3)(Circle_API [RTC_GET_TIME_ID])) ((u32)(a),(u32)(b),(u32)(c))
1078 #define RTC_DisplayTime() ((tCircleFunc0)(Circle_API [RTC_DISPLAY_TIME_ID])) ()
1085 #define TOOLBAR_MAXITEMS 4
1113 #define TOOLBAR_SET_ID (TOOLBAR_ID + 0)
1114 #define TOOLBAR_SET_DEFAULT_TOOLBAR_ID (TOOLBAR_ID + 1)
1115 #define TOOLBAR_CHANGE_BUTTON_ID (TOOLBAR_ID + 2)
1118 #define TOOLBAR_Set(a) (((tCircleFunc1)(Circle_API [TOOLBAR_SET_ID])) ((u32)(a)))
1119 #define TOOLBAR_SetDefaultToolbar() ((tCircleFunc0)(Circle_API [TOOLBAR_SET_DEFAULT_TOOLBAR_ID])) ()
1120 #define TOOLBAR_ChangeButton(a,b,c) (((tCircleFunc3)(Circle_API [TOOLBAR_CHANGE_BUTTON_ID])) ((u32)(a),(u32)(b),(u32)(c) ))
1126 #define LIST_MAXITEM 64
1146 unsigned fdispTitle : 1;
1154 u32 FirstDisplayItem;
1161 #define TOUCHSCR_GET_POS_ID (TOUCHSCR_ID + 0)
1162 #define TOUCHSCR_GET_ABS_POS_ID (TOUCHSCR_ID + 1)
1163 #define TOUCHSCR_IS_PRESSED_ID (TOUCHSCR_ID + 2)
1164 #define TOUCHSCR_GET_MODE_ID (TOUCHSCR_ID + 3)
1165 #define TOUCHSCR_SET_SENS_ID (TOUCHSCR_ID + 4)
1166 #define LIST_MANAGER_ID (TOUCHSCR_ID + 5)
1167 #define LIST_SET_ID (TOUCHSCR_ID + 6)
1168 #define TOUCHSCR_GET_POSX_ID (TOUCHSCR_ID + 7)
1169 #define TOUCHSCR_GET_POSY_ID (TOUCHSCR_ID + 8)
1172 #define TOUCHSCR_GetPos() (u16) (((tCircleFunc0)(Circle_API [TOUCHSCR_GET_POS_ID])) () )
1173 #define TOUCHSCR_GetAbsPos() (u16) (((tCircleFunc0)(Circle_API [TOUCHSCR_GET_ABS_POS_ID])) () )
1174 #define TOUCHSCR_IsPressed() (bool) (((tCircleFunc0)(Circle_API [TOUCHSCR_IS_PRESSED_ID])) () )
1175 #define TOUCHSCR_GetMode() (TOUCHSCR_Mode_enum) (((tCircleFunc0)(Circle_API [TOUCHSCR_GET_MODE_ID])) () )
1176 #define TOUCHSCR_SetSensibility(a) (((tCircleFunc1)(Circle_API [TOUCHSCR_SET_SENS_ID])) ((u32)(a)) )
1177 #define LIST_Manager() (s32) (((tCircleFunc0)(Circle_API [LIST_MANAGER_ID])) () )
1178 #define LIST_Set(a,b,c,d) (((tCircleFunc4)(Circle_API [LIST_SET_ID])) ((u32)(a),(u32)(b),(u32)(c),(u32)(d)) )
1179 #define TOUCHSCR_GetPosX() (s32) (((tCircleFunc0)(Circle_API [TOUCHSCR_GET_POSX_ID])) () )
1180 #define TOUCHSCR_GetPosY() (s32) (((tCircleFunc0)(Circle_API [TOUCHSCR_GET_POSY_ID])) () )
1202 #define AUDIO_SET_MODE_ID (AUDIO_ID + 0)
1203 #define AUDIO_GET_MODE_ID (AUDIO_ID + 1)
1204 #define AUDIO_PLAY_ID (AUDIO_ID + 2)
1205 #define AUDIO_SPEAKER_ONOFF_ID (AUDIO_ID + 3)
1206 #define AUDIO_MUTE_ONOFF_ID (AUDIO_ID + 4)
1207 #define AUDIO_ISMUTE_ID (AUDIO_ID + 5)
1208 #define AUDIO_INC_VOLUME_ID (AUDIO_ID + 6)
1209 #define AUDIO_DEC_VOLUME_ID (AUDIO_ID + 7)
1210 #define AUDIO_PLAYBACK_GETSTATUS_ID (AUDIO_ID + 8)
1211 #define AUDIO_RECORD_GETSTATUS_ID (AUDIO_ID + 9)
1212 #define AUDIO_RECORD_ID (AUDIO_ID + 10)
1213 #define AUDIO_READ_REGISTER_ID (AUDIO_ID + 11)
1214 #define AUDIO_WRITE_REGISTER_ID (AUDIO_ID + 12)
1216 #define AUDIO_SET_BUFFER_SIZE_ID (AUDIO2_ID + 0)
1217 #define AUDIO_RECORD_BUFF_GETSTATUS_ID (AUDIO2_ID + 1)
1218 #define AUDIO_RECORD_STOP_ID (AUDIO2_ID + 2)
1219 #define AUDIO_PLAY_BUFF_GETSTATUS_ID (AUDIO2_ID + 3)
1220 #define AUDIO_PLAY_STOP_ID (AUDIO2_ID + 4)
1223 #define AUDIO_SetMode(a,b,c,d) (((tCircleFunc4)(Circle_API [AUDIO_SET_MODE_ID])) ((u32)(a),(u32)(b),(u32)(c),(u32)(d)))
1227 #define AUDIO_GetMode() (AUDIO_DeviceMode_enum)(((tCircleFunc0)(Circle_API [AUDIO_GET_MODE_ID])) () )
1228 #define AUDIO_Play(a,b) ((tCircleFunc2)(Circle_API[AUDIO_PLAY_ID])) ((u32) (a), (u32) (b))
1229 #define AUDIO_SPEAKER_OnOff(a) ((tCircleFunc1)(Circle_API [AUDIO_SPEAKER_ONOFF_ID])) ((u32) (a))
1230 #define AUDIO_MUTE_OnOff(a) ((tCircleFunc1)(Circle_API [AUDIO_MUTE_ONOFF_ID])) ((u32) (a))
1231 #define AUDIO_IsMute() (bool)(((tCircleFunc0)(Circle_API [AUDIO_ISMUTE_ID])) () )
1232 #define AUDIO_Inc_Volume(a) ((tCircleFunc1)(Circle_API [AUDIO_INC_VOLUME_ID])) ((u32) (a))
1233 #define AUDIO_Dec_Volume(a) ((tCircleFunc1)(Circle_API [AUDIO_DEC_VOLUME_ID])) ((u32) (a))
1234 #define AUDIO_Playback_GetStatus() (AUDIO_Playback_status_enum)(((tCircleFunc0)(Circle_API [AUDIO_PLAYBACK_GETSTATUS_ID])) () )
1235 #define AUDIO_Recording_GetStatus() (AUDIO_Recording_status_enum)(((tCircleFunc0)(Circle_API [AUDIO_RECORD_GETSTATUS_ID])) () )
1236 #define AUDIO_Record(a,b) ((tCircleFunc2)(Circle_API[AUDIO_RECORD_ID])) ((u32) (a), (u32) (b))
1237 #define AUDIO_ReadRegister(a) (u8)((tCircleFunc1)(Circle_API[AUDIO_READ_REGISTER_ID])) ((u32) (a))
1238 #define AUDIO_WriteRegister(a,b) ((tCircleFunc2)(Circle_API[AUDIO_WRITE_REGISTER_ID])) ((u32) (a), (u32) (b))
1239 #define AUDIO_RecordBuffer_GetStatus(a) (AUDIO_RecordBuffer_Status)((tCircleFunc1)(Circle_API[AUDIO_RECORD_BUFF_GETSTATUS_ID])) ((u32) (a))
1240 #define AUDIO_Record_Stop() ((tCircleFunc0)(Circle_API [AUDIO_RECORD_STOP_ID])) ()
1241 #define AUDIO_PlaybackBuffer_GetStatus(a) (AUDIO_PlaybackBuffer_Status)((tCircleFunc1)(Circle_API[AUDIO_PLAY_BUFF_GETSTATUS_ID])) ((u32) (a))
1242 #define AUDIO_Playback_Stop() ((tCircleFunc0)(Circle_API [AUDIO_PLAY_STOP_ID])) ()
1243 #define AUDIO_SetLocalBufferSize(a) ((tCircleFunc1)(Circle_API [AUDIO_SET_BUFFER_SIZE_ID])) ((u32) (a))
1258 #define SHUTDOWN_ACTION_ID (SHUTDOWN_ID + 0)
1261 #define SHUTDOWN_Action() ((tCircleFunc0)(Circle_API [SHUTDOWN_ACTION_ID])) ()
1269 #define MAX_PATH_LENGTH 200
1273 #define FS_OK 0 // no error
1274 #define FS_EOF 1 // end of file (not an error)
1275 #define FS_WRITEPROT 2 // volume is write protected
1276 #define FS_NOTFOUND 3 // path or file not found
1277 #define FS_PATHLEN 4 // path too long
1278 #define FS_ALLOCNEW 5 // must allocate new directory cluster
1279 #define FS_ERRMISC 0xffffffff // generic error
1283 #define FS_OPEN_EXISTING 0x00
1284 #define FS_READ 0x01 // read-only
1285 #define FS_WRITE 0x02 // write-only
1286 #define FS_CREATE_NEW 0x04
1287 #define FS_CREATE_ALWAYS 0x08
1288 #define FS_OPEN_ALWAYS 0x10
1292 #define FS_ATTR_READ_ONLY 0x01
1293 #define FS_ATTR_HIDDEN 0x02
1294 #define FS_ATTR_SYSTEM 0x04
1295 #define FS_ATTR_VOLUME_ID 0x08
1296 #define FS_ATTR_DIRECTORY 0x10
1297 #define FS_ATTR_ARCHIVE 0x20
1298 #define FS_ATTR_LONG_NAME (FS_ATTR_READ_ONLY | FS_ATTR_HIDDEN | FS_ATTR_SYSTEM | FS_ATTR_VOLUME_ID)
1420 #define FS_MOUNT_ID (FS_ID+0)
1421 #define FS_UNMOUNT_ID (FS_ID+1)
1422 #define FS_OPENFILE_ID (FS_ID+2)
1423 #define FS_READFILE_ID (FS_ID+3)
1424 #define FS_WRITEFILE_ID (FS_ID+4)
1425 #define FS_CLOSE_ID (FS_ID+5)
1426 #define FS_SEEK_ID (FS_ID+6)
1427 #define FS_DELETE_ID (FS_ID+7)
1428 #define FS_GET_NEXT_ENTRY_ID (FS_ID+8)
1429 #define FS_OPEN_DIRECTORY_ID (FS_ID+9)
1430 #define FS_GET_VOLUME_INFO_ID (FS_ID+10)
1431 #define FS_EXPLORER_INI_ID (FS_ID+11)
1432 #define FS_EXPLORER_ID (FS_ID+12)
1433 #define FS_GET_SD_CURRENT_PATH_ID (FS_ID+13)
1434 #define FS_GET_SD_VOLINFO_ID (FS_ID+14)
1435 #define FS_GET_PATH_FILTER_ID (FS_ID+15)
1436 #define FS_SET_PATH_FILTER_ID (FS_ID+16)
1437 #define FS_TELL_ID (FS_ID+17)
1438 #define FS_GETS_ID (FS_ID+18)
1439 #define FS_FILE_COPY_ID (FS_ID+19)
1440 #define FS_FILE_CMP_ID (FS_ID+20)
1441 #define FS_SIZE_ID (FS_ID+21)
1442 #define FS_EOF_ID (FS_ID+22)
1446 #define FS_Mount(a) (u32)((tCircleFunc1)(Circle_API [FS_MOUNT_ID])) ((u32) (a))
1447 #define FS_Unmount(a) (u32)((tCircleFunc1)(Circle_API [FS_UNMOUNT_ID])) ((u32) (a))
1448 #define FS_OpenFile(a,b,c,d) (u32)(((tCircleFunc4)(Circle_API [FS_OPENFILE_ID])) ((u32)(a),(u32)(b),(u32)(c),(u32)(d)) )
1449 #define FS_ReadFile(a,b,c,d) (u32)(((tCircleFunc4)(Circle_API [FS_READFILE_ID])) ((u32)(a),(u32)(b),(u32)(c),(u32)(d)) )
1450 #define FS_WriteFile(a,b,c,d) (u32)(((tCircleFunc4)(Circle_API [FS_WRITEFILE_ID])) ((u32)(a),(u32)(b),(u32)(c),(u32)(d)) )
1451 #define FS_Close(a) (u32)((tCircleFunc1)(Circle_API [FS_CLOSE_ID])) ((u32) (a))
1452 #define FS_Seek(a,b) ((tCircleFunc2)(Circle_API [FS_SEEK_ID])) ((u32) (a), (u32) (b))
1453 #define FS_Delete(a,b) (u32)((tCircleFunc2)(Circle_API [FS_DELETE_ID])) ((u32) (a), (u32) (b))
1454 #define FS_GetNextEntry(a,b,c) (u32)(((tCircleFunc3)(Circle_API [FS_GET_NEXT_ENTRY_ID])) ((u32)(a),(u32)(b),(u32)(c) ))
1455 #define FS_OpenDirectory(a,b,c) (u32)(((tCircleFunc3)(Circle_API [FS_OPEN_DIRECTORY_ID])) ((u32)(a),(u32)(b),(u32)(c) ))
1456 #define FS_GetVolumeInfo(a,b,c) (u32)(((tCircleFunc3)(Circle_API [FS_GET_VOLUME_INFO_ID])) ((u32)(a),(u32)(b),(u32)(c) ))
1457 #define FS_Explorer_Ini() (u32)(((tCircleFunc0)(Circle_API [FS_EXPLORER_INI_ID])) () )
1458 #define FS_Explorer() (u32)(((tCircleFunc0)(Circle_API [FS_EXPLORER_ID])) () )
1459 #define FS_GetSDCardCurrentPath() (u32)(((tCircleFunc0)(Circle_API [FS_GET_SD_CURRENT_PATH_ID])) () )
1460 #define FS_GetSDCardVolInfo() (u32)(((tCircleFunc0)(Circle_API [FS_GET_SD_VOLINFO_ID])) () )
1461 #define FS_GetPathFilter() (u32)(((tCircleFunc0)(Circle_API [FS_GET_PATH_FILTER_ID])) () )
1462 #define FS_SetPathFilter(a) ((tCircleFunc1)(Circle_API [FS_SET_PATH_FILTER_ID])) ((u32) (a))
1463 #define FS_Tell(a) (u32) ((tCircleFunc1)(Circle_API [FS_TELL_ID])) ((u32) (a))
1464 #define FS_Gets(a,b,c) (u32)(((tCircleFunc3)(Circle_API [FS_GETS_ID])) ((u32)(a),(u32)(b),(u32)(c) ))
1465 #define FS_FileCopy(a,b) (u32) ((tCircleFunc2)(Circle_API [FS_FILE_COPY_ID])) ((u32) (a), (u32) (b))
1466 #define FS_FileCmp(a,b) (u32) ((tCircleFunc2)(Circle_API [FS_FILE_CMP_ID])) ((u32) (a), (u32) (b))
1467 #define FS_Size(a) (u32) ((tCircleFunc1)(Circle_API [FS_SIZE_ID])) ((u32) (a))
1468 #define FS_Eof(a) (u32) ((tCircleFunc1)(Circle_API [FS_EOF_ID])) ((u32) (a))
1474 typedef void ( *
tAppPtrMgr )( coord_t sposX, coord_t sposY );