fix: 修正 cpg10 dev_mode 指令
This commit is contained in:
@@ -15,8 +15,8 @@
|
||||
#define VERSION_DATE_YEAR 24
|
||||
#define VERSION_DATE_MONTH 7
|
||||
#define VERSION_DATE_DAY 9
|
||||
#define VERSION_DATE_HOUR 12
|
||||
#define VERSION_DATE_MINUTE 6
|
||||
#define VERSION_DATE_HOUR 15
|
||||
#define VERSION_DATE_MINUTE 17
|
||||
static void cis_version(uint8_t *ins, uint16_t size)
|
||||
{
|
||||
NRF_LOG_INFO("%s", __FUNCTION__);
|
||||
@@ -53,14 +53,15 @@ void dev_mode(uint8_t *ins, uint16_t size)
|
||||
|
||||
switch (p_ins->dev_opcode)
|
||||
{
|
||||
case 0x90:
|
||||
case 0x00:
|
||||
dev_mode_set_cpg10_electrodes(ins);
|
||||
break;
|
||||
|
||||
case 0x91:
|
||||
case 0x01:
|
||||
dev_mode_set_cpg10_tw1508(ins);
|
||||
break;
|
||||
|
||||
//0xA0 to 0xBF are reserved for controlling the BMD380
|
||||
case 0xA0:
|
||||
dev_mode_gpio_function(ins);
|
||||
break;
|
||||
|
||||
+12
-12
@@ -122,7 +122,7 @@ static void set_bmd380_pin_signal(uint32_t pin, uint32_t high_low)
|
||||
if (gpio != UNDEF_GPIO)
|
||||
{
|
||||
nrf_gpio_pin_write(gpio, high_low);
|
||||
NRF_LOG_INFO("set pin %d (gpio %d) = %d", pin, gpio, high_low);
|
||||
NRF_LOG_INFO("set pin %02d (gpio %02d) = %d", pin, gpio, high_low);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -206,28 +206,28 @@ static void cpg10_electrodes(uint32_t electrodes_mode)
|
||||
|
||||
/*
|
||||
dev_mode_set_cpg10_electrodes
|
||||
(1)0x3000FF9001
|
||||
(1)0x3000FF0001
|
||||
-func: ELECTRODES_A1HB1L
|
||||
|
||||
(2)0x3000FF9002
|
||||
(2)0x3000FF0002
|
||||
-func: ELECTRODES_A1LB1H
|
||||
|
||||
(3)0x3000FF9003
|
||||
(3)0x3000FF0003
|
||||
-func: ELECTRODES_A2HB2L
|
||||
|
||||
(4)0x3000FF9004
|
||||
(4)0x3000FF0004
|
||||
-func: ELECTRODES_A2LB2H
|
||||
|
||||
(5)0x3000FF9005
|
||||
(5)0x3000FF0005
|
||||
-func: ELECTRODES_A3HB3L
|
||||
|
||||
(6)0x3000FF9006
|
||||
(6)0x3000FF0006
|
||||
-func: ELECTRODES_A3LB3H
|
||||
|
||||
(7)0x3000FF9007
|
||||
(7)0x3000FF0007
|
||||
-func: ELECTRODES_A4HB4L
|
||||
|
||||
(8)0x3000FF9008
|
||||
(8)0x3000FF0008
|
||||
-func: ELECTRODES_A4LB4H
|
||||
*/
|
||||
void dev_mode_set_cpg10_electrodes(uint8_t *ins)
|
||||
@@ -246,10 +246,10 @@ void dev_mode_set_cpg10_electrodes(uint8_t *ins)
|
||||
|
||||
/*
|
||||
dev_mode_set_cpg10_tw1508
|
||||
(1)0x3000FF9100
|
||||
(1)0x3000FF0100
|
||||
-func: tw1805_init()
|
||||
|
||||
(2)0x3000FF9101aaaabbbb
|
||||
(2)0x3000FF0101aaaabbbb
|
||||
-func: tw1508_set()
|
||||
-aaaa: out_0 value 0~1023[LSB]
|
||||
-bbbb: out_1 value 0~1023[LSB]
|
||||
@@ -328,7 +328,7 @@ void dev_mode_gpio_function(uint8_t *ins)
|
||||
|
||||
case 0x01: {
|
||||
uint32_t high_low = p_ins->param[0];
|
||||
uint32_t set_pin[44] = {6, 8, 9, 10, 13, 14, 16, 17, 26, 27,
|
||||
uint32_t set_pin[] = {6, 8, 9, 10, 13, 14, 16, 17, 26, 27,
|
||||
28, 30, 32, 33, 34, 36, 37, 38, 39, 40,
|
||||
41, 44, 45, 46, 47, 48, 49, 50, 51, 52,
|
||||
53, 59, 60, 61, 62};
|
||||
|
||||
Reference in New Issue
Block a user