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 for avr. | |
int | HAL_OffUartCts (HAL_UartDescriptor_t *descriptor) |
Allows the host to transmit data. Only UART_CHANNEL_1 can be used for hardware flow control for avr. | |
int | HAL_ReadUartRts (HAL_UartDescriptor_t *descriptor) |
Reads RTS pin state. Only UART_CHANNEL_1 can be used for hardware flow control for avr. | |
int | HAL_ReadUartDtr (HAL_UartDescriptor_t *descriptor) |
Reads DTR pin state. Only UART_CHANNEL_1 can be used for hardware flow control for avr. | |
int | HAL_IsTxEmpty (HAL_UartDescriptor_t *descriptor) |
Checks the status of tx buffer. |
Copyright (c) 2008 , Atmel Corporation. All rights reserved. Licensed under Atmel's Limited License Agreement (BitCloudTM).
Definition in file uart.h.
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_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 |
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; |
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_OnUartCts | ( | HAL_UartDescriptor_t * | descriptor | ) |
Forbids the host to transmit data. Only UART_CHANNEL_1 can be used for hardware flow control for avr.
[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 for avr.
[in] | descriptor | - pointer to HAL_UartDescriptor_t structure; |
int HAL_ReadUartRts | ( | HAL_UartDescriptor_t * | descriptor | ) |
Reads RTS pin state. Only UART_CHANNEL_1 can be used for hardware flow control for avr.
[in] | descriptor | - pointer to HAL_UartDescriptor_t structure; |
int HAL_ReadUartDtr | ( | HAL_UartDescriptor_t * | descriptor | ) |
Reads DTR pin state. Only UART_CHANNEL_1 can be used for hardware flow control for avr.
[in] | descriptor | - pointer to HAL_UartDescriptor_t structure; |
int HAL_IsTxEmpty | ( | HAL_UartDescriptor_t * | descriptor | ) |
Checks the status of tx buffer.
[in] | descriptor | - pointer to HAL_UartDescriptor_t structure; |