diff options
author | inmarket <andrewh@inmarket.com.au> | 2018-11-03 10:51:23 +1000 |
---|---|---|
committer | inmarket <andrewh@inmarket.com.au> | 2018-11-03 10:51:23 +1000 |
commit | 7c5a6c928fa7129cf754c9c73c5c7ae39372ba9d (patch) | |
tree | 95cf152ef65ff19c7b2515b427bbe86b92b611d0 /demos/modules/gaudio | |
parent | 8bd70d953bcd3e32ceb4e45a4e561c973726280a (diff) | |
download | uGFX-7c5a6c928fa7129cf754c9c73c5c7ae39372ba9d.tar.gz uGFX-7c5a6c928fa7129cf754c9c73c5c7ae39372ba9d.tar.bz2 uGFX-7c5a6c928fa7129cf754c9c73c5c7ae39372ba9d.zip |
For all source files update integer types to the new gI8 etc type names
Diffstat (limited to 'demos/modules/gaudio')
-rw-r--r-- | demos/modules/gaudio/oscilloscope/gwinosc.c | 12 | ||||
-rw-r--r-- | demos/modules/gaudio/oscilloscope/gwinosc.h | 2 | ||||
-rw-r--r-- | demos/modules/gaudio/play-vs1053/main.c | 4 | ||||
-rw-r--r-- | demos/modules/gaudio/play-wave/main.c | 18 |
4 files changed, 18 insertions, 18 deletions
diff --git a/demos/modules/gaudio/oscilloscope/gwinosc.c b/demos/modules/gaudio/oscilloscope/gwinosc.c index e46640e8..001dbc68 100644 --- a/demos/modules/gaudio/oscilloscope/gwinosc.c +++ b/demos/modules/gaudio/oscilloscope/gwinosc.c @@ -64,7 +64,7 @@ static const gwinVMT scopeVMT = { 0, // The after-clear routine }; -GHandle gwinGScopeCreate(GDisplay *g, GScopeObject *gs, GWindowInit *pInit, uint16_t channel, uint32_t frequency, ArrayDataFormat format) { +GHandle gwinGScopeCreate(GDisplay *g, GScopeObject *gs, GWindowInit *pInit, gU16 channel, gU32 frequency, ArrayDataFormat format) { /* Make sure the audio parameters are valid first */ if (!gaudioRecordInit(channel, frequency, format)) return 0; @@ -100,10 +100,10 @@ void gwinScopeWaitForTrace(GHandle gh) { int i; gCoord x, y; gCoord yoffset; - uint8_t *pa8; - uint16_t *pa16; + gU8 *pa8; + gU16 *pa16; gCoord *pc; - uint8_t shr; + gU8 shr; #if TRIGGER_METHOD == TRIGGER_POSITIVERAMP gBool rdytrigger; @@ -132,8 +132,8 @@ void gwinScopeWaitForTrace(GHandle gh) { x = gs->nextx; pc = gs->lastscopetrace+x; - pa8 = (uint8_t *)(paud+1); - pa16 = (uint16_t *)(paud+1); + pa8 = (gU8 *)(paud+1); + pa16 = (gU16 *)(paud+1); #if TRIGGER_METHOD == TRIGGER_POSITIVERAMP rdytrigger = gFalse; diff --git a/demos/modules/gaudio/oscilloscope/gwinosc.h b/demos/modules/gaudio/oscilloscope/gwinosc.h index e77a61b2..99e81dad 100644 --- a/demos/modules/gaudio/oscilloscope/gwinosc.h +++ b/demos/modules/gaudio/oscilloscope/gwinosc.h @@ -81,7 +81,7 @@ extern "C" { /** * Create a scope window. */ - GHandle gwinGScopeCreate(GDisplay *g, GScopeObject *gs, GWindowInit *pInit, uint16_t channel, uint32_t frequency, ArrayDataFormat format); + GHandle gwinGScopeCreate(GDisplay *g, GScopeObject *gs, GWindowInit *pInit, gU16 channel, gU32 frequency, ArrayDataFormat format); #define gwinScopeCreate(gs,pI,ch,f,fmt) gwinGScopeCreate(GDISP,gs,pI,ch,f,fmt) /** diff --git a/demos/modules/gaudio/play-vs1053/main.c b/demos/modules/gaudio/play-vs1053/main.c index 8cfa60f6..663bcd12 100644 --- a/demos/modules/gaudio/play-vs1053/main.c +++ b/demos/modules/gaudio/play-vs1053/main.c @@ -46,8 +46,8 @@ int main(void) { gFont font; GFILE *f; char *errmsg; - uint32_t toplay; - uint32_t len; + gU32 toplay; + gU32 len; GDataBuffer *pd; // Initialise everything diff --git a/demos/modules/gaudio/play-wave/main.c b/demos/modules/gaudio/play-wave/main.c index c6a5ea84..8b54d185 100644 --- a/demos/modules/gaudio/play-wave/main.c +++ b/demos/modules/gaudio/play-wave/main.c @@ -48,10 +48,10 @@ int main(void) { gFont font; GFILE *f; char *errmsg; - uint32_t toplay; - uint32_t frequency; + gU32 toplay; + gU32 frequency; ArrayDataFormat datafmt; - uint32_t len; + gU32 len; GDataBuffer *pd; // Initialise everything @@ -92,8 +92,8 @@ repeatplay: } // Read the fmt block - len = (((uint32_t)(uint8_t)whdr[16])<<0) | (((uint32_t)(uint8_t)whdr[17])<<8) - | (((uint32_t)(uint8_t)whdr[18])<<16) | (((uint32_t)(uint8_t)whdr[19])<<24); + len = (((gU32)(gU8)whdr[16])<<0) | (((gU32)(gU8)whdr[17])<<8) + | (((gU32)(gU8)whdr[18])<<16) | (((gU32)(gU8)whdr[19])<<24); if (len > sizeof(whdr) || len < 16) { errmsg = "Err: Bad fmt len"; goto theend; @@ -123,8 +123,8 @@ repeatplay: #endif // Get the sample frequency (little endian format) and format - frequency = (((uint32_t)(uint8_t)whdr[4])<<0) | (((uint32_t)(uint8_t)whdr[5])<<8) - | (((uint32_t)(uint8_t)whdr[6])<<16) | (((uint32_t)(uint8_t)whdr[7])<<24); + frequency = (((gU32)(gU8)whdr[4])<<0) | (((gU32)(gU8)whdr[5])<<8) + | (((gU32)(gU8)whdr[6])<<16) | (((gU32)(gU8)whdr[7])<<24); datafmt = whdr[14] == 8 ? ARRAY_DATA_8BITUNSIGNED : ARRAY_DATA_16BITSIGNED; // Initialise the audio output device @@ -146,8 +146,8 @@ repeatplay: } // Get the block length (little endian format) - toplay = (((uint32_t)(uint8_t)whdr[4])<<0) | (((uint32_t)(uint8_t)whdr[5])<<8) - | (((uint32_t)(uint8_t)whdr[6])<<16) | (((uint32_t)(uint8_t)whdr[7])<<24); + toplay = (((gU32)(gU8)whdr[4])<<0) | (((gU32)(gU8)whdr[5])<<8) + | (((gU32)(gU8)whdr[6])<<16) | (((gU32)(gU8)whdr[7])<<24); // Stop scanning when this is a data block if (whdr[0] == 'd' && whdr[1] == 'a' && whdr[2] == 't' && whdr[3] == 'a') |