diff --git a/arch/arm/src/nrf52/chip.h b/arch/arm/src/nrf52/chip.h index 1791918c29..9c35af909a 100644 --- a/arch/arm/src/nrf52/chip.h +++ b/arch/arm/src/nrf52/chip.h @@ -58,20 +58,4 @@ #define ARMV7M_PERIPHERAL_INTERRUPTS NRF52_IRQ_NEXTINT -/************************************************************************************ - * Pre-processor Definitions - ************************************************************************************/ - -/************************************************************************************ - * Public Types - ************************************************************************************/ - -/************************************************************************************ - * Public Data - ************************************************************************************/ - -/************************************************************************************ - * Public Functions - ************************************************************************************/ - #endif /* __ARCH_ARM_SRC_NRF52_CHIP_H */ diff --git a/arch/arm/src/nrf52/nrf52_clockconfig.c b/arch/arm/src/nrf52/nrf52_clockconfig.c index e7aa6144a0..7a4730d992 100644 --- a/arch/arm/src/nrf52/nrf52_clockconfig.c +++ b/arch/arm/src/nrf52/nrf52_clockconfig.c @@ -63,7 +63,7 @@ * clocking using the settings in board.h. This function also performs * other low-level chip as necessary. * - *****************************************************************************/ + ****************************************************************************/ void nrf52_clockconfig() { diff --git a/arch/arm/src/nrf52/nrf52_clockconfig.h b/arch/arm/src/nrf52/nrf52_clockconfig.h index 7fb21c52f2..62fe47c211 100644 --- a/arch/arm/src/nrf52/nrf52_clockconfig.h +++ b/arch/arm/src/nrf52/nrf52_clockconfig.h @@ -49,15 +49,9 @@ /* Frequencies of internal clocks */ #define NRF52_SYSTEM_CLOCK 64000000 /* Default System clock value */ -#define NRF52_RTC_CLOCK 32768 /* RTC oscillator 32 kHz output (32k_clk )*/ - -/**************************************************************************** - * Public Types - ****************************************************************************/ - -/**************************************************************************** - * Inline Functions - ****************************************************************************/ +#define NRF52_RTC_CLOCK 32768 /* RTC oscillator 32 kHz output + * (32k_clk) + */ #ifndef __ASSEMBLY__ @@ -87,7 +81,7 @@ extern "C" * clocking using the settings in board.h. This function also performs * other low-level chip as necessary. * - *****************************************************************************/ + ****************************************************************************/ void nrf52_clockconfig(void); diff --git a/arch/arm/src/nrf52/nrf52_config.h b/arch/arm/src/nrf52/nrf52_config.h index a01abca183..be740d32d2 100644 --- a/arch/arm/src/nrf52/nrf52_config.h +++ b/arch/arm/src/nrf52/nrf52_config.h @@ -49,7 +49,7 @@ * Pre-processor Definitions ************************************************************************************/ -/* Configuration *********************************************************************/ +/* Configuration ********************************************************************/ /* Make sure that no unsupported UART, I2C master, or SPI master peripherals are * enabled. @@ -95,8 +95,4 @@ # define HAVE_UART_CONSOLE 1 #endif -/************************************************************************************ - * Public Functions - ************************************************************************************/ - #endif /* __ARCH_ARM_SRC_NRF52_NRF52_CONFIG_H */ diff --git a/arch/arm/src/nrf52/nrf52_gpio.h b/arch/arm/src/nrf52/nrf52_gpio.h index e03810d8a6..85fe0d0187 100644 --- a/arch/arm/src/nrf52/nrf52_gpio.h +++ b/arch/arm/src/nrf52/nrf52_gpio.h @@ -202,7 +202,7 @@ extern "C" #endif /************************************************************************************ - * Public Functions + * Public Function Prototypes ************************************************************************************/ /************************************************************************************ diff --git a/arch/arm/src/nrf52/nrf52_gpiote.h b/arch/arm/src/nrf52/nrf52_gpiote.h index 3b1e162f72..d822a2e3fc 100644 --- a/arch/arm/src/nrf52/nrf52_gpiote.h +++ b/arch/arm/src/nrf52/nrf52_gpiote.h @@ -46,10 +46,6 @@ #include "chip.h" -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - /**************************************************************************** * Public Function Prototypes ****************************************************************************/ diff --git a/arch/arm/src/nrf52/nrf52_i2c.c b/arch/arm/src/nrf52/nrf52_i2c.c index 0285d8e623..bae704a5a1 100644 --- a/arch/arm/src/nrf52/nrf52_i2c.c +++ b/arch/arm/src/nrf52/nrf52_i2c.c @@ -85,7 +85,7 @@ struct nrf52_i2c_priv_s uint32_t freq; /* Current I2C frequency */ int dcnt; /* Current message length */ uint16_t flags; /* Current message flags */ - uint16_t addr; /* Current I2C address*/ + uint16_t addr; /* Current I2C address */ sem_t sem_excl; /* Mutual exclusion semaphore */ #ifndef CONFIG_I2C_POLLED sem_t sem_isr; /* Interrupt wait semaphore */ diff --git a/arch/arm/src/nrf52/nrf52_i2c.h b/arch/arm/src/nrf52/nrf52_i2c.h index 9e39e7b773..286cf71819 100644 --- a/arch/arm/src/nrf52/nrf52_i2c.h +++ b/arch/arm/src/nrf52/nrf52_i2c.h @@ -45,10 +45,6 @@ #include "chip.h" -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - /**************************************************************************** * Public Function Prototypes ****************************************************************************/ diff --git a/arch/arm/src/nrf52/nrf52_irq.c b/arch/arm/src/nrf52/nrf52_irq.c index c822d56f79..a5f75992ba 100644 --- a/arch/arm/src/nrf52/nrf52_irq.c +++ b/arch/arm/src/nrf52/nrf52_irq.c @@ -124,21 +124,30 @@ static void nrf52_dumpnvic(const char *msg, int irq) getreg32(NVIC_SYSTICK_CTRL_ENABLE)); #endif irqinfo(" IRQ ENABLE: %08x %08x\n", - getreg32(NVIC_IRQ0_31_ENABLE), getreg32(NVIC_IRQ32_63_ENABLE)); + getreg32(NVIC_IRQ0_31_ENABLE), + getreg32(NVIC_IRQ32_63_ENABLE)); irqinfo(" SYSH_PRIO: %08x %08x %08x\n", - getreg32(NVIC_SYSH4_7_PRIORITY), getreg32(NVIC_SYSH8_11_PRIORITY), + getreg32(NVIC_SYSH4_7_PRIORITY), + getreg32(NVIC_SYSH8_11_PRIORITY), getreg32(NVIC_SYSH12_15_PRIORITY)); irqinfo(" IRQ PRIO: %08x %08x %08x %08x\n", - getreg32(NVIC_IRQ0_3_PRIORITY), getreg32(NVIC_IRQ4_7_PRIORITY), - getreg32(NVIC_IRQ8_11_PRIORITY), getreg32(NVIC_IRQ12_15_PRIORITY)); + getreg32(NVIC_IRQ0_3_PRIORITY), + getreg32(NVIC_IRQ4_7_PRIORITY), + getreg32(NVIC_IRQ8_11_PRIORITY), + getreg32(NVIC_IRQ12_15_PRIORITY)); irqinfo(" %08x %08x %08x %08x\n", - getreg32(NVIC_IRQ16_19_PRIORITY), getreg32(NVIC_IRQ20_23_PRIORITY), - getreg32(NVIC_IRQ24_27_PRIORITY), getreg32(NVIC_IRQ28_31_PRIORITY)); + getreg32(NVIC_IRQ16_19_PRIORITY), + getreg32(NVIC_IRQ20_23_PRIORITY), + getreg32(NVIC_IRQ24_27_PRIORITY), + getreg32(NVIC_IRQ28_31_PRIORITY)); irqinfo(" %08x %08x %08x %08x\n", - getreg32(NVIC_IRQ32_35_PRIORITY), getreg32(NVIC_IRQ36_39_PRIORITY), - getreg32(NVIC_IRQ40_43_PRIORITY), getreg32(NVIC_IRQ44_47_PRIORITY)); + getreg32(NVIC_IRQ32_35_PRIORITY), + getreg32(NVIC_IRQ36_39_PRIORITY), + getreg32(NVIC_IRQ40_43_PRIORITY), + getreg32(NVIC_IRQ44_47_PRIORITY)); irqinfo(" %08x %08x %08x\n", - getreg32(NVIC_IRQ48_51_PRIORITY), getreg32(NVIC_IRQ52_55_PRIORITY), + getreg32(NVIC_IRQ48_51_PRIORITY), + getreg32(NVIC_IRQ52_55_PRIORITY), getreg32(NVIC_IRQ56_59_PRIORITY)); leave_critical_section(flags); diff --git a/arch/arm/src/nrf52/nrf52_irq.h b/arch/arm/src/nrf52/nrf52_irq.h index 6cbfe781b3..96cbfd99dc 100644 --- a/arch/arm/src/nrf52/nrf52_irq.h +++ b/arch/arm/src/nrf52/nrf52_irq.h @@ -43,7 +43,7 @@ #include /**************************************************************************** - * Public Functions + * Public Function Prototypes ****************************************************************************/ /**************************************************************************** diff --git a/arch/arm/src/nrf52/nrf52_lowputc.c b/arch/arm/src/nrf52/nrf52_lowputc.c index 212d1ab849..fe9e4ecb62 100644 --- a/arch/arm/src/nrf52/nrf52_lowputc.c +++ b/arch/arm/src/nrf52/nrf52_lowputc.c @@ -135,10 +135,10 @@ static void nrf52_setbaud(uintptr_t base, const struct uart_config_s *config) * Name: nrf52_lowsetup * * Description: - * Called at the very beginning of _start. Performs low level initialization - * including setup of the console UART. This UART initialization is done - * early so that the serial console is available for debugging very early in - * the boot sequence. + * Called at the very beginning of _start. Performs low level + * initialization including setup of the console UART. + * This UART initialization is done early so that the serial console is + * available for debugging very early in the boot sequence. * ****************************************************************************/ @@ -163,7 +163,8 @@ void nrf52_lowsetup(void) ****************************************************************************/ #ifdef HAVE_UART_DEVICE -void nrf52_usart_configure(uintptr_t base, const struct uart_config_s *config) +void nrf52_usart_configure(uintptr_t base, + const struct uart_config_s *config) { uint32_t pin = 0; uint32_t port = 0; diff --git a/arch/arm/src/nrf52/nrf52_lowputc.h b/arch/arm/src/nrf52/nrf52_lowputc.h index d587c3d8b1..6fe445d28b 100644 --- a/arch/arm/src/nrf52/nrf52_lowputc.h +++ b/arch/arm/src/nrf52/nrf52_lowputc.h @@ -71,7 +71,7 @@ struct uart_config_s #endif /**************************************************************************** - * Public Functions + * Public Function Prototypes ****************************************************************************/ /**************************************************************************** diff --git a/arch/arm/src/nrf52/nrf52_serial.c b/arch/arm/src/nrf52/nrf52_serial.c index 92e8802283..feddae4fee 100644 --- a/arch/arm/src/nrf52/nrf52_serial.c +++ b/arch/arm/src/nrf52/nrf52_serial.c @@ -329,10 +329,10 @@ static void nrf52_shutdown(struct uart_dev_s *dev) * Name: nrf52_attach * * Description: - * Configure the UART to operation in interrupt driven mode. This method is - * called when the serial port is opened. Normally, this is just after the - * the setup() method is called, however, the serial console may operate in - * a non-interrupt driven mode during the boot phase. + * Configure the UART to operation in interrupt driven mode. This method + * is called when the serial port is opened. Normally, this is just after + * the the setup() method is called, however, the serial console may + * operate in a non-interrupt driven mode during the boot phase. * * RX and TX interrupts are not enabled when by the attach method (unless * the hardware supports multiple levels of interrupt enabling). @@ -364,8 +364,8 @@ static int nrf52_attach(struct uart_dev_s *dev) * * Description: * Detach UART interrupts. This method is called when the serial port is - * closed normally just before the shutdown method is called. The exception - * is the serial console which is never shutdown. + * closed normally just before the shutdown method is called. + * The exception is the serial console which is never shutdown. * ****************************************************************************/ diff --git a/arch/arm/src/nrf52/nrf52_serial.h b/arch/arm/src/nrf52/nrf52_serial.h index 90d83c31af..e74ef67711 100644 --- a/arch/arm/src/nrf52/nrf52_serial.h +++ b/arch/arm/src/nrf52/nrf52_serial.h @@ -44,7 +44,7 @@ #include "nrf52_config.h" /**************************************************************************** - * Public Functions + * Public Function Prototypes ****************************************************************************/ /**************************************************************************** diff --git a/arch/arm/src/nrf52/nrf52_spi.c b/arch/arm/src/nrf52/nrf52_spi.c index 188ad73988..6646e9ce49 100644 --- a/arch/arm/src/nrf52/nrf52_spi.c +++ b/arch/arm/src/nrf52/nrf52_spi.c @@ -84,7 +84,9 @@ struct nrf52_spidev_s uint32_t frequency; /* Requested clock frequency */ uint8_t mode; /* Mode 0,1,2,3 */ - sem_t exclsem; /* Held while chip is selected for mutual exclusion */ + sem_t exclsem; /* Held while chip is selected for mutual + * exclusion + */ #ifdef CONFIG_NRF52_SPI_MASTER_INTERRUPTS sem_t sem_isr; /* Interrupt wait semaphore */ #endif diff --git a/arch/arm/src/nrf52/nrf52_spi.h b/arch/arm/src/nrf52/nrf52_spi.h index c87e7dbf26..07a9ad5740 100644 --- a/arch/arm/src/nrf52/nrf52_spi.h +++ b/arch/arm/src/nrf52/nrf52_spi.h @@ -45,10 +45,6 @@ #include "chip.h" -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - /**************************************************************************** * Public Function Prototypes ****************************************************************************/ @@ -84,14 +80,14 @@ FAR struct spi_dev_s *nrf52_spibus_initialize(int port); * pins. * 2. Provide nrf52_spi0/1/...select() and nrf52_spi0/1/...status() * functions in your board-specific logic. These functions will perform - * chip selection and status operations using GPIOs in the way your board - * is configured. + * chip selection and status operations using GPIOs in the way your + * board is configured. * 3. If CONFIG_SPI_CMDDATA is defined in your NuttX configuration file, * then provide nrf52_spi0/1/...cmddata() functions in your * board-specific logic. These functions will perform cmd/data selection * operations using GPIOs in the way your board is configured. - * 4. Add a calls to nrf52_spibus_initialize() in your low level application - * initialization logic + * 4. Add a calls to nrf52_spibus_initialize() in your low level + * application initialization logic. * 5. The handle returned by nrf52_spibus_initialize() may then be used to * bind the SPI driver to higher level logic (e.g., calling * mmcsd_spislotinitialize(), for example, will bind the SPI driver to diff --git a/arch/arm/src/nrf52/nrf52_start.c b/arch/arm/src/nrf52/nrf52_start.c index d95a9a475f..db587f181f 100644 --- a/arch/arm/src/nrf52/nrf52_start.c +++ b/arch/arm/src/nrf52/nrf52_start.c @@ -33,6 +33,10 @@ * ****************************************************************************/ +/**************************************************************************** + * Included Files + ****************************************************************************/ + #include #include diff --git a/arch/arm/src/nrf52/nrf52_utils.c b/arch/arm/src/nrf52/nrf52_utils.c index 1a23b91297..92bcb09a82 100644 --- a/arch/arm/src/nrf52/nrf52_utils.c +++ b/arch/arm/src/nrf52/nrf52_utils.c @@ -55,8 +55,8 @@ * Name: nrf52_clrpend * * Description: - * Clear a pending interrupt at the NVIC. This does not seem to be required - * for most interrupts. + * Clear a pending interrupt at the NVIC. This does not seem to be + * required for most interrupts. * * This function is logically a part of nrf52_irq.c, but I will keep it in * a separate file so that it will not increase the footprint on NRF52 @@ -76,7 +76,8 @@ void nrf52_clrpend(int irq) } else if (irq < NRF52_IRQ_NIRQS) { - putreg32(1 << (irq - NRF52_IRQ_EXTINT - 32), NVIC_IRQ32_63_CLRPEND); + putreg32(1 << (irq - NRF52_IRQ_EXTINT - 32), + NVIC_IRQ32_63_CLRPEND); } } } diff --git a/arch/arm/src/nrf52/nrf52_wdt.h b/arch/arm/src/nrf52/nrf52_wdt.h index 00afbda94f..0bfb4bd2ab 100644 --- a/arch/arm/src/nrf52/nrf52_wdt.h +++ b/arch/arm/src/nrf52/nrf52_wdt.h @@ -55,7 +55,7 @@ enum wdt_behaviour_e }; /**************************************************************************** - * Public Functions + * Public Function Prototypes ****************************************************************************/ #undef EXTERN