diff --git a/simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app/headstage/Elite15_PIN.h b/simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app/headstage/Elite15_PIN.h index c2d12f732..953cd9631 100644 --- a/simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app/headstage/Elite15_PIN.h +++ b/simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app/headstage/Elite15_PIN.h @@ -214,28 +214,6 @@ static void Init_Elite15_PIN () { latch_setOutputValue(LOAD0, 0); remove_elite_pin(); - -// InitLH(); -// add_elite_pin(); -// -// PIN_setOutputValue(pin_handle, LOAD0, 1); -// PIN_setOutputValue(pin_handle, LOAD1, 1); -// PIN_setOutputValue(pin_handle, LOAD2, 1); -// CPUdelay(10); -// PIN_setOutputValue(pin_handle, D0, 0); -// PIN_setOutputValue(pin_handle, D1, 0); -// PIN_setOutputValue(pin_handle, D2, 0); -// PIN_setOutputValue(pin_handle, D3, 0); -// PIN_setOutputValue(pin_handle, D4, 0); -// PIN_setOutputValue(pin_handle, D5, 0); -// PIN_setOutputValue(pin_handle, D6, 0); -// PIN_setOutputValue(pin_handle, D7, 0); -// CPUdelay(10); -// PIN_setOutputValue(pin_handle, LOAD0, 0); -// PIN_setOutputValue(pin_handle, LOAD1, 0); -// PIN_setOutputValue(pin_handle, LOAD2, 0); -// -// remove_elite_pin(); } static void latch_setOutputValue (uint32_t latch_num, bool highlow) { @@ -260,12 +238,14 @@ static void latch_setOutputValue (uint32_t latch_num, bool highlow) { default: { PIN_setOutputValue(pin_handle, LOADA, 1); PIN_setOutputValue(pin_handle, LOADB, 1); +// PIN_setPortOutputValue(pin_handle, ((1<=0; i--) { PIN_setOutputValue(pin_handle, GPIO_CLK_CH[1], 0); // generate clk signal @@ -165,9 +169,10 @@ static void GPIO_SPI_transfer(uint32_t *GPIO_CLK_CH, uint16_t spi_GPIO_txbuf) { PIN_setOutputValue(pin_handle, D3, 0); update_latch_status (ADC_SPI_MOSI, 0); - PIN_setOutputValue(pin_handle, LOADA, 1); // Turn off all LATCH - PIN_setOutputValue(pin_handle, LOADB, 1); +// PIN_setOutputValue(pin_handle, LOADB, 1); // Turn off all LATCH +// PIN_setOutputValue(pin_handle, LOADA, 1); remove_elite_pin(); + PIN_setPortOutputValue(pin_handle, 1); ELITE15_SPI_HOLD(); // PIN15_setOutputValue(ADC_DAC_SPI_MOSI, 0); diff --git a/simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app/headstage/Elite_TRIG.h b/simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app/headstage/Elite_TRIG.h index dea64c122..f2bd2ee51 100644 --- a/simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app/headstage/Elite_TRIG.h +++ b/simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app/headstage/Elite_TRIG.h @@ -64,4 +64,6 @@ static void trig_callback(PIN_Handle handle, PIN_Id pinId) { -#endif \ No newline at end of file +#endif + + 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 140b881fa..67722be7d 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 @@ -1061,8 +1061,6 @@ static void update_ZM_instruction(uint8 *ins) { // int32_t ADCRealValue = 0; uint8_t CIS_buf[9] = {0}; uint16_t ADCValueAVG_RAW = 0; - uint8_t ADC_input = 0; - bool AVG_done = 0; uint16_t TW1508in = 0; TW1508in = ((uint16_t) (ins[5]) << 8 ) | ((uint16_t) (ins[6])); @@ -1072,9 +1070,9 @@ static void update_ZM_instruction(uint8 *ins) { if(ins[4] == 0xFF) { TW1508reset(); } else { - AoutChannelSelect(ins[4], 1); GPIO_SPI_write(ins[4], TW1508in); - AoutChannelSelect(ins[4], 0); +// AoutChannelSelect(ins[4], 1); + PIN15_setOutputValue(AO_MOS_0, 1); } break; } diff --git a/simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app/headstage/impedance_meter.h b/simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app/headstage/impedance_meter.h index 1e1b78b24..b7fcec0da 100644 --- a/simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app/headstage/impedance_meter.h +++ b/simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app/headstage/impedance_meter.h @@ -61,6 +61,7 @@ static void ZM_init() { VoutGainControl(INSTRUCTION.VoutGainLevel); elite_gptimer_open(); + TW1508reset(); // TRIG_LED_Init(); // PIN_registerIntCb(pin_handle, switch_on_callback); // PIN_setInterrupt(pin_handle, switch_on | PIN_IRQ_POSEDGE);