aboutsummaryrefslogtreecommitdiffstats
path: root/demos/ARM7-LPC214x-GCC
diff options
context:
space:
mode:
Diffstat (limited to 'demos/ARM7-LPC214x-GCC')
-rw-r--r--demos/ARM7-LPC214x-GCC/buzzer.c4
-rw-r--r--demos/ARM7-LPC214x-GCC/buzzer.h4
-rw-r--r--demos/ARM7-LPC214x-GCC/main.c14
-rw-r--r--demos/ARM7-LPC214x-GCC/mmcsd.c16
-rw-r--r--demos/ARM7-LPC214x-GCC/mmcsd.h14
5 files changed, 26 insertions, 26 deletions
diff --git a/demos/ARM7-LPC214x-GCC/buzzer.c b/demos/ARM7-LPC214x-GCC/buzzer.c
index 9ee122fe1..249b1542b 100644
--- a/demos/ARM7-LPC214x-GCC/buzzer.c
+++ b/demos/ARM7-LPC214x-GCC/buzzer.c
@@ -64,7 +64,7 @@ static void stop(void *p) {
chEvtSendI(&BuzzerSilentEventSource);
}
-void PlaySound(int freq, t_time duration) {
+void PlaySound(int freq, systime_t duration) {
static VirtualTimer bvt;
TC *tc = T1Base;
@@ -82,7 +82,7 @@ void PlaySound(int freq, t_time duration) {
chSysUnlock();
}
-void PlaySoundWait(int freq, t_time duration) {
+void PlaySoundWait(int freq, systime_t duration) {
TC *tc = T1Base;
StopCounter(tc);
diff --git a/demos/ARM7-LPC214x-GCC/buzzer.h b/demos/ARM7-LPC214x-GCC/buzzer.h
index 464e081d8..734cb1a44 100644
--- a/demos/ARM7-LPC214x-GCC/buzzer.h
+++ b/demos/ARM7-LPC214x-GCC/buzzer.h
@@ -24,8 +24,8 @@
extern "C" {
#endif
void InitBuzzer(void);
- void PlaySound(int freq, t_time duration);
- void PlaySoundWait(int freq, t_time duration);
+ void PlaySound(int freq, systime_t duration);
+ void PlaySoundWait(int freq, systime_t duration);
#ifdef __cplusplus
}
#endif
diff --git a/demos/ARM7-LPC214x-GCC/main.c b/demos/ARM7-LPC214x-GCC/main.c
index fe0b9342c..ad2ab2700 100644
--- a/demos/ARM7-LPC214x-GCC/main.c
+++ b/demos/ARM7-LPC214x-GCC/main.c
@@ -29,7 +29,7 @@
* Red LEDs blinker thread, times are in milliseconds.
*/
static WorkingArea(waThread1, 64);
-static t_msg Thread1(void *arg) {
+static msg_t Thread1(void *arg) {
while (TRUE) {
IO0CLR = 0x00000800;
@@ -48,7 +48,7 @@ static t_msg Thread1(void *arg) {
* Yellow LED blinker thread, times are in milliseconds.
*/
static WorkingArea(waThread2, 64);
-static t_msg Thread2(void *arg) {
+static msg_t Thread2(void *arg) {
while (TRUE) {
IO0CLR = 0x80000000;
@@ -62,8 +62,8 @@ static t_msg Thread2(void *arg) {
/*
* Executed as event handler at 500mS intervals.
*/
-static void TimerHandler(t_eventid id) {
- t_msg TestThread(void *p);
+static void TimerHandler(eventid_t id) {
+ msg_t TestThread(void *p);
if (!(IO0PIN & 0x00018000)) { // Both buttons
TestThread(&COM1);
@@ -83,7 +83,7 @@ static void TimerHandler(t_eventid id) {
* Plays sounds when a MMC/SD card is inserted, then initializes the MMC
* driver and reads a sector.
*/
-static void InsertHandler(t_eventid id) {
+static void InsertHandler(eventid_t id) {
static uint8_t rwbuf[512];
MMCCSD data;
@@ -102,7 +102,7 @@ static void InsertHandler(t_eventid id) {
/*
* Plays sounds when a MMC/SD card is removed.
*/
-static void RemoveHandler(t_eventid id) {
+static void RemoveHandler(eventid_t id) {
PlaySoundWait(2000, 100);
PlaySoundWait(1000, 100);
@@ -112,7 +112,7 @@ static void RemoveHandler(t_eventid id) {
* Entry point, the interrupts are disabled on entry.
*/
int main(int argc, char **argv) {
- static const t_evhandler evhndl[] = {
+ static const evhandler_t evhndl[] = {
TimerHandler,
InsertHandler,
RemoveHandler
diff --git a/demos/ARM7-LPC214x-GCC/mmcsd.c b/demos/ARM7-LPC214x-GCC/mmcsd.c
index febfca237..c06123f88 100644
--- a/demos/ARM7-LPC214x-GCC/mmcsd.c
+++ b/demos/ARM7-LPC214x-GCC/mmcsd.c
@@ -91,7 +91,7 @@ void mmcStopPolling(void) {
/*
* Returns TRUE if the card is safely inserted in the reader.
*/
-t_bool mmcCardInserted (void) {
+bool_t mmcCardInserted (void) {
return cnt == 0;
}
@@ -145,7 +145,7 @@ static uint8_t recvr1(void) {
return 0xFF; /* Timeout.*/
}
-static t_bool getdata(uint8_t *buf, uint32_t n) {
+static bool_t getdata(uint8_t *buf, uint32_t n) {
int i;
for (i = 0; i < MMC_WAIT_DATA; i++) {
@@ -162,7 +162,7 @@ static t_bool getdata(uint8_t *buf, uint32_t n) {
/*
* Initializes a card after the power up by selecting the SPI mode.
*/
-t_bool mmcInit(void) {
+bool_t mmcInit(void) {
/*
* Starting initialization with slow clock mode.
@@ -222,7 +222,7 @@ uint8_t mmcSendCommand(uint8_t cmd, uint32_t arg) {
* @param data the pointer to a \p MMCCSD structure
* @return \p TRUE if an error happened
*/
-t_bool mmcGetSize(MMCCSD *data) {
+bool_t mmcGetSize(MMCCSD *data) {
uint8_t buf[16];
sspAcquireBus();
@@ -250,7 +250,7 @@ t_bool mmcGetSize(MMCCSD *data) {
* @param buf the pointer to the read buffer
* @return \p TRUE if an error happened
*/
-t_bool mmcRead(uint8_t *buf, uint32_t blknum) {
+bool_t mmcRead(uint8_t *buf, uint32_t blknum) {
sspAcquireBus();
sendhdr(CMDREAD, blknum << 8);
@@ -273,7 +273,7 @@ t_bool mmcRead(uint8_t *buf, uint32_t blknum) {
* @param buf the pointer to the read buffer
* @return \p TRUE if an error happened
*/
-t_bool mmcReadMultiple(uint8_t *buf, uint32_t blknum, uint32_t n) {
+bool_t mmcReadMultiple(uint8_t *buf, uint32_t blknum, uint32_t n) {
static const uint8_t stopcmd[] = {0x40 | CMDSTOP, 0, 0, 0, 0, 1, 0xFF};
sspAcquireBus();
@@ -309,7 +309,7 @@ t_bool mmcReadMultiple(uint8_t *buf, uint32_t blknum, uint32_t n) {
* the card, this allows to not make useless busy waiting. The invoking
* thread can do other things while the data is being written.
*/
-t_bool mmcWrite(uint8_t *buf, uint32_t blknum) {
+bool_t mmcWrite(uint8_t *buf, uint32_t blknum) {
static const uint8_t start[] = {0xFF, 0xFE};
uint8_t b[4];
@@ -340,7 +340,7 @@ t_bool mmcWrite(uint8_t *buf, uint32_t blknum) {
* the card, this allows to not make useless busy waiting. The invoking
* thread can do other things while the data is being written.
*/
-t_bool mmcWriteMultiple(uint8_t *buf, uint32_t blknum, uint32_t n) {
+bool_t mmcWriteMultiple(uint8_t *buf, uint32_t blknum, uint32_t n) {
static const uint8_t start[] = {0xFF, 0xFC},
stop[] = {0xFD, 0xFF};
uint8_t b[4];
diff --git a/demos/ARM7-LPC214x-GCC/mmcsd.h b/demos/ARM7-LPC214x-GCC/mmcsd.h
index 60396dafb..d7ab4b348 100644
--- a/demos/ARM7-LPC214x-GCC/mmcsd.h
+++ b/demos/ARM7-LPC214x-GCC/mmcsd.h
@@ -48,16 +48,16 @@ extern EventSource MMCInsertEventSource, MMCRemoveEventSource;
#endif
void InitMMC(void);
- t_bool mmcInit(void);
+ bool_t mmcInit(void);
void mmcStartPolling(void);
void mmcStopPolling(void);
- t_bool mmcCardInserted (void);
+ bool_t mmcCardInserted (void);
uint8_t mmcSendCommand(uint8_t cmd, uint32_t arg);
- t_bool mmcGetSize(MMCCSD *data);
- t_bool mmcRead(uint8_t *buf, uint32_t blknum);
- t_bool mmcReadMultiple(uint8_t *buf, uint32_t blknum, uint32_t n);
- t_bool mmcWrite(uint8_t *buf, uint32_t blknum);
- t_bool mmcWriteMultiple(uint8_t *buf, uint32_t blknum, uint32_t n);
+ bool_t mmcGetSize(MMCCSD *data);
+ bool_t mmcRead(uint8_t *buf, uint32_t blknum);
+ bool_t mmcReadMultiple(uint8_t *buf, uint32_t blknum, uint32_t n);
+ bool_t mmcWrite(uint8_t *buf, uint32_t blknum);
+ bool_t mmcWriteMultiple(uint8_t *buf, uint32_t blknum, uint32_t n);
void mmcSynch(void);
#ifdef __cplusplus
}