WebRadioApp  0.1
ewmain.h
Go to the documentation of this file.
1 
66 #ifndef EWMAIN_H
67 #define EWMAIN_H
68 
69 #if defined __ICCARM__
70 #define TOOLCHAIN_STRING "IAR Embedded Workbench"
71 #define COMPILER_VERSION_STRING EW_STRINGIZE(__VER__)
72 #elif defined __CC_ARM || (__ARMCC_VERSION >= 6000000)
73 #define TOOLCHAIN_STRING "Keil MDK"
74 #define COMPILER_VERSION_STRING EW_STRINGIZE(__ARMCC_VERSION)
75 #elif defined __GNUC__
76 #define TOOLCHAIN_STRING "GCC"
77 #define COMPILER_VERSION_STRING \
78  EW_STRINGIZE(__GNUC__) \
79  "." EW_STRINGIZE(__GNUC_MINOR__) "." EW_STRINGIZE(__GNUC_PATCHLEVEL__)
80 #else
81 #define TOOLCHAIN_STRING "unknown"
82 #endif
83 
84 #ifdef EW_DONT_USE_PATH_FUNCTIONS
85 #define VECTOR_GRAPHICS_SUPPORT_STRING "disabled"
86 #else
87 #define VECTOR_GRAPHICS_SUPPORT_STRING "enabled"
88 #endif
89 
90 #ifdef EW_DONT_USE_WARP_FUNCTIONS
91 #define WARP_FUNCTION_SUPPORT_STRING "disabled"
92 #else
93 #define WARP_FUNCTION_SUPPORT_STRING "enabled"
94 #endif
95 
96 #ifdef EW_DONT_USE_INDEX8_SURFACES
97 #define INDEX8_SURFACE_SUPPORT_STRING "disabled"
98 #else
99 #define INDEX8_SURFACE_SUPPORT_STRING "enabled"
100 #endif
101 
102 #ifdef EW_DONT_USE_RGB565_SURFACES
103 #define RGB565_SURFACE_SUPPORT_STRING "disabled"
104 #else
105 #define RGB565_SURFACE_SUPPORT_STRING "enabled"
106 #endif
107 
108 #ifdef EW_DONT_USE_BIDI_FUNCTIONS
109 #define BIDI_TEXT_SUPPORT_STRING "disabled"
110 #else
111 #define BIDI_TEXT_SUPPORT_STRING "enabled"
112 #endif
113 
114 #if EW_USE_GRAPHICS_ACCELERATOR == 1
115 #define GRAPHICS_ACCELERATOR_STRING "DMA2D"
116 #else
117 #define GRAPHICS_ACCELERATOR_STRING "none"
118 #endif
119 
120 #if (EW_USE_FREE_RTOS == 1)
121 #define OPERATING_SYSTEM_STRING "FreeRTOS"
122 #else
123 #define OPERATING_SYSTEM_STRING "none"
124 #endif
125 
126 #if (EW_USE_EXTERNAL_FLASH == 1)
127 #define EXTERNAL_FLASH_STRING "QSPI Flash"
128 #else
129 #define EXTERNAL_FLASH_STRING "none"
130 #endif
131 
132 #ifdef __cplusplus
133 extern "C" {
134 #endif
135 
136 int EwInit(void);
137 void EwDone(void);
138 int EwProcess(void);
139 void EwPrintSystemInfo(void);
140 
141 #ifdef __cplusplus
142 }
143 #endif
144 
145 #endif
146 
147 /* msy, mli */
148 
XTouchEvent::YPos
int YPos
Definition: ew_bsp_touch.h:90
CoreKeyCodeUp
@ CoreKeyCodeUp
Definition: Core.h:187
EwBspTouchDone
void EwBspTouchDone(void)
Terminates the touch driver.
Definition: ew_bsp_touch.c:114
XDisplayInfo::DisplayWidth
int DisplayWidth
Definition: ew_bsp_display.h:112
Core.h
EwGetKeyCommand
static XEnum EwGetKeyCommand(void)
The function EwGetKeyCommand reads the next key code from the console and translates it into an Embed...
Definition: ewmain.c:392
RootObject
static CoreRoot RootObject
Definition: ewmain.c:109
ew_bsp_event.h
CoreKeyCodeDown
@ CoreKeyCodeDown
Definition: Core.h:188
BIDI_TEXT_SUPPORT_STRING
#define BIDI_TEXT_SUPPORT_STRING
Definition: ewmain.h:111
EwBeginUpdateArea
XBitmap * EwBeginUpdateArea(XViewport *aViewport, XRect aArea)
EwBspClockSetTime
void EwBspClockSetTime(unsigned long aTime)
Sets the given time in seconds since 01.01.1970 at real time clock (RTC).
Definition: ew_bsp_clock.c:303
EwNewObject
#define EwNewObject(aClass, aArg)
Definition: ewrte.h:1142
EwBspEventWait
void EwBspEventWait(int aTimeout)
The function EwBspEventWait should be called from the Embedded Wizard main loop in case there are no ...
Definition: ew_bsp_event.c:62
CoreKeyCodePower
@ CoreKeyCodePower
Definition: Core.h:263
PLATFORM_STRING
#define PLATFORM_STRING
Definition: ewconfig.h:56
Viewport
static XViewport * Viewport
Definition: ewmain.c:110
GRAPHICS_ACCELERATOR_STRING
#define GRAPHICS_ACCELERATOR_STRING
Definition: ewmain.h:117
EW_BSP_DISPLAY_UPDATE_SCRATCHPAD
#define EW_BSP_DISPLAY_UPDATE_SCRATCHPAD
Definition: ew_bsp_display.h:58
XHandle
unsigned long XHandle
Definition: ewrte.h:291
CoreKeyCodeLeft
@ CoreKeyCodeLeft
Definition: Core.h:189
EwScreenSize
const XPoint EwScreenSize
Definition: Core.c:145
EwDoneGraphicsEngine
void EwDoneGraphicsEngine(void)
XDisplayInfo
Definition: ew_bsp_display.h:84
XDisplayInfo::UpdateMode
int UpdateMode
Definition: ew_bsp_display.h:114
DeviceDriver_ProcessData
int DeviceDriver_ProcessData(void)
The function DeviceDriver_ProcessData() is called from the main UI loop, in order to process data and...
Definition: DeviceDriver.cpp:253
EW_MEMORY_POOL_SIZE
#define EW_MEMORY_POOL_SIZE
Definition: ewconfig.h:184
WARP_FUNCTION_SUPPORT_STRING
#define WARP_FUNCTION_SUPPORT_STRING
Definition: ewmain.h:93
XPoint::Y
XInt32 Y
Definition: ewrte.h:1632
ew_bsp_touch.h
EwDoneViewport
void EwDoneViewport(XViewport *aViewport)
EwBspClockInit
void EwBspClockInit(void)
Initialises the system clock and the real time clock.
Definition: ew_bsp_clock.c:200
EwNewObjectIndirect
XObject EwNewObjectIndirect(const void *aClass, XHandle aArg)
TOOLCHAIN_STRING
#define TOOLCHAIN_STRING
Definition: ewmain.h:81
EW_MAX_SURFACE_CACHE_SIZE
#define EW_MAX_SURFACE_CACHE_SIZE
Definition: ewgfxdefs.h:89
EwBspDisplayGetUpdateArea
int EwBspDisplayGetUpdateArea(XRect *aUpdateRect)
The function EwBspDisplayGetUpdateArea returns the next update area depending on the selected display...
Definition: ew_bsp_display.c:604
EW_BSP_TOUCH_DOWN
#define EW_BSP_TOUCH_DOWN
Definition: ew_bsp_touch.h:50
CoreRoot__DriveKeyboardHitting
XBool CoreRoot__DriveKeyboardHitting(void *_this, XEnum aCode, XChar aCharCode, XBool aDown)
Definition: Core.c:4450
EwBspTouchGetEvents
int EwBspTouchGetEvents(XTouchEvent **aTouchEvent)
The function EwBspTouchGetEvents reads the current touch positions from the touch driver and returns ...
Definition: ew_bsp_touch.c:129
CHECK_HANDLE
#define CHECK_HANDLE(handle)
Definition: ewmain.c:92
EW_MAX_GLYPH_SURFACE_HEIGHT
#define EW_MAX_GLYPH_SURFACE_HEIGHT
Definition: ewgfxdefs.h:189
XTouchEvent
Definition: ew_bsp_touch.h:74
CoreKeyCodeMenu
@ CoreKeyCodeMenu
Definition: Core.h:186
ewmain.h
This file implements a generic framework for running Embedded Wizard generated GUI applications on a ...
EwBspConsoleGetCharacter
unsigned char EwBspConsoleGetCharacter(void)
The function EwBspConsoleGetCharacter returns the current character from the console interface....
Definition: ew_bsp_console.c:184
EW_EXTRA_POOL_SIZE
#define EW_EXTRA_POOL_SIZE
Definition: ewconfig.h:189
EW_MEMORY_POOL_ADDR
#define EW_MEMORY_POOL_ADDR
Definition: ewconfig.h:182
CoreRoot__UpdateCanvas
XRect CoreRoot__UpdateCanvas(void *_this, GraphicsCanvas aCanvas, XPoint aOffset)
Definition: Core.c:4123
EwNewRect
XRect EwNewRect(XInt32 aX1, XInt32 aY1, XInt32 aX2, XInt32 aY2)
DeviceDriver_Initialize
void DeviceDriver_Initialize(void)
The function DeviceDriver_Initialize() initializes the module and prepares all necessary things to ac...
Definition: DeviceDriver.cpp:168
EwProcessTimers
int EwProcessTimers(void)
XEnum
unsigned long XEnum
Definition: ewrte.h:1593
EwDoneHeap
void EwDoneHeap(void)
EW_RTE_VERSION
#define EW_RTE_VERSION
Definition: ewrte.h:38
EW_GFX_VERSION
#define EW_GFX_VERSION
Definition: ewgfx.h:157
XRect
Definition: ewrte.h:1639
EwPrint
void EwPrint(const char *aFormat,...)
CoreKeyCodeNoKey
@ CoreKeyCodeNoKey
Definition: Core.h:183
EwDone
void EwDone(void)
EwDone() is responsible to shutdown the application and to release all used resources.
Definition: ewmain.c:188
ew_bsp_clock.h
ew_bsp_display.h
CoreRoot__UpdateGE20
XRect CoreRoot__UpdateGE20(void *_this, GraphicsCanvas aCanvas)
Definition: Core.c:4056
VECTOR_GRAPHICS_SUPPORT_STRING
#define VECTOR_GRAPHICS_SUPPORT_STRING
Definition: ewmain.h:87
EwApplicationClass
const XClass EwApplicationClass
Definition: Core.c:148
DeviceDriver_Deinitialize
void DeviceDriver_Deinitialize(void)
The function DeviceDriver_Deinitialize() deinitializes the module and finalizes the access or communi...
Definition: DeviceDriver.cpp:218
EW_BSP_TOUCH_MOVE
#define EW_BSP_TOUCH_MOVE
Definition: ew_bsp_touch.h:54
EwBeginUpdate
XBitmap * EwBeginUpdate(XViewport *aViewport)
EwBspDisplayInit
int EwBspDisplayInit(XDisplayInfo *aDisplayInfo)
The function EwBspDisplayInit initializes the display hardware and returns the display parameter.
Definition: ew_bsp_display.c:331
CoreRoot__EndUpdate
void CoreRoot__EndUpdate(void *_this)
Definition: Core.c:4076
XTouchEvent::Finger
int Finger
Definition: ew_bsp_touch.h:91
EwInitViewport
XViewport * EwInitViewport(XPoint aSize, XRect aExtent, XInt32 aOrient, XInt32 aOpacity, void *aDisplay1, void *aDisplay2, void *aDisplay3, XViewportProc aProc)
EwProcessSignals
int EwProcessSignals(void)
EW_EXTRA_POOL_ADDR
#define EW_EXTRA_POOL_ADDR
Definition: ewconfig.h:188
CoreRoot__DriveMultiTouchHitting
XBool CoreRoot__DriveMultiTouchHitting(void *_this, XBool aDown, XInt32 aFinger, XPoint aPos)
Definition: Core.c:4753
EwDumpHeap
void EwDumpHeap(int aDetailed)
CoreRoot__DoesNeedUpdate
XBool CoreRoot__DoesNeedUpdate(void *_this)
Definition: Core.c:4265
DeviceDriver.h
This file implements an interface between an Embedded Wizard generated UI application and a certain d...
EwReclaimMemory
int EwReclaimMemory(void)
CoreRoot__BeginUpdate
XInt32 CoreRoot__BeginUpdate(void *_this)
Definition: Core.c:4240
EwNextTimerExpiration
int EwNextTimerExpiration(void)
OPERATING_SYSTEM_STRING
#define OPERATING_SYSTEM_STRING
Definition: ewmain.h:123
EW_MAX_ISSUE_TASKS
#define EW_MAX_ISSUE_TASKS
Definition: ewgfxdefs.h:226
EW_STRINGIZE
#define EW_STRINGIZE(aArg)
Definition: ewdef.h:75
EwEndUpdate
void EwEndUpdate(XViewport *aViewport, XRect aArea)
EwBspTouchInit
void EwBspTouchInit(int aWidth, int aHeight)
Initializes the touch driver.
Definition: ew_bsp_touch.c:79
EwAddHeapMemoryPool
void EwAddHeapMemoryPool(void *aAddress, long aSize)
CoreKeyCodeRight
@ CoreKeyCodeRight
Definition: Core.h:190
EW_BSP_TOUCH_UP
#define EW_BSP_TOUCH_UP
Definition: ew_bsp_touch.h:57
Graphics.h
EwBspDisplayDone
void EwBspDisplayDone(void)
The function EwBspDisplayDone deinitializes the display hardware.
Definition: ew_bsp_display.c:586
RGB565_SURFACE_SUPPORT_STRING
#define RGB565_SURFACE_SUPPORT_STRING
Definition: ewmain.h:105
EwBspClockGetTime
unsigned long EwBspClockGetTime(void)
Returns the current time in seconds since 01.01.1970.
Definition: ew_bsp_clock.c:257
EwInitGraphicsEngine
int EwInitGraphicsEngine(void *aArgs)
CoreRoot__GetUpdateRegion
XRect CoreRoot__GetUpdateRegion(void *_this, XInt32 aRegionNo)
Definition: Core.c:4158
CoreKeyCodeExit
@ CoreKeyCodeExit
Definition: Core.h:185
RTC_MINIMUM_TIME
#define RTC_MINIMUM_TIME
Definition: ewconfig.h:66
XDisplayInfo::FrameBuffer
void * FrameBuffer
Definition: ew_bsp_display.h:108
CoreRoot__Initialize
CoreRoot CoreRoot__Initialize(void *_this, XPoint aSize)
Definition: Core.c:4289
CoreRoot__DriveMultiTouchMovement
XBool CoreRoot__DriveMultiTouchMovement(void *_this, XInt32 aFinger, XPoint aPos)
Definition: Core.c:4555
EwUpdate
static void EwUpdate(XViewport *aViewport, CoreRoot aApplication)
The function EwUpdate performs the screen update of the dirty area.
Definition: ewmain.c:336
XTouchEvent::XPos
int XPos
Definition: ew_bsp_touch.h:89
XRect::Point1
XPoint Point1
Definition: ewrte.h:1657
XPoint
Definition: ewrte.h:1616
EW_SURFACE_ROTATION
#define EW_SURFACE_ROTATION
Definition: ewgfxdefs.h:76
GraphicsCanvas__DetachBitmap
GraphicsCanvas GraphicsCanvas__DetachBitmap(void *_this)
Definition: Graphics.c:217
XPoint::X
XInt32 X
Definition: ewrte.h:1631
GraphicsCanvas__AttachBitmap
GraphicsCanvas GraphicsCanvas__AttachBitmap(void *_this, XHandle aBitmap)
Definition: Graphics.c:262
ewconfig.h
This file contains general configuration settings for the target system, like memory ranges and displ...
EW_BSP_DISPLAY_UPDATE_NORMAL
#define EW_BSP_DISPLAY_UPDATE_NORMAL
Definition: ew_bsp_display.h:49
RTC_DEFAULT_TIME
#define RTC_DEFAULT_TIME
Definition: ewconfig.h:67
EwPrintSystemInfo
void EwPrintSystemInfo(void)
This function prints system and configuration information - very helpful in case of any support issue...
Definition: ewmain.c:431
EwInit
int EwInit(void)
EwInit() is responsible to initialize the system, to configure the display, to get access to the desi...
Definition: ewmain.c:124
DisplayInfo
static XDisplayInfo DisplayInfo
Definition: ewmain.c:111
XDisplayInfo::BufferHeight
int BufferHeight
Definition: ew_bsp_display.h:111
XDisplayInfo::DisplayHeight
int DisplayHeight
Definition: ew_bsp_display.h:113
INDEX8_SURFACE_SUPPORT_STRING
#define INDEX8_SURFACE_SUPPORT_STRING
Definition: ewmain.h:99
XDisplayInfo::BufferWidth
int BufferWidth
Definition: ew_bsp_display.h:110
EW_MAX_GLYPH_SURFACE_WIDTH
#define EW_MAX_GLYPH_SURFACE_WIDTH
Definition: ewgfxdefs.h:185
EwUnlockObject
void EwUnlockObject(register XObject aObject)
EwInitHeap
int EwInitHeap(int aLargeObjectSize)
EXTERNAL_FLASH_STRING
#define EXTERNAL_FLASH_STRING
Definition: ewmain.h:129
EwPrintProfilerStatistic
void EwPrintProfilerStatistic(int aDetailed)
XViewport
Definition: ewgfx.h:547
CoreKeyCodeOk
@ CoreKeyCodeOk
Definition: Core.h:184
EwVerifyHeap
int EwVerifyHeap(void)
EwLockObject
void EwLockObject(register XObject aObject)
XBitmap
Definition: ewgfx.h:344
EwProcess
int EwProcess(void)
EwProcess() implements one cycle of the main loop. This function has to be called in an (endless) loo...
Definition: ewmain.c:237
XDisplayInfo::DoubleBuffer
void * DoubleBuffer
Definition: ew_bsp_display.h:109