16 #include "hal/hal_counter.h" 35 #define IR_RECV_FREQ 0x10 38 #define IR_FREQ_BUF_LEN 6 52 IR_ERR_INVALID_PARAM = -1,
65 void (*rx_cb)(
void* arg,
int status,
int sz);
67 void (*tx_cb)(
void* arg,
int status);
94 int hal_ir_rx(
void* hdl, uint32_t *buf,
int size, uint32_t *out_sz);
104 int hal_ir_rx_freq(
void *hdl, uint32_t *buf,
int size, uint32_t *out_sz);
120 int hal_ir_tx(
void* hdl, uint32_t *buf,
int size);
138 int hal_ir_tx_repeat(
void *hdl, uint32_t *buf,
int size, uint32_t *repeat_buf,
int repeat_size);
146 int hal_ir_set_clk(
void *hdl, uint32_t high_usec, uint32_t low_usec);
int hal_ir_set_clk(void *hdl, uint32_t high_usec, uint32_t low_usec)
Set IR carrier clock mannually.
void hal_ir_close(void *hdl)
Close IR device.
int hal_ir_tx(void *hdl, uint32_t *buf, int size)
Start send data.
int hal_ir_stop_rx(void *hdl)
Stop reciece data.
int hal_ir_tx_repeat(void *hdl, uint32_t *buf, int size, uint32_t *repeat_buf, int repeat_size)
Send data and then send repeated data continually.
int hal_ir_rx_freq(void *hdl, uint32_t *buf, int size, uint32_t *out_sz)
Start reciece data for frequence caculation. Need call.
int hal_ir_stop_tx(void *hdl)
Stop send data.
int hal_ir_rx(void *hdl, uint32_t *buf, int size, uint32_t *out_sz)
Start reciece data. Need call.
void * hal_ir_open(int id, ir_init_t *init)
Open IR device.