aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gaudio/vs1053/gaudio_play_vs1053.c
diff options
context:
space:
mode:
authorinmarket <andrewh@inmarket.com.au>2018-06-23 13:02:07 +1000
committerinmarket <andrewh@inmarket.com.au>2018-06-23 13:02:07 +1000
commit41271d632b74f5cf47c30d3b699eb6b2786f2136 (patch)
tree78bcb729c6d6177ca598f28908fefd186c50e9b6 /drivers/gaudio/vs1053/gaudio_play_vs1053.c
parent3b97fb798e96514057bcf17263c1e5dbdcd7da26 (diff)
downloaduGFX-41271d632b74f5cf47c30d3b699eb6b2786f2136.tar.gz
uGFX-41271d632b74f5cf47c30d3b699eb6b2786f2136.tar.bz2
uGFX-41271d632b74f5cf47c30d3b699eb6b2786f2136.zip
Added new type definitions - moving towards V3.0
Diffstat (limited to 'drivers/gaudio/vs1053/gaudio_play_vs1053.c')
-rw-r--r--drivers/gaudio/vs1053/gaudio_play_vs1053.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/gaudio/vs1053/gaudio_play_vs1053.c b/drivers/gaudio/vs1053/gaudio_play_vs1053.c
index c96ec036..8b333741 100644
--- a/drivers/gaudio/vs1053/gaudio_play_vs1053.c
+++ b/drivers/gaudio/vs1053/gaudio_play_vs1053.c
@@ -61,7 +61,7 @@
#endif
// Our static variables
-static bool_t vs1053_isinit;
+static gBool vs1053_isinit;
static GTimer playTimer;
// Some common macro's
@@ -228,7 +228,7 @@ static void FeedData(void *param) {
/* External declarations. */
/*===========================================================================*/
-bool_t gaudio_play_lld_init(uint16_t channel, uint32_t frequency, ArrayDataFormat format) {
+gBool gaudio_play_lld_init(uint16_t channel, uint32_t frequency, ArrayDataFormat format) {
uint32_t brate;
uint32_t bps;
uint8_t buf[4];
@@ -246,14 +246,14 @@ bool_t gaudio_play_lld_init(uint16_t channel, uint32_t frequency, ArrayDataForma
};
if (format != ARRAY_DATA_8BITUNSIGNED && format != ARRAY_DATA_16BITSIGNED && format != ARRAY_DATA_UNKNOWN)
- return FALSE;
+ return gFalse;
if (frequency > VS1053_MAX_SAMPLE_RATE)
- return FALSE;
+ return gFalse;
// Reset the chip if needed
if (!vs1053_isinit) {
vs1053_hard_reset();
- vs1053_isinit = TRUE;
+ vs1053_isinit = gTrue;
}
// Setup
@@ -274,10 +274,10 @@ bool_t gaudio_play_lld_init(uint16_t channel, uint32_t frequency, ArrayDataForma
buf[0] = gfxSampleFormatBits(format); buf[1] = 0; data_write(buf, 2);
data_write(hdr2, sizeof(hdr2));
}
- return TRUE;
+ return gTrue;
}
-bool_t gaudio_play_lld_set_volume(uint8_t vol) {
+gBool gaudio_play_lld_set_volume(uint8_t vol) {
uint16_t tmp;
// Volume is 0xFE -> 0x00. Adjust vol to match
@@ -291,7 +291,7 @@ bool_t gaudio_play_lld_set_volume(uint8_t vol) {
cmd_write(SCI_VOL, tmp);
- return TRUE;
+ return gTrue;
}
void gaudio_play_lld_start(void) {
@@ -310,7 +310,7 @@ void gaudio_play_lld_start(void) {
// Start the playing by starting the timer and executing FeedData immediately just to get things started
// We really should set the timer to be equivalent to half the available data but that is just too hard to calculate.
- gtimerStart(&playTimer, FeedData, 0, TRUE, VS1053_POLL_RATE);
+ gtimerStart(&playTimer, FeedData, 0, gTrue, VS1053_POLL_RATE);
FeedData(0);
}