Keisuke Sehara
/
STM32_Whisking
fast-feedback virtual target task code on STM Nucleo
rig.cpp
- Committer:
- gwappa
- Date:
- 2018-06-21
- Revision:
- 11:897ecd5413e0
- Parent:
- 9:e136394bdb39
- Child:
- 12:06ea96546af1
File content as of revision 11:897ecd5413e0:
#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 // the task timer Timer timer; // state time out Timeout stateTimeout; // trigger time out for TASK output Timeout triggerTimeout; // ticker for audio cue Ticker buzzerTicker; // input InterruptIn whiskIn(ARDUINO_12); // or USER_BUTTON InterruptIn lickIn(ARDUINO_13); // or USER_BUTTON // output DigitalOut audioOut(ARDUINO_A0); // or LED1 Conditioning visualOut(ARDUINO_A1); // Duration rewardOut(ARDUINO_A2); // Duration trialStart(ARDUINO_A3, ms_to_us(TRIGGER_DUR_MS)); // or any other pin Duration trialEnd(ARDUINO_A4, ms_to_us(TRIGGER_DUR_MS)); // Task task(Pair); Trial trial;