mirror of https://github.com/ARMmbed/mbed-os.git
Fix astyle issues
parent
ec9d647c31
commit
0212fde7fb
|
@ -26,19 +26,19 @@
|
|||
* Override the subtarget sdk init startup hook (specific to nRF2)
|
||||
* This will configure the internal regulator to operate at 3.3V
|
||||
*/
|
||||
void subtarget_sdk_init(void) {
|
||||
void subtarget_sdk_init(void)
|
||||
{
|
||||
|
||||
if (NRF_UICR->REGOUT0 != UICR_REGOUT0_VOUT_3V3)
|
||||
{
|
||||
NRF_NVMC->CONFIG = NVMC_CONFIG_WEN_Wen << NVMC_CONFIG_WEN_Pos;
|
||||
while (NRF_NVMC->READY == NVMC_READY_READY_Busy){}
|
||||
NRF_UICR->REGOUT0 = UICR_REGOUT0_VOUT_3V3;
|
||||
NRF_NVMC->CONFIG = NVMC_CONFIG_WEN_Ren << NVMC_CONFIG_WEN_Pos;
|
||||
while (NRF_NVMC->READY == NVMC_READY_READY_Busy){}
|
||||
if (NRF_UICR->REGOUT0 != UICR_REGOUT0_VOUT_3V3) {
|
||||
NRF_NVMC->CONFIG = NVMC_CONFIG_WEN_Wen << NVMC_CONFIG_WEN_Pos;
|
||||
while (NRF_NVMC->READY == NVMC_READY_READY_Busy) {}
|
||||
NRF_UICR->REGOUT0 = UICR_REGOUT0_VOUT_3V3;
|
||||
NRF_NVMC->CONFIG = NVMC_CONFIG_WEN_Ren << NVMC_CONFIG_WEN_Pos;
|
||||
while (NRF_NVMC->READY == NVMC_READY_READY_Busy) {}
|
||||
|
||||
// Trigger a soft reset so that the settings take effect
|
||||
NVIC_SystemReset();
|
||||
}
|
||||
// Trigger a soft reset so that the settings take effect
|
||||
NVIC_SystemReset();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -26,7 +26,8 @@
|
|||
#if MBED_CONF_EP_ATLAS_ENABLE_USB_STDIO_CONSOLE
|
||||
|
||||
/* Retarget stdio to USBSerial */
|
||||
mbed::FileHandle *mbed::mbed_target_override_console(int fd) {
|
||||
mbed::FileHandle *mbed::mbed_target_override_console(int fd)
|
||||
{
|
||||
static USBSerial usb_serial;
|
||||
return &usb_serial;
|
||||
}
|
||||
|
|
|
@ -48,13 +48,13 @@
|
|||
#endif
|
||||
|
||||
#if defined(__ARMCC_VERSION)
|
||||
__attribute__ ((section(".bss.nvictable")))
|
||||
uint32_t nrf_dispatch_vector[NVIC_NUM_VECTORS];
|
||||
__attribute__((section(".bss.nvictable")))
|
||||
uint32_t nrf_dispatch_vector[NVIC_NUM_VECTORS];
|
||||
#elif defined(__GNUC__)
|
||||
__attribute__ ((section(".nvictable")))
|
||||
uint32_t nrf_dispatch_vector[NVIC_NUM_VECTORS];
|
||||
__attribute__((section(".nvictable")))
|
||||
uint32_t nrf_dispatch_vector[NVIC_NUM_VECTORS];
|
||||
#elif defined(__ICCARM__)
|
||||
uint32_t nrf_dispatch_vector[NVIC_NUM_VECTORS] @ ".nvictable";
|
||||
uint32_t nrf_dispatch_vector[NVIC_NUM_VECTORS] @ ".nvictable";
|
||||
#endif
|
||||
|
||||
#include "platform/mbed_toolchain.h"
|
||||
|
@ -73,11 +73,11 @@ extern uint32_t __Vectors[];
|
|||
void nrf_reloc_vector_table(void)
|
||||
{
|
||||
// Copy and switch to dynamic vectors
|
||||
uint32_t *old_vectors = VECTORS_FLASH_START;
|
||||
uint32_t i;
|
||||
for (i = 0; i< NVIC_NUM_VECTORS; i++) {
|
||||
nrf_dispatch_vector[i] = old_vectors[i];
|
||||
}
|
||||
uint32_t *old_vectors = VECTORS_FLASH_START;
|
||||
uint32_t i;
|
||||
for (i = 0; i < NVIC_NUM_VECTORS; i++) {
|
||||
nrf_dispatch_vector[i] = old_vectors[i];
|
||||
}
|
||||
|
||||
#if defined(SOFTDEVICE_PRESENT)
|
||||
|
||||
|
@ -118,12 +118,12 @@ void nrf_reloc_vector_table(void)
|
|||
|
||||
void mbed_sdk_init(void)
|
||||
{
|
||||
if (STDIO_UART_RTS != NC) {
|
||||
gpio_t rts;
|
||||
gpio_init_out(&rts, STDIO_UART_RTS);
|
||||
/* Set STDIO_UART_RTS as gpio driven low */
|
||||
gpio_write(&rts, 0);
|
||||
}
|
||||
if (STDIO_UART_RTS != NC) {
|
||||
gpio_t rts;
|
||||
gpio_init_out(&rts, STDIO_UART_RTS);
|
||||
/* Set STDIO_UART_RTS as gpio driven low */
|
||||
gpio_write(&rts, 0);
|
||||
}
|
||||
|
||||
subtarget_sdk_init();
|
||||
subtarget_sdk_init();
|
||||
}
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
#include "subtarget_init.h"
|
||||
#include "platform/mbed_toolchain.h"
|
||||
|
||||
MBED_WEAK void subtarget_sdk_init(void) {
|
||||
MBED_WEAK void subtarget_sdk_init(void)
|
||||
{
|
||||
/* Do nothing by default */
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue