return NEU_SETUP_DONE at correct time

This commit is contained in:
weiting2
2020-02-21 16:42:36 +08:00
parent 1ff7bc8746
commit 2f8b646a4f
@@ -1058,7 +1058,7 @@ static uint8_t build_neu_ins_config(uint8_t config_type, uint32_t* value) {
if (sti_channel == ALL_STI_CH_CONFIG_DONE) {
INSTRUCTION.sti_channel = 0x01 << sti_channel;
INSTRUCTION.ins_opcode = HIGH_SIDE;
return NEU_SETUP_DONE;
return NEU_SET_POLARITY;
// return NEU_SET_STI_VOLT;
} else {
single_ch_config_done = build_sti_cur_instruction(sti_channel, value);
@@ -1097,6 +1097,12 @@ static uint8_t build_neu_ins_config(uint8_t config_type, uint32_t* value) {
// return NEU_SET_GENERAL_EN;
return NEU_SET_STI_CHANNEL;
}
// enable stimulate
case NEU_SET_STI_CHANNEL: {
*value = (0x01 << 23) | (0x2E << 16) | INSTRUCTION.sti_channel;
return NEU_SETUP_DONE;
}
/* These are recording parameter */
case NEU_WARM_UP:{
@@ -1146,11 +1152,7 @@ static uint8_t build_neu_ins_config(uint8_t config_type, uint32_t* value) {
// *value = (0x01 << 23) | (0x3B << 16) | INSTRUCTION.chopper_ratio;
// return NEU_SETUP_DONE;
// }
// enable stimulate
case NEU_SET_STI_CHANNEL: {
*value = (0x01 << 23) | (0x2E << 16) | INSTRUCTION.sti_channel;
return NEU_SETUP_DONE;
}
default: {
return NEU_SET_STI_CUR;
}