31 lines
371 B
C++
31 lines
371 B
C++
#ifndef IR_H
|
|
#define IR_H
|
|
|
|
#include <SoftwareSerial.h>
|
|
#include <Arduino.h>
|
|
#include "consts.h"
|
|
|
|
enum IRMode
|
|
{
|
|
IR_MODE_GPIO,
|
|
IR_MODE_UART
|
|
};
|
|
|
|
struct IRData
|
|
{
|
|
IRMode mode;
|
|
uint8_t pins[IR_COUNT];
|
|
uint8_t count;
|
|
uint8_t data[8];
|
|
};
|
|
|
|
class IR
|
|
{
|
|
public:
|
|
static SoftwareSerial *uart;
|
|
static IRData data;
|
|
static void init();
|
|
static void update();
|
|
};
|
|
|
|
#endif |