esp32-car/include/ir.h

33 lines
349 B
C
Raw Normal View History

2024-12-27 11:32:09 +08:00
#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