AVR Z-LINKŪ


usart.h

Go to the documentation of this file.
00001 /* This file has been prepared for Doxygen automatic documentation generation.*/
00024 #ifndef UART_H
00025 #define UART_H
00026 
00027 /* === Includes ============================================================ */
00028 #include<stdbool.h>
00029 #include<stdint.h>
00030 
00031 #include "compiler.h" 
00032 
00033 
00034 /* ==== Macros ============================================================= */
00035 #define ENABLE_RECEIVER  ( UCSR0B |= ( 1 << RXEN0 ) ) 
00036 #define DISABLE_RECEIVER ( UCSR0B &= ~( 1 << RXEN0 ) ) 
00038 #define ENABLE_TRANSMITTER  ( UCSR0B |= ( 1 << TXEN0 ) ) 
00039 #define DISABLE_TRANSMITTER ( UCSR0B &= ~( 1 << TXEN0 ) ) 
00041 #define ENABLE_RECEIVE_COMPLETE_INTERRUPT  ( UCSR0B |= ( 1 << RXCIE0 ) ) 
00042 #define DISABLE_RECEIVE_COMPLETE_INTERRUPT ( UCSR0B &= ~( 1 << RXCIE0 ) ) 
00043 /* === Typedefs ============================================================ */
00044 
00052 typedef enum{
00053   
00054   BR_9600  = 0x33, 
00055   BR_19200 = 0x19, 
00056   BR_38400 = 0x0C  
00057 }baudRate_t;
00058 /* === Static Variables ==================================================== */
00059 /* === Prototypes ========================================================== */
00060 void uartInitialization( const baudRate_t rate ); 
00061 void uartSendSymbol( const uint8_t symbol );
00062 #endif
@DOC_TITLE@
Generated on Sat Dec 2 16:05:51 2006 for AVR414 User's Guide - ATAVRRZ502 - Accessory Kit by doxygen 1.4.7