Fix a few errors that crept in with my review changes.

This commit is contained in:
Gregory Nutt 2017-08-02 09:19:29 -06:00
parent 0960b50f3f
commit 42b3ee4cfc
5 changed files with 19 additions and 24 deletions

View File

@ -103,7 +103,6 @@
# define NVIC_SYSH_SVCALL_PRIORITY NVIC_SYSH_PRIORITY_MAX # define NVIC_SYSH_SVCALL_PRIORITY NVIC_SYSH_PRIORITY_MAX
#endif #endif
/************************************************************************************ /************************************************************************************
* Public Types * Public Types
************************************************************************************/ ************************************************************************************/

View File

@ -154,7 +154,6 @@ int lc823450_dmastart(DMA_HANDLE handle, dma_callback_t callback,
void lc823450_dmastop(DMA_HANDLE handle); void lc823450_dmastop(DMA_HANDLE handle);
int lc823450_dmaremain(DMA_HANDLE handle); int lc823450_dmaremain(DMA_HANDLE handle);
#undef EXTERN #undef EXTERN
#if defined(__cplusplus) #if defined(__cplusplus)
} }

View File

@ -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_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_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 #ifdef CONFIG_I2C_RESET
static int lc823450_i2c_reset(FAR struct i2c_master_s *priv); 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 #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 *priv =
(FAR struct lc823450_i2c_priv_s *)arg; (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); return lc823450_i2c_poll(priv);
} }
#endif #endif
#endif
/**************************************************************************** /****************************************************************************
* Private Initialization and Deinitialization * Private Initialization and Deinitialization

View File

@ -503,9 +503,11 @@ static int up_setup(struct uart_dev_s *dev)
case 7: case 7:
ctl &= ~UART_UMD_CL; ctl &= ~UART_UMD_CL;
break; break;
case 8: case 8:
ctl |= UART_UMD_CL; ctl |= UART_UMD_CL;
break; break;
default: default:
serr("ERROR: bits = %d\n", priv->bits); serr("ERROR: bits = %d\n", priv->bits);
return -EINVAL; return -EINVAL;
@ -516,12 +518,15 @@ static int up_setup(struct uart_dev_s *dev)
{ {
case 0: /* non */ case 0: /* non */
break; break;
case 1: /* odd */ case 1: /* odd */
ctl |= UART_UMD_PS0; ctl |= UART_UMD_PS0;
break; break;
case 2: /* even */ case 2: /* even */
ctl |= UART_UMD_PS1; ctl |= UART_UMD_PS1;
break; break;
default: default:
serr("ERROR: bits = %d\n", priv->bits); serr("ERROR: bits = %d\n", priv->bits);
return -EINVAL; return -EINVAL;
@ -547,6 +552,7 @@ static int up_setup(struct uart_dev_s *dev)
ctl |= UART_UMD_RTSEN; ctl |= UART_UMD_RTSEN;
} }
else else
{
ctl &= ~UART_UMD_RTSEN; ctl &= ~UART_UMD_RTSEN;
} }

View File

@ -35,7 +35,6 @@
* *
****************************************************************************/ ****************************************************************************/
#ifndef __ARCH_ARM_SRC_LC823450_LC823450_SYSCONTROL_H #ifndef __ARCH_ARM_SRC_LC823450_LC823450_SYSCONTROL_H
#define __ARCH_ARM_SRC_LC823450_LC823450_SYSCONTROL_H #define __ARCH_ARM_SRC_LC823450_LC823450_SYSCONTROL_H
@ -47,7 +46,6 @@
* Pre-processor Definitions * Pre-processor Definitions
****************************************************************************/ ****************************************************************************/
#define LC823450_SYSCONTROL_REGBASE 0x40080000 #define LC823450_SYSCONTROL_REGBASE 0x40080000
#define CORECNT (LC823450_SYSCONTROL_REGBASE + 0x0000) #define CORECNT (LC823450_SYSCONTROL_REGBASE + 0x0000)
@ -208,7 +206,6 @@
#define SDCTL_ACSMODE0_MMCDDR (4 << 1) #define SDCTL_ACSMODE0_MMCDDR (4 << 1)
#define SDCTL_SDMMC0_MMC (1 << 0) #define SDCTL_SDMMC0_MMC (1 << 0)
#define DREQ0_3 (LC823450_SYSCONTROL_REGBASE + 0x808) #define DREQ0_3 (LC823450_SYSCONTROL_REGBASE + 0x808)
#define DREQ4_7 (LC823450_SYSCONTROL_REGBASE + 0x80c) #define DREQ4_7 (LC823450_SYSCONTROL_REGBASE + 0x80c)
#define DREQ8_C (LC823450_SYSCONTROL_REGBASE + 0x810) #define DREQ8_C (LC823450_SYSCONTROL_REGBASE + 0x810)
@ -245,6 +242,7 @@
#define I2CMODE1 (1 << 1) #define I2CMODE1 (1 << 1)
/* GPIO */ /* GPIO */
#define PORT0_BASE 0x40081000 #define PORT0_BASE 0x40081000
#define rP0DT (PORT0_BASE + 0x0000 + 0x04) #define rP0DT (PORT0_BASE + 0x0000 + 0x04)
#define rP1DT (PORT0_BASE + 0x1000 + 0x04) #define rP1DT (PORT0_BASE + 0x1000 + 0x04)
@ -266,28 +264,22 @@
#ifndef __ASSEMBLY__ #ifndef __ASSEMBLY__
/**************************************************************************** /****************************************************************************
* Public Data * Public Data
****************************************************************************/ ****************************************************************************/
#ifdef __cplusplus #ifdef __cplusplus
#define EXTERN extern "C" #define EXTERN extern "C"
extern "C" { extern "C"
{
#else #else
#define EXTERN extern #define EXTERN extern
#endif #endif
/****************************************************************************
* Inline Functions
****************************************************************************/
/**************************************************************************** /****************************************************************************
* Public Function Prototypes * Public Function Prototypes
****************************************************************************/ ****************************************************************************/
uint32_t get_cpu_ver(void); uint32_t get_cpu_ver(void);
void init_default_mux(void); void init_default_mux(void);
void lc823450_clock_dump(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(...) # define lc823450_mod_stby_regs(...)
#endif #endif
#if defined(__cplusplus) #if defined(__cplusplus)
} }
#endif #endif