VSF Documented
|
#include "utilities/vsf_utilities.h"
#include "./uart.h"
#include "../intc/intc.h"
#include "hal/driver/common/usart/usart_template.inc"
Data Structures | |
struct | vsf_hw_usart_t |
Macros | |
#define | VSF_HW_USART_CFG_PROTECT_LEVEL interrupt |
#define | __vsf_hw_usart_protect vsf_protect(VSF_HW_USART_CFG_PROTECT_LEVEL) |
#define | __vsf_hw_usart_unprotect vsf_unprotect(VSF_HW_USART_CFG_PROTECT_LEVEL) |
#define | VSF_HW_USART_CFG_MULTI_CLASS VSF_HW_USART_CFG_MULTI_CLASS |
#define | IIR_IID_MASK 0x0Ful |
#define | IIR_IID_MODEM_STATUS 0x00ul |
#define | IIR_IID_NO_INTERRUPT_PENDING 0x01ul |
#define | IIR_IID_THR_EMPTY 0x02ul |
#define | IIR_IID_RECEIVED_DATA_AVAILABLE 0x04ul |
#define | IIR_IID_RECEIVED_LINE_STATUS 0x06ul |
#define | IIR_IID_BUSY_DELECT 0x07ul |
#define | IIR_IID_CHARACTER_TIMEOUT 0x0Cul |
#define | VSF_USART_CFG_IMP_PREFIX vsf_hw |
#define | VSF_USART_CFG_IMP_UPCASE_PREFIX VSF_HW |
#define | VSF_USART_CFG_IMP_LV0(__N, __DONT_CARE) |
Typedefs | |
typedef struct vsf_hw_usart_t | vsf_hw_usart_t |
Enumerations | |
enum | em_clk_reg_rw_t { USART1_CLK_EN = 0x04000U , USART2_CLK_EN = 0x20000U , USART3_CLK_EN = 0x40000U , GPIOA_CLK_EN = 0X00004U , GPIOB_CLK_EN = 0X00008U } |
enum | em_gpio_reg_rw_t { USART1_GPIO_MODE_CLEAR = 0XFFFFF00FU , USART1_GPIO_MODE = 0x000008B0U , USART2_GPIO_MODE_CLEAR = 0XFFFF00FFU , USART2_GPIO_MODE = 0x00008B00U , USART3_GPIO_MODE_CLEAR = 0XFFFF00FFU , USART3_GPIO_MODE = 0x00008B00U } |
Functions | |
vsf_err_t | vsf_hw_usart_init (vsf_hw_usart_t *hw_usart_ptr, vsf_usart_cfg_t *cfg_ptr) |
fsm_rt_t | vsf_hw_usart_enable (vsf_hw_usart_t *hw_usart_ptr) |
fsm_rt_t | vsf_hw_usart_disable (vsf_hw_usart_t *hw_usart_ptr) |
vsf_usart_status_t | vsf_hw_usart_status (vsf_hw_usart_t *hw_usart_ptr) |
uint_fast16_t | vsf_hw_usart_rxfifo_read (vsf_hw_usart_t *hw_usart_ptr, void *buffer_ptr, uint_fast16_t size) |
uint_fast16_t | vsf_hw_usart_txfifo_write (vsf_hw_usart_t *hw_usart_ptr, void *buffer_ptr, uint_fast16_t size) |
void | vsf_hw_usart_irqhandler (vsf_hw_usart_t *hw_usart_ptr) |
void | vsf_hw_usart_irq_enable (vsf_hw_usart_t *hw_usart_ptr, vsf_usart_irq_mask_t irq_mask) |
void | vsf_hw_usart_irq_disable (vsf_hw_usart_t *hw_usart_ptr, vsf_usart_irq_mask_t irq_mask) |
#define VSF_HW_USART_CFG_PROTECT_LEVEL interrupt |
#define __vsf_hw_usart_protect vsf_protect(VSF_HW_USART_CFG_PROTECT_LEVEL) |
#define __vsf_hw_usart_unprotect vsf_unprotect(VSF_HW_USART_CFG_PROTECT_LEVEL) |
#define VSF_HW_USART_CFG_MULTI_CLASS VSF_HW_USART_CFG_MULTI_CLASS |
#define IIR_IID_MASK 0x0Ful |
#define IIR_IID_MODEM_STATUS 0x00ul |
#define IIR_IID_NO_INTERRUPT_PENDING 0x01ul |
#define IIR_IID_THR_EMPTY 0x02ul |
#define IIR_IID_RECEIVED_DATA_AVAILABLE 0x04ul |
#define IIR_IID_RECEIVED_LINE_STATUS 0x06ul |
#define IIR_IID_BUSY_DELECT 0x07ul |
#define IIR_IID_CHARACTER_TIMEOUT 0x0Cul |
#define VSF_USART_CFG_IMP_PREFIX vsf_hw |
#define VSF_USART_CFG_IMP_UPCASE_PREFIX VSF_HW |
#define VSF_USART_CFG_IMP_LV0 | ( | __N, | |
__DONT_CARE | |||
) |
typedef struct vsf_hw_usart_t vsf_hw_usart_t |
enum em_clk_reg_rw_t |
enum em_gpio_reg_rw_t |
vsf_err_t vsf_hw_usart_init | ( | vsf_hw_usart_t * | hw_usart_ptr, |
vsf_usart_cfg_t * | cfg_ptr | ||
) |
fsm_rt_t vsf_hw_usart_enable | ( | vsf_hw_usart_t * | hw_usart_ptr | ) |
fsm_rt_t vsf_hw_usart_disable | ( | vsf_hw_usart_t * | hw_usart_ptr | ) |
vsf_usart_status_t vsf_hw_usart_status | ( | vsf_hw_usart_t * | hw_usart_ptr | ) |
uint_fast16_t vsf_hw_usart_rxfifo_read | ( | vsf_hw_usart_t * | hw_usart_ptr, |
void * | buffer_ptr, | ||
uint_fast16_t | size | ||
) |
uint_fast16_t vsf_hw_usart_txfifo_write | ( | vsf_hw_usart_t * | hw_usart_ptr, |
void * | buffer_ptr, | ||
uint_fast16_t | size | ||
) |
void vsf_hw_usart_irqhandler | ( | vsf_hw_usart_t * | hw_usart_ptr | ) |
void vsf_hw_usart_irq_enable | ( | vsf_hw_usart_t * | hw_usart_ptr, |
vsf_usart_irq_mask_t | irq_mask | ||
) |
void vsf_hw_usart_irq_disable | ( | vsf_hw_usart_t * | hw_usart_ptr, |
vsf_usart_irq_mask_t | irq_mask | ||
) |