diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2008-03-05 10:59:11 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2008-03-05 10:59:11 +0000 |
commit | 5e64a9fec2e17d008b9488faa027d2beaa130a88 (patch) | |
tree | 3ab9255111b62d78d755bc51d9e650e63b07be25 /ports | |
parent | 0778745ee12a4f14c001bd205e05728cc01e9633 (diff) | |
download | ChibiOS-5e64a9fec2e17d008b9488faa027d2beaa130a88.tar.gz ChibiOS-5e64a9fec2e17d008b9488faa027d2beaa130a88.tar.bz2 ChibiOS-5e64a9fec2e17d008b9488faa027d2beaa130a88.zip |
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@215 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'ports')
-rw-r--r-- | ports/ARM7-AT91SAM7X/sam7x_serial.c | 4 | ||||
-rw-r--r-- | ports/ARM7-LPC214x/lpc214x_serial.c | 8 | ||||
-rw-r--r-- | ports/ARM7-LPC214x/lpc214x_ssp.c | 2 | ||||
-rw-r--r-- | ports/ARM7-LPC214x/lpc214x_ssp.h | 2 | ||||
-rw-r--r-- | ports/ARM7/chtypes.h | 25 | ||||
-rw-r--r-- | ports/AVR/avr_serial.c | 6 | ||||
-rw-r--r-- | ports/AVR/chtypes.h | 25 | ||||
-rw-r--r-- | ports/Win32/simcom.c | 18 |
8 files changed, 48 insertions, 42 deletions
diff --git a/ports/ARM7-AT91SAM7X/sam7x_serial.c b/ports/ARM7-AT91SAM7X/sam7x_serial.c index b3719fbc2..2fad3c380 100644 --- a/ports/ARM7-AT91SAM7X/sam7x_serial.c +++ b/ports/ARM7-AT91SAM7X/sam7x_serial.c @@ -32,7 +32,7 @@ static uint8_t ib2[SERIAL_BUFFERS_SIZE]; static uint8_t ob2[SERIAL_BUFFERS_SIZE];
static void SetError(AT91_REG csr, FullDuplexDriver *com) {
- uint16_t sts = 0;
+ dflags_t sts = 0;
if (csr & AT91C_US_OVRE)
sts |= SD_OVERRUN_ERROR;
@@ -53,7 +53,7 @@ static void ServeInterrupt(AT91PS_USART u, FullDuplexDriver *com) { if (u->US_CSR & AT91C_US_RXRDY)
chFDDIncomingDataI(com, u->US_RHR);
if (u->US_CSR & AT91C_US_TXRDY) {
- t_msg b = chFDDRequestDataI(com);
+ msg_t b = chFDDRequestDataI(com);
if (b < Q_OK)
u->US_IDR = AT91C_US_TXRDY;
else
diff --git a/ports/ARM7-LPC214x/lpc214x_serial.c b/ports/ARM7-LPC214x/lpc214x_serial.c index 8f4e1d417..76f706ccb 100644 --- a/ports/ARM7-LPC214x/lpc214x_serial.c +++ b/ports/ARM7-LPC214x/lpc214x_serial.c @@ -33,7 +33,7 @@ static uint8_t ib2[SERIAL_BUFFERS_SIZE]; static uint8_t ob2[SERIAL_BUFFERS_SIZE];
static void SetError(IOREG32 err, FullDuplexDriver *com) {
- uint16_t sts = 0;
+ dflags_t sts = 0;
if (err & LSR_OVERRUN)
sts |= SD_OVERRUN_ERROR;
@@ -72,7 +72,7 @@ static void ServeInterrupt(UART *u, FullDuplexDriver *com) { #ifdef FIFO_PRELOAD
int i = FIFO_PRELOAD;
do {
- t_msg b = chOQGetI(&com->sd_oqueue);
+ msg_t b = chOQGetI(&com->sd_oqueue);
if (b < Q_OK) {
u->UART_IER &= ~IER_THRE;
chEvtSendI(&com->sd_oevent);
@@ -81,7 +81,7 @@ static void ServeInterrupt(UART *u, FullDuplexDriver *com) { u->UART_THR = b;
} while (--i);
#else
- t_msg b = chFDDRequestDataI(com);
+ msg_t b = chFDDRequestDataI(com);
if (b < Q_OK)
u->UART_IER &= ~IER_THRE;
else
@@ -123,7 +123,7 @@ static void preload(UART *u, FullDuplexDriver *com) { if (u->UART_LSR & LSR_THRE) {
int i = FIFO_PRELOAD;
do {
- t_msg b = chOQGetI(&com->sd_oqueue);
+ msg_t b = chOQGetI(&com->sd_oqueue);
if (b < Q_OK) {
chEvtSendI(&com->sd_oevent);
return;
diff --git a/ports/ARM7-LPC214x/lpc214x_ssp.c b/ports/ARM7-LPC214x/lpc214x_ssp.c index 80a936f4a..708c2dbeb 100644 --- a/ports/ARM7-LPC214x/lpc214x_ssp.c +++ b/ports/ARM7-LPC214x/lpc214x_ssp.c @@ -55,7 +55,7 @@ void sspReleaseBus(void) { * rest of the system. This kind of peripheral would really need a
* dedicated DMA channel.
*/
-void sspRW(uint8_t *in, uint8_t *out, t_size n) {
+void sspRW(uint8_t *in, uint8_t *out, size_t n) {
int icnt, ocnt;
SSP *ssp = SSPBase;
diff --git a/ports/ARM7-LPC214x/lpc214x_ssp.h b/ports/ARM7-LPC214x/lpc214x_ssp.h index 70a4be527..55929c2d8 100644 --- a/ports/ARM7-LPC214x/lpc214x_ssp.h +++ b/ports/ARM7-LPC214x/lpc214x_ssp.h @@ -34,7 +34,7 @@ void sspAcquireBus(void);
void sspReleaseBus(void);
- void sspRW(uint8_t *in, uint8_t *out, t_size n);
+ void sspRW(uint8_t *in, uint8_t *out, size_t n);
#ifdef __cplusplus
}
#endif
diff --git a/ports/ARM7/chtypes.h b/ports/ARM7/chtypes.h index c8a1dc69c..2fd609b1f 100644 --- a/ports/ARM7/chtypes.h +++ b/ports/ARM7/chtypes.h @@ -20,21 +20,24 @@ #ifndef _CHTYPES_H_
#define _CHTYPES_H_
+#define __need_NULL
+#define __need_size_t
+#include <stddef.h>
+
#if !defined(_STDINT_H) && !defined(__STDINT_H_)
#include <stdint.h>
#endif
-typedef int8_t t_bool;
-typedef uint8_t t_tmode;
-typedef uint8_t t_tstate;
-typedef uint16_t t_tid;
-typedef uint32_t t_prio;
-typedef int32_t t_msg;
-typedef int32_t t_eventid;
-typedef uint32_t t_eventmask;
-typedef uint32_t t_time;
-typedef int32_t t_cnt;
-typedef uint32_t t_size;
+typedef int8_t bool_t;
+typedef uint8_t tmode_t;
+typedef uint8_t tstate_t;
+typedef uint16_t tid_t;
+typedef uint32_t tprio_t;
+typedef int32_t msg_t;
+typedef int32_t eventid_t;
+typedef uint32_t eventmask_t;
+typedef uint32_t systime_t;
+typedef int32_t cnt_t;
#define INLINE inline
diff --git a/ports/AVR/avr_serial.c b/ports/AVR/avr_serial.c index 535c6d88f..d9db9efcc 100644 --- a/ports/AVR/avr_serial.c +++ b/ports/AVR/avr_serial.c @@ -25,7 +25,7 @@ #include "avr_serial.h"
static void SetError(uint8_t sra, FullDuplexDriver *com) {
- uint16_t sts = 0;
+ dflags_t sts = 0;
if (sra & (1 << DOR))
sts |= SD_OVERRUN_ERROR;
@@ -54,7 +54,7 @@ ISR(USART0_RX_vect) { }
ISR(USART0_UDRE_vect) {
- t_msg b;
+ msg_t b;
chSysIRQEnterI();
@@ -109,7 +109,7 @@ ISR(USART1_RX_vect) { }
ISR(USART1_UDRE_vect) {
- t_msg b;
+ msg_t b;
chSysIRQEnterI();
diff --git a/ports/AVR/chtypes.h b/ports/AVR/chtypes.h index 67f188b82..dfcc90a04 100644 --- a/ports/AVR/chtypes.h +++ b/ports/AVR/chtypes.h @@ -20,21 +20,24 @@ #ifndef _CHTYPES_H_
#define _CHTYPES_H_
+#define __need_NULL
+#define __need_size_t
+#include <stddef.h>
+
#if !defined(_STDINT_H) && !defined(__STDINT_H_)
#include <stdint.h>
#endif
-typedef int8_t t_bool;
-typedef uint8_t t_tmode;
-typedef uint8_t t_tstate;
-typedef uint8_t t_tid;
-typedef uint8_t t_prio;
-typedef int16_t t_msg;
-typedef uint8_t t_eventid;
-typedef uint8_t t_eventmask;
-typedef uint16_t t_time;
-typedef int8_t t_cnt;
-typedef uint16_t t_size;
+typedef int8_t bool_t;
+typedef uint8_t tmode_t;
+typedef uint8_t tstate_t;
+typedef uint8_t tid_t;
+typedef uint8_t tprio_t;
+typedef int16_t msg_t;
+typedef uint8_t eventid_t;
+typedef uint8_t eventmask_t;
+typedef uint16_t systime_t;
+typedef int8_t cnt_t;
#define INLINE inline
diff --git a/ports/Win32/simcom.c b/ports/Win32/simcom.c index 656fc2d45..1b676b1f7 100644 --- a/ports/Win32/simcom.c +++ b/ports/Win32/simcom.c @@ -108,7 +108,7 @@ void InitSimCom2(void) { init("COM2", &COM2, &sc2, COM2PORT);
}
-static t_bool connint(char *name, FullDuplexDriver *sd, struct simcom *sc) {
+static bool_t connint(char *name, FullDuplexDriver *sd, struct simcom *sc) {
if (sc->com_data == INVALID_SOCKET) {
struct sockaddr addr;
@@ -134,17 +134,17 @@ abort: exit(1);
}
-t_bool Com1ConnInterruptSimCom(void) {
+bool_t Com1ConnInterruptSimCom(void) {
return connint("COM1", &COM1, &sc1);
}
-t_bool Com2ConnInterruptSimCom(void) {
+bool_t Com2ConnInterruptSimCom(void) {
return connint("COM2", &COM2, &sc2);
}
-static t_bool inint(char *name, FullDuplexDriver *sd, struct simcom *sc) {
+static bool_t inint(char *name, FullDuplexDriver *sd, struct simcom *sc) {
if (sc->com_data != INVALID_SOCKET) {
int i;
@@ -174,17 +174,17 @@ static t_bool inint(char *name, FullDuplexDriver *sd, struct simcom *sc) { return FALSE;
}
-t_bool Com1InInterruptSimCom(void) {
+bool_t Com1InInterruptSimCom(void) {
return inint("COM1", &COM1, &sc1);
}
-t_bool Com2InInterruptSimCom(void) {
+bool_t Com2InInterruptSimCom(void) {
return inint("COM2", &COM2, &sc2);
}
-static t_bool outint(char *name, FullDuplexDriver *sd, struct simcom *sc) {
+static bool_t outint(char *name, FullDuplexDriver *sd, struct simcom *sc) {
if (sc->com_data != INVALID_SOCKET) {
int n;
@@ -216,12 +216,12 @@ static t_bool outint(char *name, FullDuplexDriver *sd, struct simcom *sc) { return FALSE;
}
-t_bool Com1OutInterruptSimCom(void) {
+bool_t Com1OutInterruptSimCom(void) {
return outint("COM1", &COM1, &sc1);
}
-t_bool Com2OutInterruptSimCom(void) {
+bool_t Com2OutInterruptSimCom(void) {
return outint("COM2", &COM2, &sc2);
}
|