Basic Z16F serial driver functionality
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@577 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
parent
491369667b
commit
a13fbcfadc
@ -355,7 +355,7 @@ static inline void up_setrate(struct up_dev_s *priv, unsigned int rate)
|
||||
|
||||
static int up_setup(struct uart_dev_s *dev)
|
||||
{
|
||||
#ifdef CONFIG_SUPPRESS_UART_CONFIG
|
||||
#ifndef CONFIG_SUPPRESS_UART_CONFIG
|
||||
struct up_dev_s *priv = dev->priv;
|
||||
unsigned int cval;
|
||||
|
||||
|
@ -286,7 +286,7 @@ static inline void up_enablebreaks(struct up_dev_s *priv, boolean enable)
|
||||
|
||||
static int up_setup(struct uart_dev_s *dev)
|
||||
{
|
||||
#ifdef CONFIG_SUPPRESS_UART_CONFIG
|
||||
#ifndef CONFIG_SUPPRESS_UART_CONFIG
|
||||
struct up_dev_s *priv = (struct up_dev_s*)dev->priv;
|
||||
uint16 brsr;
|
||||
|
||||
|
@ -352,7 +352,7 @@ static inline void up_setrate(struct up_dev_s *priv, unsigned int rate)
|
||||
|
||||
static int up_setup(struct uart_dev_s *dev)
|
||||
{
|
||||
#ifdef CONFIG_SUPPRESS_UART_CONFIG
|
||||
#ifndef CONFIG_SUPPRESS_UART_CONFIG
|
||||
struct up_dev_s *priv = dev->priv;
|
||||
unsigned int cval;
|
||||
|
||||
|
@ -281,7 +281,7 @@ static inline void up_enablebreaks(struct up_dev_s *priv, boolean enable)
|
||||
|
||||
static int up_setup(struct uart_dev_s *dev)
|
||||
{
|
||||
#ifdef CONFIG_SUPPRESS_UART_CONFIG
|
||||
#ifndef CONFIG_SUPPRESS_UART_CONFIG
|
||||
struct up_dev_s *priv = (struct up_dev_s*)dev->priv;
|
||||
uint16 brsr;
|
||||
|
||||
|
@ -517,12 +517,12 @@
|
||||
/* Register access macros ***********************************************************/
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
# define getreg8(a) (*(ubyte volatile _Near*)((a) & 0xffff))
|
||||
# define putreg8(v,a) (*(ubyte volatile _Near*)((a) & 0xffff) = (v))
|
||||
# define getreg16(a) (*(uint16 volatile _Near*)((a) & 0xffff))
|
||||
# define putreg16(v,a) (*(uint16 volatile _Near*)((a) & 0xffff) = (v))
|
||||
# define getreg32(a) (*(uint32 volatile _Near*)((a) & 0xffff))
|
||||
# define putreg32(v,a) (*(uint32 volatile _Near*)((a) & 0xffff) = (v))
|
||||
# define getreg8(a) (*(ubyte volatile _Near*)(a))
|
||||
# define putreg8(v,a) (*(ubyte volatile _Near*)(a) = (v))
|
||||
# define getreg16(a) (*(uint16 volatile _Near*)(a))
|
||||
# define putreg16(v,a) (*(uint16 volatile _Near*)(a) = (v))
|
||||
# define getreg32(a) (*(uint32 volatile _Near*)(a))
|
||||
# define putreg32(v,a) (*(uint32 volatile _Near*)(a) = (v))
|
||||
#endif /* __ASSEMBLY__ */
|
||||
|
||||
/************************************************************************************
|
||||
|
@ -50,14 +50,11 @@
|
||||
#ifdef CONFIG_ARCH_LEDS
|
||||
xref _up_ledinit:EROM
|
||||
#endif
|
||||
#if defined(CONFIG_DEV_CONSOLE) && CONFIG_NFILE_DESCRIPTORS > 0
|
||||
xref _up_earlyserialinit:EROM
|
||||
#endif
|
||||
#if defined(CONFIG_ARCH_LOWPUTC) || defined(CONFIG_ARCH_LOWGETC)
|
||||
#if defined(CONFIG_ARCH_LOWPUTC) || defined(CONFIG_ARCH_LOWGETC) || CONFIG_NFILE_DESCRIPTORS == 0
|
||||
xref _z16f_lowuartinit:EROM
|
||||
#endif
|
||||
#if defined(CONFIG_DEV_CONSOLE) && CONFIG_NFILE_DESCRIPTORS > 0
|
||||
xref up_earlyserialinit:EROM
|
||||
xref _up_earlyserialinit:EROM
|
||||
#endif
|
||||
xref _os_start:EROM
|
||||
xref _up_doirq:EROM
|
||||
|
@ -298,7 +298,7 @@ static void z16f_waittx(struct uart_dev_s *dev, boolean (*status)(struct uart_de
|
||||
|
||||
static int z16f_setup(struct uart_dev_s *dev)
|
||||
{
|
||||
#ifdef CONFIG_SUPPRESS_UART_CONFIG
|
||||
#ifndef CONFIG_SUPPRESS_UART_CONFIG
|
||||
struct z16f_uart_s *priv = (struct z16f_uart_s*)dev->priv;
|
||||
uint32 brg;
|
||||
ubyte ctl0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user