Go to the documentation of this file.
42 #ifndef __RS232_AT90USB1287__
43 #define __RS232_AT90USB1287__
53 #define RS232_PORT_0 0
58 #if (F_CPU == 16000000UL)
61 #define USART_BAUD_2400 416
62 #define USART_BAUD_4800 207
63 #define USART_BAUD_9600 103
64 #define USART_BAUD_14400 68
65 #define USART_BAUD_19200 51
66 #define USART_BAUD_28800 34
67 #define USART_BAUD_38400 25
68 #define USART_BAUD_57600 16
69 #define USART_BAUD_76800 12
70 #define USART_BAUD_115200 8
71 #define USART_BAUD_230400 3
72 #define USART_BAUD_250000 3
73 #define USART_BAUD_500000 1
74 #define USART_BAUD_1000000 0
75 #elif (F_CPU == 8000000UL)
77 #define USART_BAUD_2400 207
78 #define USART_BAUD_4800 103
79 #define USART_BAUD_9600 51
80 #define USART_BAUD_14400 34
81 #define USART_BAUD_19200 25
82 #define USART_BAUD_28800 16
83 #define USART_BAUD_38400 12
84 #define USART_BAUD_57600 8
85 #define USART_BAUD_76800 6
86 #define USART_BAUD_115200 3
87 #define USART_BAUD_230400 1
88 #define USART_BAUD_250000 1
89 #define USART_BAUD_500000 0
91 #error "Please define the baud rates for your CPU clock: ATmega128 handbook p. \
92 195-198 or set the rate in contiki-conf.h"
99 #define USART_INTERRUPT_RX_COMPLETE _BV (RXCIE1)
100 #define USART_INTERRUPT_TX_COMPLETE _BV (TXCIE1)
101 #define USART_INTERRUPT_DATA_REG_EMPTY _BV (UDRIE1)
106 #define USART_RECEIVER_ENABLE _BV (RXEN1)
107 #define USART_TRANSMITTER_ENABLE _BV (TXEN1)
112 #define USART_MODE_ASYNC 0x00
113 #define USART_MODE_SYNC _BV (UMSEL00)
118 #define USART_PARITY_NONE 0x00
119 #define USART_PARITY_EVEN _BV (UPM01)
120 #define USART_PARITY_ODD _BV (UPM01) | _BV (UPM00)
125 #define USART_STOP_BITS_1 0x00
126 #define USART_STOP_BITS_2 _BV (USBS)
131 #define USART_DATA_BITS_5 0x00
132 #define USART_DATA_BITS_6 _BV (UCSZ10)
133 #define USART_DATA_BITS_7 _BV (UCSZ11)
134 #define USART_DATA_BITS_8 _BV (UCSZ11) | _BV (UCSZ10)
140 #define USART_RISING_XCKN_EDGE 0x00
141 #define USART_FALLING_XCKN_EDGE _BV (UCPOL0)