From dfaed7fc5a594f4f3fe6afc8cfa5a9968720b74c Mon Sep 17 00:00:00 2001 From: Roy_01 Date: Mon, 27 May 2024 18:01:34 +0800 Subject: [PATCH] fix: "DEF_PULSE_E_LOAD_01" replaced with "DEF_PULSE_E_LOAD_10" --- app_config.h | 6 +++--- elite.c | 4 ++-- elite_board.c | 4 ++-- elite_board.h | 2 +- pel.c | 17 +++++++++++------ pel10_io.c | 2 +- 6 files changed, 20 insertions(+), 15 deletions(-) diff --git a/app_config.h b/app_config.h index 9e28e69..573fe61 100644 --- a/app_config.h +++ b/app_config.h @@ -104,8 +104,8 @@ extern "C" // BLE device name #define DEF_ELITE_EDC_20 0x00020109 -#define DEF_PULSE_E_LOAD_01 0x00070000 -#define DEF_ELITE_MODEL DEF_PULSE_E_LOAD_01 +#define DEF_PULSE_E_LOAD_10 0x00070000 +#define DEF_ELITE_MODEL DEF_PULSE_E_LOAD_10 #if (DEF_ELITE_MODEL == DEF_ELITE_EDC_20) #define ELITE_DEVICE_NAME "Elite-EDC" @@ -133,7 +133,7 @@ extern "C" #define DEF_RTT_JSCOP_ENABLED 0 -#elif (DEF_ELITE_MODEL == DEF_PULSE_E_LOAD_01) +#elif (DEF_ELITE_MODEL == DEF_PULSE_E_LOAD_10) #define ELITE_DEVICE_NAME "Elite-EDC" #define MAJOR_PRODUCT_NUMBER 0 diff --git a/elite.c b/elite.c index 01d24e9..9ef26b9 100644 --- a/elite.c +++ b/elite.c @@ -2,7 +2,7 @@ #if (DEF_ELITE_MODEL == DEF_ELITE_EDC_20) #include "edc.h" -#elif (DEF_ELITE_MODEL == DEF_PULSE_E_LOAD_01) +#elif (DEF_ELITE_MODEL == DEF_PULSE_E_LOAD_10) #include "pel.h" #else #error "Unknown DEF_ELITE_MODEL" @@ -99,7 +99,7 @@ void elite_init(void) #if (DEF_ELITE_MODEL == DEF_ELITE_EDC_20) edc.init(); p_instance = edc.p_elite_instance; -#elif (DEF_ELITE_MODEL == DEF_PULSE_E_LOAD_01) +#elif (DEF_ELITE_MODEL == DEF_PULSE_E_LOAD_10) p_instance = pel_init(); #else #error "Unknown DEF_ELITE_MODEL" diff --git a/elite_board.c b/elite_board.c index 7c3a2b2..f663e2b 100644 --- a/elite_board.c +++ b/elite_board.c @@ -4,7 +4,7 @@ #if (DEF_ELITE_MODEL == DEF_ELITE_EDC_20) #include "edc20_io.h" -#elif (DEF_ELITE_MODEL == DEF_PULSE_E_LOAD_01) +#elif (DEF_ELITE_MODEL == DEF_PULSE_E_LOAD_10) #include "pel10_io.h" #endif @@ -18,7 +18,7 @@ void elite_board_init(void) { #if (DEF_ELITE_MODEL == DEF_ELITE_EDC_20) edc20_io_init(); -#elif (DEF_ELITE_MODEL == DEF_PULSE_E_LOAD_01) +#elif (DEF_ELITE_MODEL == DEF_PULSE_E_LOAD_10) pel10_io_init(); #endif } diff --git a/elite_board.h b/elite_board.h index 11d16b7..306b2b6 100644 --- a/elite_board.h +++ b/elite_board.h @@ -5,7 +5,7 @@ #include "app_config.h" #if (DEF_ELITE_MODEL == DEF_ELITE_EDC_20) #include "edc20_io.h" -#elif (DEF_ELITE_MODEL == DEF_PULSE_E_LOAD_01) +#elif (DEF_ELITE_MODEL == DEF_PULSE_E_LOAD_10) #include "pel10_io.h" #else #error "Not implemented xxx_pin_ctrl.h" diff --git a/pel.c b/pel.c index 53f6ddd..f08e18d 100644 --- a/pel.c +++ b/pel.c @@ -9,7 +9,7 @@ #include "adc_drv.h" -#if (DEF_ELITE_MODEL == DEF_PULSE_E_LOAD_01) +#if (DEF_ELITE_MODEL == DEF_PULSE_E_LOAD_10) typedef struct { @@ -276,23 +276,28 @@ static void dev_mode(uint8_t *ins, uint16_t size) uint8_t channel; } __PACKED *p_param = (void *)p_ins->param; - if (p_param->channel == 0x01) { + if (p_param->channel == 0x01) + { extern ret_code_t le_data_upadate(uint8_t * p_value, uint16_t len); le_data_upadate((void *)&dev_mode_pel_output.output_r1, sizeof(dev_mode_pel_output.output_r1)); } - else if (p_param->channel == 0x02) { + else if (p_param->channel == 0x02) + { extern ret_code_t le_data_upadate(uint8_t * p_value, uint16_t len); le_data_upadate((void *)&dev_mode_pel_output.output_r2, sizeof(dev_mode_pel_output.output_r2)); } - else if (p_param->channel == 0x03) { + else if (p_param->channel == 0x03) + { extern ret_code_t le_data_upadate(uint8_t * p_value, uint16_t len); le_data_upadate((void *)&dev_mode_pel_output.output_vo, sizeof(dev_mode_pel_output.output_vo)); } - else if (p_param->channel == 0x04) { + else if (p_param->channel == 0x04) + { extern ret_code_t le_data_upadate(uint8_t * p_value, uint16_t len); le_data_upadate((void *)&dev_mode_pel_output.output_vc, sizeof(dev_mode_pel_output.output_vc)); } - else if (p_param->channel == 0x05) { + else if (p_param->channel == 0x05) + { extern ret_code_t le_data_upadate(uint8_t * p_value, uint16_t len); le_data_upadate((void *)&dev_mode_pel_output.output_ve, sizeof(dev_mode_pel_output.output_ve)); } diff --git a/pel10_io.c b/pel10_io.c index 26b9d45..28cc99f 100644 --- a/pel10_io.c +++ b/pel10_io.c @@ -7,7 +7,7 @@ #include "semphr.h" #include "task.h" -#if (DEF_ELITE_MODEL == DEF_PULSE_E_LOAD_01) +#if (DEF_ELITE_MODEL == DEF_PULSE_E_LOAD_10) void spim_xfer(uint32_t cs_pin, nrf_spim_mode_t spi_mode,