#include #include #include #define BAUD 115200 // define Baud Rate #define USART0_RX_BUFFER_SIZE 32 // define Receive Buffer Size. Size can be 2, 4, 8, 16, 32, 64, 128 or 256 Byte #define USART0_TX_BUFFER_SIZE 64 // define Transmit Buffer Size. Size can be 2, 4, 8, 16, 32, 64, 128 or 256 Byte #define F_CPU 20000000 #include "usart.h" #include const char cmd0[] PROGMEM = "cd /flash2;sh setup.sh\r\n"; const char cmd1[] PROGMEM = "madstream http://rs35.stream24.org:80/stream\r\n"; const char cmd2[] PROGMEM = "madstream http://mp3.webradio.rockantenne.de:80\r\n"; const char cmd3[] PROGMEM = "madstream http://s8.mediastreaming.it:7050\r\n"; const char cmd4[] PROGMEM = "madstream http://alternative.mthn.net:8700\r\n"; const char cmd5[] PROGMEM = "madstream http://rs20.stream24.org:8000/stream\r\n"; const char cmd6[] PROGMEM = "madstream http://rs35.stream24.org:80/stream\r\n"; const char cmd7[] PROGMEM = "madstream http://rs35.stream24.org:80/stream\r\n"; const char cmd8[] PROGMEM = "madstream http://rs35.stream24.org:80/stream\r\n"; /* Static Variables */ static char USART0_RxBuf[USART0_RX_BUFFER_SIZE]; static volatile char USART0_RxHead; static volatile char USART0_RxTail; static char USART0_TxBuf[USART0_TX_BUFFER_SIZE]; static volatile char USART0_TxHead; static volatile char USART0_TxTail; /* Initialize USART */ void usart0_init( void ) { UBRR0L = UBRRL_VALUE; UBRR0H = UBRRH_VALUE; UCSR0B = ( ( 1 << RXCIE0 ) | ( 1 << RXEN0 ) | ( 1 << TXEN0 ) ); #ifdef URSEL UCSRC = (1<