From bbf60ebfed717edd252503a409da04be974c72c3 Mon Sep 17 00:00:00 2001 From: Roy Date: Thu, 19 Nov 2020 16:00:51 +0800 Subject: [PATCH] test periodicEvent --- .../simple_peripheral/cc26xx/app/headstage/headstage.h | 6 +++++- .../simple_peripheral/cc26xx/app/simple_peripheral.c | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) 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 ef5641679..964370c64 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 @@ -1315,7 +1315,11 @@ static void update_ZM_instruction(uint8 *ins) { for(int i=0 ; i<12 ; i++){ FlushNotify(); } - PeriodicEvent = true; + if(INSTRUCTION.eliteFxn == PULSE_MODE){ + PeriodicEvent = false; + } else { + PeriodicEvent = true; + } InitEliteFlag(); break; } 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 58f95f212..ccc7d4469 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 @@ -639,6 +639,7 @@ static void SimpleBLEPeripheral_taskFxn(UArg a0, UArg a1) { // trig = PIN_getInputValue(MEGA_TRIG); // trigger: 1 -> 0 if (Mega_PeriodicEvent) { Mega_PeriodicEvent = false; + PeriodicEvent = true; PIN15_setOutputValue(MEGA_R_LED, 0); // for functional test PIN15_setOutputValue(MEGA_G_LED, 1); }