aboutsummaryrefslogtreecommitdiffstats
path: root/demos/modules/gaudio/oscilloscope
diff options
context:
space:
mode:
Diffstat (limited to 'demos/modules/gaudio/oscilloscope')
-rw-r--r--demos/modules/gaudio/oscilloscope/gwinosc.c14
-rw-r--r--demos/modules/gaudio/oscilloscope/gwinosc.h10
-rw-r--r--demos/modules/gaudio/oscilloscope/main.c2
3 files changed, 13 insertions, 13 deletions
diff --git a/demos/modules/gaudio/oscilloscope/gwinosc.c b/demos/modules/gaudio/oscilloscope/gwinosc.c
index 38edb35e..17ea9566 100644
--- a/demos/modules/gaudio/oscilloscope/gwinosc.c
+++ b/demos/modules/gaudio/oscilloscope/gwinosc.c
@@ -76,7 +76,7 @@ GHandle gwinGScopeCreate(GDisplay *g, GScopeObject *gs, GWindowInit *pInit, uint
/* Initialise the scope object members and allocate memory for buffers */
gs->format = format;
gs->nextx = 0;
- if (!(gs->lastscopetrace = (coord_t *)gfxAlloc(gs->g.width * sizeof(coord_t))))
+ if (!(gs->lastscopetrace = (gCoord *)gfxAlloc(gs->g.width * sizeof(gCoord))))
return 0;
#if TRIGGER_METHOD == TRIGGER_POSITIVERAMP
gs->lasty = gs->g.height/2;
@@ -98,11 +98,11 @@ void gwinScopeWaitForTrace(GHandle gh) {
#define gs ((GScopeObject *)(gh))
GDataBuffer *paud;
int i;
- coord_t x, y;
- coord_t yoffset;
+ gCoord x, y;
+ gCoord yoffset;
uint8_t *pa8;
uint16_t *pa16;
- coord_t *pc;
+ gCoord *pc;
uint8_t shr;
#if TRIGGER_METHOD == TRIGGER_POSITIVERAMP
@@ -111,7 +111,7 @@ void gwinScopeWaitForTrace(GHandle gh) {
#elif TRIGGER_METHOD == TRIGGER_MINVALUE
gBool rdytrigger;
int flsamples;
- coord_t scopemin;
+ gCoord scopemin;
#endif
if (gh->vmt != &scopeVMT)
@@ -148,9 +148,9 @@ void gwinScopeWaitForTrace(GHandle gh) {
/* Calculate the new scope value - re-scale using simple shifts for efficiency, re-center and y-invert */
if (gfxSampleFormatBits(gs->format) <= 8)
- y = yoffset - (((coord_t)(*pa8++ ) << shr) >> (16-SCOPE_Y_BITS));
+ y = yoffset - (((gCoord)(*pa8++ ) << shr) >> (16-SCOPE_Y_BITS));
else
- y = yoffset - (((coord_t)(*pa16++) << shr) >> (16-SCOPE_Y_BITS));
+ y = yoffset - (((gCoord)(*pa16++) << shr) >> (16-SCOPE_Y_BITS));
#if TRIGGER_METHOD == TRIGGER_MINVALUE
/* Calculate the scopemin ready for the next trace */
diff --git a/demos/modules/gaudio/oscilloscope/gwinosc.h b/demos/modules/gaudio/oscilloscope/gwinosc.h
index 5a5c5034..e77a61b2 100644
--- a/demos/modules/gaudio/oscilloscope/gwinosc.h
+++ b/demos/modules/gaudio/oscilloscope/gwinosc.h
@@ -63,14 +63,14 @@
typedef struct GScopeObject_t {
GWindowObject g; // Base Class
- coord_t *lastscopetrace; // To store last scope trace
+ gCoord *lastscopetrace; // To store last scope trace
ArrayDataFormat format; // The sample format
- coord_t nextx; // Where we are up to
+ 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/gaudio/oscilloscope/main.c b/demos/modules/gaudio/oscilloscope/main.c
index cd62e1f1..f9623b29 100644
--- a/demos/modules/gaudio/oscilloscope/main.c
+++ b/demos/modules/gaudio/oscilloscope/main.c
@@ -51,7 +51,7 @@ static GScopeObject gScopeWindow;
*/
int main(void) {
GHandle ghScope;
- coord_t swidth, sheight;
+ gCoord swidth, sheight;
gfxInit();