Keisuke Sehara
/
STM32_Whisking
fast-feedback virtual target task code on STM Nucleo
rig.cpp@4:fcf597f82632, 2018-05-23 (annotated)
- Committer:
- gwappa
- Date:
- Wed May 23 15:15:03 2018 +0000
- Revision:
- 4:fcf597f82632
- Parent:
- 3:991c6d5ce19d
- Child:
- 8:973dcd190672
make Pair mode work
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
gwappa | 3:991c6d5ce19d | 1 | #include "rig.h" |
gwappa | 3:991c6d5ce19d | 2 | |
gwappa | 3:991c6d5ce19d | 3 | // the task timer |
gwappa | 3:991c6d5ce19d | 4 | Timer timer; |
gwappa | 3:991c6d5ce19d | 5 | |
gwappa | 3:991c6d5ce19d | 6 | // state time out |
gwappa | 3:991c6d5ce19d | 7 | Timeout stateTimeout; |
gwappa | 3:991c6d5ce19d | 8 | |
gwappa | 3:991c6d5ce19d | 9 | // reward time out |
gwappa | 3:991c6d5ce19d | 10 | Timeout rewardTimeout; |
gwappa | 3:991c6d5ce19d | 11 | |
gwappa | 3:991c6d5ce19d | 12 | // input |
gwappa | 4:fcf597f82632 | 13 | InterruptIn whiskIn(USER_BUTTON); // USER_BUTTON or PA_13 |
gwappa | 3:991c6d5ce19d | 14 | InterruptIn lickIn(PA_14); |
gwappa | 3:991c6d5ce19d | 15 | |
gwappa | 3:991c6d5ce19d | 16 | // output |
gwappa | 4:fcf597f82632 | 17 | DigitalOut taskOut(LED1); // LED1 or PA_15 |
gwappa | 4:fcf597f82632 | 18 | DigitalOut cueOut(PA_4); // LED1 or PA_4 |
gwappa | 3:991c6d5ce19d | 19 | DigitalOut enableOut(PA_0); |
gwappa | 3:991c6d5ce19d | 20 | DigitalOut rewardOut(PA_1); |
gwappa | 3:991c6d5ce19d | 21 | |
gwappa | 3:991c6d5ce19d | 22 | Task task(Pair); |
gwappa | 3:991c6d5ce19d | 23 | Trial trial; |