Bouffalo SDK  1.0
Bouffalolab Software Development Kit
bflb_ir.h File Reference
#include "bflb_core.h"
Include dependency graph for bflb_ir.h:

Go to the source code of this file.

Data Structures

struct  bflb_ir_tx_config_s
 IR TX configuration structure. More...
 
struct  bflb_ir_rx_config_s
 IR RX configuration structure. More...
 

Macros

#define IR_TX_NEC   0
 
#define IR_TX_RC5   1
 
#define IR_TX_SWM   2
 
#define IR_TX_CUSTOMIZE   3
 
#define IR_TX_FIFO_WIDTH_8BIT   0
 
#define IR_TX_FIFO_WIDTH_16BIT   1
 
#define IR_TX_FIFO_WIDTH_24BIT   2
 
#define IR_TX_FIFO_WIDTH_32BIT   3
 
#define IR_TX_INTEN_END   (1 << 0)
 
#define IR_TX_INTEN_FIFO   (1 << 1)
 
#define IR_TX_INTEN_FER   (1 << 2)
 
#define IR_TX_INTSTS_END   (1 << 0)
 
#define IR_TX_INTSTS_FIFO   (1 << 1)
 
#define IR_TX_INTSTS_FER   (1 << 2)
 
#define IR_RX_NEC   0
 
#define IR_RX_RC5   1
 
#define IR_RX_SWM   2
 
#define IR_RX_INTEN_END   (1 << 0)
 
#define IR_RX_INTEN_FIFO   (1 << 1)
 
#define IR_RX_INTEN_FER   (1 << 2)
 
#define IR_RX_INTSTS_END   (1 << 0)
 
#define IR_RX_INTSTS_FIFO   (1 << 1)
 
#define IR_RX_INTSTS_FER   (1 << 2)
 

Functions

void bflb_ir_tx_init (struct bflb_device_s *dev, const struct bflb_ir_tx_config_s *config)
 Initialize ir tx. More...
 
void bflb_ir_send (struct bflb_device_s *dev, uint32_t *data, uint32_t length)
 Send data in NEC/RC5/customize mode. More...
 
void bflb_ir_swm_send (struct bflb_device_s *dev, uint16_t *data, uint8_t length)
 Send data in software mode. More...
 
void bflb_ir_tx_enable (struct bflb_device_s *dev, bool enable)
 Enable or disable ir tx. More...
 
void bflb_ir_txint_mask (struct bflb_device_s *dev, uint8_t int_type, bool mask)
 Mask or unmask ir tx interrupt. More...
 
uint32_t bflb_ir_get_txint_status (struct bflb_device_s *dev)
 Get ir tx interrupt status. More...
 
void bflb_ir_txint_clear (struct bflb_device_s *dev)
 Clear ir tx interrupt. More...
 
void bflb_ir_link_txdma (struct bflb_device_s *dev, bool enable)
 Enable or disable ir tx dma mode. More...
 
uint8_t bflb_ir_get_txfifo_cnt (struct bflb_device_s *dev)
 Get ir tx fifo available count. More...
 
void bflb_ir_txfifo_clear (struct bflb_device_s *dev)
 Clear ir tx fifo. More...
 
void bflb_ir_rx_init (struct bflb_device_s *dev, const struct bflb_ir_rx_config_s *config)
 Initialize ir rx. More...
 
uint8_t bflb_ir_receive (struct bflb_device_s *dev, uint64_t *data)
 Receive data in NEC/RC5/customize mode. More...
 
uint8_t bflb_ir_swm_receive (struct bflb_device_s *dev, uint16_t *data, uint8_t length)
 Receive data in software mode. More...
 
void bflb_ir_rx_enable (struct bflb_device_s *dev, bool enable)
 Enable or disable ir rx. More...
 
uint8_t bflb_ir_get_rxfifo_cnt (struct bflb_device_s *dev)
 Get ir rx fifo available count. More...
 
void bflb_ir_rxfifo_clear (struct bflb_device_s *dev)
 Clear ir rx fifo. More...
 
void bflb_ir_rxint_mask (struct bflb_device_s *dev, uint8_t int_type, bool mask)
 Mask ir rx interrupt. More...
 
uint32_t bflb_ir_get_rxint_status (struct bflb_device_s *dev)
 Get ir rx interrupt status. More...
 
void bflb_ir_rxint_clear (struct bflb_device_s *dev)
 Clear ir rx interrupt. More...
 
int bflb_ir_feature_control (struct bflb_device_s *dev, int cmd, size_t arg)
 Control ir feature. More...