diff options
author | inmarket <andrewh@inmarket.com.au> | 2018-07-08 10:54:19 +1000 |
---|---|---|
committer | inmarket <andrewh@inmarket.com.au> | 2018-07-08 10:54:19 +1000 |
commit | 2ab2d77fcba42467b62f2be732cb8dc00510fe19 (patch) | |
tree | 8dbd616faa116a2946ad47c62c20d4a34fb749b2 /demos/modules/gadc | |
parent | 7e95acb7310d83284288a6e89a6b3fe4bf4e8668 (diff) | |
download | uGFX-2ab2d77fcba42467b62f2be732cb8dc00510fe19.tar.gz uGFX-2ab2d77fcba42467b62f2be732cb8dc00510fe19.tar.bz2 uGFX-2ab2d77fcba42467b62f2be732cb8dc00510fe19.zip |
Change coord_t to gCoord
Diffstat (limited to 'demos/modules/gadc')
-rw-r--r-- | demos/modules/gadc/gwinosc.c | 12 | ||||
-rw-r--r-- | demos/modules/gadc/gwinosc.h | 10 | ||||
-rw-r--r-- | demos/modules/gadc/main.c | 2 |
3 files changed, 12 insertions, 12 deletions
diff --git a/demos/modules/gadc/gwinosc.c b/demos/modules/gadc/gwinosc.c index e82cd7d8..4f89a262 100644 --- a/demos/modules/gadc/gwinosc.c +++ b/demos/modules/gadc/gwinosc.c @@ -62,7 +62,7 @@ GHandle gwinGScopeCreate(GDisplay *g, GScopeObject *gs, GWindowInit *pInit, uint if (!(gs = (GScopeObject *)_gwindowCreate(g, &gs->g, pInit, &scopeVMT, 0))) return 0; gs->nextx = 0; - if (!(gs->lastscopetrace = gfxAlloc(gs->g.width * sizeof(coord_t)))) + if (!(gs->lastscopetrace = gfxAlloc(gs->g.width * sizeof(gCoord)))) return 0; #if TRIGGER_METHOD == TRIGGER_POSITIVERAMP gs->lasty = gs->g.height/2; @@ -82,10 +82,10 @@ GHandle gwinGScopeCreate(GDisplay *g, GScopeObject *gs, GWindowInit *pInit, uint void gwinScopeWaitForTrace(GHandle gh) { #define gs ((GScopeObject *)(gh)) int i; - coord_t x, y; - coord_t yoffset; + gCoord x, y; + gCoord yoffset; adcsample_t *pa; - coord_t *pc; + gCoord *pc; GDataBuffer *pd; uint8_t shr; #if TRIGGER_METHOD == TRIGGER_POSITIVERAMP @@ -94,7 +94,7 @@ void gwinScopeWaitForTrace(GHandle gh) { #elif TRIGGER_METHOD == TRIGGER_MINVALUE gBool rdytrigger; int flsamples; - coord_t scopemin; + gCoord scopemin; #endif if (gh->vmt != &scopeVMT) @@ -127,7 +127,7 @@ void gwinScopeWaitForTrace(GHandle gh) { for(i = pd->len/sizeof(adcsample_t); i; i--) { /* Calculate the new scope value - re-scale using simple shifts for efficiency, re-center and y-invert */ - y = yoffset - (((coord_t)(*pa++) << shr) >> (16-SCOPE_Y_BITS)); + y = yoffset - (((gCoord)(*pa++) << shr) >> (16-SCOPE_Y_BITS)); #if TRIGGER_METHOD == TRIGGER_MINVALUE /* Calculate the scopemin ready for the next trace */ diff --git a/demos/modules/gadc/gwinosc.h b/demos/modules/gadc/gwinosc.h index 0c687a4f..15ef2f3a 100644 --- a/demos/modules/gadc/gwinosc.h +++ b/demos/modules/gadc/gwinosc.h @@ -63,13 +63,13 @@ typedef struct GScopeObject_t { GWindowObject g; // Base Class - coord_t *lastscopetrace; // To store last scope trace - coord_t nextx; // Where we are up to + gCoord *lastscopetrace; // To store last scope trace + gCoord nextx; // Where we are up to #if TRIGGER_METHOD == TRIGGER_POSITIVERAMP - coord_t lasty; // The last y value - used for trigger slope detection + gCoord lasty; // The last y value - used for trigger slope detection #elif TRIGGER_METHOD == TRIGGER_MINVALUE - coord_t lasty; // The last y value - used for trigger slope detection - coord_t scopemin; // The last scopes minimum value + gCoord lasty; // The last y value - used for trigger slope detection + gCoord scopemin; // The last scopes minimum value #endif } GScopeObject; diff --git a/demos/modules/gadc/main.c b/demos/modules/gadc/main.c index 5d07f8eb..92312e83 100644 --- a/demos/modules/gadc/main.c +++ b/demos/modules/gadc/main.c @@ -134,7 +134,7 @@ static GTimer lsTimer; */ int main(void) { GHandle ghScope; - coord_t swidth, sheight; + gCoord swidth, sheight; #if defined(MY_DIAL_DEVICE) || defined(MY_TEMP_DEVICE) GHandle ghText; font_t font; |