diff --git a/usart/Clock.h b/usart/clock.h similarity index 100% rename from usart/Clock.h rename to usart/clock.h diff --git a/usart/main.cpp b/usart/main.cpp index a33559a..d4cac5a 100644 --- a/usart/main.cpp +++ b/usart/main.cpp @@ -5,7 +5,7 @@ */ #include -#include "Clock.h" +#include "clock.h" #include "usart.h" int main() @@ -32,7 +32,7 @@ int main() cUSART << "sizeof( void* ) = " << sizeof( void* ) << "\r\n"; cUSART << "sizeof( unsigned char* ) = " << sizeof( unsigned char* ) << "\r\n"; cUSART << "sizeof( unsigned int* ) = " << sizeof( unsigned int* ) << "\r\n\r\n"; - + while( true ) { cUSART << "This has been running for \"" << ui32Counter++ << "\" seconds!\r\n\r\n"; @@ -41,7 +41,7 @@ int main() int iNumber; cUSART >> iNumber; - + cUSART << "\r\nYou entered: " << iNumber << "\r\n\r\n"; cUSART << "Please enter a decimal number: "; @@ -53,9 +53,9 @@ int main() unsigned char uchByte; cUSART.receiveByte( uchByte, 1000 ); - + _delay_ms( 1000 ); } - + return 0; -} \ No newline at end of file +} diff --git a/usart/usart.h b/usart/usart.h index b666ff3..20f1029 100644 --- a/usart/usart.h +++ b/usart/usart.h @@ -12,7 +12,7 @@ #include #include #include -#include "Clock.h" +#include "clock.h" #include "string/string.h" #include "vector/vector.h" @@ -68,20 +68,20 @@ public: MASTERSPI = 2 #endif }; - + enum class Parity { DISABLED = 0, ODD = 1, EVEN = 2 }; - + enum class StopBit { ONE = 1, TWO = 2 }; - + protected: volatile uint8_t *m_vui8pUCSRA; volatile uint8_t *m_vui8pUCSRB; @@ -106,13 +106,13 @@ private: public: USART0(); ~USART0(); - + void init( uint32_t ui32BaudRate = 9600, uint8_t ui8DataBits = 8, Parity enmParity = Parity::DISABLED, StopBit enmStopBits = StopBit::ONE, Mode enmMode = Mode::ASYNCHRONOUS ); - + bool receiveByte( unsigned char &chData, uint32_t ui32DelayMS ); unsigned char receiveByte(); string receiveLine( string strLineTerminator = "\r\n", size_t sizeMaxSize = 1024 ); - + void receive( char &chReceived ); void receive( unsigned char &uchReceived ); void receive( short int &shiReceived ); @@ -126,10 +126,10 @@ public: void receive( float &fReceived ); void receive( double &dReceived ); void receive( long double &ldReceived ); - + void transmitByte( unsigned char byteData ); void transmit( string strData ); - + void transmit( char chData ); void transmit( unsigned char uchData ); void transmit( short int shiData ); @@ -143,7 +143,7 @@ public: void transmit( float fData ); void transmit( double dData ); void transmit( long double ldData ); - + ////////////////////////////////////////////////////////////////////////// template USART0& operator<<( const T &RHS ) @@ -151,7 +151,7 @@ public: transmit( RHS ); return *this; } - + ////////////////////////////////////////////////////////////////////////// template USART0& operator>>( T &RHS ) @@ -172,4 +172,4 @@ public: #endif -#endif \ No newline at end of file +#endif