Dos2Unix...

This commit is contained in:
klaute 2016-08-23 19:10:37 +02:00
parent 105a43aa5f
commit 3c6bfbfa39
3 changed files with 983 additions and 984 deletions

View file

@ -82,6 +82,7 @@ int main(void)
cc_init(); cc_init();
SET_ERR_MASK(ERRMASK_USB_NOTREADY); SET_ERR_MASK(ERRMASK_USB_NOTREADY);
GlobalInterruptEnable(); GlobalInterruptEnable();
for (;;) for (;;)

View file

@ -41,7 +41,6 @@ LICENSE:
#include <avr/pgmspace.h> #include <avr/pgmspace.h>
#include "uart.h" #include "uart.h"
/* /*
* constants and macros * constants and macros
*/ */
@ -370,7 +369,6 @@ Purpose: called when the UART has received a character
unsigned char usr; unsigned char usr;
unsigned char lastRxError; unsigned char lastRxError;
/* read UART status register and UART data register */ /* read UART status register and UART data register */
usr = UART0_STATUS; usr = UART0_STATUS;
data = UART0_DATA; data = UART0_DATA;
@ -454,7 +452,7 @@ void uart_init(unsigned int baudrate)
#endif #endif
#endif #endif
/* Set baud rate */ // Set baud rate
if ( baudrate & 0x8000 ) if ( baudrate & 0x8000 )
{ {
#if UART0_BIT_U2X #if UART0_BIT_U2X
@ -466,10 +464,10 @@ void uart_init(unsigned int baudrate)
#endif #endif
UART0_UBRRL = (unsigned char) (baudrate&0x00FF); UART0_UBRRL = (unsigned char) (baudrate&0x00FF);
/* Enable USART receiver and transmitter and receive complete interrupt */ // Enable USART receiver and transmitter and receive complete interrupt
UART0_CONTROL = _BV(UART0_BIT_RXCIE)|(1<<UART0_BIT_RXEN)|(1<<UART0_BIT_TXEN); UART0_CONTROL = _BV(UART0_BIT_RXCIE)|(1<<UART0_BIT_RXEN)|(1<<UART0_BIT_TXEN);
/* Set frame format: asynchronous, 8data, no parity, 1stop bit */ // Set frame format: asynchronous, 8data, no parity, 1stop bit
#ifdef UART0_CONTROLC #ifdef UART0_CONTROLC
#ifdef UART0_BIT_URSEL #ifdef UART0_BIT_URSEL
UART0_CONTROLC = (1<<UART0_BIT_URSEL)|(1<<UART0_BIT_UCSZ1)|(1<<UART0_BIT_UCSZ0); UART0_CONTROLC = (1<<UART0_BIT_URSEL)|(1<<UART0_BIT_UCSZ1)|(1<<UART0_BIT_UCSZ0);