diff --git a/adc_drv.h b/adc_drv.h index 9a4c8f7..ac9fd1c 100644 --- a/adc_drv.h +++ b/adc_drv.h @@ -5,8 +5,8 @@ extern "C" { #endif -#include "adc_drv_if.h" #include "app_config.h" +#include "adc_drv_if.h" #define ADC_DRV_ERROR (-1) #define ADC_DRV_SUCCESS (0) diff --git a/adgs1412.c b/adgs1412.c index ffaf936..8475956 100644 --- a/adgs1412.c +++ b/adgs1412.c @@ -1,4 +1,6 @@ #include "adgs1412.h" +#include "elite_board.h" + #include "nrf_delay.h" #if (DEF_ADGS1412_ENABLED) diff --git a/adgs1412.h b/adgs1412.h index a343046..aa14049 100644 --- a/adgs1412.h +++ b/adgs1412.h @@ -7,7 +7,6 @@ extern "C" { #include "app_config.h" #include "sw_drv_if.h" -#include "elite_board.h" #if (DEF_ADGS1412_ENABLED) diff --git a/ads8691.c b/ads8691.c index ca8d17e..65d963d 100644 --- a/ads8691.c +++ b/ads8691.c @@ -2,8 +2,6 @@ #include "elite_board.h" #include "nrf_delay.h" -#include "nrf_log.h" -#include "nrf_spim.h" #include "FreeRTOS.h" #include "task.h" diff --git a/dac_drv.h b/dac_drv.h index 5efb234..ee4bc28 100644 --- a/dac_drv.h +++ b/dac_drv.h @@ -8,7 +8,6 @@ extern "C" { #include "app_config.h" #include "dac_drv_if.h" - #define DAC_DRV_ERROR (-1) #define DAC_DRV_SUCCESS (0) diff --git a/edc20_cycle_iv_mode.c b/edc20_cycle_iv_mode.c index 852f5c8..9c66a65 100644 --- a/edc20_cycle_iv_mode.c +++ b/edc20_cycle_iv_mode.c @@ -1,4 +1,3 @@ -#include "app_config.h" #include "edc.h" #include "elite_board.h" diff --git a/edc20_io.c b/edc20_io.c index 4f33cb8..4e7c9d1 100644 --- a/edc20_io.c +++ b/edc20_io.c @@ -1,4 +1,3 @@ -#include "app_config.h" #include "elite_board.h" #include "nrf_drv_spi.h" diff --git a/elite_board.c b/elite_board.c index 5c71a3b..4b67795 100644 --- a/elite_board.c +++ b/elite_board.c @@ -1,19 +1,4 @@ -#include "app_config.h" - -#include "nrf_log.h" - -#if (DEF_ELITE_MODEL == DEF_ELITE_EDC_20) -#include "edc20_io.h" -#elif (DEF_ELITE_MODEL == DEF_PULSE_E_LOAD_10) -#include "pel10_io.h" -#endif - -#include "adc_drv.h" -#include "dac_drv.h" -#include "fs.h" -#include "led_drv.h" -#include "sw_drv.h" -#include "btn.h" +#include "elite_board.h" void elite_board_init(void) { diff --git a/elite_board.h b/elite_board.h index 46e894a..64dcc52 100644 --- a/elite_board.h +++ b/elite_board.h @@ -6,21 +6,22 @@ extern "C" { #endif #include "app_config.h" +#include "adc_drv.h" +#include "dac_drv.h" +#include "fs.h" +#include "led_drv.h" +#include "sw_drv.h" +#include "btn.h" + #if (DEF_ELITE_MODEL == DEF_ELITE_DEV) #elif (DEF_ELITE_MODEL == DEF_ELITE_EDC_20) #include "edc20_io.h" #elif (DEF_ELITE_MODEL == DEF_PULSE_E_LOAD_10) #include "pel10_io.h" #else -#error "Not implemented xxx_pin_ctrl.h" +#error "Not implemented xxx_io.h" #endif -#include "adc_drv.h" -#include "dac_drv.h" -#include "fs.h" -#include "led_drv.h" -#include "sw_drv.h" - void elite_board_init(void); void elite_board_power_off(void); void elite_drv_init(void); diff --git a/led_drv_if.h b/led_drv_if.h index 347da7b..6e5f83a 100644 --- a/led_drv_if.h +++ b/led_drv_if.h @@ -6,6 +6,7 @@ extern "C" { #endif #include +#include #include struct led_color diff --git a/main.c b/main.c index fdc97bc..f2c4395 100644 --- a/main.c +++ b/main.c @@ -10,8 +10,6 @@ extern "C" #include "elite_board.h" #include "sdk_config.h" -#include "nrf_delay.h" -#include "nrf_gpio.h" #include "nrf_log.h" #include "nrf_log_ctrl.h" #include "nrf_log_default_backends.h" @@ -19,13 +17,6 @@ extern "C" #include "nrf_sdh_ble.h" #include "nrf_sdh_freertos.h" -#include "FreeRTOS.h" -#include "task.h" -#include "timers.h" - -#include -#include - #ifdef __cplusplus } #endif @@ -44,13 +35,12 @@ static void le_evt_handler(ble_evt_t const *p_ble_evt, void *p_context) case BLE_GAP_EVT_CONN_PARAM_UPDATE: NRF_LOG_INFO("Connection parameters updated."); break; - case BLE_GAP_EVT_CONNECTED: { + case BLE_GAP_EVT_CONNECTED: NRF_LOG_INFO("Connect to peer."); err_code = sd_ble_gap_tx_power_set(BLE_GAP_TX_POWER_ROLE_CONN, p_ble_evt->evt.gap_evt.conn_handle, 8); APP_ERROR_CHECK(err_code); led_set(LED_IDEL_CONNECTED); - } - break; + break; case BLE_GAP_EVT_DISCONNECTED: NRF_LOG_INFO("Disconnect from peer."); err_code = sd_ble_gap_tx_power_set(BLE_GAP_TX_POWER_ROLE_ADV, p_ble_evt->evt.gap_evt.conn_handle, 0); diff --git a/pel10_io.c b/pel10_io.c index f89f654..6a22767 100644 --- a/pel10_io.c +++ b/pel10_io.c @@ -1,4 +1,3 @@ -#include "app_config.h" #include "elite_board.h" #include "nrf_spim.h" diff --git a/sw_drv.c b/sw_drv.c index 94420e2..7d62c78 100644 --- a/sw_drv.c +++ b/sw_drv.c @@ -1,4 +1,3 @@ -#include "app_config.h" #include "sw_drv.h" #if (DEF_ADGS1412_ENABLED) diff --git a/sw_drv.h b/sw_drv.h index 6c124ce..b910a71 100644 --- a/sw_drv.h +++ b/sw_drv.h @@ -5,7 +5,7 @@ extern "C" { #endif -#include +#include "app_config.h" #include "sw_drv_if.h" #define SW_DRV_ERROR (-1) diff --git a/sw_drv_if.h b/sw_drv_if.h index bb1eff8..f0f5869 100644 --- a/sw_drv_if.h +++ b/sw_drv_if.h @@ -6,6 +6,7 @@ extern "C" { #endif #include +#include typedef union {