Keisuke Sehara
/
STM32_Whisking
fast-feedback virtual target task code on STM Nucleo
Diff: rig.cpp
- Revision:
- 26:b4421d1ee57a
- Parent:
- 20:4c06d3041337
- Child:
- 27:b31ea8d74f9e
--- a/rig.cpp Wed Jul 04 13:26:58 2018 +0000 +++ b/rig.cpp Thu Jul 05 20:15:37 2018 +0000 @@ -1,15 +1,6 @@ #include "rig.h" #include "utils.h" - -#define ARDUINO_12 PA_6 -#define ARDUINO_13 PA_5 - -#define ARDUINO_A0 PA_0 -#define ARDUINO_A1 PA_1 -#define ARDUINO_A2 PA_4 -#define ARDUINO_A3 PB_0 -#define ARDUINO_A4 PC_1 -#define ARDUINO_A5 PC_0 +#include "arduinopins.h" // the task timer Timer timer; @@ -17,12 +8,10 @@ // state time out Timeout stateTimeout; -// trigger time out for TASK output -Timeout triggerTimeout; - // input -InterruptIn whiskIn(ARDUINO_12); // or USER_BUTTON -InterruptIn lickIn(ARDUINO_13); // or USER_BUTTON +InterruptHandler gateIn(ARDUINO_11); +InterruptHandler whiskIn(ARDUINO_12); // or USER_BUTTON +InterruptHandler lickIn(ARDUINO_13); // or USER_BUTTON // output Pulse audioOut(ARDUINO_A0); // or LED1