esp32-car/include/ir.h

32 lines
373 B
C++

#ifndef IR_H
#define IR_H
#include <Wire.h>
#include <Arduino.h>
#include <algorithm>
#include "consts.h"
enum IRMode
{
IR_MODE_GPIO,
IR_MODE_I2C
};
struct IRData
{
IRMode mode;
uint8_t pins[IR_COUNT];
uint8_t count;
uint8_t data[8];
};
class IR
{
public:
static TwoWire *i2c;
static IRData data;
static void init();
static void update();
};
#endif