Bouffalo SDK  1.0
Bouffalolab Software Development Kit
Collaboration diagram for IR:

Modules

 ir tx mode definition
 
 ir tx fifo width valid width definition
 
 ir tx interrupt enable definition
 
 ir tx interrupt status definition
 
 ir rx mode definition
 
 ir rx interrupt enable definition
 
 ir rx interrupt status definition
 

Data Structures

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

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...
 

Detailed Description

Function Documentation

◆ bflb_ir_feature_control()

int bflb_ir_feature_control ( struct bflb_device_s dev,
int  cmd,
size_t  arg 
)

Control ir feature.

Parameters
[in]devdevice handle
[in]cmdfeature command
[in]arguser data
Returns
A negated errno value on failure

◆ bflb_ir_get_rxfifo_cnt()

uint8_t bflb_ir_get_rxfifo_cnt ( struct bflb_device_s dev)

Get ir rx fifo available count.

Parameters
[in]devdevice handle
Returns
Ir rx fifo available count

◆ bflb_ir_get_rxint_status()

uint32_t bflb_ir_get_rxint_status ( struct bflb_device_s dev)

Get ir rx interrupt status.

Parameters
[in]devdevice handle
Returns
Ir rx interrupt status

◆ bflb_ir_get_txfifo_cnt()

uint8_t bflb_ir_get_txfifo_cnt ( struct bflb_device_s dev)

Get ir tx fifo available count.

Parameters
[in]devdevice handle
Returns
Ir tx fifo available count

◆ bflb_ir_get_txint_status()

uint32_t bflb_ir_get_txint_status ( struct bflb_device_s dev)

Get ir tx interrupt status.

Parameters
[in]devdevice handle
Returns
Ir tx interrupt status

◆ bflb_ir_link_txdma()

void bflb_ir_link_txdma ( struct bflb_device_s dev,
bool  enable 
)

Enable or disable ir tx dma mode.

Parameters
[in]devdevice handle
[in]enableenable or disable

◆ bflb_ir_receive()

uint8_t bflb_ir_receive ( struct bflb_device_s dev,
uint64_t *  data 
)

Receive data in NEC/RC5/customize mode.

Parameters
[in]devdevice handle
[out]datadata received
Returns
Bit count of data received

◆ bflb_ir_rx_enable()

void bflb_ir_rx_enable ( struct bflb_device_s dev,
bool  enable 
)

Enable or disable ir rx.

Parameters
[in]devdevice handle
[in]enableenable or disable

◆ bflb_ir_rx_init()

void bflb_ir_rx_init ( struct bflb_device_s dev,
const struct bflb_ir_rx_config_s config 
)

Initialize ir rx.

Parameters
[in]devdevice handle
[in]configconfig pointer to ir rx configure structure

◆ bflb_ir_rxfifo_clear()

void bflb_ir_rxfifo_clear ( struct bflb_device_s dev)

Clear ir rx fifo.

Parameters
[in]devdevice handle

◆ bflb_ir_rxint_clear()

void bflb_ir_rxint_clear ( struct bflb_device_s dev)

Clear ir rx interrupt.

Parameters
[in]devdevice handle

◆ bflb_ir_rxint_mask()

void bflb_ir_rxint_mask ( struct bflb_device_s dev,
uint8_t  int_type,
bool  mask 
)

Mask ir rx interrupt.

Parameters
[in]devdevice handle
[in]int_typeir rx interrupt type, use ir rx interrupt enable definition
[in]maskmask or unmask

◆ bflb_ir_send()

void bflb_ir_send ( struct bflb_device_s dev,
uint32_t *  data,
uint32_t  length 
)

Send data in NEC/RC5/customize mode.

Parameters
[in]devdevice handle
[in]datadata buffer to send
[in]lengthlength of data buffer

◆ bflb_ir_swm_receive()

uint8_t bflb_ir_swm_receive ( struct bflb_device_s dev,
uint16_t *  data,
uint8_t  length 
)

Receive data in software mode.

Parameters
[in]devdevice handle
[out]datadata buffer to receive
[in]lengthof data buffer
Returns
Length of data received

◆ bflb_ir_swm_send()

void bflb_ir_swm_send ( struct bflb_device_s dev,
uint16_t *  data,
uint8_t  length 
)

Send data in software mode.

Parameters
[in]devdevice handle
[in]datadata data buffer to send
[in]lengthlength of data buffer

◆ bflb_ir_tx_enable()

void bflb_ir_tx_enable ( struct bflb_device_s dev,
bool  enable 
)

Enable or disable ir tx.

Parameters
[in]devdevice handle
[in]enableenable or disable

◆ bflb_ir_tx_init()

void bflb_ir_tx_init ( struct bflb_device_s dev,
const struct bflb_ir_tx_config_s config 
)

Initialize ir tx.

Parameters
[in]devdevice handle
[in]configpointer to ir tx configure structure

◆ bflb_ir_txfifo_clear()

void bflb_ir_txfifo_clear ( struct bflb_device_s dev)

Clear ir tx fifo.

Parameters
[in]devdevice handle

◆ bflb_ir_txint_clear()

void bflb_ir_txint_clear ( struct bflb_device_s dev)

Clear ir tx interrupt.

Parameters
[in]devdevice handle

◆ bflb_ir_txint_mask()

void bflb_ir_txint_mask ( struct bflb_device_s dev,
uint8_t  int_type,
bool  mask 
)

Mask or unmask ir tx interrupt.

Parameters
[in]devdevice handle
[in]int_typeir tx interrupt type, use ir tx interrupt enable definition
[in]maskmask or unmask