Header file containing functions prototypes of UART HAL library. More...
Go to the source code of this file.
Classes | |
struct | _uart_init |
UART init structure definition. More... | |
struct | _uart_handle |
UART handle Structure definition. More... | |
struct | _hal_uart_callback |
HAL_UART Callback function definition. More... | |
Typedefs | |
typedef struct _uart_init | uart_init_t |
UART init structure definition. More... | |
typedef struct _uart_handle | uart_handle_t |
UART handle Structure definition. More... | |
typedef struct _hal_uart_callback | hal_uart_callback_t |
HAL_UART Callback function definition. More... | |
Enumerations | |
enum | hal_uart_state_t { HAL_UART_STATE_RESET = 0x00U, HAL_UART_STATE_READY = 0x10U, HAL_UART_STATE_BUSY = 0x14U, HAL_UART_STATE_BUSY_TX = 0x11U, HAL_UART_STATE_BUSY_RX = 0x12U, HAL_UART_STATE_BUSY_TXRX = 0x13U, HAL_UART_STATE_TIMEOUT = 0x30U, HAL_UART_STATE_ERROR = 0x70U } |
HAL UART State enumerations definition. More... | |
Functions | |
hal_status_t | hal_uart_init (uart_handle_t *p_uart) |
Initialize the UART according to the specified parameters in the uart_init_t and initialize the associated handle. More... | |
hal_status_t | hal_uart_deinit (uart_handle_t *p_uart) |
De-initialize the UART peripheral. More... | |
void | hal_uart_msp_init (uart_handle_t *p_uart) |
Initialize the UART MSP. More... | |
void | hal_uart_msp_deinit (uart_handle_t *p_uart) |
De-initialize the UART MSP. More... | |
hal_status_t | hal_uart_transmit (uart_handle_t *p_uart, uint8_t *p_data, uint16_t size, uint32_t timeout) |
Send an amount of data in blocking mode. More... | |
hal_status_t | hal_uart_receive (uart_handle_t *p_uart, uint8_t *p_data, uint16_t size, uint32_t timeout) |
Receive an amount of data in blocking mode. More... | |
hal_status_t | hal_uart_transmit_it (uart_handle_t *p_uart, uint8_t *p_data, uint16_t size) |
Send an amount of data in interrupt mode. More... | |
hal_status_t | hal_uart_receive_it (uart_handle_t *p_uart, uint8_t *p_data, uint16_t size) |
Receive an amount of data in interrupt mode. More... | |
hal_status_t | hal_uart_transmit_dma (uart_handle_t *p_uart, uint8_t *p_data, uint16_t size) |
Send an amount of data in DMA mode. More... | |
hal_status_t | hal_uart_transmit_dma_sg_llp (uart_handle_t *p_uart, uint8_t *p_data, uint16_t size, dma_sg_llp_config_t *sg_llp_config) |
Send an amount of data in DMA mode. More... | |
hal_status_t | hal_uart_receive_dma (uart_handle_t *p_uart, uint8_t *p_data, uint16_t size) |
Receive an amount of data in DMA mode. More... | |
hal_status_t | hal_uart_receive_dma_sg_llp (uart_handle_t *p_uart, uint8_t *p_data, uint16_t size, dma_sg_llp_config_t *sg_llp_config) |
Receive an amount of data in DMA mode. More... | |
hal_status_t | hal_uart_dma_pause (uart_handle_t *p_uart) |
Pause the DMA Transfer. More... | |
hal_status_t | hal_uart_dma_resume (uart_handle_t *p_uart) |
Resume the DMA Transfer. More... | |
hal_status_t | hal_uart_dma_stop (uart_handle_t *p_uart) |
Stop the DMA Transfer. More... | |
hal_status_t | hal_uart_abort (uart_handle_t *p_uart) |
Abort ongoing transfers (blocking mode). More... | |
hal_status_t | hal_uart_abort_transmit (uart_handle_t *p_uart) |
Abort ongoing Transmit transfer (blocking mode). More... | |
hal_status_t | hal_uart_abort_receive (uart_handle_t *p_uart) |
Abort ongoing Receive transfer (blocking mode). More... | |
hal_status_t | hal_uart_abort_it (uart_handle_t *p_uart) |
Abort ongoing transfers (Interrupt mode). More... | |
hal_status_t | hal_uart_abort_transmit_it (uart_handle_t *p_uart) |
Abort ongoing Transmit transfer (Interrupt mode). More... | |
hal_status_t | hal_uart_abort_receive_it (uart_handle_t *p_uart) |
Abort ongoing Receive transfer (Interrupt mode). More... | |
void | hal_uart_irq_handler (uart_handle_t *p_uart) |
Handle UART interrupt request. More... | |
void | hal_uart_tx_cplt_callback (uart_handle_t *p_uart) |
Tx Transfer completed callback. More... | |
void | hal_uart_rx_cplt_callback (uart_handle_t *p_uart) |
Rx Transfer completed callback. More... | |
void | hal_uart_error_callback (uart_handle_t *p_uart) |
UART error callback. More... | |
void | hal_uart_abort_cplt_callback (uart_handle_t *p_uart) |
UART Abort Complete callback. More... | |
void | hal_uart_abort_tx_cplt_callback (uart_handle_t *p_uart) |
UART Abort Tansmit Complete callback. More... | |
void | hal_uart_abort_rx_cplt_callback (uart_handle_t *p_uart) |
UART Abort Receive Complete callback. More... | |
hal_uart_state_t | hal_uart_get_state (uart_handle_t *p_uart) |
Return the UART handle state. More... | |
uint32_t | hal_uart_get_error (uart_handle_t *p_uart) |
Return the UART handle error code. More... | |
hal_status_t | hal_uart_suspend_reg (uart_handle_t *p_uart) |
Suspend some registers related to UART configuration before sleep. More... | |
hal_status_t | hal_uart_resume_reg (uart_handle_t *p_uart) |
Restore some registers related to UART configuration after sleep. This function must be used in conjunction with the hal_uart_suspend_reg(). More... | |
Header file containing functions prototypes of UART HAL library.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. Neither the name of GOODIX nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Definition in file gr55xx_hal_uart.h.