33 lines
349 B
C++
33 lines
349 B
C++
#ifndef IR_H
|
|
#define IR_H
|
|
|
|
#include <Arduino.h>
|
|
|
|
enum IRMode
|
|
{
|
|
IR_MODE_GPIO,
|
|
IR_MODE_UART
|
|
};
|
|
|
|
struct IRConfig
|
|
{
|
|
IRMode mode;
|
|
uint8_t pins[5];
|
|
};
|
|
|
|
struct IRData
|
|
{
|
|
uint8_t length;
|
|
uint8_t data[8];
|
|
};
|
|
|
|
class IR
|
|
{
|
|
public:
|
|
static IRConfig config;
|
|
static IRData data;
|
|
static void init(IRConfig config);
|
|
static void update();
|
|
};
|
|
|
|
#endif |