- Main Page
- Modules
- Data Structures
- Files
- Related Pages

# uart_drv.h File Reference

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

## Defines
#define | MSK_UART_5BIT 0x00
#define | MSK_UART_6BIT 0x02
#define | MSK_UART_7BIT 0x04
#define | MSK_UART_8BIT 0x06
#define | MSK_UART_9BIT 0x06
#define | MSK_UART_RX_DONE 0x80
#define | MSK_UART_TX_COMPLET 0x40
#define | MSK_UART_DRE 0x20
#define | MSK_UART_ENABLE_IT_RX 0x80
#define | MSK_UART_ENABLE_IT_TX 0x40
#define | MSK_UART_ENABLE_RX 0x10
#define | MSK_UART_ENABLE_TX 0x08
#define | MSK_UART_TX_BIT9 0x01
#define | MSK_UART_RX_BIT9 0x02
#define | Uart_hw_init(config) (UCSRC=config)
#define | Uart_enable() (UCSRB|=MSK_UART_ENABLE_RX|MSK_UART_ENABLE_TX)
#define | Uart_tx_ready() (UCSRA&MSK_UART_DRE)
#define | Uart_set_tx_busy()
#define | Uart_send_byte(ch) (UDR=ch)
#define | Uart_rx_ready() (UCSRA&MSK_UART_RX_DONE)
#define | Uart_get_byte() (UDR)
#define | Uart_ack_rx_byte()
#define | Uart_enable_it_rx() (UCSRB|=MSK_UART_ENABLE_IT_RX)
#define | Uart_enable_it_tx() (UCSRB|=MSK_UART_ENABLE_IT_TX)
#define | Uart_disable_it_rx() (UCSRB&=~MSK_UART_ENABLE_IT_RX)

## Detailed Description

Uart driver - Compiler: IAR EWAVR and GNU GCC for AVR

- Supported devices: AT90USB1287, AT90USB1286, AT90USB647, AT90USB646
  Author:
    Atmel Corporation: http://www.atmel.com
    Support and FAQ: http://support.atmel.no/

Definition in file uart_drv.h.

## Define Documentation

#define MSK_UART_5BIT 0x00

Definition at line 44 of file uart_drv.h.

#define MSK_UART_6BIT 0x02

Definition at line 45 of file uart_drv.h.

#define MSK_UART_7BIT 0x04

Definition at line 46 of file uart_drv.h.

#define MSK_UART_8BIT 0x06

Definition at line 47 of file uart_drv.h.

#define MSK_UART_9BIT 0x06

Definition at line 48 of file uart_drv.h.

#define MSK_UART_RX_DONE 0x80

Definition at line 50 of file uart_drv.h.

#define MSK_UART_TX_COMPLET 0x40

Definition at line 51 of file uart_drv.h.

#define MSK_UART_DRE 0x20

Definition at line 52 of file uart_drv.h.

#define MSK_UART_ENABLE_IT_RX 0x80

Definition at line 54 of file uart_drv.h.

#define MSK_UART_ENABLE_IT_TX 0x40

Definition at line 55 of file uart_drv.h.

#define MSK_UART_ENABLE_RX 0x10

Definition at line 56 of file uart_drv.h.

#define MSK_UART_ENABLE_TX 0x08

Definition at line 57 of file uart_drv.h.

#define MSK_UART_TX_BIT9 0x01

Definition at line 58 of file uart_drv.h.

#define MSK_UART_RX_BIT9 0x02

Definition at line 59 of file uart_drv.h.

#define Uart_hw_init | ( | config |  | ) | (UCSRC=config)

Definition at line 82 of file uart_drv.h.

Referenced by uart_init().

#define Uart_enable | ( |  | ) | (UCSRB|=MSK_UART_ENABLE_RX|MSK_UART_ENABLE_TX)

Definition at line 83 of file uart_drv.h.

Referenced by uart_init().

#define Uart_tx_ready | ( |  | ) | (UCSRA&MSK_UART_DRE)

Definition at line 84 of file uart_drv.h.

Referenced by uart_putchar().

#define Uart_set_tx_busy | ( |  | ) |

Definition at line 85 of file uart_drv.h.

Referenced by uart_putchar().

#define Uart_send_byte | ( | ch |  | ) | (UDR=ch)

Definition at line 86 of file uart_drv.h.

Referenced by uart_putchar().

#define Uart_rx_ready | ( |  | ) | (UCSRA&MSK_UART_RX_DONE)

Definition at line 87 of file uart_drv.h.

Referenced by uart_getchar(), and uart_test_hit().

#define Uart_get_byte | ( |  | ) | (UDR)

Definition at line 88 of file uart_drv.h.

Referenced by uart_getchar().

#define Uart_ack_rx_byte | ( |  | ) |

Definition at line 89 of file uart_drv.h.

Referenced by uart_getchar().

#define Uart_enable_it_rx | ( |  | ) | (UCSRB|=MSK_UART_ENABLE_IT_RX)

Definition at line 91 of file uart_drv.h.

#define Uart_enable_it_tx | ( |  | ) | (UCSRB|=MSK_UART_ENABLE_IT_TX)

Definition at line 92 of file uart_drv.h.

#define Uart_disable_it_rx | ( |  | ) | (UCSRB&=~MSK_UART_ENABLE_IT_RX)

Definition at line 93 of file uart_drv.h.