arch: arm: nuc1xx: fix nxstyle errors

Fix nxstyle errors to pass CI

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
This commit is contained in:
Alin Jerpelea
2021-03-24 09:30:03 +01:00
committed by Xiang Xiao
parent dd9d21be87
commit ee32535bc9
32 changed files with 485 additions and 464 deletions
+18 -16
View File
@@ -1,4 +1,4 @@
/************************************************************************************
/****************************************************************************
* arch/arm/src/nuc1xx/chip.h
*
* Licensed to the Apache Software Foundation (ASF) under one or more
@@ -16,14 +16,14 @@
* License for the specific language governing permissions and limitations
* under the License.
*
************************************************************************************/
****************************************************************************/
#ifndef __ARCH_ARM_SRC_NUC1XX_CHIP_H
#define __ARCH_ARM_SRC_NUC1XX_CHIP_H
/************************************************************************************
/****************************************************************************
* Included Files
************************************************************************************/
****************************************************************************/
#include <nuttx/config.h>
@@ -31,30 +31,32 @@
#include <arch/nuc1xx/chip.h>
/* Define the number of interrupt vectors that need to be supported for this chip */
/* Define the number of interrupt vectors that need to be supported for this
* chip
*/
#define ARMV6M_PERIPHERAL_INTERRUPTS 32
/* Include the memory map file. Other chip hardware files should then include
* this file for the proper setup.
/* Include the memory map file. Other chip hardware files should then
* include this file for the proper setup.
*/
#include "hardware/nuc_memorymap.h"
/************************************************************************************
/****************************************************************************
* Pre-processor Definitions
************************************************************************************/
****************************************************************************/
/************************************************************************************
/****************************************************************************
* Public Types
************************************************************************************/
****************************************************************************/
/************************************************************************************
/****************************************************************************
* Public Data
************************************************************************************/
****************************************************************************/
/************************************************************************************
* Public Functions
************************************************************************************/
/****************************************************************************
* Public Functions Prototypes
****************************************************************************/
#endif /* __ARCH_ARM_SRC_NUC1XX_CHIP_H */
+16 -18
View File
@@ -1,4 +1,4 @@
/********************************************************************************************
/****************************************************************************
* arch/arm/src/nuc1xx/hardware/nuc_adc.h
*
* Licensed to the Apache Software Foundation (ASF) under one or more
@@ -16,41 +16,39 @@
* License for the specific language governing permissions and limitations
* under the License.
*
********************************************************************************************/
****************************************************************************/
#ifndef __ARCH_ARM_SRC_NUC1XX_HARDWARE_NUC_ADC_H
#define __ARCH_ARM_SRC_NUC1XX_HARDWARE_NUC_ADC_H
/********************************************************************************************
/****************************************************************************
* Included Files
********************************************************************************************/
****************************************************************************/
#include <nuttx/config.h>
#include "chip.h"
/********************************************************************************************
/****************************************************************************
* Pre-processor Definitions
********************************************************************************************/
/* Register offsets *************************************************************************/
****************************************************************************/
/* Register offsets *********************************************************/
/* Register addresses ***********************************************************************/
/* Register addresses *******************************************************/
/* Register bit-field definitions *******************************************/
/* Register bit-field definitions ***********************************************************/
/********************************************************************************************
/****************************************************************************
* Public Types
********************************************************************************************/
****************************************************************************/
/********************************************************************************************
/****************************************************************************
* Public Data
********************************************************************************************/
****************************************************************************/
/********************************************************************************************
* Public Functions
********************************************************************************************/
/****************************************************************************
* Public Functions Prototypes
****************************************************************************/
#endif /* __ARCH_ARM_SRC_NUC1XX_HARDWARE_NUC_ADC_H */
+34 -17
View File
@@ -1,4 +1,4 @@
/********************************************************************************************
/****************************************************************************
* arch/arm/src/nuc1xx/hardware/nuc_clk.h
*
* Licensed to the Apache Software Foundation (ASF) under one or more
@@ -16,28 +16,29 @@
* License for the specific language governing permissions and limitations
* under the License.
*
********************************************************************************************/
****************************************************************************/
#ifndef __ARCH_ARM_SRC_NUC1XX_HARDWARE_NUC_CLK_H
#define __ARCH_ARM_SRC_NUC1XX_HARDWARE_NUC_CLK_H
/********************************************************************************************
/****************************************************************************
* Included Files
********************************************************************************************/
****************************************************************************/
#include <nuttx/config.h>
#include "chip.h"
/********************************************************************************************
/****************************************************************************
* Pre-processor Definitions
********************************************************************************************/
/* Well-known clock frequencies *************************************************************/
****************************************************************************/
/* Well-known clock frequencies *********************************************/
#define NUC_INTHI_FREQUENCY 22118400
#define NUC_INTLO_FREQUENCY 10000
/* Register offsets *************************************************************************/
/* Register offsets *********************************************************/
#define NUC_CLK_PWRCON_OFFSET 0x0000 /* System power down control register */
#define NUC_CLK_AHBCLK_OFFSET 0x0004 /* AHB devices clock enable control register */
@@ -50,7 +51,7 @@
#define NUC_CLK_PLLCON_OFFSET 0x0020 /* PLL control register */
#define NUC_CLK_FRQDIV_OFFSET 0x0024 /* Frequency divider control register */
/* Register addresses ***********************************************************************/
/* Register addresses *******************************************************/
#define NUC_CLK_PWRCON (NUC_CLK_BASE+NUC_CLK_PWRCON_OFFSET)
#define NUC_CLK_AHBCLK (NUC_CLK_BASE+NUC_CLK_AHBCLK_OFFSET)
@@ -63,7 +64,7 @@
#define NUC_CLK_PLLCON (NUC_CLK_BASE+NUC_CLK_PLLCON_OFFSET)
#define NUC_CLK_FRQDIV (NUC_CLK_BASE+NUC_CLK_FRQDIV_OFFSET)
/* Register bit-field definitions ***********************************************************/
/* Register bit-field definitions *******************************************/
/* System power down control register */
@@ -133,6 +134,7 @@
# define CLK_CLKSEL0_HCLK_S_PLL (2 << CLK_CLKSEL0_HCLK_S_SHIFT) /* PLL clock */
# define CLK_CLKSEL0_HCLK_S_INTLO (3 << CLK_CLKSEL0_HCLK_S_SHIFT) /* Internal low speed clock */
# define CLK_CLKSEL0_HCLK_S_INTHI (7 << CLK_CLKSEL0_HCLK_S_SHIFT) /* Internal high speed clock */
#define CLK_CLKSEL0_STCLK_S_SHIFT (3) /* Bits 3-5: Cortex M0 Systick clock source select */
#define CLK_CLKSEL0_STCLK_S_MASK (7 << CLK_CLKSEL0_STCLK_S_SHIFT)
# define CLK_CLKSEL0_STCLK_S_XTALHI (0 << CLK_CLKSEL0_STCLK_S_SHIFT) /* High speed XTAL clock */
@@ -147,46 +149,54 @@
#define CLK_CLKSEL1_WDT_S_MASK (3 << CLK_CLKSEL1_WDT_S_SHIFT)
# define CLK_CLKSEL1_ADC_S_HCLKDIV (2 << CLK_CLKSEL1_WDT_S_SHIFT) /* HCLK / 2048 */
# define CLK_CLKSEL1_ADC_S_INTLO (3 << CLK_CLKSEL1_WDT_S_SHIFT) /* Internal low speed clock */
#define CLK_CLKSEL1_ADC_S_SHIFT (2) /* Bits 2-3: ADC clock source select */
#define CLK_CLKSEL1_ADC_S_MASK (3 << CLK_CLKSEL1_ADC_S_SHIFT)
# define CLK_CLKSEL1_ADC_S_XTALHI (0 << CLK_CLKSEL1_ADC_S_SHIFT) /* High speed XTAL clock */
# define CLK_CLKSEL1_ADC_S_PLL (1 << CLK_CLKSEL1_ADC_S_SHIFT) /* PLL */
# define CLK_CLKSEL1_ADC_S_INTHI (3 << CLK_CLKSEL1_ADC_S_SHIFT) /* Internal high speed clock */
#define CLK_CLKSEL1_TMR0_S_SHIFT (8) /* Bits 8-10: Timer0 clock source select */
#define CLK_CLKSEL1_TMR0_S_MASK (7 << CLK_CLKSEL1_TMR0_S_SHIFT)
# define CLK_CLKSEL1_TMR0_S_XTALHI (0 << CLK_CLKSEL1_TMR0_S_SHIFT) /* High speed XTAL clock */
# define CLK_CLKSEL1_TMR0_S_XTALLO (1 << CLK_CLKSEL1_TMR0_S_SHIFT) /* Low speed XTAL clock */
# define CLK_CLKSEL1_TMR0_S_HCLK (2 << CLK_CLKSEL1_TMR0_S_SHIFT) /* HCLK */
# define CLK_CLKSEL1_TMR0_S_INTHI (7 << CLK_CLKSEL1_TMR0_S_SHIFT) /* Internal high speed clock */
#define CLK_CLKSEL1_TMR1_S_SHIFT (12) /* Bits 12-14: Timer1 clock source select */
#define CLK_CLKSEL1_TMR1_S_MASK (7 << CLK_CLKSEL1_TMR1_S_SHIFT)
# define CLK_CLKSEL1_TMR1_S_XTALHI (0 << CLK_CLKSEL1_TMR1_S_SHIFT) /* High speed XTAL clock */
# define CLK_CLKSEL1_TMR1_S_XTALLO (1 << CLK_CLKSEL1_TMR1_S_SHIFT) /* Low speed XTAL clock */
# define CLK_CLKSEL1_TMR1_S_HCLK (2 << CLK_CLKSEL1_TMR1_S_SHIFT) /* HCLK */
# define CLK_CLKSEL1_TMR1_S_INTHI (7 << CLK_CLKSEL1_TMR1_S_SHIFT) /* Internal high speed clock */
#define CLK_CLKSEL1_TMR2_S_SHIFT (16) /* Bits 16-18: Timer2 clock source select */
#define CLK_CLKSEL1_TMR2_S_MASK (7 << CLK_CLKSEL1_TMR2_S_SHIFT)
# define CLK_CLKSEL1_TMR2_S_XTALHI (0 << CLK_CLKSEL1_TMR2_S_SHIFT) /* High speed XTAL clock */
# define CLK_CLKSEL1_TMR2_S_XTALLO (1 << CLK_CLKSEL1_TMR2_S_SHIFT) /* Low speed XTAL clock */
# define CLK_CLKSEL1_TMR2_S_HCLK (2 << CLK_CLKSEL1_TMR2_S_SHIFT) /* HCLK */
# define CLK_CLKSEL1_TMR2_S_INTHI (7 << CLK_CLKSEL1_TMR2_S_SHIFT) /* Internal high speed clock */
#define CLK_CLKSEL1_TMR3_S_SHIFT (20) /* Bits 20-22: Timer3 clock source select */
#define CLK_CLKSEL1_TMR3_S_MASK (7 << CLK_CLKSEL1_TMR3_S_SHIFT)
# define CLK_CLKSEL1_TMR3_S_XTALHI (0 << CLK_CLKSEL1_TMR3_S_SHIFT) /* High speed XTAL clock */
# define CLK_CLKSEL1_TMR3_S_XTALLO (1 << CLK_CLKSEL1_TMR3_S_SHIFT) /* Low speed XTAL clock */
# define CLK_CLKSEL1_TMR3_S_HCLK (2 << CLK_CLKSEL1_TMR3_S_SHIFT) /* HCLK */
# define CLK_CLKSEL1_TMR3_S_INTHI (7 << CLK_CLKSEL1_TMR3_S_SHIFT) /* Internal high speed clock */
#define CLK_CLKSEL1_UART_S_SHIFT (24) /* Bits 24-25: UART clock source select */
#define CLK_CLKSEL1_UART_S_MASK (3 << CLK_CLKSEL1_UART_S_SHIFT)
# define CLK_CLKSEL1_UART_S_XTALHI (0 << CLK_CLKSEL1_UART_S_SHIFT) /* High speed XTAL clock */
# define CLK_CLKSEL1_UART_S_PLL (1 << CLK_CLKSEL1_UART_S_SHIFT) /* PLL */
# define CLK_CLKSEL1_UART_S_INTHI (3 << CLK_CLKSEL1_UART_S_SHIFT) /* Internal high speed clock */
#define CLK_CLKSEL1_PWM01_S_SHIFT (28) /* Bits 28-29: PWM0 and PWM1 clock source select */
#define CLK_CLKSEL1_PWM01_S_MASK (3 << CLK_CLKSEL1_PWM01_S_SHIFT)
# define CLK_CLKSEL1_PWM01_S_XTALHI (0 << CLK_CLKSEL1_PWM01_S_SHIFT) /* High speed XTAL clock */
# define CLK_CLKSEL1_PWM01_S_XTALLO (1 << CLK_CLKSEL1_PWM01_S_SHIFT) /* Low speed XTAL clock */
# define CLK_CLKSEL1_PWM01_S_HCLK (2 << CLK_CLKSEL1_PWM01_S_SHIFT) /* HCLK */
# define CLK_CLKSEL1_PWM01_S_INTHI (3 << CLK_CLKSEL1_PWM01_S_SHIFT) /* Internal high speed clock */
#define CLK_CLKSEL1_PWM23_S_SHIFT (30) /* Bits 30-31: PWM2 and PWM3 clock source select */
#define CLK_CLKSEL1_PWM23_S_MASK (3 << CLK_CLKSEL1_PWM23_S_SHIFT)
# define CLK_CLKSEL1_PWM23_S_XTALHI (0 << CLK_CLKSEL1_PWM23_S_SHIFT) /* High speed XTAL clock */
@@ -202,17 +212,20 @@
# define CLK_CLKSEL1_I2S_S_XTALLO (1 << CLK_CLKSEL2_I2S_S_SHIFT) /* Low speed XTAL clock */
# define CLK_CLKSEL1_I2S_S_HCLK (2 << CLK_CLKSEL2_I2S_S_SHIFT) /* HCLK */
# define CLK_CLKSEL1_I2S_S_INTHI (3 << CLK_CLKSEL2_I2S_S_SHIFT) /* Internal high speed clock */
#define CLK_CLKSEL2_FRQDIV_S_SHIFT (2) /* Bits 2-3: Frequency divider clock source select */
#define CLK_CLKSEL2_FRQDIV_S_MASK (3 << CLK_CLKSEL2_FRQDIV_S_SHIFT)
# define CLK_CLKSEL1_FRQDIV_S_XTALHI (0 << CLK_CLKSEL2_FRQDIV_S_SHIFT) /* High speed XTAL clock */
# define CLK_CLKSEL1_FRQDIV_S_XTALLO (1 << CLK_CLKSEL2_FRQDIV_S_SHIFT) /* Low speed XTAL clock */
# define CLK_CLKSEL1_FRQDIV_S_HCLK (2 << CLK_CLKSEL2_FRQDIV_S_SHIFT) /* HCLK */
#define CLK_CLKSEL2_PWM45_S_SHIFT (4) /* Bits 4-5: PWM4 and PWM5 clock source select */
#define CLK_CLKSEL2_PWM45_S_MASK (3 << CLK_CLKSEL2_PWM45_S_SHIFT)
# define CLK_CLKSEL1_PWM45_S_XTALHI (0 << CLK_CLKSEL2_PWM45_S_SHIFT) /* High speed XTAL clock */
# define CLK_CLKSEL1_PWM45_S_XTALLO (1 << CLK_CLKSEL2_PWM45_S_SHIFT) /* Low speed XTAL clock */
# define CLK_CLKSEL1_PWM45_S_HCLK (2 << CLK_CLKSEL2_PWM45_S_SHIFT) /* HCLK */
# define CLK_CLKSEL1_PWM45_S_INTHI (3 << CLK_CLKSEL2_PWM45_S_SHIFT) /* Internal high speed clock */
#define CLK_CLKSEL2_PWM67_S_SHIFT (6) /* Bits 6-7: PWM6 and PWM7 clock source select */
#define CLK_CLKSEL2_PWM67_S_MASK (3 << CLK_CLKSEL2_PWM67_S_SHIFT)
# define CLK_CLKSEL1_PWM67_S_XTALHI (0 << CLK_CLKSEL2_PWM67_S_SHIFT) /* High speed XTAL clock */
@@ -225,12 +238,15 @@
#define CLK_CLKDIV_HCLK_N_SHIFT (0) /* Bits 0-3: HCLCK divide from clock source */
#define CLK_CLKDIV_HCLK_N_MASK (15 << CLK_CLKDIV_HCLK_N_SHIFT)
# define CLK_CLKDIV_HCLK_N(n) (((n)-1) << CLK_CLKDIV_HCLK_N_SHIFT) /* n=1..16 */
#define CLK_CLKDIV_USB_N_SHIFT (4) /* Bits 4-7: USBD divide from clock source */
#define CLK_CLKDIV_USB_N_MASK (15 << CLK_CLKDIV_USB_N_SHIFT)
# define CLK_CLKDIV_USB_N(n) (((n)-1) << CLK_CLKDIV_USB_N_SHIFT) /* n=1..16 */
#define CLK_CLKDIV_UART_N_SHIFT (8) /* Bits 8-11 UART divide from clock source */
#define CLK_CLKDIV_UART_N_MASK (15 << CLK_CLKDIV_UART_N_SHIFT)
# define CLK_CLKDIV_UART_N(n) (((n)-1) << CLK_CLKDIV_UART_N_SHIFT) /* n=1..16 */
#define CLK_CLKDIV_ADC_N_SHIFT (16) /* Bits 16-23: ADC divide from clock source */
#define CLK_CLKDIV_ADC_N_MASK (255 << CLK_CLKDIV_ADC_N_SHIFT)
# define CLK_CLKDIV_ADC_N(n) (((n)-1) << CLK_CLKDIV_UART_N_SHIFT) /* n=1..256 */
@@ -256,18 +272,19 @@
#define CLK_FRQDIV_FSEL_SHIFT (0) /* Bits 0-3: Divider output frequency selection bits */
#define CLK_FRQDIV_FSEL_MASK (15 << CLK_FRQDIV_FSEL_SHIFT)
# define CLK_FRQDIV_FSEL(n) ((n) << CLK_FRQDIV_FSEL_SHIFT) /* fout = fin / (2^(n+1)) */
#define CLK_FRQDIV_DIVIDER_EN (1 << 4) /* Bit 4: Frequency divider enable bit */
/********************************************************************************************
/****************************************************************************
* Public Types
********************************************************************************************/
****************************************************************************/
/********************************************************************************************
/****************************************************************************
* Public Data
********************************************************************************************/
****************************************************************************/
/********************************************************************************************
* Public Functions
********************************************************************************************/
/****************************************************************************
* Public Functions Prototypes
****************************************************************************/
#endif /* __ARCH_ARM_SRC_NUC1XX_HARDWARE_NUC_CLK_H */
+16 -18
View File
@@ -1,4 +1,4 @@
/********************************************************************************************
/****************************************************************************
* arch/arm/src/nuc1xx/hardware/nuc_cmp.h
*
* Licensed to the Apache Software Foundation (ASF) under one or more
@@ -16,41 +16,39 @@
* License for the specific language governing permissions and limitations
* under the License.
*
********************************************************************************************/
****************************************************************************/
#ifndef __ARCH_ARM_SRC_NUC1XX_HARDWARE_NUC_CMP_H
#define __ARCH_ARM_SRC_NUC1XX_HARDWARE_NUC_CMP_H
/********************************************************************************************
/****************************************************************************
* Included Files
********************************************************************************************/
****************************************************************************/
#include <nuttx/config.h>
#include "chip.h"
/********************************************************************************************
/****************************************************************************
* Pre-processor Definitions
********************************************************************************************/
/* Register offsets *************************************************************************/
****************************************************************************/
/* Register offsets *********************************************************/
/* Register addresses ***********************************************************************/
/* Register addresses *******************************************************/
/* Register bit-field definitions *******************************************/
/* Register bit-field definitions ***********************************************************/
/********************************************************************************************
/****************************************************************************
* Public Types
********************************************************************************************/
****************************************************************************/
/********************************************************************************************
/****************************************************************************
* Public Data
********************************************************************************************/
****************************************************************************/
/********************************************************************************************
* Public Functions
********************************************************************************************/
/****************************************************************************
* Public Functions Prototypes
****************************************************************************/
#endif /* __ARCH_ARM_SRC_NUC1XX_HARDWARE_NUC_CMP_H */
+18 -16
View File
@@ -1,4 +1,4 @@
/********************************************************************************************
/****************************************************************************
* arch/arm/src/nuc1xx/hardware/nuc_config.h
*
* Licensed to the Apache Software Foundation (ASF) under one or more
@@ -16,33 +16,34 @@
* License for the specific language governing permissions and limitations
* under the License.
*
********************************************************************************************/
****************************************************************************/
#ifndef __ARCH_ARM_SRC_NUC1XX_HARDWARE_NUC_CONFIG_H
#define __ARCH_ARM_SRC_NUC1XX_HARDWARE_NUC_CONFIG_H
/********************************************************************************************
/****************************************************************************
* Included Files
********************************************************************************************/
****************************************************************************/
#include <nuttx/config.h>
#include "chip.h"
/********************************************************************************************
/****************************************************************************
* Pre-processor Definitions
********************************************************************************************/
/* Register offsets *************************************************************************/
****************************************************************************/
/* Register offsets *********************************************************/
#define NUC_CONFIG0_OFFSET 0x0000 /* Config 0 */
#define NUC_CONFIG1_OFFSET 0x0004 /* Config 1 */
/* Register addresses ***********************************************************************/
/* Register addresses *******************************************************/
#define NUC_CONFIG0 (NUC_CONFIG_BASE+NUC_CONFIG0_OFFSET)
#define NUC_CONFIG1 (NUC_CONFIG_BASE+NUC_CONFIG1_OFFSET)
/* Register bit-field definitions ***********************************************************/
/* Register bit-field definitions *******************************************/
/* Config 0 */
@@ -56,6 +57,7 @@
# define CONFIG0_CBOV_2p7V (1 << CONFIG0_CBOV_SHIFT) /* 2.7V */
# define CONFIG0_CBOV_3p8V (2 << CONFIG0_CBOV_SHIFT) /* 3.8V */
# define CONFIG0_CBOV_4p5V (3 << CONFIG0_CBOV_SHIFT) /* 4.5V */
#define CONFIG0_CBODEN (1 << 23) /* Bit 23: Brown out detector enable */
#define CONFIG0_CFOSC_SHIFT (24) /* Bits 24-26: CPU clock source selection after reset */
#define CONFIG0_CFOSC_MASK (7 << CONFIG0_CFOSC_SHIFT)
@@ -87,16 +89,16 @@
#define CONFIG1_FACTORY_DEFAULT (0x00005000)
/********************************************************************************************
/****************************************************************************
* Public Types
********************************************************************************************/
****************************************************************************/
/********************************************************************************************
/****************************************************************************
* Public Data
********************************************************************************************/
****************************************************************************/
/********************************************************************************************
* Public Functions
********************************************************************************************/
/****************************************************************************
* Public Functions Prototypes
****************************************************************************/
#endif /* __ARCH_ARM_SRC_NUC1XX_HARDWARE_NUC_CONFIG_H */
+16 -18
View File
@@ -1,4 +1,4 @@
/********************************************************************************************
/****************************************************************************
* arch/arm/src/nuc1xx/hardware/nuc_ebi.h
*
* Licensed to the Apache Software Foundation (ASF) under one or more
@@ -16,41 +16,39 @@
* License for the specific language governing permissions and limitations
* under the License.
*
********************************************************************************************/
****************************************************************************/
#ifndef __ARCH_ARM_SRC_NUC1XX_HARDWARE_NUC_EBI_H
#define __ARCH_ARM_SRC_NUC1XX_HARDWARE_NUC_EBI_H
/********************************************************************************************
/****************************************************************************
* Included Files
********************************************************************************************/
****************************************************************************/
#include <nuttx/config.h>
#include "chip.h"
/********************************************************************************************
/****************************************************************************
* Pre-processor Definitions
********************************************************************************************/
/* Register offsets *************************************************************************/
****************************************************************************/
/* Register offsets *********************************************************/
/* Register addresses ***********************************************************************/
/* Register addresses *******************************************************/
/* Register bit-field definitions *******************************************/
/* Register bit-field definitions ***********************************************************/
/********************************************************************************************
/****************************************************************************
* Public Types
********************************************************************************************/
****************************************************************************/
/********************************************************************************************
/****************************************************************************
* Public Data
********************************************************************************************/
****************************************************************************/
/********************************************************************************************
* Public Functions
********************************************************************************************/
/****************************************************************************
* Public Functions Prototypes
****************************************************************************/
#endif /* __ARCH_ARM_SRC_NUC1XX_HARDWARE_NUC_EBI_H */
+19 -17
View File
@@ -1,4 +1,4 @@
/********************************************************************************************
/****************************************************************************
* arch/arm/src/nuc1xx/hardware/nuc_gcr.h
*
* Licensed to the Apache Software Foundation (ASF) under one or more
@@ -16,23 +16,24 @@
* License for the specific language governing permissions and limitations
* under the License.
*
********************************************************************************************/
****************************************************************************/
#ifndef __ARCH_ARM_SRC_NUC1XX_HARDWARE_NUC_GCR_H
#define __ARCH_ARM_SRC_NUC1XX_HARDWARE_NUC_GCR_H
/********************************************************************************************
/****************************************************************************
* Included Files
********************************************************************************************/
****************************************************************************/
#include <nuttx/config.h>
#include "chip.h"
/********************************************************************************************
/****************************************************************************
* Pre-processor Definitions
********************************************************************************************/
/* Register offsets *************************************************************************/
****************************************************************************/
/* Register offsets *********************************************************/
#define NUC_GCR_PDID_OFFSET 0x0000 /* Part didentification number register */
#define NUC_GCR_RSTSRC_OFFSET 0x0004 /* System reset source register */
@@ -50,7 +51,7 @@
#define NUC_GCR_ALT_MFP_OFFSET 0x0050 /* Alternative multiple function pin control register */
#define NUC_GCR_REGWRPROT_OFFSET 0x0100 /* Register write-protection control register */
/* Register addresses ***********************************************************************/
/* Register addresses *******************************************************/
#define NUC_GCR_PDID (NUC_GCR_BASE+NUC_GCR_PDID_OFFSET)
#define NUC_GCR_RSTSRC (NUC_GCR_BASE+NUC_GCR_RSTSRC_OFFSET)
@@ -68,7 +69,7 @@
#define NUC_GCR_ALT_MFP (NUC_GCR_BASE+NUC_GCR_ALT_MFP_OFFSET)
#define NUC_GCR_REGWRPROT (NUC_GCR_BASE+NUC_GCR_REGWRPROT_OFFSET)
/* Register bit-field definitions ***********************************************************/
/* Register bit-field definitions *******************************************/
/* Part didentification number register (32-bit part ID number) */
@@ -120,12 +121,13 @@
/* Brown-out detector control register */
#define GCR_BODCR_BOD_EN (1 << 0) /* Bit 0: Brown-ut detector enable */
#define GCR_BODCR_BOD_VL_SHIFT (1) /* Bits 1-2: Brown-out detector threshold voltage selection */
#define GCR_BODCR_BOD_VL_SHIFT (1) /* Bits 1-2: Brown-out detector threshold voltage selection */
#define GCR_BODCR_BOD_VL_MASK (3 << GCR_BODCR_BOD_VL_SHIFT)
# define GCR_BODCR_BOD_VL_2p2V (0 << GCR_BODCR_BOD_VL_SHIFT) /* 2.2V */
# define GCR_BODCR_BOD_VL_2p7V (1 << GCR_BODCR_BOD_VL_SHIFT) /* 2.7V */
# define GCR_BODCR_BOD_VL_3p8V (2 << GCR_BODCR_BOD_VL_SHIFT) /* 3.8V */
# define GCR_BODCR_BOD_VL_4p5V (3 << GCR_BODCR_BOD_VL_SHIFT) /* 4.5V */
#define GCR_BODCR_BOD_RSTEN (1 << 3) /* Bit 3: Brown-out reset enable */
#define GCR_BODCR_BOD_INTF (1 << 4) /* Bit 4: Brown-out deletector interrupt flag */
#define GCR_BODCR_BOD_LPM (1 << 5) /* Bit 5: Brown-out detector low power mode */
@@ -343,16 +345,16 @@
/* Read: */
#define GCR_REGWRPROT_DIS (1 << 0) /* Bit 0: Register write protection disable index */
/********************************************************************************************
/****************************************************************************
* Public Types
********************************************************************************************/
****************************************************************************/
/********************************************************************************************
/****************************************************************************
* Public Data
********************************************************************************************/
****************************************************************************/
/********************************************************************************************
* Public Functions
********************************************************************************************/
/****************************************************************************
* Public Functions Prototypes
****************************************************************************/
#endif /* __ARCH_ARM_SRC_NUC1XX_HARDWARE_NUC_GCR_H */
+18 -16
View File
@@ -1,4 +1,4 @@
/********************************************************************************************
/****************************************************************************
* arch/arm/src/nuc1xx/hardware/nuc_gpio.h
*
* Licensed to the Apache Software Foundation (ASF) under one or more
@@ -16,23 +16,24 @@
* License for the specific language governing permissions and limitations
* under the License.
*
********************************************************************************************/
****************************************************************************/
#ifndef __ARCH_ARM_SRC_NUC1XX_HARDWARE_NUC_GPIO_H
#define __ARCH_ARM_SRC_NUC1XX_HARDWARE_NUC_GPIO_H
/********************************************************************************************
/****************************************************************************
* Included Files
********************************************************************************************/
****************************************************************************/
#include <nuttx/config.h>
#include "chip.h"
/********************************************************************************************
/****************************************************************************
* Pre-processor Definitions
********************************************************************************************/
/* Register offsets *************************************************************************/
****************************************************************************/
/* Register offsets *********************************************************/
#define NUC_GPIO_PORTA 0
#define NUC_GPIO_PORTB 1
@@ -237,7 +238,7 @@
#define NUC_PORTE_PDIO_OFFSET(n) (NUC_PORTE_DATAIO_OFFSET+NUC_PORT_PIN_OFFSET(n))
# define NUC_PE5_PDIO_OFFSET (NUC_PORTE_DATAIO_OFFSET+NUC_PORT_PIN0_OFFSET)
/* Register addresses ***********************************************************************/
/* Register addresses *******************************************************/
/* GPIO control registers */
@@ -404,7 +405,7 @@
#define NUC_PORTE_PDIO(n) (NUC_GPIO_BASE+NUC_PORTE_PDIO_OFFSET(n))
# define NUC_PE5_PDIO (NUC_GPIO_BASE+NUC_PE5_PDIO_OFFSET)
/* Register bit-field definitions ***********************************************************/
/* Register bit-field definitions *******************************************/
/* GPIO port pin I/O mode control */
@@ -493,6 +494,7 @@
/* GPIO port interrupt enable */
#define GPIO_IF_EN(n) (1 << (n)) /* Bit n: GPIOx Pin[n] interrupt enable low/falling */
#define GPIO_IR_EN(n) (1 << ((n)+16)) /* Bit n: GPIOx Pin[n] interrupt enable high/rising */
/* GPIO port interrupt source flag */
@@ -526,16 +528,16 @@
#define PORT_MASK (1) /* Bit 0: GPIOx Pin[n] data I/O */
/********************************************************************************************
/****************************************************************************
* Public Types
********************************************************************************************/
****************************************************************************/
/********************************************************************************************
/****************************************************************************
* Public Data
********************************************************************************************/
****************************************************************************/
/********************************************************************************************
* Public Functions
********************************************************************************************/
/****************************************************************************
* Public Functions Prototypes
****************************************************************************/
#endif /* __ARCH_ARM_SRC_NUC1XX_HARDWARE_NUC_GPIO_H */
+16 -18
View File
@@ -1,4 +1,4 @@
/********************************************************************************************
/****************************************************************************
* arch/arm/src/nuc1xx/hardware/nuc_i2c.h
*
* Licensed to the Apache Software Foundation (ASF) under one or more
@@ -16,41 +16,39 @@
* License for the specific language governing permissions and limitations
* under the License.
*
********************************************************************************************/
****************************************************************************/
#ifndef __ARCH_ARM_SRC_NUC1XX_HARDWARE_NUC_I2C_H
#define __ARCH_ARM_SRC_NUC1XX_HARDWARE_NUC_I2C_H
/********************************************************************************************
/****************************************************************************
* Included Files
********************************************************************************************/
****************************************************************************/
#include <nuttx/config.h>
#include "chip.h"
/********************************************************************************************
/****************************************************************************
* Pre-processor Definitions
********************************************************************************************/
/* Register offsets *************************************************************************/
****************************************************************************/
/* Register offsets *********************************************************/
/* Register addresses ***********************************************************************/
/* Register addresses *******************************************************/
/* Register bit-field definitions *******************************************/
/* Register bit-field definitions ***********************************************************/
/********************************************************************************************
/****************************************************************************
* Public Types
********************************************************************************************/
****************************************************************************/
/********************************************************************************************
/****************************************************************************
* Public Data
********************************************************************************************/
****************************************************************************/
/********************************************************************************************
* Public Functions
********************************************************************************************/
/****************************************************************************
* Public Functions Prototypes
****************************************************************************/
#endif /* __ARCH_ARM_SRC_NUC1XX_HARDWARE_NUC_I2C_H */
+16 -18
View File
@@ -1,4 +1,4 @@
/********************************************************************************************
/****************************************************************************
* arch/arm/src/nuc1xx/hardware/nuc_i2s.h
*
* Licensed to the Apache Software Foundation (ASF) under one or more
@@ -16,41 +16,39 @@
* License for the specific language governing permissions and limitations
* under the License.
*
********************************************************************************************/
****************************************************************************/
#ifndef __ARCH_ARM_SRC_NUC1XX_HARDWARE_NUC_I2S_H
#define __ARCH_ARM_SRC_NUC1XX_HARDWARE_NUC_I2S_H
/********************************************************************************************
/****************************************************************************
* Included Files
********************************************************************************************/
****************************************************************************/
#include <nuttx/config.h>
#include "chip.h"
/********************************************************************************************
/****************************************************************************
* Pre-processor Definitions
********************************************************************************************/
/* Register offsets *************************************************************************/
****************************************************************************/
/* Register offsets *********************************************************/
/* Register addresses ***********************************************************************/
/* Register addresses *******************************************************/
/* Register bit-field definitions *******************************************/
/* Register bit-field definitions ***********************************************************/
/********************************************************************************************
/****************************************************************************
* Public Types
********************************************************************************************/
****************************************************************************/
/********************************************************************************************
/****************************************************************************
* Public Data
********************************************************************************************/
****************************************************************************/
/********************************************************************************************
* Public Functions
********************************************************************************************/
/****************************************************************************
* Public Functions Prototypes
****************************************************************************/
#endif /* __ARCH_ARM_SRC_NUC1XX_HARDWARE_NUC_I2S_H */
+16 -13
View File
@@ -1,4 +1,4 @@
/********************************************************************************************
/****************************************************************************
* arch/arm/src/nuc1xx/hardware/nuc_memorymap.h
*
* Licensed to the Apache Software Foundation (ASF) under one or more
@@ -16,22 +16,23 @@
* License for the specific language governing permissions and limitations
* under the License.
*
********************************************************************************************/
****************************************************************************/
#ifndef __ARCH_ARM_SRC_NUC1XX_HARDWARE_NUC_MEMORYMAP_H
#define __ARCH_ARM_SRC_NUC1XX_HARDWARE_NUC_MEMORYMAP_H
/********************************************************************************************
/****************************************************************************
* Included Files
********************************************************************************************/
****************************************************************************/
#include <nuttx/config.h>
#include "chip.h"
/********************************************************************************************
/****************************************************************************
* Pre-processor Definitions
********************************************************************************************/
****************************************************************************/
/* System Memory Map */
#define NUC_FLASH_BASE 0x00000000 /* -0x0001ffff: FLASH memory space (128KB) */
@@ -42,6 +43,7 @@
#define NUC_EXTMEM_BASE 0x60000000 /* -0x6001ffff: External Memory space (128KB) */
#define NUC_SYSCON_BASE 0x60000000 /* -0x6001ffff: ARMv6-M system controller space
* See nvic.h */
/* FLASH space */
#define NUC_CONFIG_BASE 0x00300000 /* -0x00300004: User configuration */
@@ -70,6 +72,7 @@
#define NUC_ACMP_BASE 0x400d0000 /* -0x400d3fff: Analog comparator control registers */
#define NUC_ADC_BASE 0x400e0000 /* -0x400effff: Analog-digital-converter (ADC) control
* registers */
/* APB2 controller space */
#define NUC_PS2_BASE 0x40100000 /* -0x40103fff: PS/2 interface control registers */
@@ -82,16 +85,16 @@
#define NUC_UART2_BASE 0x40154000 /* -0x40157fff: UART2 control registers */
#define NUC_I2S_BASE 0x401a0000 /* -0x401a3fff: I2S interface control registers */
/********************************************************************************************
/****************************************************************************
* Public Types
********************************************************************************************/
****************************************************************************/
/********************************************************************************************
/****************************************************************************
* Public Data
********************************************************************************************/
****************************************************************************/
/********************************************************************************************
* Public Functions
********************************************************************************************/
/****************************************************************************
* Public Functions Prototypes
****************************************************************************/
#endif /* __ARCH_ARM_SRC_NUC1XX_HARDWARE_NUC_MEMORYMAP_H */
+16 -18
View File
@@ -1,4 +1,4 @@
/********************************************************************************************
/****************************************************************************
* arch/arm/src/nuc1xx/hardware/nuc_pdma.h
*
* Licensed to the Apache Software Foundation (ASF) under one or more
@@ -16,41 +16,39 @@
* License for the specific language governing permissions and limitations
* under the License.
*
********************************************************************************************/
****************************************************************************/
#ifndef __ARCH_ARM_SRC_NUC1XX_HARDWARE_NUC_PDMA_H
#define __ARCH_ARM_SRC_NUC1XX_HARDWARE_NUC_PDMA_H
/********************************************************************************************
/****************************************************************************
* Included Files
********************************************************************************************/
****************************************************************************/
#include <nuttx/config.h>
#include "chip.h"
/********************************************************************************************
/****************************************************************************
* Pre-processor Definitions
********************************************************************************************/
/* Register offsets *************************************************************************/
****************************************************************************/
/* Register offsets *********************************************************/
/* Register addresses ***********************************************************************/
/* Register addresses *******************************************************/
/* Register bit-field definitions *******************************************/
/* Register bit-field definitions ***********************************************************/
/********************************************************************************************
/****************************************************************************
* Public Types
********************************************************************************************/
****************************************************************************/
/********************************************************************************************
/****************************************************************************
* Public Data
********************************************************************************************/
****************************************************************************/
/********************************************************************************************
* Public Functions
********************************************************************************************/
/****************************************************************************
* Public Functions Prototypes
****************************************************************************/
#endif /* __ARCH_ARM_SRC_NUC1XX_HARDWARE_NUC_PDMA_H */
+16 -18
View File
@@ -1,4 +1,4 @@
/********************************************************************************************
/****************************************************************************
* arch/arm/src/nuc1xx/hardware/nuc_ps2d.h
*
* Licensed to the Apache Software Foundation (ASF) under one or more
@@ -16,41 +16,39 @@
* License for the specific language governing permissions and limitations
* under the License.
*
********************************************************************************************/
****************************************************************************/
#ifndef __ARCH_ARM_SRC_NUC1XX_HARDWARE_NUC_PS2D_H
#define __ARCH_ARM_SRC_NUC1XX_HARDWARE_NUC_PS2D_H
/********************************************************************************************
/****************************************************************************
* Included Files
********************************************************************************************/
****************************************************************************/
#include <nuttx/config.h>
#include "chip.h"
/********************************************************************************************
/****************************************************************************
* Pre-processor Definitions
********************************************************************************************/
/* Register offsets *************************************************************************/
****************************************************************************/
/* Register offsets *********************************************************/
/* Register addresses ***********************************************************************/
/* Register addresses *******************************************************/
/* Register bit-field definitions *******************************************/
/* Register bit-field definitions ***********************************************************/
/********************************************************************************************
/****************************************************************************
* Public Types
********************************************************************************************/
****************************************************************************/
/********************************************************************************************
/****************************************************************************
* Public Data
********************************************************************************************/
****************************************************************************/
/********************************************************************************************
* Public Functions
********************************************************************************************/
/****************************************************************************
* Public Functions Prototypes
****************************************************************************/
#endif /* __ARCH_ARM_SRC_NUC1XX_HARDWARE_NUC_PS2D_H */
+16 -18
View File
@@ -1,4 +1,4 @@
/********************************************************************************************
/****************************************************************************
* arch/arm/src/nuc1xx/hardware/nuc_pwm.h
*
* Licensed to the Apache Software Foundation (ASF) under one or more
@@ -16,41 +16,39 @@
* License for the specific language governing permissions and limitations
* under the License.
*
********************************************************************************************/
****************************************************************************/
#ifndef __ARCH_ARM_SRC_NUC1XX_HARDWARE_NUC_PWM_H
#define __ARCH_ARM_SRC_NUC1XX_HARDWARE_NUC_PWM_H
/********************************************************************************************
/****************************************************************************
* Included Files
********************************************************************************************/
****************************************************************************/
#include <nuttx/config.h>
#include "chip.h"
/********************************************************************************************
/****************************************************************************
* Pre-processor Definitions
********************************************************************************************/
/* Register offsets *************************************************************************/
****************************************************************************/
/* Register offsets *********************************************************/
/* Register addresses ***********************************************************************/
/* Register addresses *******************************************************/
/* Register bit-field definitions *******************************************/
/* Register bit-field definitions ***********************************************************/
/********************************************************************************************
/****************************************************************************
* Public Types
********************************************************************************************/
****************************************************************************/
/********************************************************************************************
/****************************************************************************
* Public Data
********************************************************************************************/
****************************************************************************/
/********************************************************************************************
* Public Functions
********************************************************************************************/
/****************************************************************************
* Public Functions Prototypes
****************************************************************************/
#endif /* __ARCH_ARM_SRC_NUC1XX_HARDWARE_NUC_PWM_H */
+16 -18
View File
@@ -1,4 +1,4 @@
/********************************************************************************************
/****************************************************************************
* arch/arm/src/nuc1xx/hardware/nuc_rtc.h
*
* Licensed to the Apache Software Foundation (ASF) under one or more
@@ -16,41 +16,39 @@
* License for the specific language governing permissions and limitations
* under the License.
*
********************************************************************************************/
****************************************************************************/
#ifndef __ARCH_ARM_SRC_NUC1XX_HARDWARE_NUC_RTC_H
#define __ARCH_ARM_SRC_NUC1XX_HARDWARE_NUC_RTC_H
/********************************************************************************************
/****************************************************************************
* Included Files
********************************************************************************************/
****************************************************************************/
#include <nuttx/config.h>
#include "chip.h"
/********************************************************************************************
/****************************************************************************
* Pre-processor Definitions
********************************************************************************************/
/* Register offsets *************************************************************************/
****************************************************************************/
/* Register offsets *********************************************************/
/* Register addresses ***********************************************************************/
/* Register addresses *******************************************************/
/* Register bit-field definitions *******************************************/
/* Register bit-field definitions ***********************************************************/
/********************************************************************************************
/****************************************************************************
* Public Types
********************************************************************************************/
****************************************************************************/
/********************************************************************************************
/****************************************************************************
* Public Data
********************************************************************************************/
****************************************************************************/
/********************************************************************************************
* Public Functions
********************************************************************************************/
/****************************************************************************
* Public Functions Prototypes
****************************************************************************/
#endif /* __ARCH_ARM_SRC_NUC1XX_HARDWARE_NUC_RTC_H */
+16 -18
View File
@@ -1,4 +1,4 @@
/********************************************************************************************
/****************************************************************************
* arch/arm/src/nuc1xx/hardware/nuc_spi.h
*
* Licensed to the Apache Software Foundation (ASF) under one or more
@@ -16,41 +16,39 @@
* License for the specific language governing permissions and limitations
* under the License.
*
********************************************************************************************/
****************************************************************************/
#ifndef __ARCH_ARM_SRC_NUC1XX_HARDWARE_NUC_SPI_H
#define __ARCH_ARM_SRC_NUC1XX_HARDWARE_NUC_SPI_H
/********************************************************************************************
/****************************************************************************
* Included Files
********************************************************************************************/
****************************************************************************/
#include <nuttx/config.h>
#include "chip.h"
/********************************************************************************************
/****************************************************************************
* Pre-processor Definitions
********************************************************************************************/
/* Register offsets *************************************************************************/
****************************************************************************/
/* Register offsets *********************************************************/
/* Register addresses ***********************************************************************/
/* Register addresses *******************************************************/
/* Register bit-field definitions *******************************************/
/* Register bit-field definitions ***********************************************************/
/********************************************************************************************
/****************************************************************************
* Public Types
********************************************************************************************/
****************************************************************************/
/********************************************************************************************
/****************************************************************************
* Public Data
********************************************************************************************/
****************************************************************************/
/********************************************************************************************
* Public Functions
********************************************************************************************/
/****************************************************************************
* Public Functions Prototypes
****************************************************************************/
#endif /* __ARCH_ARM_SRC_NUC1XX_HARDWARE_NUC_SPI_H */
+16 -18
View File
@@ -1,4 +1,4 @@
/********************************************************************************************
/****************************************************************************
* arch/arm/src/nuc1xx/hardware/nuc_tmr.h
*
* Licensed to the Apache Software Foundation (ASF) under one or more
@@ -16,41 +16,39 @@
* License for the specific language governing permissions and limitations
* under the License.
*
********************************************************************************************/
****************************************************************************/
#ifndef __ARCH_ARM_SRC_NUC1XX_HARDWARE_NUC_TMR_H
#define __ARCH_ARM_SRC_NUC1XX_HARDWARE_NUC_TMR_H
/********************************************************************************************
/****************************************************************************
* Included Files
********************************************************************************************/
****************************************************************************/
#include <nuttx/config.h>
#include "chip.h"
/********************************************************************************************
/****************************************************************************
* Pre-processor Definitions
********************************************************************************************/
/* Register offsets *************************************************************************/
****************************************************************************/
/* Register offsets *********************************************************/
/* Register addresses ***********************************************************************/
/* Register addresses *******************************************************/
/* Register bit-field definitions *******************************************/
/* Register bit-field definitions ***********************************************************/
/********************************************************************************************
/****************************************************************************
* Public Types
********************************************************************************************/
****************************************************************************/
/********************************************************************************************
/****************************************************************************
* Public Data
********************************************************************************************/
****************************************************************************/
/********************************************************************************************
* Public Functions
********************************************************************************************/
/****************************************************************************
* Public Functions Prototypes
****************************************************************************/
#endif /* __ARCH_ARM_SRC_NUC1XX_HARDWARE_NUC_TMR_H */
+18 -16
View File
@@ -1,4 +1,4 @@
/********************************************************************************************
/****************************************************************************
* arch/arm/src/nuc1xx/hardware/nuc_uart.h
*
* Licensed to the Apache Software Foundation (ASF) under one or more
@@ -16,23 +16,24 @@
* License for the specific language governing permissions and limitations
* under the License.
*
********************************************************************************************/
****************************************************************************/
#ifndef __ARCH_ARM_SRC_NUC1XX_HARDWARE_NUC_UART_H
#define __ARCH_ARM_SRC_NUC1XX_HARDWARE_NUC_UART_H
/********************************************************************************************
/****************************************************************************
* Included Files
********************************************************************************************/
****************************************************************************/
#include <nuttx/config.h>
#include "chip.h"
/********************************************************************************************
/****************************************************************************
* Pre-processor Definitions
********************************************************************************************/
/* Register offsets *************************************************************************/
****************************************************************************/
/* Register offsets *********************************************************/
#define NUC_UART_RBR_OFFSET 0x0000 /* UART receive buffer register */
#define NUC_UART_THR_OFFSET 0x0000 /* UART transmit holding register */
@@ -49,7 +50,7 @@
#define NUC_UART_ALT_CSR_OFFSET 0x002c /* UART alternate control/status register */
#define NUC_UART_FUN_SEL_OFFSET 0x0030 /* UART function select register */
/* Register addresses ***********************************************************************/
/* Register addresses *******************************************************/
#define NUC_UART0_RBR (NUC_UART0_BASE+NUC_UART_RBR_OFFSET)
#define NUC_UART0_THR (NUC_UART0_BASE+NUC_UART_THR_OFFSET)
@@ -96,7 +97,7 @@
#define NUC_UART2_ALT_CSR (NUC_UART2_BASE+NUC_UART_ALT_CSR_OFFSET)
#define NUC_UART2_FUN_SEL (NUC_UART2_BASE+NUC_UART_FUN_SEL_OFFSET)
/* Register bit-field definitions ***********************************************************/
/* Register bit-field definitions *******************************************/
/* UART receive buffer register */
@@ -137,6 +138,7 @@
# define UART_FCR_RFITL_30 (4 << UART_FCR_RFITL_SHIFT) /* High speed */
# define UART_FCR_RFITL_46 (5 << UART_FCR_RFITL_SHIFT) /* High speed */
# define UART_FCR_RFITL_62 (6 << UART_FCR_RFITL_SHIFT) /* High speed */
#define UART_FCR_RX_DIS (1 << 8) /* Bit 8: Receive disable register */
#define UART_FCR_RTS_TRI_LEV_SHIFT (16) /* Bits 16-19: RTS trigger level for auto flow control */
#define UART_FCR_RTS_TRI_LEV_MASK (15 << UART_FCR_RTS_TRI_LEV_SHIFT)
@@ -260,16 +262,16 @@
# define UART_FUN_SEL_IRDA (2 << UART_FUN_SEL_SHIFT)
# define UART_FUN_SEL_RS485 (3 << UART_FUN_SEL_SHIFT) /* Low density only */
/********************************************************************************************
/****************************************************************************
* Public Types
********************************************************************************************/
****************************************************************************/
/********************************************************************************************
/****************************************************************************
* Public Data
********************************************************************************************/
****************************************************************************/
/********************************************************************************************
* Public Functions
********************************************************************************************/
/****************************************************************************
* Public Functions Prototypes
****************************************************************************/
#endif /* __ARCH_ARM_SRC_NUC1XX_HARDWARE_NUC_UART_H */
+16 -18
View File
@@ -1,4 +1,4 @@
/********************************************************************************************
/****************************************************************************
* arch/arm/src/nuc1xx/hardware/nuc_usbd.h
*
* Licensed to the Apache Software Foundation (ASF) under one or more
@@ -16,41 +16,39 @@
* License for the specific language governing permissions and limitations
* under the License.
*
********************************************************************************************/
****************************************************************************/
#ifndef __ARCH_ARM_SRC_NUC1XX_HARDWARE_NUC_USBD_H
#define __ARCH_ARM_SRC_NUC1XX_HARDWARE_NUC_USBD_H
/********************************************************************************************
/****************************************************************************
* Included Files
********************************************************************************************/
****************************************************************************/
#include <nuttx/config.h>
#include "chip.h"
/********************************************************************************************
/****************************************************************************
* Pre-processor Definitions
********************************************************************************************/
/* Register offsets *************************************************************************/
****************************************************************************/
/* Register offsets *********************************************************/
/* Register addresses ***********************************************************************/
/* Register addresses *******************************************************/
/* Register bit-field definitions *******************************************/
/* Register bit-field definitions ***********************************************************/
/********************************************************************************************
/****************************************************************************
* Public Types
********************************************************************************************/
****************************************************************************/
/********************************************************************************************
/****************************************************************************
* Public Data
********************************************************************************************/
****************************************************************************/
/********************************************************************************************
* Public Functions
********************************************************************************************/
/****************************************************************************
* Public Functions Prototypes
****************************************************************************/
#endif /* __ARCH_ARM_SRC_NUC1XX_HARDWARE_NUC_USBD_H */
+16 -18
View File
@@ -1,4 +1,4 @@
/********************************************************************************************
/****************************************************************************
* arch/arm/src/nuc1xx/hardware/nuc_wdt.h
*
* Licensed to the Apache Software Foundation (ASF) under one or more
@@ -16,41 +16,39 @@
* License for the specific language governing permissions and limitations
* under the License.
*
********************************************************************************************/
****************************************************************************/
#ifndef __ARCH_ARM_SRC_NUC1XX_HARDWARE_NUC_WDT_H
#define __ARCH_ARM_SRC_NUC1XX_HARDWARE_NUC_WDT_H
/********************************************************************************************
/****************************************************************************
* Included Files
********************************************************************************************/
****************************************************************************/
#include <nuttx/config.h>
#include "chip.h"
/********************************************************************************************
/****************************************************************************
* Pre-processor Definitions
********************************************************************************************/
/* Register offsets *************************************************************************/
****************************************************************************/
/* Register offsets *********************************************************/
/* Register addresses ***********************************************************************/
/* Register addresses *******************************************************/
/* Register bit-field definitions *******************************************/
/* Register bit-field definitions ***********************************************************/
/********************************************************************************************
/****************************************************************************
* Public Types
********************************************************************************************/
****************************************************************************/
/********************************************************************************************
/****************************************************************************
* Public Data
********************************************************************************************/
****************************************************************************/
/********************************************************************************************
* Public Functions
********************************************************************************************/
/****************************************************************************
* Public Functions Prototypes
****************************************************************************/
#endif /* __ARCH_ARM_SRC_NUC1XX_HARDWARE_NUC_WDT_H */
+4 -4
View File
@@ -88,7 +88,7 @@ static inline void nuc_lock(void)
* Public Functions
****************************************************************************/
/************************************************************************************
/****************************************************************************
* Name: nuc_clockconfig
*
* Description:
@@ -100,7 +100,7 @@ static inline void nuc_lock(void)
* Returned Value:
* None
*
************************************************************************************/
****************************************************************************/
void nuc_clockconfig(void)
{
@@ -110,8 +110,8 @@ void nuc_clockconfig(void)
nuc_unlock();
/* Enable External 4~24 mhz high speed crystal (And other clocks if needed by
* other drivers).
/* Enable External 4~24 mhz high speed crystal (And other clocks if needed
* by other drivers).
*/
regval = getreg32(NUC_CLK_PWRCON);
+15 -15
View File
@@ -1,4 +1,4 @@
/************************************************************************************
/****************************************************************************
* arch/arm/src/nuc1xx/nuc_clockconfig.h
*
* Licensed to the Apache Software Foundation (ASF) under one or more
@@ -16,28 +16,28 @@
* License for the specific language governing permissions and limitations
* under the License.
*
************************************************************************************/
****************************************************************************/
#ifndef __ARCH_ARM_SRC_NUC1XX_NUC_CLOCKCONFIG_H
#define __ARCH_ARM_SRC_NUC1XX_NUC_CLOCKCONFIG_H
/************************************************************************************
/****************************************************************************
* Included Files
************************************************************************************/
****************************************************************************/
#include <nuttx/config.h>
/************************************************************************************
/****************************************************************************
* Pre-processor Definitions
************************************************************************************/
****************************************************************************/
/************************************************************************************
/****************************************************************************
* Public Types
************************************************************************************/
****************************************************************************/
/************************************************************************************
/****************************************************************************
* Public Data
************************************************************************************/
****************************************************************************/
#ifndef __ASSEMBLY__
@@ -50,11 +50,11 @@ extern "C"
#define EXTERN extern
#endif
/************************************************************************************
* Public Functions
************************************************************************************/
/****************************************************************************
* Public Functions Prototypes
****************************************************************************/
/************************************************************************************
/****************************************************************************
* Name: nuc_clockconfig
*
* Description:
@@ -66,7 +66,7 @@ extern "C"
* Returned Value:
* None
*
************************************************************************************/
****************************************************************************/
void nuc_clockconfig(void);
+22 -18
View File
@@ -1,4 +1,4 @@
/************************************************************************************
/****************************************************************************
* arch/arm/src/nuc1xx/nuc_config.h
*
* Licensed to the Apache Software Foundation (ASF) under one or more
@@ -16,22 +16,25 @@
* License for the specific language governing permissions and limitations
* under the License.
*
************************************************************************************/
****************************************************************************/
#ifndef __ARCH_ARM_SRC_NUC1XX_NUC_CONFIG_H
#define __ARCH_ARM_SRC_NUC1XX_NUC_CONFIG_H
/************************************************************************************
/****************************************************************************
* Included Files
************************************************************************************/
****************************************************************************/
#include <nuttx/config.h>
#include <arch/nuc1xx/chip.h>
/************************************************************************************
/****************************************************************************
* Pre-processor Definitions
************************************************************************************/
/* Limit the number of enabled UARTs to those supported by the chip architecture */
****************************************************************************/
/* Limit the number of enabled UARTs to those supported by the chip
* architecture
*/
#if NUC_NUARTS < 3
# undef CONFIG_NUC_UART2
@@ -52,8 +55,8 @@
# define HAVE_UART 1
#endif
/* Make sure all features are disabled for disabled U[S]ARTs. This simplifies
* checking later.
/* Make sure all features are disabled for disabled U[S]ARTs.
* This simplifies checking later.
*/
#ifndef CONFIG_NUC_UART0
@@ -77,8 +80,9 @@
# undef CONFIG_UART2_RS485MODE
#endif
/* Is there a serial console? There should be at most one defined. It could be on
* any UARTn, n=0,1,2 - OR - there might not be any serial console at all.
/* Is there a serial console? There should be at most one defined.
* It could be on any UARTn, n=0,1,2 - OR - there might not be any serial
* console at all.
*/
#if defined(CONFIG_UART0_SERIAL_CONSOLE)
@@ -100,16 +104,16 @@
# undef HAVE_SERIAL_CONSOLE
#endif
/************************************************************************************
/****************************************************************************
* Public Types
************************************************************************************/
****************************************************************************/
/************************************************************************************
/****************************************************************************
* Public Data
************************************************************************************/
****************************************************************************/
/************************************************************************************
* Public Functions
************************************************************************************/
/****************************************************************************
* Public Functions Prototypes
****************************************************************************/
#endif /* __ARCH_ARM_SRC_NUC1XX_NUC_CONFIG_H */
+1
View File
@@ -39,6 +39,7 @@
/****************************************************************************
* Private Data
****************************************************************************/
/* Port letters for prettier debug output */
static const char g_portchar[NUC_GPIO_NPORTS] =
+2 -1
View File
@@ -104,7 +104,8 @@
# define GPIO_INTERRUPT_HIGH_LEVEL (4 << GPIO_INTERRUPT_SHIFT)
# define GPIO_INTERRUPT_LOW_LEVEL (5 << GPIO_INTERRUPT_SHIFT)
/* If the pin is a GPIO digital output, then this identifies the initial output value.
/* If the pin is a GPIO digital output, then this identifies the initial
* output value.
*
* 1111 1100 0000 0000
* 5432 1098 7654 3210
+15 -15
View File
@@ -1,4 +1,4 @@
/************************************************************************************
/****************************************************************************
* arch/arm/src/nuc1xx/nuc_irq.h
*
* Licensed to the Apache Software Foundation (ASF) under one or more
@@ -16,35 +16,35 @@
* License for the specific language governing permissions and limitations
* under the License.
*
************************************************************************************/
****************************************************************************/
#ifndef __ARCH_ARM_SRC_NUC1XX_NUC_IRQ_H
#define __ARCH_ARM_SRC_NUC1XX_NUC_IRQ_H
/************************************************************************************
/****************************************************************************
* Included Files
************************************************************************************/
****************************************************************************/
#include <nuttx/config.h>
/************************************************************************************
/****************************************************************************
* Pre-processor Definitions
************************************************************************************/
****************************************************************************/
/************************************************************************************
/****************************************************************************
* Public Types
************************************************************************************/
****************************************************************************/
/************************************************************************************
/****************************************************************************
* Public Data
************************************************************************************/
****************************************************************************/
/************************************************************************************
/****************************************************************************
* Inline Functions
************************************************************************************/
****************************************************************************/
/************************************************************************************
* Public Functions
************************************************************************************/
/****************************************************************************
* Public Functions Prototypes
****************************************************************************/
#endif /* __ARCH_ARM_SRC_NUC1XX_NUC_IRQ_H */
+14 -7
View File
@@ -43,6 +43,7 @@
/****************************************************************************
* Pre-processor Definitions
****************************************************************************/
/* Get the serial console UART configuration */
#ifdef HAVE_SERIAL_CONSOLE
@@ -101,7 +102,8 @@ static inline void nuc_console_ready(void)
#if 1
/* Wait for the TX FIFO to be empty (excessive!) */
while ((getreg32(NUC_CONSOLE_BASE + NUC_UART_FSR_OFFSET) & UART_FSR_TX_EMPTY) == 0);
while ((getreg32(NUC_CONSOLE_BASE + NUC_UART_FSR_OFFSET) &
UART_FSR_TX_EMPTY) == 0);
#else
uint32_t depth;
@@ -109,10 +111,12 @@ static inline void nuc_console_ready(void)
do
{
register uint32_t regval = getreg32(NUC_CONSOLE_BASE + NUC_UART_FSR_OFFSET);
depth = (regval & UART_FSR_TX_POINTER_MASK) >> UART_FSR_TX_POINTER_SHIFT;
register uint32_t regval = getreg32(NUC_CONSOLE_BASE +
NUC_UART_FSR_OFFSET);
depth = (regval & UART_FSR_TX_POINTER_MASK) >>
UART_FSR_TX_POINTER_SHIFT;
}
while (depth >= (NUC_CONSOLE_DEPTH-1));
while (depth >= (NUC_CONSOLE_DEPTH - 1));
#endif
}
#endif /* HAVE_SERIAL_CONSOLE */
@@ -125,7 +129,8 @@ static inline void nuc_console_ready(void)
* Name: nuc_lowsetup
*
* Description:
* Called at the very beginning of _start. Performs low level initialization.
* Called at the very beginning of _start.
* Performs low level initialization.
*
****************************************************************************/
@@ -228,7 +233,8 @@ void nuc_lowsetup(void)
/* Enable UART clocking for the selected UARTs */
regval = getreg32(NUC_CLK_APBCLK);
regval &= ~(CLK_APBCLK_UART0_EN | CLK_APBCLK_UART1_EN | CLK_APBCLK_UART2_EN);
regval &= ~(CLK_APBCLK_UART0_EN | CLK_APBCLK_UART1_EN |
CLK_APBCLK_UART2_EN);
#ifdef CONFIG_NUC_UART0
regval |= CLK_APBCLK_UART0_EN;
@@ -332,7 +338,8 @@ void nuc_lowputc(uint32_t ch)
* Mode DIV_X_EN DIV_X_ONE Divider X BRD (Baud rate equation)
* -------------------------------------------------------------
* 0 0 0 B A UART_CLK / [16 * (A+2)]
* 1 1 0 B A UART_CLK / [(B+1) * (A+2)] , B must >= 8
* 1 1 0 B A UART_CLK / [(B+1) * (A+2)],
* B must >= 8
* 2 1 1 Don't care A UART_CLK / (A+2), A must >=3
*
* Here we assume that the default clock source for the UART modules is
+19 -17
View File
@@ -1,4 +1,4 @@
/************************************************************************************
/****************************************************************************
* arch/arm/src/nuc1xx/nuc_lowputc.h
*
* Licensed to the Apache Software Foundation (ASF) under one or more
@@ -16,29 +16,29 @@
* License for the specific language governing permissions and limitations
* under the License.
*
************************************************************************************/
****************************************************************************/
#ifndef __ARCH_ARM_SRC_NUC1XX_NUC_LOWPUTC_H
#define __ARCH_ARM_SRC_NUC1XX_NUC_LOWPUTC_H
/************************************************************************************
/****************************************************************************
* Included Files
************************************************************************************/
****************************************************************************/
#include <nuttx/config.h>
#include "nuc_config.h"
/************************************************************************************
/****************************************************************************
* Pre-processor Definitions
************************************************************************************/
****************************************************************************/
/************************************************************************************
/****************************************************************************
* Public Types
************************************************************************************/
****************************************************************************/
/************************************************************************************
/****************************************************************************
* Public Data
************************************************************************************/
****************************************************************************/
#ifndef __ASSEMBLY__
@@ -51,17 +51,18 @@ extern "C"
#define EXTERN extern
#endif
/************************************************************************************
* Public Functions
************************************************************************************/
/****************************************************************************
* Public Functions Prototypes
****************************************************************************/
/************************************************************************************
/****************************************************************************
* Name: nuc_lowsetup
*
* Description:
* Called at the very beginning of _start. Performs low level initialization.
* Called at the very beginning of _start.
* Performs low level initialization.
*
************************************************************************************/
****************************************************************************/
void nuc_lowsetup(void);
@@ -74,7 +75,8 @@ void nuc_lowsetup(void);
* Mode DIV_X_EN DIV_X_ONE Divider X BRD (Baud rate equation)
* -------------------------------------------------------------
* 0 Disable 0 B A UART_CLK / [16 * (A+2)]
* 1 Enable 0 B A UART_CLK / [(B+1) * (A+2)] , B must >= 8
* 1 Enable 0 B A UART_CLK / [(B+1) * (A+2)] ,
* B must >= 8
* 2 Enable 1 Don't care A UART_CLK / (A+2), A must >=3
*
* Here we assume that the default clock source for the UART modules is
+15 -15
View File
@@ -1,4 +1,4 @@
/************************************************************************************
/****************************************************************************
* arch/arm/src/nuc1xx/nuc_serial.h
*
* Licensed to the Apache Software Foundation (ASF) under one or more
@@ -16,38 +16,38 @@
* License for the specific language governing permissions and limitations
* under the License.
*
************************************************************************************/
****************************************************************************/
#ifndef __ARCH_ARM_SRC_NUC1XX_NUC_SERIAL_H
#define __ARCH_ARM_SRC_NUC1XX_NUC_SERIAL_H
/************************************************************************************
/****************************************************************************
* Included Files
************************************************************************************/
****************************************************************************/
#include <nuttx/config.h>
#include "nuc_config.h"
#include "hardware/nuc_uart.h"
/************************************************************************************
/****************************************************************************
* Pre-processor Definitions
************************************************************************************/
****************************************************************************/
/************************************************************************************
/****************************************************************************
* Public Types
************************************************************************************/
****************************************************************************/
/************************************************************************************
/****************************************************************************
* Public Data
************************************************************************************/
****************************************************************************/
/************************************************************************************
/****************************************************************************
* Inline Functions
************************************************************************************/
****************************************************************************/
/************************************************************************************
* Public Functions
************************************************************************************/
/****************************************************************************
* Public Functions Prototypes
****************************************************************************/
#endif /* __ARCH_ARM_SRC_NUC1XX_NUC_SERIAL_H */
+12 -12
View File
@@ -1,4 +1,4 @@
/************************************************************************************
/****************************************************************************
* arch/arm/src/nuc1xx/nuc_start.h
*
* Licensed to the Apache Software Foundation (ASF) under one or more
@@ -16,31 +16,31 @@
* License for the specific language governing permissions and limitations
* under the License.
*
************************************************************************************/
****************************************************************************/
#ifndef __ARCH_ARM_SRC_NUC1XX_NUC_START_H
#define __ARCH_ARM_SRC_NUC1XX_NUC_START_H
/************************************************************************************
/****************************************************************************
* Included Files
************************************************************************************/
****************************************************************************/
#include <nuttx/config.h>
/************************************************************************************
/****************************************************************************
* Public Function Prototypes
************************************************************************************/
****************************************************************************/
/************************************************************************************
/****************************************************************************
* Name: nuc_boardinitialize
*
* Description:
* All NUC1xx architectures must provide the following entry point. This entry
* point is called early in the initialization -- after clocking and memory have
* been configured but before caches have been enabled and before any devices have
* been initialized.
* All NUC1xx architectures must provide the following entry point.
* This entry point is called early in the initialization -- after
* clocking and memory have been configured but before caches have been
* enabled and before any devices have been initialized.
*
************************************************************************************/
****************************************************************************/
void nuc_boardinitialize(void);
+4 -2
View File
@@ -42,6 +42,7 @@
/****************************************************************************
* Pre-processor Definitions
****************************************************************************/
/* Get the frequency of the selected clock source */
#if defined(CONFIG_NUC_SYSTICK_CORECLK)
@@ -218,8 +219,9 @@ void up_timer_initialize(void)
*/
#ifdef CONFIG_NUC_SYSTICK_CORECLK
putreg32((SYSTICK_CSR_CLKSOURCE | SYSTICK_CSR_TICKINT | SYSTICK_CSR_ENABLE),
ARMV6M_SYSTICK_CSR);
putreg32((SYSTICK_CSR_CLKSOURCE | SYSTICK_CSR_TICKINT |
SYSTICK_CSR_ENABLE),
ARMV6M_SYSTICK_CSR);
#else
putreg32((SYSTICK_CSR_TICKINT | SYSTICK_CSR_ENABLE), ARMV6M_SYSTICK_CSR);
#endif
+13 -13
View File
@@ -1,4 +1,4 @@
/************************************************************************************
/****************************************************************************
* arch/arm/src/nuc1xx/nuc_userspace.h
*
* Licensed to the Apache Software Foundation (ASF) under one or more
@@ -16,32 +16,32 @@
* License for the specific language governing permissions and limitations
* under the License.
*
************************************************************************************/
****************************************************************************/
#ifndef __ARCH_ARM_SRC_NUC1XX_NUC_USERSPACE_H
#define __ARCH_ARM_SRC_NUC1XX_NUC_USERSPACE_H
/************************************************************************************
/****************************************************************************
* Included Files
************************************************************************************/
****************************************************************************/
#include <nuttx/config.h>
/************************************************************************************
/****************************************************************************
* Pre-processor Definitions
************************************************************************************/
****************************************************************************/
/************************************************************************************
/****************************************************************************
* Public Types
************************************************************************************/
****************************************************************************/
/************************************************************************************
/****************************************************************************
* Public Data
************************************************************************************/
****************************************************************************/
/************************************************************************************
* Public Functions
************************************************************************************/
/****************************************************************************
* Public Functions Prototypes
****************************************************************************/
/****************************************************************************
* Name: nuc_userspace