From 232bc3ab1955790abceb9909b2849b236422b2e6 Mon Sep 17 00:00:00 2001 From: hathach Date: Sat, 29 Sep 2018 00:08:59 +0700 Subject: [PATCH] clean up --- src/main.c | 4 +-- src/sdk_config.h | 87 ------------------------------------------------ 2 files changed, 1 insertion(+), 90 deletions(-) diff --git a/src/main.c b/src/main.c index c8c2fc1..bc39520 100644 --- a/src/main.c +++ b/src/main.c @@ -199,10 +199,8 @@ int main(void) */ bootloader_dfu_start(false, DFU_SERIAL_STARTUP_INTERVAL); #else - led_on(LED_RED); // turn on LED to signal user // if RST is pressed during this delay --> if will enter dfu NRFX_DELAY_MS(DFU_DBL_RESET_DELAY); - led_off(LED_RED); #endif } @@ -373,7 +371,7 @@ void app_error_fault_handler(uint32_t id, uint32_t pc, uint32_t info) NVIC_SystemReset(); } -void assert_nrf_callback(uint16_t line_num, const uint8_t * p_file_name) +void assert_nrf_callback (uint16_t line_num, uint8_t const * p_file_name) { app_error_fault_handler(0xDEADBEEF, 0, 0); } diff --git a/src/sdk_config.h b/src/sdk_config.h index 92d31d6..86d9dca 100644 --- a/src/sdk_config.h +++ b/src/sdk_config.h @@ -420,53 +420,6 @@ #define UART1_CONFIG_USE_EASY_DMA 1 #endif -// - -// - - -// WDT_ENABLED - nrf_drv_wdt - WDT peripheral driver -//========================================================== -#ifndef WDT_ENABLED -#define WDT_ENABLED 0 -#endif -// WDT_CONFIG_BEHAVIOUR - WDT behavior in CPU SLEEP or HALT mode - -// <1=> Run in SLEEP, Pause in HALT -// <8=> Pause in SLEEP, Run in HALT -// <9=> Run in SLEEP and HALT -// <0=> Pause in SLEEP and HALT - -#ifndef WDT_CONFIG_BEHAVIOUR -#define WDT_CONFIG_BEHAVIOUR 1 -#endif - -// WDT_CONFIG_RELOAD_VALUE - Reload value <15-4294967295> - - -#ifndef WDT_CONFIG_RELOAD_VALUE -#define WDT_CONFIG_RELOAD_VALUE 2000 -#endif - -// WDT_CONFIG_IRQ_PRIORITY - Interrupt priority - - -// Priorities 0,2 (nRF51) and 0,1,4,5 (nRF52) are reserved for SoftDevice -// <0=> 0 (highest) -// <1=> 1 -// <2=> 2 -// <3=> 3 -// <4=> 4 -// <5=> 5 -// <6=> 6 -// <7=> 7 - -#ifndef WDT_CONFIG_IRQ_PRIORITY -#define WDT_CONFIG_IRQ_PRIORITY 7 -#endif - -// - // //========================================================== @@ -624,46 +577,6 @@ #define HCI_RX_BUF_QUEUE_SIZE 4 #endif -// - -// NRF_FSTORAGE_ENABLED - nrf_fstorage - Flash abstraction library -//========================================================== -#ifndef NRF_FSTORAGE_ENABLED -#define NRF_FSTORAGE_ENABLED 1 -#endif -// nrf_fstorage_sd - Implementation using the SoftDevice. - -// Configuration options for the fstorage implementation using the SoftDevice. -//========================================================== -// NRF_FSTORAGE_SD_QUEUE_SIZE - Size of the internal queue of operations. -// Increase this value if API calls frequently return the error @ref NRF_ERROR_NO_MEM. - -#ifndef NRF_FSTORAGE_SD_QUEUE_SIZE -#define NRF_FSTORAGE_SD_QUEUE_SIZE 8 -#endif - -// NRF_FSTORAGE_SD_MAX_RETRIES - Maximum number of attempts at executing an operation when the SoftDevice is busy. -// Increase this value if events frequently return the @ref NRF_ERROR_TIMEOUT error. -// The SoftDevice might fail to schedule flash access due to high BLE activity. - -#ifndef NRF_FSTORAGE_SD_MAX_RETRIES -#define NRF_FSTORAGE_SD_MAX_RETRIES 8 -#endif - -// NRF_FSTORAGE_SD_MAX_WRITE_SIZE - Maximum number of bytes to be written to flash in a single operation. -// This value must be a multiple of four. -// Lowering this value can increase the chances of the SoftDevice being able to execute flash operations in between radio activity. -// This value is bound by the maximum number of bytes that can be written to flash in a single call to @ref sd_flash_write. -// That is 1024 bytes for nRF51 ICs and 4096 bytes for nRF52 ICs. - -#ifndef NRF_FSTORAGE_SD_MAX_WRITE_SIZE -#define NRF_FSTORAGE_SD_MAX_WRITE_SIZE 20 -#endif - -// -//========================================================== - - // NRF_STRERROR_ENABLED - nrf_strerror - Library for converting error code to string. #ifndef NRF_STRERROR_ENABLED #define NRF_STRERROR_ENABLED 1