diff --git a/arch/arm/include/lc823450/chip.h b/arch/arm/include/lc823450/chip.h index cb3cf20ef48..5e70ed991d8 100644 --- a/arch/arm/include/lc823450/chip.h +++ b/arch/arm/include/lc823450/chip.h @@ -103,7 +103,6 @@ # define NVIC_SYSH_SVCALL_PRIORITY NVIC_SYSH_PRIORITY_MAX #endif - /************************************************************************************ * Public Types ************************************************************************************/ diff --git a/arch/arm/src/lc823450/lc823450_dma.h b/arch/arm/src/lc823450/lc823450_dma.h index 64ac4939457..fbc2acdfed6 100644 --- a/arch/arm/src/lc823450/lc823450_dma.h +++ b/arch/arm/src/lc823450/lc823450_dma.h @@ -154,7 +154,6 @@ int lc823450_dmastart(DMA_HANDLE handle, dma_callback_t callback, void lc823450_dmastop(DMA_HANDLE handle); int lc823450_dmaremain(DMA_HANDLE handle); - #undef EXTERN #if defined(__cplusplus) } diff --git a/arch/arm/src/lc823450/lc823450_i2c.c b/arch/arm/src/lc823450/lc823450_i2c.c index 50ac62f65ef..5624f6f0153 100644 --- a/arch/arm/src/lc823450/lc823450_i2c.c +++ b/arch/arm/src/lc823450/lc823450_i2c.c @@ -74,19 +74,19 @@ ****************************************************************************/ #ifndef CONFIG_LC823450_I2C_TIMEOSEC -# define CONFIG_LC823450_I2C_TIMEOSEC 0 +# define CONFIG_LC823450_I2C_TIMEOSEC 0 #endif #ifndef CONFIG_LC823450_I2C_TIMEOMS -# define CONFIG_LC823450_I2C_TIMEOMS 500 +# define CONFIG_LC823450_I2C_TIMEOMS 500 #endif #ifdef CONFIG_I2C_SLAVE -# error "I2C driver cannot support CONFIG_I2C_SLAVE." +# error "I2C driver cannot support CONFIG_I2C_SLAVE." #endif #if CONFIG_LC823450_I2C_TIMEOMS >= 1000 -# error "Unsupported value of CONFIG_LC823450_I2C_TIMEOMS" +# error "Unsupported value of CONFIG_LC823450_I2C_TIMEOMS" #endif #define GPIO_I2C0_SCL (GPIO_PORT0 | GPIO_PIN7 | GPIO_MODE_OUTPUT | GPIO_VALUE_ZERO) @@ -173,7 +173,8 @@ static int lc823450_i2c_isr(int irq, FAR void *context, FAR void *arg); static int lc823450_i2c_init(FAR struct lc823450_i2c_priv_s *priv, int port); static int lc823450_i2c_deinit(FAR struct lc823450_i2c_priv_s *priv, int port); -static int lc823450_i2c_transfer(FAR struct i2c_master_s *dev, FAR struct i2c_msg_s *msgs, int count); +static int lc823450_i2c_transfer(FAR struct i2c_master_s *dev, + FAR struct i2c_msg_s *msgs, int count); #ifdef CONFIG_I2C_RESET static int lc823450_i2c_reset(FAR struct i2c_master_s *priv); @@ -808,7 +809,7 @@ static int lc823450_i2c_poll(FAR struct lc823450_i2c_priv_s *priv) ****************************************************************************/ #ifndef CONFIG_I2C_POLLED -static int lc823450_i2c0_isr(int irq, FAR void *context, FAR void *arg) +static int lc823450_i2c_isr(int irq, FAR void *context, FAR void *arg) { FAR struct lc823450_i2c_priv_s *priv = (FAR struct lc823450_i2c_priv_s *)arg; @@ -817,7 +818,6 @@ static int lc823450_i2c0_isr(int irq, FAR void *context, FAR void *arg) return lc823450_i2c_poll(priv); } #endif -#endif /**************************************************************************** * Private Initialization and Deinitialization diff --git a/arch/arm/src/lc823450/lc823450_serial.c b/arch/arm/src/lc823450/lc823450_serial.c index 06208fb5282..1ba4745e048 100644 --- a/arch/arm/src/lc823450/lc823450_serial.c +++ b/arch/arm/src/lc823450/lc823450_serial.c @@ -503,9 +503,11 @@ static int up_setup(struct uart_dev_s *dev) case 7: ctl &= ~UART_UMD_CL; break; + case 8: ctl |= UART_UMD_CL; break; + default: serr("ERROR: bits = %d\n", priv->bits); return -EINVAL; @@ -516,12 +518,15 @@ static int up_setup(struct uart_dev_s *dev) { case 0: /* non */ break; + case 1: /* odd */ ctl |= UART_UMD_PS0; break; + case 2: /* even */ ctl |= UART_UMD_PS1; break; + default: serr("ERROR: bits = %d\n", priv->bits); return -EINVAL; @@ -547,6 +552,7 @@ static int up_setup(struct uart_dev_s *dev) ctl |= UART_UMD_RTSEN; } else + { ctl &= ~UART_UMD_RTSEN; } @@ -556,7 +562,7 @@ static int up_setup(struct uart_dev_s *dev) * any character is received. */ - ctl = up_serialin(priv, UART_UIEN); + ctl = up_serialin(priv, UART_UIEN); ctl |= UART_UIEN_UARTRF_IEN | UART_UIEN_UARTTF_IEN | UART_UIEN_ROWE_IEN diff --git a/arch/arm/src/lc823450/lc823450_syscontrol.h b/arch/arm/src/lc823450/lc823450_syscontrol.h index 65c869e48e4..509f2c3b9f2 100644 --- a/arch/arm/src/lc823450/lc823450_syscontrol.h +++ b/arch/arm/src/lc823450/lc823450_syscontrol.h @@ -35,7 +35,6 @@ * ****************************************************************************/ - #ifndef __ARCH_ARM_SRC_LC823450_LC823450_SYSCONTROL_H #define __ARCH_ARM_SRC_LC823450_LC823450_SYSCONTROL_H @@ -47,12 +46,11 @@ * Pre-processor Definitions ****************************************************************************/ - #define LC823450_SYSCONTROL_REGBASE 0x40080000 #define CORECNT (LC823450_SYSCONTROL_REGBASE + 0x0000) -#define CORECNT_C1CLKEN (1 << 0) -#define CORECNT_C1RSTN (1 << 1) +#define CORECNT_C1CLKEN (1 << 0) +#define CORECNT_C1RSTN (1 << 1) #define REMAP (LC823450_SYSCONTROL_REGBASE + 0x0008) @@ -208,7 +206,6 @@ #define SDCTL_ACSMODE0_MMCDDR (4 << 1) #define SDCTL_SDMMC0_MMC (1 << 0) - #define DREQ0_3 (LC823450_SYSCONTROL_REGBASE + 0x808) #define DREQ4_7 (LC823450_SYSCONTROL_REGBASE + 0x80c) #define DREQ8_C (LC823450_SYSCONTROL_REGBASE + 0x810) @@ -245,6 +242,7 @@ #define I2CMODE1 (1 << 1) /* GPIO */ + #define PORT0_BASE 0x40081000 #define rP0DT (PORT0_BASE + 0x0000 + 0x04) #define rP1DT (PORT0_BASE + 0x1000 + 0x04) @@ -266,28 +264,22 @@ #ifndef __ASSEMBLY__ - /**************************************************************************** * Public Data ****************************************************************************/ #ifdef __cplusplus #define EXTERN extern "C" -extern "C" { +extern "C" +{ #else #define EXTERN extern #endif -/**************************************************************************** - * Inline Functions - ****************************************************************************/ - - /**************************************************************************** * Public Function Prototypes ****************************************************************************/ - uint32_t get_cpu_ver(void); void init_default_mux(void); void lc823450_clock_dump(void); @@ -300,7 +292,6 @@ void lc823450_mod_stby_regs(uint32_t clearbits, uint32_t setbits); # define lc823450_mod_stby_regs(...) #endif - #if defined(__cplusplus) } #endif