diff options
Diffstat (limited to 'nuttx/configs/xtrs/src/xtr_serial.c')
-rw-r--r-- | nuttx/configs/xtrs/src/xtr_serial.c | 60 |
1 files changed, 31 insertions, 29 deletions
diff --git a/nuttx/configs/xtrs/src/xtr_serial.c b/nuttx/configs/xtrs/src/xtr_serial.c index 9e25d09d1..f37d2876a 100644 --- a/nuttx/configs/xtrs/src/xtr_serial.c +++ b/nuttx/configs/xtrs/src/xtr_serial.c @@ -6,7 +6,7 @@ * * This file is a part of NuttX and hence * - * Copyright (C) 2008 Gregory Nutt. All rights reserved. + * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -44,6 +44,8 @@ #include <nuttx/config.h> #include <sys/types.h> +#include <stdint.h> +#include <stdbool.h> #include <unistd.h> #include <string.h> #include <errno.h> @@ -102,18 +104,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 @@ -145,9 +147,9 @@ static char g_uarttxbuffer[CONFIG_UART_TXBUFSIZE]; static uart_dev_t g_uartport = { 0, /* open_count */ - FALSE, /* xmitwaiting */ - FALSE, /* recvwaiting */ - FALSE, /* isconsole */ + false, /* xmitwaiting */ + false, /* recvwaiting */ + false, /* isconsole */ { 1 }, /* closesem */ { 0 }, /* xmitsem */ { 0 }, /* recvsem */ @@ -275,9 +277,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_lowputc(); +// uint8_t ch = z80_lowputc(); *status = 0; return ch; @@ -291,7 +293,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) { } @@ -299,13 +301,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; } /**************************************************************************** @@ -329,7 +331,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) { } @@ -337,26 +339,26 @@ static void up_txint(struct uart_dev_s *dev, boolean enable) * Name: up_txready * * Description: - * Return TRUE if the transmit fifo is not full + * Return true if the transmit 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; } /**************************************************************************** |