fix: "DEF_PULSE_E_LOAD_01" replaced with "DEF_PULSE_E_LOAD_10"

This commit is contained in:
Roy_01
2024-05-27 18:01:34 +08:00
parent aaaa331bcb
commit dfaed7fc5a
6 changed files with 20 additions and 15 deletions
+3 -3
View File
@@ -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
+2 -2
View File
@@ -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"
+2 -2
View File
@@ -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
}
+1 -1
View File
@@ -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"
+11 -6
View File
@@ -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));
}
+1 -1
View File
@@ -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,