diff --git a/simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app/headstage/EliteWorkData.h b/simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app/headstage/EliteWorkData.h index da10ee000..9575ca583 100644 --- a/simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app/headstage/EliteWorkData.h +++ b/simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app/headstage/EliteWorkData.h @@ -3,22 +3,6 @@ #include "EliteInstruction.h" -#define IV_CURVE 0b00010000 -#define CV_CURVE 0b00100000 -#define VOLT_OUTPUT 0b00110000 -#define ZT_CURVE 0b01000000 -#define VT_CURVE 0b01010000 -#define IT_CURVE 0b01100000 -#define SET_SAMPLE_RATE 0b01110000 -#define SET_ADC_GAIN 0b10000000 -#define DIFFERENTIAL_PULSE_VOLTAMMETRY 0b10100000 -#define SQUARE_WAVE_VOLTAMMETRY 0b10110000 -#define CYCLIC_VOLTAMMETRY 0b11000000 -#define CONSTANT_CURRENT 0b11010000 -//#define READ_VOUT_VALUE 0b11100000 -#define LINEAR_SWEEP_VOLTAMMETRY 0b00000010 -#define CONSTANT_VSCAN 0b00000011 - static bool Free_Work_Mode = false; typedef void (*InitWorkData) (); diff --git a/simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app/headstage/Elite_batt.h b/simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app/headstage/Elite_batt.h index 31a56a8c9..259dda573 100644 --- a/simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app/headstage/Elite_batt.h +++ b/simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app/headstage/Elite_batt.h @@ -50,7 +50,6 @@ static uint8_t headstage_battery_volt2() { } static void headstage_battery_volt(){ - uint8_t internal_battery_percent; uint32_t bat_volt = 0; ReadBatVolt(spi_ADC_rxbuf); @@ -61,7 +60,6 @@ static void headstage_battery_volt(){ static void EliteADCBattery(){ static uint8_t ADCSwitch = 0; - int32_t VoltData; if(ADCSwitch == 0){ /**read V**/ ReadBatVolt(spi_ADC_rxbuf); diff --git a/simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app/headstage/Elite_version.h b/simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app/headstage/Elite_version.h index 730bee756..4b4e50848 100644 --- a/simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app/headstage/Elite_version.h +++ b/simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app/headstage/Elite_version.h @@ -6,7 +6,7 @@ #define VERSION_DATE_MONTH 7 #define VERSION_DATE_DAY 2 #define VERSION_DATE_HOUR 9 -#define VERSION_DATE_MINUTE 41 +#define VERSION_DATE_MINUTE 42 // this is NOT the version hash !! // it's the last version hash diff --git a/simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app/headstage/headstage.h b/simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app/headstage/headstage.h index 8f9584463..c99951d60 100644 --- a/simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app/headstage/headstage.h +++ b/simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app/headstage/headstage.h @@ -557,8 +557,6 @@ static void WorkModeLED(); static void KeyWorkModeLED(); -static uint8_t headstage_battery_volt1(); -static uint8_t headstage_battery_volt2(); static void headstage_battery_volt(); /*===================================== ==== instruction update function ==== @@ -574,49 +572,47 @@ static void set_update_instruction_callback(update_instruction_callback_type cal } // define BT instruction -#define INS_TYPE_RIS 0b00110000 -#define INS_TYPE_VIS 0b11000000 -#define INS_TYPE_CIS 0b01110000 +#define INS_TYPE_RIS 0x30 +#define INS_TYPE_VIS 0xC0 +#define INS_TYPE_CIS 0x70 -// virtual instruction -#define VIS_RST 0b11110000 -#define VIS_ASK 0b00110000 -#define VIS_STI 0b11000000 -#define VIS_FUH 0b10010000 -#define VIS_INT 0b01100000 -#define VIS_SHIFT_200K 0b10100000 -#define VIS_SHIFT_10K 0b11100000 -#define VIS_SHIFT_200R 0b10000000 -#define VIS_DEVICE_SHINY 0b00010000 -#define VIS_SHINY_DIS 0b00100000 -#define VIS_CC_ZERO 0b01000000 +// VIS (virtual instruction) +#define VIS_RST 0xF0 +#define VIS_ASK 0x30 +#define VIS_STI 0xC0 +#define VIS_FUH 0x90 +#define VIS_INT 0x60 +#define VIS_SHIFT_200K 0xA0 +#define VIS_SHIFT_10K 0xE0 +#define VIS_SHIFT_200R 0x80 +#define VIS_DEVICE_SHINY 0x10 +#define VIS_SHINY_DIS 0x20 +#define VIS_CC_ZERO 0x40 -// real instruction -#define IV_CURVE 0b00010000 -#define CV_CURVE 0b00100000 -#define VOLT_OUTPUT 0b00110000 -#define ZT_CURVE 0b01000000 -#define VT_CURVE 0b01010000 -#define IT_CURVE 0b01100000 -#define SET_SAMPLE_RATE 0b01110000 -#define SET_ADC_GAIN 0b10000000 -#define DIFFERENTIAL_PULSE_VOLTAMMETRY 0b10100000 -#define SQUARE_WAVE_VOLTAMMETRY 0b10110000 -#define CYCLIC_VOLTAMMETRY 0b11000000 -#define CONSTANT_CURRENT 0b11010000 -//#define READ_VOUT_VALUE 0b11100000 -#define CYCLE_CONSTANT_CURRENT 0b11110000 -#define HIGH_CYCLE_CYCLIC_VOLTAMMETRY 0b00000001 -#define LINEAR_SWEEP_VOLTAMMETRY 0b00000010 -#define CONSTANT_VSCAN 0b00000011 +// RIS (real instruction) +#define IV_CURVE 0x10 +#define CV_CURVE 0x20 +#define VOLT_OUTPUT 0x30 +#define ZT_CURVE 0x40 +#define VT_CURVE 0x50 +#define IT_CURVE 0x60 +#define SET_SAMPLE_RATE 0x70 +#define SET_ADC_GAIN 0x80 +#define DIFFERENTIAL_PULSE_VOLTAMMETRY 0xA0 +#define SQUARE_WAVE_VOLTAMMETRY 0xB0 +#define CYCLIC_VOLTAMMETRY 0xC0 +#define CONSTANT_CURRENT 0xD0 +#define CYCLE_CONSTANT_CURRENT 0xF0 +#define HIGH_CYCLE_CYCLIC_VOLTAMMETRY 0x01 +#define LINEAR_SWEEP_VOLTAMMETRY 0x02 +#define CONSTANT_VSCAN 0x03 +#define ADC_TEST 0x90 +//#define READ_VOUT_VALUE 0xE0 -// CIS instruction +// CIS (control instruction) #define CIS_VERSION 0x40 #define CIS_VOLT 0x10 -// test instruction -#define ADC_TEST 0b10010000 - // DAC and ADC function static uint16_t DAC_outputV(uint16_t voltLV); static int32_t DAC_to_realV(uint16_t DACcode); diff --git a/simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app/simple_peripheral.c b/simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app/simple_peripheral.c index 2622f86a3..4c41b9983 100644 --- a/simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app/simple_peripheral.c +++ b/simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app/simple_peripheral.c @@ -545,7 +545,6 @@ static void SimpleBLEPeripheral_init(void) { static void SimpleBLEPeripheral_taskFxn(UArg a0, UArg a1) { #define CLOCK_ONE_SECOND 10000 -uint16_t bat_counter = 0; // Initialize application SimpleBLEPeripheral_init();