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@2353 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo 2009-12-16 01:47:46 +00:00
parent 65afaa684a
commit 3ff1175885
22 changed files with 49 additions and 51 deletions

View File

@ -45,7 +45,6 @@
************************************************************************************/ ************************************************************************************/
#include <nuttx/config.h> #include <nuttx/config.h>
#include <sys/types.h>
#include <nuttx/irq.h> #include <nuttx/irq.h>
/************************************************************************************ /************************************************************************************

View File

@ -45,7 +45,6 @@
************************************************************************************/ ************************************************************************************/
#include <nuttx/config.h> #include <nuttx/config.h>
#include <sys/types.h>
#include <nuttx/irq.h> #include <nuttx/irq.h>
/************************************************************************************ /************************************************************************************

View File

@ -45,7 +45,6 @@
************************************************************************************/ ************************************************************************************/
#include <nuttx/config.h> #include <nuttx/config.h>
#include <sys/types.h>
#include <nuttx/irq.h> #include <nuttx/irq.h>
/************************************************************************************ /************************************************************************************

View File

@ -42,7 +42,7 @@
#include <nuttx/config.h> #include <nuttx/config.h>
#ifndef __ASSEMBLY__ #ifndef __ASSEMBLY__
# include <sys/types.h> # include <stdint.h>
#endif #endif
#include <arch/board/board.h> #include <arch/board/board.h>
@ -58,12 +58,12 @@
#ifndef __ASSEMBLY__ #ifndef __ASSEMBLY__
# define getreg8(a) (*(volatile ubyte *)(a)) # define getreg8(a) (*(volatile uint8_t *)(a))
# define putreg8(v,a) (*(volatile ubyte *)(a) = (v)) # define putreg8(v,a) (*(volatile uint8_t *)(a) = (v))
# define getreg16(a) (*(volatile uint16 *)(a)) # define getreg16(a) (*(volatile uint16_t *)(a))
# define putreg16(v,a) (*(volatile uint16 *)(a) = (v)) # define putreg16(v,a) (*(volatile uint16_t *)(a) = (v))
# define getreg32(a) (*(volatile uint32 *)(a)) # define getreg32(a) (*(volatile uint32_t *)(a))
# define putreg32(v,a) (*(volatile uint32 *)(a) = (v)) # define putreg32(v,a) (*(volatile uint32_t *)(a) = (v))
/**************************************************************************** /****************************************************************************
* Public Function Prototypes * Public Function Prototypes
@ -79,9 +79,9 @@ extern "C" {
/* Atomic modification of registers */ /* Atomic modification of registers */
EXTERN void modifyreg8(unsigned int addr, ubyte clearbits, ubyte setbits); EXTERN void modifyreg8(unsigned int addr, uint8_t clearbits, uint8_t setbits);
EXTERN void modifyreg16(unsigned int addr, uint16 clearbits, uint16 setbits); EXTERN void modifyreg16(unsigned int addr, uint16_t clearbits, uint16_t setbits);
EXTERN void modifyreg32(unsigned int addr, uint32 clearbits, uint32 setbits); EXTERN void modifyreg32(unsigned int addr, uint32_t clearbits, uint32_t setbits);
#undef EXTERN #undef EXTERN
#if defined(__cplusplus) #if defined(__cplusplus)

View File

@ -40,6 +40,7 @@
#include <nuttx/config.h> #include <nuttx/config.h>
#include <sys/types.h> #include <sys/types.h>
#include <stdint.h>
#include <sched.h> #include <sched.h>
#include <debug.h> #include <debug.h>
@ -92,7 +93,7 @@ int up_create_stack(_TCB *tcb, size_t stack_size)
if (!tcb->stack_alloc_ptr) if (!tcb->stack_alloc_ptr)
{ {
tcb->stack_alloc_ptr = (uint32 *)malloc(stack_size); tcb->stack_alloc_ptr = (uint32_t *)malloc(stack_size);
} }
if (tcb->stack_alloc_ptr) if (tcb->stack_alloc_ptr)
@ -119,7 +120,7 @@ int up_create_stack(_TCB *tcb, size_t stack_size)
/* Save the adjusted stack values in the _TCB */ /* Save the adjusted stack values in the _TCB */
tcb->adj_stack_ptr = (uint32*)top_of_stack; tcb->adj_stack_ptr = (uint32_t*)top_of_stack;
tcb->adj_stack_size = size_of_stack; tcb->adj_stack_size = size_of_stack;
up_ledon(LED_STACKCREATED); up_ledon(LED_STACKCREATED);

View File

@ -38,7 +38,7 @@
****************************************************************************/ ****************************************************************************/
#include <nuttx/config.h> #include <nuttx/config.h>
#include <sys/types.h>
#include <nuttx/arch.h> #include <nuttx/arch.h>
#include "up_internal.h" #include "up_internal.h"

View File

@ -39,7 +39,6 @@
#include <nuttx/config.h> #include <nuttx/config.h>
#include <sys/types.h>
#include <debug.h> #include <debug.h>
#include <nuttx/arch.h> #include <nuttx/arch.h>

View File

@ -40,6 +40,9 @@
* Included Files * Included Files
****************************************************************************/ ****************************************************************************/
#include <nuttx/config.h>
#include <stdint.h>
/**************************************************************************** /****************************************************************************
* Definitions * Definitions
****************************************************************************/ ****************************************************************************/
@ -96,19 +99,19 @@ typedef void (*up_vector_t)(void);
* structure. If is non-NULL only during interrupt processing. * structure. If is non-NULL only during interrupt processing.
*/ */
extern uint16 *current_regs; extern uint16_t *current_regs;
/* This is the beginning of heap as provided from processor-specific logic. /* This is the beginning of heap as provided from processor-specific logic.
* This is the first address in RAM after the loaded program+bss+idle stack. * This is the first address in RAM after the loaded program+bss+idle stack.
* The end of the heap is CONFIG_DRAM_END * The end of the heap is CONFIG_DRAM_END
*/ */
extern uint16 g_heapbase; extern uint16_t g_heapbase;
/* Address of the saved user stack pointer */ /* Address of the saved user stack pointer */
#if CONFIG_ARCH_INTERRUPTSTACK > 1 #if CONFIG_ARCH_INTERRUPTSTACK > 1
extern uint32 g_userstack; extern uint32_t g_userstack;
#endif #endif
/**************************************************************************** /****************************************************************************
@ -125,16 +128,16 @@ extern void up_boot(void);
/* Context switching functions */ /* Context switching functions */
extern void up_copystate(uint32 *dest, uint32 *src); extern void up_copystate(uint32_t *dest, uint32_t *src);
extern void up_decodeirq(uint32 *regs); extern void up_decodeirq(uint32_t *regs);
extern void up_irqinitialize(void); extern void up_irqinitialize(void);
extern int up_saveusercontext(uint32 *saveregs); extern int up_saveusercontext(uint32_t *saveregs);
extern void up_fullcontextrestore(uint32 *restoreregs) __attribute__ ((noreturn)); extern void up_fullcontextrestore(uint32_t *restoreregs) __attribute__ ((noreturn));
extern void up_switchcontext(uint32 *saveregs, uint32 *restoreregs); extern void up_switchcontext(uint32_t *saveregs, uint32_t *restoreregs);
/* Interrupt handling */ /* Interrupt handling */
extern uint16 *up_doirq(int irq, uint32 *regs); extern uint16_t *up_doirq(int irq, uint32_t *regs);
extern void up_maskack_irq(int irq); extern void up_maskack_irq(int irq);
/* Signal handling */ /* Signal handling */
@ -144,7 +147,7 @@ extern void up_sigdeliver(void);
/* System timer initialization */ /* System timer initialization */
extern void up_timerinit(void); extern void up_timerinit(void);
extern int up_timerisr(int irq, uint32 *regs); extern int up_timerisr(int irq, uint32_t *regs);
/* Debug output */ /* Debug output */

View File

@ -38,8 +38,8 @@
****************************************************************************/ ****************************************************************************/
#include <nuttx/config.h> #include <nuttx/config.h>
#include <sys/types.h>
#include <stdbool.h>
#include <nuttx/arch.h> #include <nuttx/arch.h>
#include <nuttx/irq.h> #include <nuttx/irq.h>
@ -60,12 +60,12 @@
/**************************************************************************** /****************************************************************************
* Name: up_interrupt_context * Name: up_interrupt_context
* *
* Description: Return TRUE is we are currently executing in the interrupt * Description: Return true is we are currently executing in the interrupt
* handler context. * handler context.
* *
****************************************************************************/ ****************************************************************************/
boolean up_interrupt_context(void) bool up_interrupt_context(void)
{ {
return current_regs != NULL; return current_regs != NULL;
} }

View File

@ -39,7 +39,7 @@
#include <nuttx/config.h> #include <nuttx/config.h>
#include <sys/types.h> #include <stdint.h>
#include <debug.h> #include <debug.h>
#include <arch/irq.h> #include <arch/irq.h>
@ -71,10 +71,10 @@
* *
****************************************************************************/ ****************************************************************************/
void modifyreg16(unsigned int addr, uint16 clearbits, uint16 setbits) void modifyreg16(unsigned int addr, uint16_t clearbits, uint16_t setbits)
{ {
irqstate_t flags; irqstate_t flags;
uint16 regval; uint16_t regval;
flags = irqsave(); flags = irqsave();
regval = getreg16(addr); regval = getreg16(addr);

View File

@ -39,7 +39,7 @@
#include <nuttx/config.h> #include <nuttx/config.h>
#include <sys/types.h> #include <stdint.h>
#include <debug.h> #include <debug.h>
#include <arch/irq.h> #include <arch/irq.h>
@ -71,10 +71,10 @@
* *
****************************************************************************/ ****************************************************************************/
void modifyreg32(unsigned int addr, uint32 clearbits, uint32 setbits) void modifyreg32(unsigned int addr, uint32_t clearbits, uint32_t setbits)
{ {
irqstate_t flags; irqstate_t flags;
uint32 regval; uint32_t regval;
flags = irqsave(); flags = irqsave();
regval = getreg32(addr); regval = getreg32(addr);

View File

@ -39,7 +39,7 @@
#include <nuttx/config.h> #include <nuttx/config.h>
#include <sys/types.h> #include <stdint.h>
#include <debug.h> #include <debug.h>
#include <arch/irq.h> #include <arch/irq.h>
@ -71,10 +71,10 @@
* *
****************************************************************************/ ****************************************************************************/
void modifyreg8(unsigned int addr, ubyte clearbits, ubyte setbits) void modifyreg8(unsigned int addr, uint8_t clearbits, uint8_t setbits)
{ {
irqstate_t flags; irqstate_t flags;
ubyte regval; uint8_t regval;
flags = irqsave(); flags = irqsave();
regval = getreg8(addr); regval = getreg8(addr);

View File

@ -38,7 +38,7 @@
****************************************************************************/ ****************************************************************************/
#include <nuttx/config.h> #include <nuttx/config.h>
#include <sys/types.h>
#include <nuttx/arch.h> #include <nuttx/arch.h>
#include "up_internal.h" #include "up_internal.h"

View File

@ -38,7 +38,6 @@
****************************************************************************/ ****************************************************************************/
#include <nuttx/config.h> #include <nuttx/config.h>
#include <sys/types.h>
#include <sched.h> #include <sched.h>
#include <debug.h> #include <debug.h>

View File

@ -38,11 +38,14 @@
****************************************************************************/ ****************************************************************************/
#include <nuttx/config.h> #include <nuttx/config.h>
#include <sys/types.h> #include <sys/types.h>
#include <stdint.h>
#include <sched.h> #include <sched.h>
#include <debug.h> #include <debug.h>
#include <nuttx/kmalloc.h> #include <nuttx/kmalloc.h>
#include <nuttx/arch.h> #include <nuttx/arch.h>
#include "up_internal.h" #include "up_internal.h"
/**************************************************************************** /****************************************************************************
@ -111,7 +114,7 @@ int up_use_stack(_TCB *tcb, void *stack, size_t stack_size)
/* Save the adjusted stack values in the _TCB */ /* Save the adjusted stack values in the _TCB */
tcb->adj_stack_ptr = (uint32*)top_of_stack; tcb->adj_stack_ptr = (uint32_t*)top_of_stack;
tcb->adj_stack_size = size_of_stack; tcb->adj_stack_size = size_of_stack;
return OK; return OK;
} }

View File

@ -41,7 +41,6 @@
************************************************************************************/ ************************************************************************************/
#include <nuttx/config.h> #include <nuttx/config.h>
#include <sys/types.h>
/************************************************************************************ /************************************************************************************
* Definitions * Definitions

View File

@ -41,7 +41,6 @@
************************************************************************************/ ************************************************************************************/
#include <nuttx/config.h> #include <nuttx/config.h>
#include <sys/types.h>
#include "chip.h" #include "chip.h"
/************************************************************************************ /************************************************************************************

View File

@ -41,7 +41,6 @@
************************************************************************************/ ************************************************************************************/
#include <nuttx/config.h> #include <nuttx/config.h>
#include <sys/types.h>
#include "chip.h" #include "chip.h"
/************************************************************************************ /************************************************************************************

View File

@ -41,7 +41,9 @@
************************************************************************************/ ************************************************************************************/
#include <nuttx/config.h> #include <nuttx/config.h>
#include <sys/types.h>
#include <stdint.h>
#include <stdbool.h>
#include "up_internal.h" #include "up_internal.h"
#include "chip.h" #include "chip.h"
@ -124,8 +126,8 @@ EXTERN int hcs12_ethinitialize(int intf);
struct spi_dev_s; struct spi_dev_s;
enum spi_dev_e; enum spi_dev_e;
EXTERN void hcs12_spiselect(FAR struct spi_dev_s *dev, enum spi_dev_e devid, boolean selected); EXTERN void hcs12_spiselect(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected);
EXTERN ubyte hcs12_spistatus(FAR struct spi_dev_s *dev, enum spi_dev_e devid); EXTERN uint8_t hcs12_spistatus(FAR struct spi_dev_s *dev, enum spi_dev_e devid);
#undef EXTERN #undef EXTERN
#if defined(__cplusplus) #if defined(__cplusplus)

View File

@ -41,7 +41,6 @@
************************************************************************************/ ************************************************************************************/
#include <nuttx/config.h> #include <nuttx/config.h>
#include <sys/types.h>
#include "chip.h" #include "chip.h"
/************************************************************************************ /************************************************************************************

View File

@ -38,7 +38,6 @@
****************************************************************************/ ****************************************************************************/
#include <nuttx/config.h> #include <nuttx/config.h>
#include <sys/types.h>
#include "up_internal.h" #include "up_internal.h"

View File

@ -39,7 +39,6 @@
****************************************************************************/ ****************************************************************************/
#include <nuttx/config.h> #include <nuttx/config.h>
#include <sys/types.h>
#include "mc9s12ne64_internal.h" #include "mc9s12ne64_internal.h"
#include "mc9s12ne64_mmc.h" #include "mc9s12ne64_mmc.h"