Changing NuttX fixed size type names to C99 standard names -- things will be broken for awhile

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@2361 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo
2009-12-16 20:59:06 +00:00
parent 757edb2c70
commit 1e02bc99ff
13 changed files with 63 additions and 63 deletions
+2 -2
View File
@@ -96,8 +96,8 @@ void up_initial_state(FAR _TCB *tcb)
* (SP) <- (SP) -1 * (SP) <- (SP) -1
*/ */
frame[FRAME_RETLS] = (((uint16_t))tcb->start) & 0xff); frame[FRAME_RETLS] = (((uint16_t)tcb->start) & 0xff);
frame[FRAME_RETMS] = (((uint16_t))tcb->start) >> 8); frame[FRAME_RETMS] = (((uint16_t)tcb->start) >> 8);
/* The context save area for registers a, ie, and dpstr /* The context save area for registers a, ie, and dpstr
* follows the return address in the stack frame. * follows the return address in the stack frame.
+13 -13
View File
@@ -77,9 +77,9 @@
* Name: m16c_getsp * Name: m16c_getsp
****************************************************************************/ ****************************************************************************/
static inline uint16_t) m16c_getsp(void) static inline uint16_t m16c_getsp(void)
{ {
uint16_t) sp; uint16_t sp;
__asm__ __volatile__ __asm__ __volatile__
( (
@@ -96,10 +96,10 @@ static inline uint16_t) m16c_getsp(void)
****************************************************************************/ ****************************************************************************/
#if CONFIG_ARCH_INTERRUPTSTACK > 3 #if CONFIG_ARCH_INTERRUPTSTACK > 3
static inline uint16_t) m16c_getusersp(void) static inline uint16_t m16c_getusersp(void)
{ {
uint8_t *ptr = (uint8_t*) current_regs; uint8_t *ptr = (uint8_t*) current_regs;
return (uint16_t))ptr[REG_SP] << 8 | ptr[REG_SP+1]; return (uint16_t)ptr[REG_SP] << 8 | ptr[REG_SP+1];
} }
#endif #endif
@@ -107,9 +107,9 @@ static inline uint16_t) m16c_getusersp(void)
* Name: m16c_stackdump * Name: m16c_stackdump
****************************************************************************/ ****************************************************************************/
static void m16c_stackdump(uint16_t) sp, uint16_t) stack_base) static void m16c_stackdump(uint16_t sp, uint16_t stack_base)
{ {
uint16_t) stack; uint16_t stack;
for (stack = sp & ~7; stack < stack_base; stack += 8) for (stack = sp & ~7; stack < stack_base; stack += 8)
{ {
@@ -159,12 +159,12 @@ static inline void m16c_registerdump(void)
void up_dumpstate(void) void up_dumpstate(void)
{ {
_TCB *rtcb = (_TCB*)g_readytorun.head; _TCB *rtcb = (_TCB*)g_readytorun.head;
uint16_t) sp = m16c_getsp(); uint16_t sp = m16c_getsp();
uint16_t) ustackbase; uint16_t ustackbase;
uint16_t) ustacksize; uint16_t ustacksize;
#if CONFIG_ARCH_INTERRUPTSTACK > 3 #if CONFIG_ARCH_INTERRUPTSTACK > 3
uint16_t) istackbase; uint16_t istackbase;
uint16_t) istacksize; uint16_t istacksize;
#endif #endif
/* Get the limits on the user stack memory */ /* Get the limits on the user stack memory */
@@ -176,8 +176,8 @@ void up_dumpstate(void)
} }
else else
{ {
ustackbase = (uint16_t))rtcb->adj_stack_ptr; ustackbase = (uint16_t)rtcb->adj_stack_ptr;
ustacksize = (uint16_t))rtcb->adj_stack_size; ustacksize = (uint16_t)rtcb->adj_stack_size;
} }
/* Get the limits on the interrupt stack memory. The near RAM memory map is as follows: /* Get the limits on the interrupt stack memory. The near RAM memory map is as follows:
+1 -1
View File
@@ -308,7 +308,7 @@ void up_lowputc(char ch)
/* Write the data to the transmit buffer */ /* Write the data to the transmit buffer */
putreg16((uint16_t))ch, M16C_UART_BASE + M16C_UART_TB); putreg16((uint16_t)ch, M16C_UART_BASE + M16C_UART_TB);
#endif #endif
} }
#endif #endif
+2 -2
View File
@@ -836,7 +836,7 @@ static int up_receive(struct uart_dev_s *dev, unsigned int *status)
static void m16c_rxint(struct up_dev_s *dev, bool enable) static void m16c_rxint(struct up_dev_s *dev, bool enable)
{ {
irqstate_t flags; irqstate_t flags;
uint16_t)_t regaddr; uint16_t regaddr;
uint8_t regvalue; uint8_t regvalue;
/* Disable interrupts to prevent asynchronous accesses */ /* Disable interrupts to prevent asynchronous accesses */
@@ -991,7 +991,7 @@ static void up_send(struct uart_dev_s *dev, int ch)
static void m16c_txint(struct up_dev_s *dev, bool enable) static void m16c_txint(struct up_dev_s *dev, bool enable)
{ {
irqstate_t flags; irqstate_t flags;
uint16_t)_t regaddr; uint16_t regaddr;
uint8_t regvalue; uint8_t regvalue;
/* Disable interrupts to prevent asynchronous accesses */ /* Disable interrupts to prevent asynchronous accesses */
+1 -1
View File
@@ -373,7 +373,7 @@ static inline void up_setbrr(struct up_dev_s *priv, unsigned int baud)
*/ */
uint32_t brr = ((((SH1_CLOCK + 16) / 32) + (baud >> 1)) / baud) - 1; uint32_t brr = ((((SH1_CLOCK + 16) / 32) + (baud >> 1)) / baud) - 1;
up_serialout(priv, SH1_SCI_BRR_OFFSET, (uint16_t))brr); up_serialout(priv, SH1_SCI_BRR_OFFSET, (uint16_t)brr);
} }
/**************************************************************************** /****************************************************************************
+1 -1
View File
@@ -84,7 +84,7 @@ void up_initial_state(_TCB *tcb)
memset(&tcb->xcp, 0, sizeof(struct xcptcontext)); memset(&tcb->xcp, 0, sizeof(struct xcptcontext));
#ifndef CONFIG_SUPPRESS_INTERRUPTS #ifndef CONFIG_SUPPRESS_INTERRUPTS
tcb->xcp.regs[REG_FLAGS] = (uint16_t))Z16F_CNTRL_FLAGS_IRQE; /* IRQE flag will enable interrupts */ tcb->xcp.regs[REG_FLAGS] = (uint16_t)Z16F_CNTRL_FLAGS_IRQE; /* IRQE flag will enable interrupts */
#endif #endif
reg32[REG_SP/2] = (uint32_t)tcb->adj_stack_ptr; reg32[REG_SP/2] = (uint32_t)tcb->adj_stack_ptr;
reg32[REG_PC/2] = (uint32_t)tcb->start; reg32[REG_PC/2] = (uint32_t)tcb->start;
+1 -1
View File
@@ -316,7 +316,7 @@ static int z16f_setup(struct uart_dev_s *dev)
*/ */
brg = (_DEFCLK + (priv->baud << 3))/(priv->baud << 4); brg = (_DEFCLK + (priv->baud << 3))/(priv->baud << 4);
putreg16((uint16_t))brg, priv->uartbase + Z16F_UART_BR); putreg16((uint16_t)brg, priv->uartbase + Z16F_UART_BR);
/* Configure STOP bits */ /* Configure STOP bits */
+6 -6
View File
@@ -80,9 +80,9 @@
static void up_stackdump(void) static void up_stackdump(void)
{ {
_TCB *rtcb = (_TCB*)g_readytorun.head; _TCB *rtcb = (_TCB*)g_readytorun.head;
uint16_t) sp = up_getsp(); uint16_t sp = up_getsp();
uint16_t) stack_base = (uint16_t))rtcb->adj_stack_ptr; uint16_t stack_base = (uint16_t)rtcb->adj_stack_ptr;
uint16_t) stack_size = (uint16_t))rtcb->adj_stack_size; uint16_t stack_size = (uint16_t)rtcb->adj_stack_size;
lldbg("stack_base: %04x\n", stack_base); lldbg("stack_base: %04x\n", stack_base);
lldbg("stack_size: %04x\n", stack_size); lldbg("stack_size: %04x\n", stack_size);
@@ -95,11 +95,11 @@ static void up_stackdump(void)
} }
else else
{ {
uint16_t) stack = sp & ~0x0f; uint16_t stack = sp & ~0x0f;
for (stack = sp & ~0x0f; stack < stack_base; stack += 8*sizeof(uint16_t))) for (stack = sp & ~0x0f; stack < stack_base; stack += 8*sizeof(uint16_t))
{ {
uint16_t) *ptr = (uint16_t)*)stack; uint16_t *ptr = (uint16_t*)stack;
lldbg("%04x: %04x %04x %04x %04x %04x %04x %04x %04x\n", lldbg("%04x: %04x %04x %04x %04x %04x %04x %04x %04x\n",
stack, ptr[0], ptr[1], ptr[2], ptr[3], stack, ptr[0], ptr[1], ptr[2], ptr[3],
ptr[4], ptr[5], ptr[6], ptr[7]); ptr[4], ptr[5], ptr[6], ptr[7]);
+1 -1
View File
@@ -123,7 +123,7 @@ static void ez80_sigsetup(FAR _TCB *tcb, sig_deliver_t sigdeliver, FAR chipreg_t
void up_schedule_sigaction(FAR _TCB *tcb, sig_deliver_t sigdeliver) void up_schedule_sigaction(FAR _TCB *tcb, sig_deliver_t sigdeliver)
{ {
sdbg("tcb=0x%p sigdeliver=0x%04x\n", tcb, (uint16_t))sigdeliver); sdbg("tcb=0x%p sigdeliver=0x%04x\n", tcb, (uint16_t)sigdeliver);
/* Refuse to handle nested signal actions */ /* Refuse to handle nested signal actions */
+2 -2
View File
@@ -112,7 +112,7 @@ int up_timerisr(int irq, chipreg_t *regs)
void up_timerinit(void) void up_timerinit(void)
{ {
uint16_t) reload; uint16_t reload;
uint8_t reg; uint8_t reg;
/* Disable the timer */ /* Disable the timer */
@@ -142,7 +142,7 @@ void up_timerinit(void)
* NOTE: The system clock frequency value is defined in the board.h file * NOTE: The system clock frequency value is defined in the board.h file
*/ */
reload = (uint16_t))(ez80_systemclock / 1600); reload = (uint16_t)(ez80_systemclock / 1600);
outp(EZ80_TMR0_RRH, (uint8_t)(reload >> 8)); outp(EZ80_TMR0_RRH, (uint8_t)(reload >> 8));
outp(EZ80_TMR0_RRL, (uint8_t)(reload)); outp(EZ80_TMR0_RRL, (uint8_t)(reload));
+3 -3
View File
@@ -44,7 +44,7 @@
#include <stdint.h> #include <stdint.h>
/************************************************************************************ /************************************************************************************
* Definitions * Pre-processor Definitions
************************************************************************************/ ************************************************************************************/
/* For the ZiLOG ZDS-II toolchain(s), the heap will be set using linker- /* For the ZiLOG ZDS-II toolchain(s), the heap will be set using linker-
@@ -59,12 +59,12 @@
#ifndef CONFIG_HEAP1_BASE #ifndef CONFIG_HEAP1_BASE
extern far unsigned long far_heapbot; extern far unsigned long far_heapbot;
# define CONFIG_HEAP1_BASE ((uint16_t))&far_heapbot) # define CONFIG_HEAP1_BASE ((uint16_t)&far_heapbot)
#endif #endif
#ifndef CONFIG_HEAP1_END #ifndef CONFIG_HEAP1_END
extern far unsigned long far_stacktop; extern far unsigned long far_stacktop;
# define CONFIG_HEAP1_END (((uint16_t))&far_stacktop) - CONFIG_IDLETHREAD_STACKSIZE + 1) # define CONFIG_HEAP1_END (((uint16_t)&far_stacktop) - CONFIG_IDLETHREAD_STACKSIZE + 1)
#endif #endif
/************************************************************************************ /************************************************************************************
+1 -1
View File
@@ -201,7 +201,7 @@ static const uint8_t *g_prevglyph = g_chspace;
static uint8_t g_anodecol = 1; static uint8_t g_anodecol = 1;
static uint8_t g_cathoderow = 0; static uint8_t g_cathoderow = 0;
static sbyte g_intcount = 0; static int8_t g_intcount = 0;
/**************************************************************************** /****************************************************************************
* Private Functions * Private Functions
+27 -27
View File
@@ -282,11 +282,11 @@
union rx_desc_u union rx_desc_u
{ {
uint8 rx_buf[4]; uint8_t rx_buf[4];
struct struct
{ {
uint8 rx_byte; uint8_t rx_byte;
uint8 rx_status; uint8_t rx_status;
uint16_t rx_len; uint16_t rx_len;
} desc; } desc;
}; };
@@ -306,8 +306,8 @@ struct dm9x_driver_s
/* Mode-dependent function to move data in 8/16/32 I/O modes */ /* Mode-dependent function to move data in 8/16/32 I/O modes */
void (*dm_read)(uint8 *ptr, int len); void (*dm_read)(uint8_t *ptr, int len);
void (*dm_write)(const uint8 *ptr, int len); void (*dm_write)(const uint8_t *ptr, int len);
void (*dm_discard)(int len); void (*dm_discard)(int len);
#if defined(CONFIG_DM9X_STATS) #if defined(CONFIG_DM9X_STATS)
@@ -343,17 +343,17 @@ static struct dm9x_driver_s g_dm9x[CONFIG_DM9X_NINTERFACES];
/* Utility functions */ /* Utility functions */
static uint8 getreg(int reg); static uint8_t getreg(int reg);
static void putreg(int reg, uint8 value); static void putreg(int reg, uint8_t value);
static void read8(uint8 *ptr, int len); static void read8(uint8_t *ptr, int len);
static void read16(uint8 *ptr, int len); static void read16(uint8_t *ptr, int len);
static void read32(uint8 *ptr, int len); static void read32(uint8_t *ptr, int len);
static void discard8(int len); static void discard8(int len);
static void discard16(int len); static void discard16(int len);
static void discard32(int len); static void discard32(int len);
static void write8(const uint8 *ptr, int len); static void write8(const uint8_t *ptr, int len);
static void write16(const uint8 *ptr, int len); static void write16(const uint8_t *ptr, int len);
static void write32(const uint8 *ptr, int len); static void write32(const uint8_t *ptr, int len);
/* static uint16_t dm9x_readsrom(struct dm9x_driver_s *dm9x, int offset); */ /* static uint16_t dm9x_readsrom(struct dm9x_driver_s *dm9x, int offset); */
static uint16_t dm9x_phyread(struct dm9x_driver_s *dm9x, int reg); static uint16_t dm9x_phyread(struct dm9x_driver_s *dm9x, int reg);
@@ -425,13 +425,13 @@ static void dm9x_reset(struct dm9x_driver_s *dm9x);
* *
****************************************************************************/ ****************************************************************************/
static uint8 getreg(int reg) static uint8_t getreg(int reg)
{ {
DM9X_INDEX = reg; DM9X_INDEX = reg;
return DM9X_DATA & 0xff; return DM9X_DATA & 0xff;
} }
static void putreg(int reg, uint8 value) static void putreg(int reg, uint8_t value)
{ {
DM9X_INDEX = reg; DM9X_INDEX = reg;
DM9X_DATA = value & 0xff; DM9X_DATA = value & 0xff;
@@ -454,7 +454,7 @@ static void putreg(int reg, uint8 value)
* *
****************************************************************************/ ****************************************************************************/
static void read8(uint8 *ptr, int len) static void read8(uint8_t *ptr, int len)
{ {
nvdbg("Read %d bytes (8-bit mode)\n", len); nvdbg("Read %d bytes (8-bit mode)\n", len);
for (; len > 0; len--) for (; len > 0; len--)
@@ -463,7 +463,7 @@ static void read8(uint8 *ptr, int len)
} }
} }
static void read16(uint8 *ptr, int len) static void read16(uint8_t *ptr, int len)
{ {
register uint16_t *ptr16 = (uint16_t*)ptr; register uint16_t *ptr16 = (uint16_t*)ptr;
nvdbg("Read %d bytes (16-bit mode)\n", len); nvdbg("Read %d bytes (16-bit mode)\n", len);
@@ -473,7 +473,7 @@ static void read16(uint8 *ptr, int len)
} }
} }
static void read32(uint8 *ptr, int len) static void read32(uint8_t *ptr, int len)
{ {
register uint32_t *ptr32 = (uint32_t*)ptr; register uint32_t *ptr32 = (uint32_t*)ptr;
nvdbg("Read %d bytes (32-bit mode)\n", len); nvdbg("Read %d bytes (32-bit mode)\n", len);
@@ -544,7 +544,7 @@ static void discard32(int len)
* *
****************************************************************************/ ****************************************************************************/
static void write8(const uint8 *ptr, int len) static void write8(const uint8_t *ptr, int len)
{ {
nvdbg("Write %d bytes (8-bit mode)\n", len); nvdbg("Write %d bytes (8-bit mode)\n", len);
for (; len > 0; len--) for (; len > 0; len--)
@@ -553,7 +553,7 @@ static void write8(const uint8 *ptr, int len)
} }
} }
static void write16(const uint8 *ptr, int len) static void write16(const uint8_t *ptr, int len)
{ {
register uint16_t *ptr16 = (uint16_t*)ptr; register uint16_t *ptr16 = (uint16_t*)ptr;
nvdbg("Write %d bytes (16-bit mode)\n", len); nvdbg("Write %d bytes (16-bit mode)\n", len);
@@ -564,7 +564,7 @@ static void write16(const uint8 *ptr, int len)
} }
} }
static void write32(const uint8 *ptr, int len) static void write32(const uint8_t *ptr, int len)
{ {
register uint32_t *ptr32 = (uint32_t*)ptr; register uint32_t *ptr32 = (uint32_t*)ptr;
nvdbg("Write %d bytes (32-bit mode)\n", len); nvdbg("Write %d bytes (32-bit mode)\n", len);
@@ -738,7 +738,7 @@ static void dm9x_dumpstatistics(struct dm9x_driver_s *dm9x)
****************************************************************************/ ****************************************************************************/
#if defined(CONFIG_DM9X_CHECKSUM) #if defined(CONFIG_DM9X_CHECKSUM)
static inline bool dm9x_rxchecksumready(uint8 rxbyte) static inline bool dm9x_rxchecksumready(uint8_t rxbyte)
{ {
if ((rxbyte & 0x01) == 0) if ((rxbyte & 0x01) == 0)
{ {
@@ -1113,8 +1113,8 @@ static int dm9x_interrupt(int irq, FAR void *context)
#else #else
# error "Additional logic needed to support multiple interfaces" # error "Additional logic needed to support multiple interfaces"
#endif #endif
uint8 isr; uint8_t isr;
uint8 save; uint8_t save;
int i; int i;
/* Save previous register address */ /* Save previous register address */
@@ -1363,7 +1363,7 @@ static inline void dm9x_phymode(struct dm9x_driver_s *dm9x)
static int dm9x_ifup(struct uip_driver_s *dev) static int dm9x_ifup(struct uip_driver_s *dev)
{ {
struct dm9x_driver_s *dm9x = (struct dm9x_driver_s *)dev->d_private; struct dm9x_driver_s *dm9x = (struct dm9x_driver_s *)dev->d_private;
uint8 netstatus; uint8_t netstatus;
int i; int i;
ndbg("Bringing up: %d.%d.%d.%d\n", ndbg("Bringing up: %d.%d.%d.%d\n",
@@ -1621,7 +1621,7 @@ static void dm9x_bringup(struct dm9x_driver_s *dm9x)
static void dm9x_reset(struct dm9x_driver_s *dm9x) static void dm9x_reset(struct dm9x_driver_s *dm9x)
{ {
uint8 save; uint8_t save;
int i; int i;
/* Cancel the TX poll timer and TX timeout timers */ /* Cancel the TX poll timer and TX timeout timers */
@@ -1683,7 +1683,7 @@ static void dm9x_reset(struct dm9x_driver_s *dm9x)
int dm9x_initialize(void) int dm9x_initialize(void)
{ {
uint8 *mptr; uint8_t *mptr;
uint16_t vid; uint16_t vid;
uint16_t pid; uint16_t pid;
int i; int i;