17 lines
464 B
C
17 lines
464 B
C
|
/* NEC InfraRed protocol
|
||
|
* more information at http://www.sbprojects.com/knowledge/ir/nec.php
|
||
|
*/
|
||
|
|
||
|
static const uint16_t MARKS[2]={9000,560}; /* mark duration in us [start,bit] */
|
||
|
static const uint16_t SPACES[4]={4500,2250,1680,560}; /* space duration in us [start,repeat,1,0] */
|
||
|
|
||
|
struct nec {
|
||
|
bool valid;
|
||
|
bool repeat;
|
||
|
uint8_t address;
|
||
|
uint8_t command;
|
||
|
};
|
||
|
|
||
|
void time2nec(uint16_t* burst, uint8_t pulses);
|
||
|
struct nec nec2data(uint16_t* burst, uint8_t pulses);
|