io_source.cpp File Reference
Include dependency graph for io_source.cpp:

Macros | |
#define | MAX_FALLING_EDGES_PER_IR_FRAME 32 |
#define | led_set(num, realbit) |
Macro Definition Documentation
#define led_set | ( | num, | |
realbit | |||
) |
#define MAX_FALLING_EDGES_PER_IR_FRAME 32 |
The design of the IR Sensor is as follows: Timer1 captures falling edges of CAP1.0 and timestamps are saved when this happens. Every time capture happens, a 20ms match interrupt is setup/reset. When no more signals arrive, the 20ms match interrupt will decode the timestamps and convert timestamps into binary signal.
Note that this doesn't decode into real data sent through the IR, but nevertheless, the decoded signal will be unique per button pressed on an IR remote.