From 62af1350d96f3b456cdf3802a2fbde07bfdcab63 Mon Sep 17 00:00:00 2001 From: Roy_01 Date: Tue, 2 Jul 2024 11:41:24 +0800 Subject: [PATCH 1/3] =?UTF-8?q?feat:=20=E5=B0=87=E5=B0=88=E6=A1=88?= =?UTF-8?q?=E8=A8=AD=E5=AE=9A=E5=88=87=E6=8F=9B=E5=88=B0=20pel1.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app_config.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app_config.h b/app_config.h index ccb26bc..6de238f 100644 --- a/app_config.h +++ b/app_config.h @@ -106,7 +106,7 @@ extern "C" #define DEF_ELITE_EDC_20 0x00020109 #define DEF_PULSE_E_LOAD_10 0x00070000 #define DEF_CURRENT_PULSE_GANERATOR_10 0x00080000 -#define DEF_ELITE_MODEL DEF_ELITE_DEV +#define DEF_ELITE_MODEL DEF_PULSE_E_LOAD_10 #if (DEF_ELITE_MODEL == DEF_ELITE_DEV) #define ELITE_DEVICE_NAME "Elite-Dev" From a67f2b8fa482b3f69101a2720a4ad312e79548f1 Mon Sep 17 00:00:00 2001 From: Roy_01 Date: Tue, 9 Jul 2024 11:08:03 +0800 Subject: [PATCH 2/3] =?UTF-8?q?feat:=20pel1.0=20=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E5=B0=8F=E5=B7=A5=E5=85=B7=E5=8A=9F=E8=83=BD:=20=E6=8E=A7?= =?UTF-8?q?=E5=88=B6=20Input1~12?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pel.c | 81 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 77 insertions(+), 4 deletions(-) diff --git a/pel.c b/pel.c index c1d492d..eec7bb2 100644 --- a/pel.c +++ b/pel.c @@ -168,10 +168,10 @@ pel_output_t pel_smaple_and_convt_all(uint32_t measure_out, uint32_t load_mask) } #define VERSION_DATE_YEAR 24 -#define VERSION_DATE_MONTH 5 -#define VERSION_DATE_DAY 21 -#define VERSION_DATE_HOUR 18 -#define VERSION_DATE_MINUTE 39 +#define VERSION_DATE_MONTH 7 +#define VERSION_DATE_DAY 9 +#define VERSION_DATE_HOUR 11 +#define VERSION_DATE_MINUTE 8 static void cis_version(uint8_t *ins, uint16_t size) { NRF_LOG_INFO("%s", __FUNCTION__); @@ -346,6 +346,79 @@ static void dev_mode(uint8_t *ins, uint16_t size) break; } + case 0xF2: { + struct + { + uint8_t input_n; + uint8_t status; + } __PACKED *p_param = (void *)p_ins->param; + + uint32_t high_low = p_param->status; + + switch (p_param->input_n) { + case 0x01: + nrf_gpio_pin_write(INPUT_1_PIN, high_low); + NRF_LOG_INFO("set INPUT_1_PIN = %d", high_low); + break; + + case 0x02: + nrf_gpio_pin_write(INPUT_2_PIN, high_low); + NRF_LOG_INFO("set INPUT_2_PIN = %d", high_low); + break; + + case 0x03: + nrf_gpio_pin_write(INPUT_3_PIN, high_low); + NRF_LOG_INFO("set INPUT_3_PIN = %d", high_low); + break; + + case 0x04: + nrf_gpio_pin_write(INPUT_4_PIN, high_low); + NRF_LOG_INFO("set INPUT_4_PIN = %d", high_low); + break; + + case 0x05: + nrf_gpio_pin_write(INPUT_5_PIN, high_low); + NRF_LOG_INFO("set INPUT_5_PIN = %d", high_low); + break; + + case 0x06: + nrf_gpio_pin_write(INPUT_6_PIN, high_low); + NRF_LOG_INFO("set INPUT_6_PIN = %d", high_low); + break; + + case 0x07: + nrf_gpio_pin_write(INPUT_7_PIN, high_low); + NRF_LOG_INFO("set INPUT_7_PIN = %d", high_low); + break; + + case 0x08: + nrf_gpio_pin_write(INPUT_8_PIN, high_low); + NRF_LOG_INFO("set INPUT_8_PIN = %d", high_low); + break; + + case 0x09: + nrf_gpio_pin_write(INPUT_9_PIN, high_low); + NRF_LOG_INFO("set INPUT_9_PIN = %d", high_low); + break; + + case 0x0A: + nrf_gpio_pin_write(INPUT_10_PIN, high_low); + NRF_LOG_INFO("set INPUT_10_PIN = %d", high_low); + break; + + case 0x0B: + nrf_gpio_pin_write(INPUT_11_PIN, high_low); + NRF_LOG_INFO("set INPUT_11_PIN = %d", high_low); + break; + + case 0x0C: + nrf_gpio_pin_write(INPUT_12_PIN, high_low); + NRF_LOG_INFO("set INPUT_12_PIN = %d", high_low); + break; + } + break; + } + default: { break; } From e9c206ba70ed6befcff7962e8a031d88a2f1aaa0 Mon Sep 17 00:00:00 2001 From: Roy_01 Date: Tue, 9 Jul 2024 11:08:38 +0800 Subject: [PATCH 3/3] =?UTF-8?q?feat:=20=E5=B0=87=E5=B0=88=E6=A1=88?= =?UTF-8?q?=E8=A8=AD=E5=AE=9A=E5=88=87=E6=8F=9B=E5=9B=9E=20DEF=5FELITE=5FD?= =?UTF-8?q?EV?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app_config.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app_config.h b/app_config.h index 6de238f..ccb26bc 100644 --- a/app_config.h +++ b/app_config.h @@ -106,7 +106,7 @@ extern "C" #define DEF_ELITE_EDC_20 0x00020109 #define DEF_PULSE_E_LOAD_10 0x00070000 #define DEF_CURRENT_PULSE_GANERATOR_10 0x00080000 -#define DEF_ELITE_MODEL DEF_PULSE_E_LOAD_10 +#define DEF_ELITE_MODEL DEF_ELITE_DEV #if (DEF_ELITE_MODEL == DEF_ELITE_DEV) #define ELITE_DEVICE_NAME "Elite-Dev"