Contains all macro definitions and function prototypes support for usart1n firmware library on A31G12x. More...
Go to the source code of this file.
Data Structures | |
struct | USART1n_CFG_Type |
Functions | |
HAL_Status_Type | HAL_USART_Init (USART1n_Type *USART1x, USART1n_CFG_Type *USART1n_Config) |
Initialize the USART1n peripheral with the specified parameters. More... | |
HAL_Status_Type | HAL_USART_DeInit (USART1n_Type *USART1x) |
Deinitialize the USART1n peripheral registers to their default reset values. More... | |
HAL_Status_Type | HAL_USART_UART_Mode_Config (USART1n_CFG_Type *USART1n_Config) |
Fills each USART_InitStruct member with its default value: More... | |
HAL_Status_Type | HAL_USART_USRT_Mode_Config (USART1n_CFG_Type *USART1n_Config) |
Fills each USART_InitStruct member with its default value: More... | |
HAL_Status_Type | HAL_USART_SPI_Mode_Config (USART1n_CFG_Type *USART1n_Config) |
Fills each USART_InitStruct member with its default value: More... | |
HAL_Status_Type | HAL_USART_ConfigInterrupt (USART1n_Type *USART1x, USART1n_INT_Type USART1n_IntCfg, FunctionalState NewState) |
Configure the peripheral interrupt. More... | |
HAL_Status_Type | HAL_USART_DataControlConfig (USART1n_Type *USART1x, USART1n_CONTROL_Type Mode, FunctionalState NewState) |
Configure Data Control mode for USART peripheral. More... | |
HAL_Status_Type | HAL_USART_Enable (USART1n_Type *USART1x, FunctionalState state) |
USART1n enable control. More... | |
HAL_Status_Type | HAL_USART_ClearStatus (USART1n_Type *USART1x, USART1n_STATUS_Type Status) |
Clear Status register in USART peripheral. More... | |
uint8_t | HAL_USART_GetStatus (USART1n_Type *USART1x) |
Get current value of Line Status register in USART peripheral. More... | |
FlagStatus | HAL_USART_CheckBusy (USART1n_Type *USART1x) |
Check whether if USART is busy or not. More... | |
HAL_Status_Type | HAL_USART_TransmitByte (USART1n_Type *USART1x, uint8_t Data) |
Transmit a single data through USART peripheral. More... | |
uint8_t | HAL_USART_ReceiveByte (USART1n_Type *USART1x) |
Receive a single data from USART peripheral. More... | |
uint32_t | HAL_USART_Transmit (USART1n_Type *USART1x, uint8_t *txbuf, uint32_t buflen, TRANSFER_BLOCK_Type flag) |
Send a block of data via USART peripheral. More... | |
uint32_t | HAL_USART_Receive (USART1n_Type *USART1x, uint8_t *rxbuf, uint32_t buflen, TRANSFER_BLOCK_Type flag) |
Receive a block of data via USART peripheral. More... | |
Contains all macro definitions and function prototypes support for usart1n firmware library on A31G12x.
Copyright(C) 2019, ABOV Semiconductor All rights reserved.
ABOV Disclaimer
IMPORTANT NOTICE ? PLEASE READ CAREFULLY ABOV Semiconductor ("ABOV") reserves the right to make changes, corrections, enhancements, modifications, and improvements to ABOV products and/or to this document at any time without notice. ABOV does not give warranties as to the accuracy or completeness of the information included herein. Purchasers should obtain the latest relevant information of ABOV products before placing orders. Purchasers are entirely responsible for the choice, selection, and use of ABOV products and ABOV assumes no liability for application assistance or the design of purchasers' products. No license, express or implied, to any intellectual property rights is granted by ABOV herein. ABOV disclaims all express and implied warranties and shall not be responsible or liable for any injuries or damages related to use of ABOV products in such unauthorized applications. ABOV and the ABOV logo are trademarks of ABOV. All other product or service names are the property of their respective owners. Information in this document supersedes and replaces the information previously supplied in any former versions of this document. 2020 ABOV Semiconductor All rights reserved
Definition in file A31G12x_hal_usart1n.h.
enum USART1n_ACK_Type |
Enumerator | |
---|---|
USART1n_SPI_TX_RISING | Txd Change : Rising / Rxd Change : Falling |
USART1n_SPI_TX_FALLING | Txd Change : Falling / Rxd Change : Rising |
Definition at line 111 of file A31G12x_hal_usart1n.h.
enum USART1n_CONTROL_Type |
USART Data Control type definition
Definition at line 149 of file A31G12x_hal_usart1n.h.
USART1n Data Bit type definitions
Enumerator | |
---|---|
USART1n_DATA_BIT_5 | 5 Data Bits |
USART1n_DATA_BIT_6 | 6 Data Bits |
USART1n_DATA_BIT_7 | 7 Data Bits |
USART1n_DATA_BIT_8 | 8 Data Bits |
USART1n_DATA_BIT_9 | 9 Data Bits |
Definition at line 124 of file A31G12x_hal_usart1n.h.
enum USART1n_EDGE_Type |
Enumerator | |
---|---|
USART1n_SPI_TX_LEADEDGE_SAMPLE | Leading edge : Sample / Trailing edge : Setup |
USART1n_SPI_TX_LEADEDGE_SETUP | Leading edge : Setup / Trailing edge : Sample |
Definition at line 117 of file A31G12x_hal_usart1n.h.
enum USART1n_INT_Type |
Definition at line 174 of file A31G12x_hal_usart1n.h.
enum USART1n_OPMODE_Type |
Enumerator | |
---|---|
USART1n_UART_MODE | UART Mode |
USART1n_USRT_MODE | USRT Mode (Syncronous) |
USART1n_SPI_MODE | SPI Mode |
Definition at line 98 of file A31G12x_hal_usart1n.h.
USART1n Parity Bit type definitions
Enumerator | |
---|---|
USART1n_PARITY_BIT_NONE | No parity |
USART1n_PARITY_BIT_EVEN | Even parity |
USART1n_PARITY_BIT_ODD | Odd parity |
Definition at line 141 of file A31G12x_hal_usart1n.h.
Enumerator | |
---|---|
USART1n_SPI_LSB | SPI LSB First |
USART1n_SPI_MSB | SPI MSB First |
Definition at line 105 of file A31G12x_hal_usart1n.h.
enum USART1n_STATUS_Type |
Enumerator | |
---|---|
USART1n_STATUS_PE | |
USART1n_STATUS_FE | |
USART1n_STATUS_DOR | |
USART1n_STATUS_WAKE | |
USART1n_STATUS_RXC | |
USART1n_STATUS_TXC | |
USART1n_STATUS_DRE |
Definition at line 163 of file A31G12x_hal_usart1n.h.
USART1n Stop Bit type definitions
Enumerator | |
---|---|
USART1n_STOP_BIT_1 | 1 Stop Bits |
USART1n_STOP_BIT_2 | 2 Stop Bits |
Definition at line 134 of file A31G12x_hal_usart1n.h.
FlagStatus HAL_USART_CheckBusy | ( | USART1n_Type * | USART1x | ) |
Check whether if USART is busy or not.
[in] | USART1x | Pointer to the target USART1
|
Definition at line 587 of file A31G12x_hal_usart1n.c.
HAL_Status_Type HAL_USART_ClearStatus | ( | USART1n_Type * | USART1x, |
USART1n_STATUS_Type | Status | ||
) |
Clear Status register in USART peripheral.
[in] | USART1x | Pointer to the target USART1
|
[in] | Status |
Definition at line 535 of file A31G12x_hal_usart1n.c.
References HAL_ERROR, HAL_OK, USART1n_STATUS_DRE, USART1n_STATUS_RXC, USART1n_STATUS_TXC, and USART1n_STATUS_WAKE.
Referenced by HAL_USART_Init(), and HAL_USART_Transmit().
HAL_Status_Type HAL_USART_ConfigInterrupt | ( | USART1n_Type * | USART1x, |
USART1n_INT_Type | USART1n_IntCfg, | ||
FunctionalState | NewState | ||
) |
Configure the peripheral interrupt.
[in] | USART1x | Pointer to the target USART1
|
[in] | USART1n_IntCfg | Specifies the interrupt flag
|
[in] | NewState | Next State of Interrupt Operation
|
Definition at line 380 of file A31G12x_hal_usart1n.c.
References ENABLE, HAL_ERROR, HAL_OK, USART1n_INTCFG_DR, USART1n_INTCFG_RXC, USART1n_INTCFG_TXC, and USART1n_INTCFG_WAKE.
HAL_Status_Type HAL_USART_DataControlConfig | ( | USART1n_Type * | USART1x, |
USART1n_CONTROL_Type | Mode, | ||
FunctionalState | NewState | ||
) |
Configure Data Control mode for USART peripheral.
[in] | USART1x | Pointer to the target USART1
|
[in] | Mode | Data Control Mode
|
[in] | NewState | Next State of Functional Operation
|
Definition at line 440 of file A31G12x_hal_usart1n.c.
References ENABLE, HAL_ERROR, HAL_OK, USART1n_CONTROL_DBLS, USART1n_CONTROL_DISSCK, USART1n_CONTROL_FXCH, USART1n_CONTROL_LOOPS, USART1n_CONTROL_MASTER, USART1n_CONTROL_USTEN, USART1n_CONTROL_USTRX8, USART1n_CONTROL_USTSB, USART1n_CONTROL_USTSSEN, and USART1n_CONTROL_USTTX8.
HAL_Status_Type HAL_USART_DeInit | ( | USART1n_Type * | USART1x | ) |
Deinitialize the USART1n peripheral registers to their default reset values.
[in] | USART1x | Pointer to the target USART1
|
Definition at line 194 of file A31G12x_hal_usart1n.c.
References HAL_ERROR, HAL_OK, HAL_SCU_Peripheral_EnableClock2(), and HAL_SCU_Peripheral_SetReset2().
HAL_Status_Type HAL_USART_Enable | ( | USART1n_Type * | USART1x, |
FunctionalState | state | ||
) |
USART1n enable control.
[in] | USART1x | Pointer to the target USART1
|
[in] | state |
|
Definition at line 507 of file A31G12x_hal_usart1n.c.
uint8_t HAL_USART_GetStatus | ( | USART1n_Type * | USART1x | ) |
Get current value of Line Status register in USART peripheral.
[in] | USART1x | Pointer to the target USART1
|
Definition at line 575 of file A31G12x_hal_usart1n.c.
HAL_Status_Type HAL_USART_Init | ( | USART1n_Type * | USART1x, |
USART1n_CFG_Type * | USART1n_Config | ||
) |
Initialize the USART1n peripheral with the specified parameters.
[in] | USART1x | Pointer to the target USART1
|
[in] | USART1n_Config | Pointer to a USART1n_CFG_Type structure that contains the configuration information for the specified peripheral. |
Definition at line 110 of file A31G12x_hal_usart1n.c.
References USART1n_CFG_Type::ACK, USART1n_CFG_Type::Baudrate, USART1n_CFG_Type::Databits, USART1n_CFG_Type::Edge, HAL_ERROR, HAL_OK, HAL_SCU_Peripheral_EnableClock2(), HAL_SCU_Peripheral_SetReset2(), HAL_USART_ClearStatus(), HAL_USART_ReceiveByte(), USART1n_CFG_Type::Mode, USART1n_CFG_Type::Order, USART1n_CFG_Type::Parity, USART1n_CFG_Type::Stopbits, USART1n_BaseClock, USART1n_STATUS_TXC, and usart_set_divisors().
uint32_t HAL_USART_Receive | ( | USART1n_Type * | USART1x, |
uint8_t * | rxbuf, | ||
uint32_t | buflen, | ||
TRANSFER_BLOCK_Type | flag | ||
) |
Receive a block of data via USART peripheral.
[in] | USART1x | Pointer to the target USART1
|
[out] | rxbuf | Pointer to Received buffer |
[in] | buflen | Length of Received buffer |
[in] | flag | Flag mode
|
Definition at line 724 of file A31G12x_hal_usart1n.c.
References BLOCKING, and HAL_USART_ReceiveByte().
uint8_t HAL_USART_ReceiveByte | ( | USART1n_Type * | USART1x | ) |
Receive a single data from USART peripheral.
[in] | USART1x | Pointer to the target USART1
|
Definition at line 628 of file A31G12x_hal_usart1n.c.
Referenced by HAL_USART_Init(), and HAL_USART_Receive().
HAL_Status_Type HAL_USART_SPI_Mode_Config | ( | USART1n_CFG_Type * | USART1n_Config | ) |
Fills each USART_InitStruct member with its default value:
[out] | USART1n_Config | Pointer to a USART1n_CFG_Type structure which will be initialized. |
Definition at line 326 of file A31G12x_hal_usart1n.c.
References USART1n_CFG_Type::ACK, USART1n_CFG_Type::Baudrate, USART1n_CFG_Type::Databits, USART1n_CFG_Type::Edge, HAL_ERROR, HAL_OK, USART1n_CFG_Type::Mode, USART1n_CFG_Type::Order, USART1n_CFG_Type::Parity, USART1n_CFG_Type::Stopbits, USART1n_DATA_BIT_8, USART1n_PARITY_BIT_NONE, USART1n_SPI_LSB, USART1n_SPI_MODE, USART1n_SPI_TX_FALLING, USART1n_SPI_TX_LEADEDGE_SAMPLE, USART1n_SPI_TX_LEADEDGE_SETUP, USART1n_SPI_TX_RISING, and USART1n_STOP_BIT_1.
uint32_t HAL_USART_Transmit | ( | USART1n_Type * | USART1x, |
uint8_t * | txbuf, | ||
uint32_t | buflen, | ||
TRANSFER_BLOCK_Type | flag | ||
) |
Send a block of data via USART peripheral.
[in] | USART1x | Pointer to the target USART1
|
[in] | txbuf | Pointer to Transmit buffer |
[in] | buflen | Length of Transmit buffer |
[in] | flag | Flag used in USART transfer
|
Definition at line 650 of file A31G12x_hal_usart1n.c.
References BLOCKING, HAL_USART_ClearStatus(), HAL_USART_TransmitByte(), and USART1n_STATUS_TXC.
HAL_Status_Type HAL_USART_TransmitByte | ( | USART1n_Type * | USART1x, |
uint8_t | Data | ||
) |
Transmit a single data through USART peripheral.
[in] | USART1x | Pointer to the target USART1
|
[in] | Data | Data to transmit (must be 8-bit long) |
Definition at line 608 of file A31G12x_hal_usart1n.c.
References HAL_ERROR, and HAL_OK.
Referenced by HAL_USART_Transmit().
HAL_Status_Type HAL_USART_UART_Mode_Config | ( | USART1n_CFG_Type * | USART1n_Config | ) |
Fills each USART_InitStruct member with its default value:
[out] | USART1n_Config | Pointer to a USART1n_CFG_Type structure which will be initialized. |
Definition at line 251 of file A31G12x_hal_usart1n.c.
References USART1n_CFG_Type::Baudrate, USART1n_CFG_Type::Databits, HAL_ERROR, HAL_OK, USART1n_CFG_Type::Mode, USART1n_CFG_Type::Parity, USART1n_CFG_Type::Stopbits, USART1n_DATA_BIT_8, USART1n_PARITY_BIT_NONE, USART1n_STOP_BIT_1, and USART1n_UART_MODE.
HAL_Status_Type HAL_USART_USRT_Mode_Config | ( | USART1n_CFG_Type * | USART1n_Config | ) |
Fills each USART_InitStruct member with its default value:
[out] | USART1n_Config | Pointer to a USART1n_CFG_Type structure which will be initialized. |
Definition at line 278 of file A31G12x_hal_usart1n.c.
References USART1n_CFG_Type::ACK, USART1n_CFG_Type::Baudrate, USART1n_CFG_Type::Databits, USART1n_CFG_Type::Edge, HAL_ERROR, HAL_OK, USART1n_CFG_Type::Mode, USART1n_CFG_Type::Order, USART1n_CFG_Type::Parity, USART1n_CFG_Type::Stopbits, USART1n_DATA_BIT_8, USART1n_PARITY_BIT_NONE, USART1n_SPI_LSB, USART1n_SPI_TX_FALLING, USART1n_SPI_TX_LEADEDGE_SAMPLE, USART1n_SPI_TX_LEADEDGE_SETUP, USART1n_SPI_TX_RISING, USART1n_STOP_BIT_1, and USART1n_USRT_MODE.