fast-feedback virtual target task code on STM Nucleo

Dependencies:   mbed

Committer:
gwappa
Date:
Thu Dec 13 07:18:43 2018 +0000
Revision:
32:1416e015016c
Parent:
28:797536a42b9f
change to use the Staged state

Who changed what in which revision?

UserRevisionLine numberNew contents of line
gwappa 3:991c6d5ce19d 1 #include "rig.h"
gwappa 11:897ecd5413e0 2 #include "utils.h"
gwappa 26:b4421d1ee57a 3 #include "arduinopins.h"
gwappa 3:991c6d5ce19d 4
gwappa 3:991c6d5ce19d 5 // input
gwappa 26:b4421d1ee57a 6 InterruptHandler gateIn(ARDUINO_11);
gwappa 26:b4421d1ee57a 7 InterruptHandler whiskIn(ARDUINO_12); // or USER_BUTTON
gwappa 26:b4421d1ee57a 8 InterruptHandler lickIn(ARDUINO_13); // or USER_BUTTON
gwappa 3:991c6d5ce19d 9
gwappa 3:991c6d5ce19d 10 // output
gwappa 27:b31ea8d74f9e 11 Pulse audioOut(ARDUINO_10); // or LED1
gwappa 12:06ea96546af1 12 Pulse visualOut(ARDUINO_A1); //
gwappa 12:06ea96546af1 13 Pulse rewardOut(ARDUINO_A2); //
gwappa 9:e136394bdb39 14
gwappa 12:06ea96546af1 15 Pulse trialStart(ARDUINO_A3, ms_to_us(TRIGGER_DUR_MS)); // or any other pin
gwappa 12:06ea96546af1 16 Pulse trialEnd(ARDUINO_A4, ms_to_us(TRIGGER_DUR_MS)); //
gwappa 3:991c6d5ce19d 17
gwappa 28:797536a42b9f 18 Task task;
gwappa 3:991c6d5ce19d 19 Trial trial;