From 4b6bea5f41b2f30d4ffc822d404606ecacecc5f3 Mon Sep 17 00:00:00 2001 From: weiting2 Date: Mon, 11 Nov 2019 16:25:00 +0800 Subject: [PATCH] test ADC gain instruction --- .../cc26xx/app/headstage/headstage.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) 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 dac8540ca..fb6b7483b 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 @@ -592,6 +592,7 @@ static void set_update_instruction_callback(update_instruction_callback_type cal #define POTENTIAL_STATE 0b11000000 #define CONSTANT_CURRENT 0b11010000 #define SET_RESISTER_LEVEL 0b11100000 +#define CYCLE_CONSTANT_CURRENT 0b11110000 // CIS instruction @@ -889,8 +890,26 @@ static void update_ZM_instruction(uint8 *ins) { break; } + case CYCLE_CONSTANT_CURRENT:{ + + break; + } case SET_ADC_GAIN: { INSTRUCTION.ADCGainLevel = ins[3]; + if(INSTRUCTION.ADCGainLevel == GAIN_200R){ + LED_color(DARKLED, 0xFF, 0x00, 0x00); + } + else if(INSTRUCTION.ADCGainLevel == GAIN_10K){ + LED_color(DARKLED, 0x00, 0xFF, 0x00); + } + else if(INSTRUCTION.ADCGainLevel == GAIN_200K){ + LED_color(DARKLED, 0x00, 0x00, 0xFF); + } + else{ + LED_color(DARKLED, 0xFF, 0x00, 0xFF); + } + + if(INSTRUCTION.ADCGainLevel != GAIN_AUTO){ INSTRUCTION.AutoGainEnable = 0; }