Bouffalo SDK  1.0
Bouffalolab Software Development Kit
wo interrupt definition
LHAL » WO
Collaboration diagram for wo interrupt definition:

Data Structures

struct  bflb_wo_cfg_s
 WO configuration structure. More...
 

Macros

#define WO_INT_END   (1 << 0)
 
#define WO_INT_FIFO   (1 << 1)
 
#define WO_INT_FER   (1 << 2)
 

Functions

void bflb_wo_pin_init (struct bflb_device_s *dev, uint8_t pin, uint8_t mode)
 Initialize wo pin. More...
 
void bflb_wo_init (struct bflb_device_s *dev, struct bflb_wo_cfg_s *cfg)
 Initialize wo. More...
 
void bflb_wo_enable (struct bflb_device_s *dev)
 Enable wo. More...
 
void bflb_wo_disable (struct bflb_device_s *dev)
 Disable wo. More...
 
uint32_t bflb_wo_get_fifo_available_cnt (struct bflb_device_s *dev)
 Get the count of available space in fifo. More...
 
uint32_t bflb_wo_push_fifo (struct bflb_device_s *dev, uint16_t *data, uint32_t len)
 Put len count of data on wo. More...
 
void bflb_wo_clear_fifo (struct bflb_device_s *dev)
 Clear wo fifo. More...
 
void bflb_wo_enable_dma (struct bflb_device_s *dev)
 Enable wo dma. More...
 
void bflb_wo_disable_dma (struct bflb_device_s *dev)
 Disable wo dma. More...
 
uint32_t bflb_wo_get_int_status (struct bflb_device_s *dev)
 Get wo interrupt status. More...
 
void bflb_wo_int_mask (struct bflb_device_s *dev, uint32_t int_type)
 Disable or mask wo interrupt. More...
 
void bflb_wo_int_unmask (struct bflb_device_s *dev, uint32_t int_type)
 Enable or unmask wo interrupt. More...
 
void bflb_wo_int_clear (struct bflb_device_s *dev, uint32_t int_type)
 Clear wo interrupt status. More...
 
void bflb_wo_uart_init (struct bflb_device_s *dev, uint32_t baudrate, uint8_t pin)
 Initialize wo uart. More...
 
void bflb_wo_uart_putchar (struct bflb_device_s *dev, uint8_t ch)
 Put one char on wo uart. More...
 
void bflb_wo_uart_put (struct bflb_device_s *dev, uint8_t *data, uint32_t len)
 Put a block of data on wo uart. This is a poll api. More...
 

Variables

uint16_t code_total_cnt
 
uint8_t code0_first_cnt
 
uint8_t code1_first_cnt
 
uint8_t code0_first_level
 
uint8_t code1_first_level
 
uint8_t idle_level
 
uint8_t fifo_threshold
 
uint8_t mode
 

Detailed Description

Macro Definition Documentation

◆ WO_INT_END

#define WO_INT_END   (1 << 0)

WO end Interrupt, WO fifo empty

Definition at line 26 of file bflb_wo.h.

◆ WO_INT_FER

#define WO_INT_FER   (1 << 2)

WO fifo error interrupt, auto-cleared when fifo overflow/underflow error flag is cleared

Definition at line 28 of file bflb_wo.h.

◆ WO_INT_FIFO

#define WO_INT_FIFO   (1 << 1)

WO fifo ready (fifo_available_cnt > fifo_threshold) interrupt, auto-cleared when data is pushed

Definition at line 27 of file bflb_wo.h.

Function Documentation

◆ bflb_wo_clear_fifo()

void bflb_wo_clear_fifo ( struct bflb_device_s dev)

Clear wo fifo.

Parameters
[in]devdevice handle

◆ bflb_wo_disable()

void bflb_wo_disable ( struct bflb_device_s dev)

Disable wo.

Parameters
[in]devdevice handle

◆ bflb_wo_disable_dma()

void bflb_wo_disable_dma ( struct bflb_device_s dev)

Disable wo dma.

Parameters
[in]devdevice handle

◆ bflb_wo_enable()

void bflb_wo_enable ( struct bflb_device_s dev)

Enable wo.

Parameters
[in]devdevice handle

◆ bflb_wo_enable_dma()

void bflb_wo_enable_dma ( struct bflb_device_s dev)

Enable wo dma.

Parameters
[in]devdevice handle

◆ bflb_wo_get_fifo_available_cnt()

uint32_t bflb_wo_get_fifo_available_cnt ( struct bflb_device_s dev)

Get the count of available space in fifo.

Parameters
[in]devdevice handle
Returns
the count of available space in fifo

◆ bflb_wo_get_int_status()

uint32_t bflb_wo_get_int_status ( struct bflb_device_s dev)

Get wo interrupt status.

Parameters
[in]devdevice handle
Returns
interrupt status, use wo interrupt definition

◆ bflb_wo_init()

void bflb_wo_init ( struct bflb_device_s dev,
struct bflb_wo_cfg_s cfg 
)

Initialize wo.

Parameters
[in]devdevice handle
[in]cfgpointer to save wo config

◆ bflb_wo_int_clear()

void bflb_wo_int_clear ( struct bflb_device_s dev,
uint32_t  int_type 
)

Clear wo interrupt status.

Parameters
[in]devdevice handle
[in]int_typeclear value, use wo interrupt definition

◆ bflb_wo_int_mask()

void bflb_wo_int_mask ( struct bflb_device_s dev,
uint32_t  int_type 
)

Disable or mask wo interrupt.

Parameters
[in]devdevice handle
[in]int_typemask value, use wo interrupt definition

◆ bflb_wo_int_unmask()

void bflb_wo_int_unmask ( struct bflb_device_s dev,
uint32_t  int_type 
)

Enable or unmask wo interrupt.

Parameters
[in]devdevice handle
[in]int_typeunmask value, use wo interrupt definition

◆ bflb_wo_pin_init()

void bflb_wo_pin_init ( struct bflb_device_s dev,
uint8_t  pin,
uint8_t  mode 
)

Initialize wo pin.

Parameters
[in]devdevice handle
[in]pinassert this pin to wo
[in]modeuse wo mode definition

◆ bflb_wo_push_fifo()

uint32_t bflb_wo_push_fifo ( struct bflb_device_s dev,
uint16_t *  data,
uint32_t  len 
)

Put len count of data on wo.

Parameters
[in]devdevice handle
[in]datapointer to save send data
[in]lenlength to send
Returns
count has been sent successfully.

◆ bflb_wo_uart_init()

void bflb_wo_uart_init ( struct bflb_device_s dev,
uint32_t  baudrate,
uint8_t  pin 
)

Initialize wo uart.

Parameters
[in]devdevice handle
[in]baudratebaudrate of uart
[in]pinpin assert to uart_tx

◆ bflb_wo_uart_put()

void bflb_wo_uart_put ( struct bflb_device_s dev,
uint8_t *  data,
uint32_t  len 
)

Put a block of data on wo uart. This is a poll api.

Parameters
[in]devdevice handle
[in]datapointer to save send data
[in]lenlength to send

◆ bflb_wo_uart_putchar()

void bflb_wo_uart_putchar ( struct bflb_device_s dev,
uint8_t  ch 
)

Put one char on wo uart.

Parameters
[in]devdevice handle
[in]chchar

Variable Documentation

◆ code0_first_cnt

uint8_t code0_first_cnt

Definition at line 44 of file bflb_wo.h.

◆ code0_first_level

uint8_t code0_first_level

Definition at line 46 of file bflb_wo.h.

◆ code1_first_cnt

uint8_t code1_first_cnt

Definition at line 45 of file bflb_wo.h.

◆ code1_first_level

uint8_t code1_first_level

Definition at line 47 of file bflb_wo.h.

◆ code_total_cnt

uint16_t code_total_cnt

Definition at line 43 of file bflb_wo.h.

◆ fifo_threshold

uint8_t fifo_threshold

Definition at line 49 of file bflb_wo.h.

◆ idle_level

uint8_t idle_level

Definition at line 48 of file bflb_wo.h.

◆ mode

uint8_t mode

Definition at line 50 of file bflb_wo.h.