diff options
author | inmarket <andrewh@inmarket.com.au> | 2015-10-23 18:28:42 +1000 |
---|---|---|
committer | inmarket <andrewh@inmarket.com.au> | 2015-10-23 18:28:42 +1000 |
commit | 00aeab86eb311f57d026931499ae5935c00857b1 (patch) | |
tree | 44fe653eabd0362e2f97fbafdbdf96ffb4de08d2 /src | |
parent | 29251f33bd106cfdc317fa00c10ecfb3a64fcc2d (diff) | |
parent | 48a9d334b7a5b462b32c17a5fde07159deb4c280 (diff) | |
download | uGFX-00aeab86eb311f57d026931499ae5935c00857b1.tar.gz uGFX-00aeab86eb311f57d026931499ae5935c00857b1.tar.bz2 uGFX-00aeab86eb311f57d026931499ae5935c00857b1.zip |
Merge branch 'master' into Keil
Diffstat (limited to 'src')
-rw-r--r-- | src/gdisp/gdisp.c | 8 | ||||
-rw-r--r-- | src/ginput/ginput_mouse.c | 8 | ||||
-rw-r--r-- | src/gos/gos.h | 6 | ||||
-rw-r--r-- | src/gos/gos_freertos.h | 1 | ||||
-rw-r--r-- | src/gos/gos_osx.h | 2 | ||||
-rw-r--r-- | src/gtimer/gtimer.c | 4 |
6 files changed, 12 insertions, 17 deletions
diff --git a/src/gdisp/gdisp.c b/src/gdisp/gdisp.c index 27b52e92..ffede502 100644 --- a/src/gdisp/gdisp.c +++ b/src/gdisp/gdisp.c @@ -69,7 +69,7 @@ GDisplay *GDISP; /*==========================================================================*/ #if GDISP_HARDWARE_STREAM_POS && GDISP_HARDWARE_STREAM_WRITE - static INLINE void setglobalwindow(GDisplay *g) { + static GFXINLINE void setglobalwindow(GDisplay *g) { coord_t x, y; x = g->p.x; y = g->p.y; g->p.x = g->p.y = 0; @@ -105,7 +105,7 @@ GDisplay *GDISP; // Parameters: x,y // Alters: cx, cy (if using streaming) // Does not clip -static INLINE void drawpixel(GDisplay *g) { +static GFXINLINE void drawpixel(GDisplay *g) { // Best is hardware accelerated pixel draw #if GDISP_HARDWARE_DRAWPIXEL @@ -152,7 +152,7 @@ static INLINE void drawpixel(GDisplay *g) { // Parameters: x,y // Alters: cx, cy (if using streaming) #if NEED_CLIPPING - static INLINE void drawpixel_clip(GDisplay *g) { + static GFXINLINE void drawpixel_clip(GDisplay *g) { #if GDISP_HARDWARE_CLIP == HARDWARE_AUTODETECT if (!gvmt(g)->setclip) #endif @@ -171,7 +171,7 @@ static INLINE void drawpixel(GDisplay *g) { // Alters: nothing // Note: This is not clipped // Resets the streaming area if GDISP_HARDWARE_STREAM_WRITE and GDISP_HARDWARE_STREAM_POS is set. -static INLINE void fillarea(GDisplay *g) { +static GFXINLINE void fillarea(GDisplay *g) { // Best is hardware accelerated area fill #if GDISP_HARDWARE_FILLS diff --git a/src/ginput/ginput_mouse.c b/src/ginput/ginput_mouse.c index 83cd7db4..275b9ba4 100644 --- a/src/ginput/ginput_mouse.c +++ b/src/ginput/ginput_mouse.c @@ -55,7 +55,7 @@ static GTIMER_DECL(MouseTimer); #if !GINPUT_TOUCH_NOCALIBRATE #include <string.h> // Required for memcpy - static INLINE void CalibrationTransform(GMouseReading *pt, const GMouseCalibration *c) { + static GFXINLINE void CalibrationTransform(GMouseReading *pt, const GMouseCalibration *c) { pt->x = (coord_t) (c->ax * pt->x + c->bx * pt->y + c->cx); pt->y = (coord_t) (c->ay * pt->x + c->by * pt->y + c->cy); } @@ -330,7 +330,7 @@ static void MousePoll(void *param) { #error "GINPUT: GFX_USE_GDISP must be defined when calibration is required" #endif - static INLINE void CalibrationCrossDraw(GMouse *m, const point *pp) { + static GFXINLINE void CalibrationCrossDraw(GMouse *m, const point *pp) { gdispGDrawLine(m->display, pp->x-CALIBRATION_CROSS_RADIUS, pp->y, pp->x-CALIBRATION_CROSS_INNERGAP, pp->y, CALIBRATION_CROSS_COLOR1); gdispGDrawLine(m->display, pp->x+CALIBRATION_CROSS_INNERGAP, pp->y, pp->x+CALIBRATION_CROSS_RADIUS, pp->y, CALIBRATION_CROSS_COLOR1); gdispGDrawLine(m->display, pp->x, pp->y-CALIBRATION_CROSS_RADIUS, pp->x, pp->y-CALIBRATION_CROSS_INNERGAP, CALIBRATION_CROSS_COLOR1); @@ -345,11 +345,11 @@ static void MousePoll(void *param) { gdispGDrawLine(m->display, pp->x+CALIBRATION_CROSS_RADIUS, pp->y-CALIBRATION_CROSS_RADIUS, pp->x+CALIBRATION_CROSS_RADIUS, pp->y-CALIBRATION_CROSS_RADIUS/2, CALIBRATION_CROSS_COLOR2); } - static INLINE void CalibrationCrossClear(GMouse *m, const point *pp) { + static GFXINLINE void CalibrationCrossClear(GMouse *m, const point *pp) { gdispGFillArea(m->display, pp->x - CALIBRATION_CROSS_RADIUS, pp->y - CALIBRATION_CROSS_RADIUS, CALIBRATION_CROSS_RADIUS*2+1, CALIBRATION_CROSS_RADIUS*2+1, CALIBRATION_BACKGROUND); } - static INLINE void CalibrationCalculate(GMouse *m, const point *cross, const point *points) { + static GFXINLINE void CalibrationCalculate(GMouse *m, const point *cross, const point *points) { float dx; coord_t c0, c1, c2; (void) m; diff --git a/src/gos/gos.h b/src/gos/gos.h index af9486f8..048d5765 100644 --- a/src/gos/gos.h +++ b/src/gos/gos.h @@ -77,7 +77,7 @@ * * @param[in] reval The value which should be returned */ - #define THREAD_RETURN(retval); + #define THREAD_RETURN(retval) return retval /** * @name Various platform (and operating system) constants @@ -474,10 +474,6 @@ #include "src/gos/gos_ecos.h" #elif GFX_USE_OS_ARDUINO #include "src/gos/gos_arduino.h" -#elif GFX_USE_OS_CMSIS - #include "src/gos/gos_cmsis.h" -#elif GFX_USE_OS_KEIL - #include "src/gos/gos_keil.h" #else #error "Your operating system is not supported yet" #endif diff --git a/src/gos/gos_freertos.h b/src/gos/gos_freertos.h index 574e13ae..9b3d1023 100644 --- a/src/gos/gos_freertos.h +++ b/src/gos/gos_freertos.h @@ -63,6 +63,7 @@ typedef portBASE_TYPE threadpriority_t; #define DECLARE_THREAD_STACK(name, sz) size_t *name = (size_t *)sz #define DECLARE_THREAD_FUNCTION(fnName, param) threadreturn_t fnName(void *param) #define THREAD_RETURN(retval) + portTickType MS2ST(portTickType ms); typedef struct { diff --git a/src/gos/gos_osx.h b/src/gos/gos_osx.h index e5764b81..44853937 100644 --- a/src/gos/gos_osx.h +++ b/src/gos/gos_osx.h @@ -27,7 +27,7 @@ typedef pthread_mutex_t gfxMutex; #define DECLARE_THREAD_FUNCTION(fnName, param) threadreturn_t fnName(void *param) #define DECLARE_THREAD_STACK(name, sz) uint8_t name[0]; -#define THREAD_RETURN(retval) return reval +#define THREAD_RETURN(retval) return retval #define gfxExit() exit(0) #define gfxAlloc(sz) malloc(sz) diff --git a/src/gtimer/gtimer.c b/src/gtimer/gtimer.c index e22c3484..1759ce4d 100644 --- a/src/gtimer/gtimer.c +++ b/src/gtimer/gtimer.c @@ -35,8 +35,7 @@ static DECLARE_THREAD_FUNCTION(GTimerThreadHandler, arg) { systemticks_t lastTime; GTimerFunction fn; void *param; - - (void)arg; + (void) arg; nxtTimeout = TIME_INFINITE; lastTime = 0; @@ -109,7 +108,6 @@ static DECLARE_THREAD_FUNCTION(GTimerThreadHandler, arg) { lastTime = tm; gfxMutexExit(&mutex); } - THREAD_RETURN(0); } |