summaryrefslogtreecommitdiff
path: root/nuttx/arch/z16/src/z16f/z16f_serial.c
diff options
context:
space:
mode:
Diffstat (limited to 'nuttx/arch/z16/src/z16f/z16f_serial.c')
-rw-r--r--nuttx/arch/z16/src/z16f/z16f_serial.c30
1 files changed, 22 insertions, 8 deletions
diff --git a/nuttx/arch/z16/src/z16f/z16f_serial.c b/nuttx/arch/z16/src/z16f/z16f_serial.c
index ce40a497f..1446c5c57 100644
--- a/nuttx/arch/z16/src/z16f/z16f_serial.c
+++ b/nuttx/arch/z16/src/z16f/z16f_serial.c
@@ -55,14 +55,12 @@
#include "os_internal.h"
#include "up_internal.h"
-#if CONFIG_NFILE_DESCRIPTORS > 0
+#ifdef CONFIG_USE_SERIALDRIVER
/****************************************************************************
* Definitions
****************************************************************************/
-#define BASE_BAUD 115200
-
/* System clock frequency value from ZDS target settings */
extern _Erom unsigned long SYS_CLK_FREQ;
@@ -737,7 +735,7 @@ int up_putc(int ch)
return ch;
}
-#else /* CONFIG_NFILE_DESCRIPTORS > 0 */
+#else /* CONFIG_USE_SERIALDRIVER */
/****************************************************************************
* Definitions
@@ -756,10 +754,22 @@ int up_putc(int ch)
#endif
/****************************************************************************
+ * Private Function Prototypes
+ ****************************************************************************/
+
+/****************************************************************************
+ * Private Variables
+ ****************************************************************************/
+
+/****************************************************************************
* Private Functions
****************************************************************************/
-static void _up_putc(int ch)
+/****************************************************************************
+ * Name: z16f_putc
+ ****************************************************************************/
+
+static void z16f_putc(int ch)
{
int tmp;
for (tmp = 1000 ; tmp > 0 && !z16f_contrde(); tmp--);
@@ -770,6 +780,10 @@ static void _up_putc(int ch)
* Public Functions
****************************************************************************/
+/****************************************************************************
+ * Name: up_putc
+ ****************************************************************************/
+
int up_putc(int ch)
{
/* Check for LF */
@@ -778,13 +792,13 @@ int up_putc(int ch)
{
/* Output CR before LF */
- _up_putc('\r');
+ z16f_putc('\r');
}
/* Output character */
- _up_putc(ch);
+ z16f_putc(ch);
return ch;
}
-#endif /* CONFIG_NFILE_DESCRIPTORS > 0 */
+#endif /* CONFIG_USE_SERIALDRIVER */