Keisuke Sehara
/
STM32_Whisking
fast-feedback virtual target task code on STM Nucleo
rig.cpp
- Committer:
- gwappa
- Date:
- 2018-07-02
- Revision:
- 20:4c06d3041337
- Parent:
- 12:06ea96546af1
- Child:
- 26:b4421d1ee57a
File content as of revision 20:4c06d3041337:
#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; // input InterruptIn whiskIn(ARDUINO_12); // or USER_BUTTON InterruptIn lickIn(ARDUINO_13); // or USER_BUTTON // output Pulse audioOut(ARDUINO_A0); // or LED1 Pulse visualOut(ARDUINO_A1); // Pulse rewardOut(ARDUINO_A2); // Pulse trialStart(ARDUINO_A3, ms_to_us(TRIGGER_DUR_MS)); // or any other pin Pulse trialEnd(ARDUINO_A4, ms_to_us(TRIGGER_DUR_MS)); // Task task(Pair); Trial trial;