Contains all macro definitions and function prototypes support for lpuart firmware library on A31L12x. More...
Go to the source code of this file.
Data Structures | |
struct | LPUART_CFG_Type |
Functions | |
HAL_Status_Type | HAL_LPUART_Init (LPUART_CFG_Type *LPUART_Config) |
Initialize the LPUART peripheral with the specified parameters. More... | |
HAL_Status_Type | HAL_LPUART_DeInit (void) |
Deinitialize the LPUART peripheral registers to their default reset values. More... | |
HAL_Status_Type | HAL_LPUART_ConfigStructInit (LPUART_CFG_Type *LPUART_Config) |
Fills each LPUART_Config member with its default value: More... | |
HAL_Status_Type | HAL_LPUART_ConfigInterrupt (LPUART_INT_Type LPUART_IntCfg, FunctionalState NewState) |
Configure the interrupt source of selected LPUART peripheral. More... | |
HAL_Status_Type | HAL_LPUART_DataControlConfig (LPUART_CONTROL_Type Mode, FunctionalState NewState) |
Configure Data Control mode for LPUART peripheral. More... | |
HAL_Status_Type | HAL_LPUART_Enable (FunctionalState state) |
LPUART enable control. More... | |
HAL_Status_Type | HAL_LPUART_ClearStatus (LPUART_STATUS_Type Status) |
This function clears Interrupt Flag and Status Register. More... | |
uint8_t | HAL_LPUART_GetStatus (void) |
This function returns the current value of Interrupt Flag and Status Register. More... | |
HAL_Status_Type | HAL_LPUART_TransmitByte (uint8_t Data) |
Transmit a single data through USART peripheral. More... | |
uint8_t | HAL_LPUART_ReceiveByte (void) |
Receive a single data from USART peripheral. More... | |
uint32_t | HAL_LPUART_Transmit (uint8_t *txbuf, uint32_t buflen, TRANSFER_BLOCK_Type flag) |
Send a block of data via LPUART peripheral. More... | |
uint32_t | HAL_LPUART_Receive (uint8_t *rxbuf, uint32_t buflen, TRANSFER_BLOCK_Type flag) |
Receive a block of data via LPUART peripheral. More... | |
Contains all macro definitions and function prototypes support for lpuart firmware library on A31L12x.
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 A31L12x_hal_lpuart.h.
enum LPUART_CONTROL_Type |
Definition at line 93 of file A31L12x_hal_lpuart.h.
enum LPUART_DATA_BIT_Type |
Enumerator | |
---|---|
LPUART_DATA_BIT_5 | |
LPUART_DATA_BIT_6 | |
LPUART_DATA_BIT_7 | |
LPUART_DATA_BIT_8 |
Definition at line 70 of file A31L12x_hal_lpuart.h.
enum LPUART_INT_Type |
Enumerator | |
---|---|
LPUART_INTCFG_RXCIEN | |
LPUART_INTCFG_TXCIEN | |
LPUART_INTCFG_SBDIEN | |
LPUART_INTCFG_RTOIEN | |
LPUART_INTCFG_RCDIEN |
Definition at line 113 of file A31L12x_hal_lpuart.h.
Enumerator | |
---|---|
LPUART_OVRS_16 | |
LPUART_OVRS_8 | |
LPUART_OVRS_1 |
Definition at line 63 of file A31L12x_hal_lpuart.h.
Enumerator | |
---|---|
LPUART_PARITY_BIT_NONE | |
LPUART_PARITY_BIT_ODD | |
LPUART_PARITY_BIT_EVEN | |
LPUART_PARITY_BIT_SP0 | |
LPUART_PARITY_BIT_SP1 |
Definition at line 78 of file A31L12x_hal_lpuart.h.
enum LPUART_STATUS_Type |
Enumerator | |
---|---|
LPUART_STATUS_RXCIFLAG | |
LPUART_STATUS_TXCIFLAG | |
LPUART_STATUS_SBDIFLAG | |
LPUART_STATUS_RTOIFLAG | |
LPUART_STATUS_RCDIFLAG | |
LPUART_STATUS_RXBUSY | |
LPUART_STATUS_PE | |
LPUART_STATUS_FE | |
LPUART_STATUS_DOR |
Definition at line 122 of file A31L12x_hal_lpuart.h.
enum LPUART_STOP_BIT_Type |
Enumerator | |
---|---|
LPUART_STOP_BIT_1 | |
LPUART_STOP_BIT_2 |
Definition at line 87 of file A31L12x_hal_lpuart.h.
HAL_Status_Type HAL_LPUART_ClearStatus | ( | LPUART_STATUS_Type | Status | ) |
This function clears Interrupt Flag and Status Register.
[in] | Status |
|
Definition at line 361 of file A31L12x_hal_lpuart.c.
References HAL_ERROR, HAL_OK, LPUART_STATUS_DOR, LPUART_STATUS_FE, LPUART_STATUS_PE, LPUART_STATUS_RCDIFLAG, LPUART_STATUS_RTOIFLAG, LPUART_STATUS_RXBUSY, LPUART_STATUS_RXCIFLAG, LPUART_STATUS_SBDIFLAG, and LPUART_STATUS_TXCIFLAG.
Referenced by HAL_LPUART_Transmit().
HAL_Status_Type HAL_LPUART_ConfigInterrupt | ( | LPUART_INT_Type | LPUART_IntCfg, |
FunctionalState | NewState | ||
) |
Configure the interrupt source of selected LPUART peripheral.
[in] | LPUART_IntCfg | Specifies the interrupt source
|
[in] | NewState | Next State of Interrupt Operation
|
Definition at line 182 of file A31L12x_hal_lpuart.c.
References ENABLE, HAL_ERROR, HAL_OK, LPUART_INTCFG_RCDIEN, LPUART_INTCFG_RTOIEN, LPUART_INTCFG_RXCIEN, LPUART_INTCFG_SBDIEN, and LPUART_INTCFG_TXCIEN.
HAL_Status_Type HAL_LPUART_ConfigStructInit | ( | LPUART_CFG_Type * | LPUART_Config | ) |
Fills each LPUART_Config member with its default value:
[out] | LPUART_Config | Pointer to a LPUART_CFG_Type structure which will be initialized. |
Definition at line 148 of file A31L12x_hal_lpuart.c.
References LPUART_CFG_Type::BaseClock, LPUART_CFG_Type::Baudrate, LPUART_CFG_Type::DataBit, HAL_ERROR, HAL_OK, LPUART_DATA_BIT_8, LPUART_OVRS_16, LPUART_PARITY_BIT_NONE, LPUART_STOP_BIT_1, LPUART_CFG_Type::OverSampling, LPUART_CFG_Type::ParityBit, and LPUART_CFG_Type::StopBit.
HAL_Status_Type HAL_LPUART_DataControlConfig | ( | LPUART_CONTROL_Type | Mode, |
FunctionalState | NewState | ||
) |
Configure Data Control mode for LPUART peripheral.
[in] | Mode | Data Control Mode
|
[in] | NewState | Next State of Functional Operation
|
Definition at line 244 of file A31L12x_hal_lpuart.c.
References ENABLE, HAL_ERROR, HAL_OK, LPUART_CONTROL_DEPEN, LPUART_CONTROL_DEPOL, LPUART_CONTROL_HDCOM, LPUART_CONTROL_LPUEN, LPUART_CONTROL_PEN, LPUART_CONTROL_PSEL, LPUART_CONTROL_RCDEN, LPUART_CONTROL_RTOEN, LPUART_CONTROL_RXE, LPUART_CONTROL_STKPEN, LPUART_CONTROL_STOPB, LPUART_CONTROL_TXE, and LPUART_CONTROL_WAKEN.
HAL_Status_Type HAL_LPUART_DeInit | ( | void | ) |
Deinitialize the LPUART peripheral registers to their default reset values.
Definition at line 129 of file A31L12x_hal_lpuart.c.
References HAL_OK, HAL_SCU_Peripheral_EnableClock2(), and HAL_SCU_Peripheral_SetReset2().
HAL_Status_Type HAL_LPUART_Enable | ( | FunctionalState | state | ) |
LPUART enable control.
[in] | state |
|
Definition at line 340 of file A31L12x_hal_lpuart.c.
References HAL_OK.
uint8_t HAL_LPUART_GetStatus | ( | void | ) |
This function returns the current value of Interrupt Flag and Status Register.
Definition at line 409 of file A31L12x_hal_lpuart.c.
HAL_Status_Type HAL_LPUART_Init | ( | LPUART_CFG_Type * | LPUART_Config | ) |
Initialize the LPUART peripheral with the specified parameters.
[in] | LPUART_Config | Pointer to a LPUART_CFG_Type structure that contains the configuration information for the specified peripheral. |
Definition at line 94 of file A31L12x_hal_lpuart.c.
References LPUART_CFG_Type::DataBit, HAL_ERROR, HAL_LPUART_ReceiveByte(), HAL_OK, HAL_SCU_Peripheral_EnableClock2(), HAL_SCU_Peripheral_SetReset2(), lpuart_set_divisors(), LPUART_CFG_Type::OverSampling, LPUART_CFG_Type::ParityBit, and LPUART_CFG_Type::StopBit.
uint32_t HAL_LPUART_Receive | ( | uint8_t * | rxbuf, |
uint32_t | buflen, | ||
TRANSFER_BLOCK_Type | flag | ||
) |
Receive a block of data via LPUART peripheral.
[out] | rxbuf | Pointer to Received buffer |
[in] | buflen | Length of Received buffer |
[in] | flag | Flag mode
|
Definition at line 531 of file A31L12x_hal_lpuart.c.
References BLOCKING, and HAL_LPUART_ReceiveByte().
uint8_t HAL_LPUART_ReceiveByte | ( | void | ) |
Receive a single data from USART peripheral.
Definition at line 431 of file A31L12x_hal_lpuart.c.
Referenced by HAL_LPUART_Init(), and HAL_LPUART_Receive().
uint32_t HAL_LPUART_Transmit | ( | uint8_t * | txbuf, |
uint32_t | buflen, | ||
TRANSFER_BLOCK_Type | flag | ||
) |
Send a block of data via LPUART peripheral.
[in] | txbuf | Pointer to Transmit buffer |
[in] | buflen | Length of Transmit buffer |
[in] | flag | Flag used in LPUART transfer
|
Definition at line 450 of file A31L12x_hal_lpuart.c.
References BLOCKING, HAL_LPUART_ClearStatus(), HAL_LPUART_TransmitByte(), and LPUART_STATUS_TXCIFLAG.
HAL_Status_Type HAL_LPUART_TransmitByte | ( | uint8_t | Data | ) |
Transmit a single data through USART peripheral.
[in] | Data | Data to transmit (must be 8-bit long) |
Definition at line 420 of file A31L12x_hal_lpuart.c.
References HAL_OK.
Referenced by HAL_LPUART_Transmit().