summaryrefslogtreecommitdiff
path: root/nuttx/arch/sh/src/sh1
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2009-12-16 16:05:08 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2009-12-16 16:05:08 +0000
commitf8a2fb3042d58963a00fe808d18f84eec6a0be71 (patch)
tree9f122b32d69abfaf364eab636ef8cc5bd7b730a2 /nuttx/arch/sh/src/sh1
parentf66691d238faf4858c8c9f5c5a53f118a1e1ab8e (diff)
downloadpx4-nuttx-f8a2fb3042d58963a00fe808d18f84eec6a0be71.tar.gz
px4-nuttx-f8a2fb3042d58963a00fe808d18f84eec6a0be71.tar.bz2
px4-nuttx-f8a2fb3042d58963a00fe808d18f84eec6a0be71.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@2357 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/arch/sh/src/sh1')
-rw-r--r--nuttx/arch/sh/src/sh1/chip.h6
-rw-r--r--nuttx/arch/sh/src/sh1/sh1_703x.h3
-rw-r--r--nuttx/arch/sh/src/sh1/sh1_copystate.c6
-rwxr-xr-xnuttx/arch/sh/src/sh1/sh1_dumpstate.c34
-rw-r--r--nuttx/arch/sh/src/sh1/sh1_initialstate.c8
-rw-r--r--nuttx/arch/sh/src/sh1/sh1_irq.c14
-rw-r--r--nuttx/arch/sh/src/sh1/sh1_lowputc.c8
-rw-r--r--nuttx/arch/sh/src/sh1/sh1_schedulesigaction.c8
-rw-r--r--nuttx/arch/sh/src/sh1/sh1_serial.c86
-rw-r--r--nuttx/arch/sh/src/sh1/sh1_sigdeliver.c6
-rw-r--r--nuttx/arch/sh/src/sh1/sh1_timerisr.c12
11 files changed, 98 insertions, 93 deletions
diff --git a/nuttx/arch/sh/src/sh1/chip.h b/nuttx/arch/sh/src/sh1/chip.h
index c10322a13..21204155f 100644
--- a/nuttx/arch/sh/src/sh1/chip.h
+++ b/nuttx/arch/sh/src/sh1/chip.h
@@ -1,7 +1,7 @@
/************************************************************************************
* arch/sh/src/sh1/chip.h
*
- * Copyright (C) 2008 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
*
* Redistribution and use in source and binary forms, with or without
@@ -41,7 +41,7 @@
************************************************************************************/
#include <nuttx/config.h>
-#include <sys/types.h>
+#include <stdint.h>
#ifdef CONFIG_ARCH_SH7032
# include "sh1_703x.h"
@@ -63,7 +63,7 @@
#ifndef __ASSEMBLY__
# if CONFIG_ARCH_INTERRUPTSTACK > 3
- extern uint32 g_userstack;
+ extern uint32_t g_userstack;
# endif
#endif
diff --git a/nuttx/arch/sh/src/sh1/sh1_703x.h b/nuttx/arch/sh/src/sh1/sh1_703x.h
index 160afac96..b79bbb039 100644
--- a/nuttx/arch/sh/src/sh1/sh1_703x.h
+++ b/nuttx/arch/sh/src/sh1/sh1_703x.h
@@ -1,7 +1,7 @@
/************************************************************************************
* arch/sh/src/sh1/sh1_703x.h
*
- * Copyright (C) 2008 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
*
* Redistribution and use in source and binary forms, with or without
@@ -41,7 +41,6 @@
************************************************************************************/
#include <nuttx/config.h>
-#include <sys/types.h>
/************************************************************************************
* Definitions
diff --git a/nuttx/arch/sh/src/sh1/sh1_copystate.c b/nuttx/arch/sh/src/sh1/sh1_copystate.c
index 4449c0425..3b0863eb7 100644
--- a/nuttx/arch/sh/src/sh1/sh1_copystate.c
+++ b/nuttx/arch/sh/src/sh1/sh1_copystate.c
@@ -1,7 +1,7 @@
/****************************************************************************
* arch/sh/src/sh1/up_copystate.c
*
- * Copyright (C) 2008, 2009 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
*
* Redistribution and use in source and binary forms, with or without
@@ -39,7 +39,7 @@
#include <nuttx/config.h>
-#include <sys/types.h>
+#include <stdint.h>
#include "os_internal.h"
#include "up_internal.h"
@@ -66,7 +66,7 @@
/* A little faster than most memcpy's */
-void up_copystate(uint32 *dest, uint32 *src)
+void up_copystate(uint32_t *dest, uint32_t *src)
{
int i;
for (i = 0; i < XCPTCONTEXT_REGS; i++)
diff --git a/nuttx/arch/sh/src/sh1/sh1_dumpstate.c b/nuttx/arch/sh/src/sh1/sh1_dumpstate.c
index 55f998cca..cf6a16cbe 100755
--- a/nuttx/arch/sh/src/sh1/sh1_dumpstate.c
+++ b/nuttx/arch/sh/src/sh1/sh1_dumpstate.c
@@ -1,7 +1,7 @@
/****************************************************************************
* arch/sh/src/sh1/sh1_assert.c
*
- * Copyright (C) 2008, 2009 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
*
* Redistribution and use in source and binary forms, with or without
@@ -39,7 +39,7 @@
#include <nuttx/config.h>
-#include <sys/types.h>
+#include <stdint.h>
#include <debug.h>
#include <nuttx/irq.h>
@@ -76,9 +76,9 @@
* Name: sh1_getsp
****************************************************************************/
-static inline uint32 sh1_getsp(void)
+static inline uint32_t sh1_getsp(void)
{
- uint32 sp;
+ uint32_t sp;
__asm__ __volatile__
(
@@ -94,13 +94,13 @@ static inline uint32 sh1_getsp(void)
* Name: sh1_stackdump
****************************************************************************/
-static void sh1_stackdump(uint32 sp, uint32 stack_base)
+static void sh1_stackdump(uint32_t sp, uint32_t stack_base)
{
- uint32 stack ;
+ uint32_t stack ;
for (stack = sp & ~0x1f; stack < stack_base; stack += 32)
{
- uint32 *ptr = (uint32*)stack;
+ uint32_t *ptr = (uint32_t*)stack;
lldbg("%08x: %08x %08x %08x %08x %08x %08x %08x %08x\n",
stack, ptr[0], ptr[1], ptr[2], ptr[3],
ptr[4], ptr[5], ptr[6], ptr[7]);
@@ -113,7 +113,7 @@ static void sh1_stackdump(uint32 sp, uint32 stack_base)
static inline void sh1_registerdump(void)
{
- uint32 *ptr = current_regs;
+ uint32_t *ptr = current_regs;
/* Are user registers available from interrupt processing? */
@@ -147,13 +147,13 @@ static inline void sh1_registerdump(void)
void up_dumpstate(void)
{
- _TCB *rtcb = (_TCB*)g_readytorun.head;
- uint32 sp = sh1_getsp();
- uint32 ustackbase;
- uint32 ustacksize;
+ _TCB *rtcb = (_TCB*)g_readytorun.head;
+ uint32_t sp = sh1_getsp();
+ uint32_t ustackbase;
+ uint32_t ustacksize;
#if CONFIG_ARCH_INTERRUPTSTACK > 3
- uint32 istackbase;
- uint32 istacksize;
+ uint32_t istackbase;
+ uint32_t istacksize;
#endif
/* Get the limits on the user stack memory */
@@ -165,14 +165,14 @@ void up_dumpstate(void)
}
else
{
- ustackbase = (uint32)rtcb->adj_stack_ptr;
- ustacksize = (uint32)rtcb->adj_stack_size;
+ ustackbase = (uint32_t)rtcb->adj_stack_ptr;
+ ustacksize = (uint32_t)rtcb->adj_stack_size;
}
/* Get the limits on the interrupt stack memory */
#if CONFIG_ARCH_INTERRUPTSTACK > 3
- istackbase = (uint32)&g_userstack;
+ istackbase = (uint32_t)&g_userstack;
istacksize = (CONFIG_ARCH_INTERRUPTSTACK & ~3) - 4;
/* Show interrupt stack info */
diff --git a/nuttx/arch/sh/src/sh1/sh1_initialstate.c b/nuttx/arch/sh/src/sh1/sh1_initialstate.c
index 8ad4290e1..692561e86 100644
--- a/nuttx/arch/sh/src/sh1/sh1_initialstate.c
+++ b/nuttx/arch/sh/src/sh1/sh1_initialstate.c
@@ -1,7 +1,7 @@
/****************************************************************************
* arch/sh/src/sh1/sh1_initialstate.c
*
- * Copyright (C) 2008, 2009 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
*
* Redistribution and use in source and binary forms, with or without
@@ -38,7 +38,7 @@
****************************************************************************/
#include <nuttx/config.h>
-#include <sys/types.h>
+#include <stdint.h>
#include <string.h>
#include <nuttx/arch.h>
#include "up_internal.h"
@@ -99,8 +99,8 @@ void up_initial_state(_TCB *tcb)
/* Initialize the initial exception register context structure */
memset(xcp, 0, sizeof(struct xcptcontext));
- xcp->regs[REG_SP] = (uint32)tcb->adj_stack_ptr;
- xcp->regs[REG_PC] = (uint32)tcb->start;
+ xcp->regs[REG_SP] = (uint32_t)tcb->adj_stack_ptr;
+ xcp->regs[REG_PC] = (uint32_t)tcb->start;
#ifdef CONFIG_SUPPRESS_INTERRUPTS
xcp->regs[REG_SR] = up_getsr() | 0x000000f0;
#else
diff --git a/nuttx/arch/sh/src/sh1/sh1_irq.c b/nuttx/arch/sh/src/sh1/sh1_irq.c
index 76c157f4f..c5b33cc3e 100644
--- a/nuttx/arch/sh/src/sh1/sh1_irq.c
+++ b/nuttx/arch/sh/src/sh1/sh1_irq.c
@@ -1,7 +1,7 @@
/****************************************************************************
* arch/sh/src/sh1/sh1_irq.c
*
- * Copyright (C) 2008 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
*
* Redistribution and use in source and binary forms, with or without
@@ -39,7 +39,7 @@
#include <nuttx/config.h>
-#include <sys/types.h>
+#include <stdint.h>
#include <errno.h>
#include <debug.h>
@@ -57,7 +57,7 @@
* Public Data
****************************************************************************/
-uint32 *current_regs;
+uint32_t *current_regs;
/****************************************************************************
* Private Data
@@ -98,10 +98,10 @@ void up_irqinitialize(void)
void up_prioritize_irq(int irq, int priority)
{
- uint16 mask;
- uint16 reg16;
- uint32 reg;
- int shift;
+ uint16_t mask;
+ uint16_t reg16;
+ uint32_t reg;
+ int shift;
#ifdef CONFIG_DEBUG
if ((unsigned) irq > NR_IRQS || (unsigned)priority > 15)
diff --git a/nuttx/arch/sh/src/sh1/sh1_lowputc.c b/nuttx/arch/sh/src/sh1/sh1_lowputc.c
index 092093670..dd66c727b 100644
--- a/nuttx/arch/sh/src/sh1/sh1_lowputc.c
+++ b/nuttx/arch/sh/src/sh1/sh1_lowputc.c
@@ -1,7 +1,7 @@
/**************************************************************************
* arch/sh/src/sh1/sh1_lowputc.c
*
- * Copyright (C) 2008 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
*
* Redistribution and use in source and binary forms, with or without
@@ -38,8 +38,8 @@
**************************************************************************/
#include <nuttx/config.h>
-#include <sys/types.h>
+#include <stdint.h>
#include <nuttx/arch.h>
#include "up_internal.h"
@@ -197,7 +197,7 @@ static inline int up_txready(void)
void up_lowputc(char ch)
{
#ifdef HAVE_CONSOLE
- ubyte ssr;
+ uint8_t ssr;
/* Wait until the TDR is avaible */
@@ -228,7 +228,7 @@ void up_lowputc(char ch)
void up_lowsetup(void)
{
#if defined(HAVE_CONSOLE) && !defined(CONFIG_SUPPRESS_SCI_CONFIG)
- ubyte scr;
+ uint8_t scr;
/* Disable the transmitter and receiver */
diff --git a/nuttx/arch/sh/src/sh1/sh1_schedulesigaction.c b/nuttx/arch/sh/src/sh1/sh1_schedulesigaction.c
index 3af182f37..6e7ba34e8 100644
--- a/nuttx/arch/sh/src/sh1/sh1_schedulesigaction.c
+++ b/nuttx/arch/sh/src/sh1/sh1_schedulesigaction.c
@@ -1,7 +1,7 @@
/****************************************************************************
* arch/sh/src/sh1/sh1_schedulesigaction.c
*
- * Copyright (C) 2008, 2009 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
*
* Redistribution and use in source and binary forms, with or without
@@ -39,7 +39,7 @@
#include <nuttx/config.h>
-#include <sys/types.h>
+#include <stdint.h>
#include <sched.h>
#include <debug.h>
@@ -154,7 +154,7 @@ void up_schedule_sigaction(_TCB *tcb, sig_deliver_t sigdeliver)
* disabled
*/
- current_regs[REG_PC] = (uint32)up_sigdeliver;
+ current_regs[REG_PC] = (uint32_t)up_sigdeliver;
current_regs[REG_SR] |= 0x000000f0;
/* And make sure that the saved context in the TCB
@@ -186,7 +186,7 @@ void up_schedule_sigaction(_TCB *tcb, sig_deliver_t sigdeliver)
* disabled
*/
- tcb->xcp.regs[REG_PC] = (uint32)up_sigdeliver;
+ tcb->xcp.regs[REG_PC] = (uint32_t)up_sigdeliver;
tcb->xcp.regs[REG_SR] |= 0x000000f0 ;
}
diff --git a/nuttx/arch/sh/src/sh1/sh1_serial.c b/nuttx/arch/sh/src/sh1/sh1_serial.c
index 0be2bc280..69fda986a 100644
--- a/nuttx/arch/sh/src/sh1/sh1_serial.c
+++ b/nuttx/arch/sh/src/sh1/sh1_serial.c
@@ -1,7 +1,7 @@
/****************************************************************************
* arch/sh/src/sh1/sh1_serial.c
*
- * Copyright (C) 2008 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
*
* Redistribution and use in source and binary forms, with or without
@@ -38,12 +38,16 @@
****************************************************************************/
#include <nuttx/config.h>
+
#include <sys/types.h>
+#include <stdint.h>
+#include <stdbool.h>
#include <unistd.h>
#include <semaphore.h>
#include <string.h>
#include <errno.h>
#include <debug.h>
+
#include <nuttx/irq.h>
#include <nuttx/arch.h>
#include <nuttx/serial.h>
@@ -137,31 +141,31 @@
struct up_dev_s
{
- uint32 scibase; /* Base address of SCI registers */
- uint32 baud; /* Configured baud */
- volatile ubyte scr; /* Saved SCR value */
- volatile ubyte ssr; /* Saved SR value (only used during interrupt processing) */
- ubyte irq; /* Base IRQ associated with this SCI */
- ubyte parity; /* 0=none, 1=odd, 2=even */
- ubyte bits; /* Number of bits (7 or 8) */
- boolean stopbits2; /* TRUE: Configure with 2 stop bits instead of 1 */
+ uint32_t scibase; /* Base address of SCI registers */
+ uint32_t baud; /* Configured baud */
+ volatile uint8_t scr; /* Saved SCR value */
+ volatile uint8_t ssr; /* Saved SR value (only used during interrupt processing) */
+ uint8_t irq; /* Base IRQ associated with this SCI */
+ uint8_t parity; /* 0=none, 1=odd, 2=even */
+ uint8_t bits; /* Number of bits (7 or 8) */
+ bool stopbits2; /* true: Configure with 2 stop bits instead of 1 */
};
/****************************************************************************
* Private Function Prototypes
****************************************************************************/
-static int up_setup(struct uart_dev_s *dev);
-static void up_shutdown(struct uart_dev_s *dev);
-static int up_attach(struct uart_dev_s *dev);
-static void up_detach(struct uart_dev_s *dev);
-static int up_interrupt(int irq, void *context);
-static int up_receive(struct uart_dev_s *dev, uint32 *status);
-static void up_rxint(struct uart_dev_s *dev, boolean enable);
-static boolean up_rxavailable(struct uart_dev_s *dev);
-static void up_send(struct uart_dev_s *dev, int ch);
-static void up_txint(struct uart_dev_s *dev, boolean enable);
-static boolean up_txready(struct uart_dev_s *dev);
+static int up_setup(struct uart_dev_s *dev);
+static void up_shutdown(struct uart_dev_s *dev);
+static int up_attach(struct uart_dev_s *dev);
+static void up_detach(struct uart_dev_s *dev);
+static int up_interrupt(int irq, void *context);
+static int up_receive(struct uart_dev_s *dev, uint32_t *status);
+static void up_rxint(struct uart_dev_s *dev, bool enable);
+static bool up_rxavailable(struct uart_dev_s *dev);
+static void up_send(struct uart_dev_s *dev, int ch);
+static void up_txint(struct uart_dev_s *dev, bool enable);
+static bool up_txready(struct uart_dev_s *dev);
/****************************************************************************
* Private Variables
@@ -261,7 +265,7 @@ static uart_dev_t g_sci1port =
* Name: up_serialin
****************************************************************************/
-static inline ubyte up_serialin(struct up_dev_s *priv, int offset)
+static inline uint8_t up_serialin(struct up_dev_s *priv, int offset)
{
return getreg8(priv->scibase + offset);
}
@@ -270,7 +274,7 @@ static inline ubyte up_serialin(struct up_dev_s *priv, int offset)
* Name: up_serialout
****************************************************************************/
-static inline void up_serialout(struct up_dev_s *priv, int offset, ubyte value)
+static inline void up_serialout(struct up_dev_s *priv, int offset, uint8_t value)
{
putreg8(value, priv->scibase + offset);
}
@@ -279,7 +283,7 @@ static inline void up_serialout(struct up_dev_s *priv, int offset, ubyte value)
* Name: up_disablesciint
****************************************************************************/
-static inline void up_disablesciint(struct up_dev_s *priv, ubyte *scr)
+static inline void up_disablesciint(struct up_dev_s *priv, uint8_t *scr)
{
/* Return a copy of the current scr settings */
@@ -298,7 +302,7 @@ static inline void up_disablesciint(struct up_dev_s *priv, ubyte *scr)
* Name: up_restoresciint
****************************************************************************/
-static inline void up_restoresciint(struct up_dev_s *priv, ubyte scr)
+static inline void up_restoresciint(struct up_dev_s *priv, uint8_t scr)
{
/* Set the interrupt bits in the scr value */
@@ -368,8 +372,8 @@ static inline void up_setbrr(struct up_dev_s *priv, unsigned int baud)
* = 32
*/
- uint32 brr = ((((SH1_CLOCK + 16) / 32) + (baud >> 1)) / baud) - 1;
- up_serialout(priv, SH1_SCI_BRR_OFFSET, (uint16)brr);
+ uint32_t brr = ((((SH1_CLOCK + 16) / 32) + (baud >> 1)) / baud) - 1;
+ up_serialout(priv, SH1_SCI_BRR_OFFSET, (uint16_t))brr);
}
/****************************************************************************
@@ -386,7 +390,7 @@ static int up_setup(struct uart_dev_s *dev)
{
#ifndef CONFIG_SUPPRESS_SCI_CONFIG
struct up_dev_s *priv = (struct up_dev_s*)dev->priv;
- ubyte smr;
+ uint8_t smr;
/* Disable the transmitter and receiver */
@@ -651,8 +655,8 @@ static int up_interrupt(int irq, void *context)
static int up_receive(struct uart_dev_s *dev, unsigned int *status)
{
struct up_dev_s *priv = (struct up_dev_s*)dev->priv;
- ubyte rdr;
- ubyte ssr;
+ uint8_t rdr;
+ uint8_t ssr;
/* Read the character from the RDR port */
@@ -668,7 +672,7 @@ static int up_receive(struct uart_dev_s *dev, unsigned int *status)
/* For status, return the SSR at the time that the interrupt was received */
- *status = (uint32)priv->ssr << 8 | rdr;
+ *status = (uint32_t)priv->ssr << 8 | rdr;
/* Return the received character */
@@ -683,7 +687,7 @@ static int up_receive(struct uart_dev_s *dev, unsigned int *status)
*
****************************************************************************/
-static void up_rxint(struct uart_dev_s *dev, boolean enable)
+static void up_rxint(struct uart_dev_s *dev, bool enable)
{
struct up_dev_s *priv = (struct up_dev_s*)dev->priv;
irqstate_t flags;
@@ -719,11 +723,11 @@ static void up_rxint(struct uart_dev_s *dev, boolean enable)
* Name: up_rxavailable
*
* Description:
- * Return TRUE if the RDR is not empty
+ * Return true if the RDR is not empty
*
****************************************************************************/
-static boolean up_rxavailable(struct uart_dev_s *dev)
+static bool up_rxavailable(struct uart_dev_s *dev)
{
/* Return true if the RDR full bit is set in the SSR */
@@ -742,11 +746,11 @@ static boolean up_rxavailable(struct uart_dev_s *dev)
static void up_send(struct uart_dev_s *dev, int ch)
{
struct up_dev_s *priv = (struct up_dev_s*)dev->priv;
- ubyte ssr;
+ uint8_t ssr;
/* Write the data to the TDR */
- up_serialout(priv, SH1_SCI_TDR_OFFSET, (ubyte)ch);
+ up_serialout(priv, SH1_SCI_TDR_OFFSET, (uint8_t)ch);
/* Clear the TDRE bit in the SSR */
@@ -763,7 +767,7 @@ static void up_send(struct uart_dev_s *dev, int ch)
*
****************************************************************************/
-static void up_txint(struct uart_dev_s *dev, boolean enable)
+static void up_txint(struct uart_dev_s *dev, bool enable)
{
struct up_dev_s *priv = (struct up_dev_s*)dev->priv;
irqstate_t flags;
@@ -814,11 +818,11 @@ static void up_txint(struct uart_dev_s *dev, boolean enable)
* Name: up_txready
*
* Description:
- * Return TRUE if the TDR is empty
+ * Return true if the TDR is empty
*
****************************************************************************/
-static boolean up_txready(struct uart_dev_s *dev)
+static bool up_txready(struct uart_dev_s *dev)
{
struct up_dev_s *priv = (struct up_dev_s*)dev->priv;
return (up_serialin(priv, SH1_SCI_SSR_OFFSET) & SH1_SCISSR_TDRE) != 0;
@@ -856,7 +860,7 @@ void up_earlyconsoleinit(void)
/* Configuration whichever one is the console */
#ifdef HAVE_CONSOLE
- CONSOLE_DEV.isconsole = TRUE;
+ CONSOLE_DEV.isconsole = true;
up_setup(&CONSOLE_DEV);
#endif
}
@@ -900,7 +904,7 @@ int up_putc(int ch)
{
#ifdef HAVE_CONSOLE
struct up_dev_s *priv = (struct up_dev_s*)CONSOLE_DEV.priv;
- ubyte scr;
+ uint8_t scr;
up_disablesciint(priv, &scr);
@@ -915,7 +919,7 @@ int up_putc(int ch)
}
up_waittxready(priv);
- up_serialout(priv, SH1_SCI_TDR_OFFSET, (ubyte)ch);
+ up_serialout(priv, SH1_SCI_TDR_OFFSET, (uint8_t)ch);
up_waittxready(priv);
up_restoresciint(priv, scr);
diff --git a/nuttx/arch/sh/src/sh1/sh1_sigdeliver.c b/nuttx/arch/sh/src/sh1/sh1_sigdeliver.c
index 91e9163ff..cddec6041 100644
--- a/nuttx/arch/sh/src/sh1/sh1_sigdeliver.c
+++ b/nuttx/arch/sh/src/sh1/sh1_sigdeliver.c
@@ -1,7 +1,7 @@
/****************************************************************************
* common/up_sigdeliver.c
*
- * Copyright (C) 2008 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
*
* Redistribution and use in source and binary forms, with or without
@@ -39,7 +39,7 @@
#include <nuttx/config.h>
-#include <sys/types.h>
+#include <stdint.h>
#include <sched.h>
#include <debug.h>
@@ -83,7 +83,7 @@ void up_sigdeliver(void)
{
#ifndef CONFIG_DISABLE_SIGNALS
_TCB *rtcb = (_TCB*)g_readytorun.head;
- uint32 regs[XCPTCONTEXT_REGS];
+ uint32_t regs[XCPTCONTEXT_REGS];
sig_deliver_t sigdeliver;
/* Save the errno. This must be preserved throughout the
diff --git a/nuttx/arch/sh/src/sh1/sh1_timerisr.c b/nuttx/arch/sh/src/sh1/sh1_timerisr.c
index f29c141eb..7072c4c64 100644
--- a/nuttx/arch/sh/src/sh1/sh1_timerisr.c
+++ b/nuttx/arch/sh/src/sh1/sh1_timerisr.c
@@ -1,7 +1,7 @@
/****************************************************************************
* arch/sh/src/sh1/sh1_timerisr.c
*
- * Copyright (C) 2008 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
*
* Redistribution and use in source and binary forms, with or without
@@ -38,9 +38,11 @@
****************************************************************************/
#include <nuttx/config.h>
-#include <sys/types.h>
+
+#include <stdint.h>
#include <time.h>
#include <debug.h>
+
#include <nuttx/arch.h>
#include <arch/board/board.h>
@@ -131,9 +133,9 @@
*
****************************************************************************/
-int up_timerisr(int irq, uint32 *regs)
+int up_timerisr(int irq, uint32_t *regs)
{
- ubyte reg8;
+ uint8_t reg8;
/* Process timer interrupt */
@@ -159,7 +161,7 @@ int up_timerisr(int irq, uint32 *regs)
void up_timerinit(void)
{
- ubyte reg8;
+ uint8_t reg8;
/* Clear timer counter 0 */