diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2009-12-15 20:56:22 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2009-12-15 20:56:22 +0000 |
commit | 1375e4917dc9f9ec7ad488fa83c23d94a1053de9 (patch) | |
tree | cc9f00d272faed8cca17c115086ef4f542beec34 /nuttx/configs/z80sim/src/z80_serial.c | |
parent | 08b2e5a5495fb08277274eaaf91c21069e0fbadf (diff) | |
download | px4-nuttx-1375e4917dc9f9ec7ad488fa83c23d94a1053de9.tar.gz px4-nuttx-1375e4917dc9f9ec7ad488fa83c23d94a1053de9.tar.bz2 px4-nuttx-1375e4917dc9f9ec7ad488fa83c23d94a1053de9.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@2352 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/configs/z80sim/src/z80_serial.c')
-rw-r--r-- | nuttx/configs/z80sim/src/z80_serial.c | 60 |
1 files changed, 31 insertions, 29 deletions
diff --git a/nuttx/configs/z80sim/src/z80_serial.c b/nuttx/configs/z80sim/src/z80_serial.c index 803ff6fb9..0e66c804f 100644 --- a/nuttx/configs/z80sim/src/z80_serial.c +++ b/nuttx/configs/z80sim/src/z80_serial.c @@ -1,7 +1,7 @@ /**************************************************************************** * board/z80_serial.c * - * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. + * Copyright (C) 2007-2009 Gregory Nutt. All rights reserved. * Author: Gregory Nutt <spudmonkey@racsa.co.cr> * * Redistribution and use in source and binary forms, with or without @@ -40,6 +40,8 @@ #include <nuttx/config.h> #include <sys/types.h> +#include <stdint.h> +#include <stdbool.h> #include <unistd.h> #include <string.h> #include <errno.h> @@ -68,18 +70,18 @@ * 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_ioctl(struct file *filep, int cmd, unsigned long arg); -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 boolean up_txempty(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_ioctl(struct file *filep, int cmd, unsigned long arg); +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); +static bool up_txempty(struct uart_dev_s *dev); /**************************************************************************** * Private Variables @@ -111,9 +113,9 @@ static char g_uarttxbuffer[CONFIG_UART_TXBUFSIZE]; static uart_dev_t g_uartport = { 0, /* open_count */ - FALSE, /* xmitwaiting */ - FALSE, /* recvwaiting */ - TRUE, /* isconsole */ + false, /* xmitwaiting */ + false, /* recvwaiting */ + true, /* isconsole */ { 1 }, /* closesem */ { 0 }, /* xmitsem */ { 0 }, /* recvsem */ @@ -225,9 +227,9 @@ static int up_ioctl(struct file *filep, int cmd, unsigned long arg) * ****************************************************************************/ -static int up_receive(struct uart_dev_s *dev, uint32 *status) +static int up_receive(struct uart_dev_s *dev, uint32_t *status) { - uint8 ch = z80_lowgetc(); + uint8_t ch = z80_lowgetc(); *status = 0; return ch; } @@ -240,7 +242,7 @@ static int up_receive(struct uart_dev_s *dev, uint32 *status) * ****************************************************************************/ -static void up_rxint(struct uart_dev_s *dev, boolean enable) +static void up_rxint(struct uart_dev_s *dev, bool enable) { } @@ -248,13 +250,13 @@ static void up_rxint(struct uart_dev_s *dev, boolean enable) * Name: up_rxavailable * * Description: - * Return TRUE if the receive fifo is not empty + * Return true if the receive fifo is not empty * ****************************************************************************/ -static boolean up_rxavailable(struct uart_dev_s *dev) +static bool up_rxavailable(struct uart_dev_s *dev) { - return TRUE; + return true; } /**************************************************************************** @@ -278,7 +280,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) { } @@ -286,26 +288,26 @@ static void up_txint(struct uart_dev_s *dev, boolean enable) * Name: up_txready * * Description: - * Return TRUE if the tranmsit fifo is not full + * Return true if the tranmsit fifo is not full * ****************************************************************************/ -static boolean up_txready(struct uart_dev_s *dev) +static bool up_txready(struct uart_dev_s *dev) { - return TRUE; + return true; } /**************************************************************************** * Name: up_txempty * * Description: - * Return TRUE if the transmit fifo is empty + * Return true if the transmit fifo is empty * ****************************************************************************/ -static boolean up_txempty(struct uart_dev_s *dev) +static bool up_txempty(struct uart_dev_s *dev) { - return TRUE; + return true; } /**************************************************************************** |