diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2009-12-16 20:59:06 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2009-12-16 20:59:06 +0000 |
commit | 471b50c5f8f0f49ce8abfb8f0085d05cfe32edaa (patch) | |
tree | 6ad8b287c156c844116acc3dc4f55ec9069fd180 /nuttx/arch | |
parent | 692fdecda1d50a2d5ca3bd8338074ece4c8eee38 (diff) | |
download | px4-nuttx-471b50c5f8f0f49ce8abfb8f0085d05cfe32edaa.tar.gz px4-nuttx-471b50c5f8f0f49ce8abfb8f0085d05cfe32edaa.tar.bz2 px4-nuttx-471b50c5f8f0f49ce8abfb8f0085d05cfe32edaa.zip |
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
Diffstat (limited to 'nuttx/arch')
-rw-r--r-- | nuttx/arch/pjrc-8051/src/up_initialstate.c | 4 | ||||
-rwxr-xr-x | nuttx/arch/sh/src/m16c/m16c_dumpstate.c | 28 | ||||
-rw-r--r-- | nuttx/arch/sh/src/m16c/m16c_lowputc.c | 2 | ||||
-rw-r--r-- | nuttx/arch/sh/src/m16c/m16c_serial.c | 4 | ||||
-rw-r--r-- | nuttx/arch/sh/src/sh1/sh1_serial.c | 2 | ||||
-rw-r--r-- | nuttx/arch/z16/src/common/up_initialstate.c | 2 | ||||
-rw-r--r-- | nuttx/arch/z16/src/z16f/z16f_serial.c | 2 | ||||
-rw-r--r-- | nuttx/arch/z80/src/common/up_stackdump.c | 14 | ||||
-rw-r--r-- | nuttx/arch/z80/src/ez80/ez80_schedulesigaction.c | 2 | ||||
-rw-r--r-- | nuttx/arch/z80/src/ez80/ez80_timerisr.c | 4 | ||||
-rw-r--r-- | nuttx/arch/z80/src/z8/up_mem.h | 6 |
11 files changed, 35 insertions, 35 deletions
diff --git a/nuttx/arch/pjrc-8051/src/up_initialstate.c b/nuttx/arch/pjrc-8051/src/up_initialstate.c index c4f634dcf..5289d867c 100644 --- a/nuttx/arch/pjrc-8051/src/up_initialstate.c +++ b/nuttx/arch/pjrc-8051/src/up_initialstate.c @@ -96,8 +96,8 @@ void up_initial_state(FAR _TCB *tcb) * (SP) <- (SP) -1 */ - frame[FRAME_RETLS] = (((uint16_t))tcb->start) & 0xff); - frame[FRAME_RETMS] = (((uint16_t))tcb->start) >> 8); + frame[FRAME_RETLS] = (((uint16_t)tcb->start) & 0xff); + frame[FRAME_RETMS] = (((uint16_t)tcb->start) >> 8); /* The context save area for registers a, ie, and dpstr * follows the return address in the stack frame. diff --git a/nuttx/arch/sh/src/m16c/m16c_dumpstate.c b/nuttx/arch/sh/src/m16c/m16c_dumpstate.c index ff451e9b4..eeae392d4 100755 --- a/nuttx/arch/sh/src/m16c/m16c_dumpstate.c +++ b/nuttx/arch/sh/src/m16c/m16c_dumpstate.c @@ -77,9 +77,9 @@ * 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__ ( @@ -96,10 +96,10 @@ static inline uint16_t) m16c_getsp(void) ****************************************************************************/ #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; - return (uint16_t))ptr[REG_SP] << 8 | ptr[REG_SP+1]; + return (uint16_t)ptr[REG_SP] << 8 | ptr[REG_SP+1]; } #endif @@ -107,9 +107,9 @@ static inline uint16_t) m16c_getusersp(void) * 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) { @@ -158,13 +158,13 @@ static inline void m16c_registerdump(void) void up_dumpstate(void) { - _TCB *rtcb = (_TCB*)g_readytorun.head; - uint16_t) sp = m16c_getsp(); - uint16_t) ustackbase; - uint16_t) ustacksize; + _TCB *rtcb = (_TCB*)g_readytorun.head; + uint16_t sp = m16c_getsp(); + uint16_t ustackbase; + uint16_t ustacksize; #if CONFIG_ARCH_INTERRUPTSTACK > 3 - uint16_t) istackbase; - uint16_t) istacksize; + uint16_t istackbase; + uint16_t istacksize; #endif /* Get the limits on the user stack memory */ @@ -176,8 +176,8 @@ void up_dumpstate(void) } else { - ustackbase = (uint16_t))rtcb->adj_stack_ptr; - ustacksize = (uint16_t))rtcb->adj_stack_size; + ustackbase = (uint16_t)rtcb->adj_stack_ptr; + ustacksize = (uint16_t)rtcb->adj_stack_size; } /* Get the limits on the interrupt stack memory. The near RAM memory map is as follows: diff --git a/nuttx/arch/sh/src/m16c/m16c_lowputc.c b/nuttx/arch/sh/src/m16c/m16c_lowputc.c index b5d32d915..4651e617e 100644 --- a/nuttx/arch/sh/src/m16c/m16c_lowputc.c +++ b/nuttx/arch/sh/src/m16c/m16c_lowputc.c @@ -308,7 +308,7 @@ void up_lowputc(char ch) /* 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 diff --git a/nuttx/arch/sh/src/m16c/m16c_serial.c b/nuttx/arch/sh/src/m16c/m16c_serial.c index 9f569ec16..d18b4af59 100644 --- a/nuttx/arch/sh/src/m16c/m16c_serial.c +++ b/nuttx/arch/sh/src/m16c/m16c_serial.c @@ -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) { irqstate_t flags; - uint16_t)_t regaddr; + uint16_t regaddr; uint8_t regvalue; /* 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) { irqstate_t flags; - uint16_t)_t regaddr; + uint16_t regaddr; uint8_t regvalue; /* Disable interrupts to prevent asynchronous accesses */ diff --git a/nuttx/arch/sh/src/sh1/sh1_serial.c b/nuttx/arch/sh/src/sh1/sh1_serial.c index 69fda986a..3f87ee4db 100644 --- a/nuttx/arch/sh/src/sh1/sh1_serial.c +++ b/nuttx/arch/sh/src/sh1/sh1_serial.c @@ -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; - up_serialout(priv, SH1_SCI_BRR_OFFSET, (uint16_t))brr); + up_serialout(priv, SH1_SCI_BRR_OFFSET, (uint16_t)brr); } /**************************************************************************** diff --git a/nuttx/arch/z16/src/common/up_initialstate.c b/nuttx/arch/z16/src/common/up_initialstate.c index 2282e2735..b6b3ced50 100644 --- a/nuttx/arch/z16/src/common/up_initialstate.c +++ b/nuttx/arch/z16/src/common/up_initialstate.c @@ -84,7 +84,7 @@ void up_initial_state(_TCB *tcb) memset(&tcb->xcp, 0, sizeof(struct xcptcontext)); #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 reg32[REG_SP/2] = (uint32_t)tcb->adj_stack_ptr; reg32[REG_PC/2] = (uint32_t)tcb->start; diff --git a/nuttx/arch/z16/src/z16f/z16f_serial.c b/nuttx/arch/z16/src/z16f/z16f_serial.c index d87b3257c..20b888caf 100644 --- a/nuttx/arch/z16/src/z16f/z16f_serial.c +++ b/nuttx/arch/z16/src/z16f/z16f_serial.c @@ -316,7 +316,7 @@ static int z16f_setup(struct uart_dev_s *dev) */ 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 */ diff --git a/nuttx/arch/z80/src/common/up_stackdump.c b/nuttx/arch/z80/src/common/up_stackdump.c index 62c4ee24c..be6c67dd4 100644 --- a/nuttx/arch/z80/src/common/up_stackdump.c +++ b/nuttx/arch/z80/src/common/up_stackdump.c @@ -79,10 +79,10 @@ #ifdef CONFIG_ARCH_STACKDUMP static void up_stackdump(void) { - _TCB *rtcb = (_TCB*)g_readytorun.head; - uint16_t) sp = up_getsp(); - uint16_t) stack_base = (uint16_t))rtcb->adj_stack_ptr; - uint16_t) stack_size = (uint16_t))rtcb->adj_stack_size; + _TCB *rtcb = (_TCB*)g_readytorun.head; + uint16_t sp = up_getsp(); + uint16_t stack_base = (uint16_t)rtcb->adj_stack_ptr; + uint16_t stack_size = (uint16_t)rtcb->adj_stack_size; lldbg("stack_base: %04x\n", stack_base); lldbg("stack_size: %04x\n", stack_size); @@ -95,11 +95,11 @@ static void up_stackdump(void) } 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", stack, ptr[0], ptr[1], ptr[2], ptr[3], ptr[4], ptr[5], ptr[6], ptr[7]); diff --git a/nuttx/arch/z80/src/ez80/ez80_schedulesigaction.c b/nuttx/arch/z80/src/ez80/ez80_schedulesigaction.c index e95cebc69..8c9a84260 100644 --- a/nuttx/arch/z80/src/ez80/ez80_schedulesigaction.c +++ b/nuttx/arch/z80/src/ez80/ez80_schedulesigaction.c @@ -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) { - 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 */ diff --git a/nuttx/arch/z80/src/ez80/ez80_timerisr.c b/nuttx/arch/z80/src/ez80/ez80_timerisr.c index b047a1331..a251b57e7 100644 --- a/nuttx/arch/z80/src/ez80/ez80_timerisr.c +++ b/nuttx/arch/z80/src/ez80/ez80_timerisr.c @@ -112,7 +112,7 @@ int up_timerisr(int irq, chipreg_t *regs) void up_timerinit(void) { - uint16_t) reload; + uint16_t reload; uint8_t reg; /* Disable the timer */ @@ -142,7 +142,7 @@ void up_timerinit(void) * 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_RRL, (uint8_t)(reload)); diff --git a/nuttx/arch/z80/src/z8/up_mem.h b/nuttx/arch/z80/src/z8/up_mem.h index 877d043ff..42ad293a8 100644 --- a/nuttx/arch/z80/src/z8/up_mem.h +++ b/nuttx/arch/z80/src/z8/up_mem.h @@ -44,7 +44,7 @@ #include <stdint.h> /************************************************************************************ - * Definitions + * Pre-processor Definitions ************************************************************************************/ /* For the ZiLOG ZDS-II toolchain(s), the heap will be set using linker- @@ -59,12 +59,12 @@ #ifndef CONFIG_HEAP1_BASE extern far unsigned long far_heapbot; -# define CONFIG_HEAP1_BASE ((uint16_t))&far_heapbot) +# define CONFIG_HEAP1_BASE ((uint16_t)&far_heapbot) #endif #ifndef CONFIG_HEAP1_END 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 /************************************************************************************ |