From d9904e2bb1dadc622bcb9737bc0a76c9dd53f4b8 Mon Sep 17 00:00:00 2001 From: weiting2 Date: Thu, 23 Apr 2020 18:39:36 +0800 Subject: [PATCH] sti cali function --- .../cc26xx/app/headstage/headstage_neu.h | 1 + .../cc26xx/app/headstage/headstage_sti_cali.h | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) create mode 100644 simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app/headstage/headstage_sti_cali.h diff --git a/simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app/headstage/headstage_neu.h b/simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app/headstage/headstage_neu.h index ca306aecd..0d5435f80 100644 --- a/simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app/headstage/headstage_neu.h +++ b/simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app/headstage/headstage_neu.h @@ -1020,6 +1020,7 @@ static uint8_t build_neu_ins_config(uint8_t config_type, uint32_t* value) { } } case NEU_SET_STI_VOLT: { + UserCode2StiCode(INSTRUCTION.sti_amplitude_h, INSTRUCTION.sti_amplitude_l); done = build_sti_amplitude(value); if (done) { return NEU_SET_POLARITY; diff --git a/simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app/headstage/headstage_sti_cali.h b/simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app/headstage/headstage_sti_cali.h new file mode 100644 index 000000000..2b7bde51f --- /dev/null +++ b/simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app/headstage/headstage_sti_cali.h @@ -0,0 +1,16 @@ + +#ifndef STI_CALI_H +#define STI_CALI_H + +#include "headstage_cali_table.h" + +static void UserCode2StiCode(uint16_t amp_h, uint16_t *amp_l){ + // get real current value (uA) + uint32_t real_amp = amp_h * 5; + + // trans into sti code + +} + + +#endif