Go to the source code of this file.
Data Structures | |
struct | HAL_UartDescriptor_t |
Uart descriptor. More... | |
Functions | |
int | HAL_OpenUart (HAL_UartDescriptor_t *descriptor) |
Registers uart's event handlers. Performs configuration of uart registers. Performs configuration of RTS, CTS and DTR pins. | |
int | HAL_CloseUart (HAL_UartDescriptor_t *descriptor) |
Releases the uart channel and pins, if hardware flow control was used. | |
int | HAL_WriteUart (HAL_UartDescriptor_t *descriptor, uint8_t *buffer, uint8_t length) |
Writes a number of bytes to uart channel. txCallback function will be used to notify when the transmission is finished. If hardware flow control is used for transmitting then RTS and DTR pins will be tested during transmission. | |
int | HAL_ReadUart (HAL_UartDescriptor_t *descriptor, uint8_t *buffer, uint8_t length) |
Reads a number of bytes from uart and places them to the buffer. | |
int | HAL_OnUartCts (HAL_UartDescriptor_t *descriptor) |
Forbids the host to transmit data. Only UART_CHANNEL_1 can be used for hardware flow control. | |
int | HAL_OffUartCts (HAL_UartDescriptor_t *descriptor) |
Allows the host to transmit data. Only UART_CHANNEL_1 can be used for hardware flow control. | |
int | HAL_ReadUartRts (HAL_UartDescriptor_t *descriptor) |
Reads RTS pin state. | |
int | HAL_ReadUartDtr (HAL_UartDescriptor_t *descriptor) |
Reads DTR pin state. | |
int | HAL_IsTxEmpty (HAL_UartDescriptor_t *descriptor) |
Checks the status of tx buffer. | |
void | HAL_EnableDtrWakeUp (void) |
Enables DTR wake up. | |
void | HAL_DisableDtrWakeUp (void) |
Disables DTR wake up. |
Definition in file uart.h.
int HAL_CloseUart | ( | HAL_UartDescriptor_t * | descriptor | ) |
Releases the uart channel and pins, if hardware flow control was used.
[in] | descriptor | - pointer to HAL_UartDescriptor_t structure |
void HAL_DisableDtrWakeUp | ( | void | ) |
Disables DTR wake up.
void HAL_EnableDtrWakeUp | ( | void | ) |
Enables DTR wake up.
int HAL_IsTxEmpty | ( | HAL_UartDescriptor_t * | descriptor | ) |
Checks the status of tx buffer.
[in] | descriptor | - pointer to HAL_UartDescriptor_t structure; |
int HAL_OffUartCts | ( | HAL_UartDescriptor_t * | descriptor | ) |
Allows the host to transmit data. Only UART_CHANNEL_1 can be used for hardware flow control.
[in] | descriptor | - pointer to HAL_UartDescriptor_t structure; |
int HAL_OnUartCts | ( | HAL_UartDescriptor_t * | descriptor | ) |
Forbids the host to transmit data. Only UART_CHANNEL_1 can be used for hardware flow control.
[in] | descriptor | - pointer to HAL_UartDescriptor_t structure; |
int HAL_OpenUart | ( | HAL_UartDescriptor_t * | descriptor | ) |
Registers uart's event handlers. Performs configuration of uart registers. Performs configuration of RTS, CTS and DTR pins.
[in] | descriptor | - pointer to HAL_UartDescriptor_t structure |
int HAL_ReadUart | ( | HAL_UartDescriptor_t * | descriptor, | |
uint8_t * | buffer, | |||
uint8_t | length | |||
) |
Reads a number of bytes from uart and places them to the buffer.
[in] | descriptor | - pointer to HAL_UartDescriptor_t structure; |
[in] | buffer | - pointer to the application buffer; |
[in] | length | - number of bytes to be placed to the buffer; |
int HAL_ReadUartDtr | ( | HAL_UartDescriptor_t * | descriptor | ) |
Reads DTR pin state.
[in] | descriptor | - pointer to HAL_UartDescriptor_t structure; |
int HAL_ReadUartRts | ( | HAL_UartDescriptor_t * | descriptor | ) |
Reads RTS pin state.
[in] | descriptor | - pointer to HAL_UartDescriptor_t structure; |
int HAL_WriteUart | ( | HAL_UartDescriptor_t * | descriptor, | |
uint8_t * | buffer, | |||
uint8_t | length | |||
) |
Writes a number of bytes to uart channel. txCallback function will be used to notify when the transmission is finished. If hardware flow control is used for transmitting then RTS and DTR pins will be tested during transmission.
[in] | descriptor | - pointer to HAL_UartDescriptor_t structure; |
[in] | buffer | - pointer to the application data buffer; |
[in] | length | - number of bytes to transfer; |