diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 3e5b64f..0000000 --- a/.gitattributes +++ /dev/null @@ -1,9 +0,0 @@ -*.h eol=lf -*.hpp eol=lf -*.c eol=lf -*.cpp eol=lf -.git* eol=lf -*.vcxproj* eol=crlf -*.cppproj eol=crlf -*.sln eol=crlf -*.atsln eol=crlf diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 38e936d..0000000 --- a/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -.vs -Release -Debug -*.componentinfo.xml -avrdude.bat diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index c7e0c08..0000000 --- a/.gitmodules +++ /dev/null @@ -1,3 +0,0 @@ -[submodule "usart/array"] - path = usart/array - url = git@blackmark.me:array.git diff --git a/usart.atsln b/usart.atsln deleted file mode 100644 index 3981c17..0000000 --- a/usart.atsln +++ /dev/null @@ -1,22 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Atmel Studio Solution File, Format Version 11.00 -VisualStudioVersion = 14.0.23107.0 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{E66E83B9-2572-4076-B26E-6BE79FF3018A}") = "usart", "usart\usart.cppproj", "{DCE6C7E3-EE26-4D79-826B-08594B9AD897}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|AVR = Debug|AVR - Release|AVR = Release|AVR - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {DCE6C7E3-EE26-4D79-826B-08594B9AD897}.Debug|AVR.ActiveCfg = Debug|AVR - {DCE6C7E3-EE26-4D79-826B-08594B9AD897}.Debug|AVR.Build.0 = Debug|AVR - {DCE6C7E3-EE26-4D79-826B-08594B9AD897}.Release|AVR.ActiveCfg = Release|AVR - {DCE6C7E3-EE26-4D79-826B-08594B9AD897}.Release|AVR.Build.0 = Release|AVR - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/usart/usart.cpp b/usart.cpp similarity index 100% rename from usart/usart.cpp rename to usart.cpp diff --git a/usart/usart.h b/usart.h similarity index 99% rename from usart/usart.h rename to usart.h index 1e0b1bb..485347c 100644 --- a/usart/usart.h +++ b/usart.h @@ -11,7 +11,7 @@ #include #include #include -#include "clock.h" +#include "../clock.h" #if defined (__AVR_ATmega168A__) || defined (__AVR_ATmega328P__) || defined (__AVR_ATmega644P__) || defined (__AVR_ATmega1284P__) #define USART_SPI diff --git a/usart/array b/usart/array deleted file mode 160000 index 634564a..0000000 --- a/usart/array +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 634564a7bb6f34305dbc6f68993a34a4419899a6 diff --git a/usart/clock.h b/usart/clock.h deleted file mode 100644 index a04b5ea..0000000 --- a/usart/clock.h +++ /dev/null @@ -1,14 +0,0 @@ -/* -* Copyright (c) by BlackMark 2015 -* Date 24/11/2015 -* Version 1.1 -*/ - -#ifndef CLOCK_H -#define CLOCK_H - -#define F_CPU 8000000 - -#include - -#endif \ No newline at end of file diff --git a/usart/main.cpp b/usart/main.cpp deleted file mode 100644 index 4b47263..0000000 --- a/usart/main.cpp +++ /dev/null @@ -1,92 +0,0 @@ -/* -* Copyright (c) by BlackMark 2015-2016 -* Date 21/05/2016 -* Version 1.5 -*/ - -#include -#include "clock.h" -#include "usart.h" -#include "array/array.h" - -int main() -{ - sei(); - USART0 &cUSART = USART0::inst(); - cUSART.init(); - - uint32_t ui32Counter = 0; - - array arrBuffer; - - cUSART << "\r\nSizes: \r\n"; - - sprintf( arrBuffer.data(), "%d\r\n", sizeof( char ) ); - cUSART << "sizeof( char ) = " << arrBuffer.data(); - - sprintf( arrBuffer.data(), "%d\r\n", sizeof( unsigned char ) ); - cUSART << "sizeof( unsigned char ) = " << arrBuffer.data(); - - sprintf( arrBuffer.data(), "%d\r\n", sizeof( short int ) ); - cUSART << "sizeof( short int ) = " << arrBuffer.data(); - - sprintf( arrBuffer.data(), "%d\r\n", sizeof( unsigned short int ) ); - cUSART << "sizeof( unsigned short int ) = " << arrBuffer.data(); - - sprintf( arrBuffer.data(), "%d\r\n", sizeof( int ) ); - cUSART << "sizeof( int ) = " << arrBuffer.data(); - - sprintf( arrBuffer.data(), "%d\r\n", sizeof( unsigned int ) ); - cUSART << "sizeof( unsigned int ) = " << arrBuffer.data(); - - sprintf( arrBuffer.data(), "%d\r\n", sizeof( long int ) ); - cUSART << "sizeof( long int ) = " << arrBuffer.data(); - - sprintf( arrBuffer.data(), "%d\r\n", sizeof( unsigned long int ) ); - cUSART << "sizeof( unsigned long int ) = " << arrBuffer.data(); - - sprintf( arrBuffer.data(), "%d\r\n", sizeof( long long int ) ); - cUSART << "sizeof( long long int ) = " << arrBuffer.data(); - - sprintf( arrBuffer.data(), "%d\r\n", sizeof( unsigned long long int ) ); - cUSART << "sizeof( unsigned long long int ) = " << arrBuffer.data(); - - sprintf( arrBuffer.data(), "%d\r\n", sizeof( float ) ); - cUSART << "sizeof( float ) = " << arrBuffer.data(); - - sprintf( arrBuffer.data(), "%d\r\n", sizeof( double ) ); - cUSART << "sizeof( double ) = " << arrBuffer.data(); - - sprintf( arrBuffer.data(), "%d\r\n", sizeof( long double ) ); - cUSART << "sizeof( long double ) = " << arrBuffer.data(); - - sprintf( arrBuffer.data(), "%d\r\n\r\n", sizeof( void* ) ); - cUSART << "sizeof( void* ) = " << arrBuffer.data(); - - while( true ) - { - sprintf( arrBuffer.data(), "%lu", ui32Counter++ ); - cUSART << "This has been running for \"" << arrBuffer.data() << "\" seconds!\r\n"; - - if( !cUSART.receiveLine( arrBuffer.data(), arrBuffer.size(), "\r" ) ) - { - cUSART << "Receive error: "; - } - else - { - cUSART << "Echo: "; - } - - cUSART << arrBuffer.data() << "\r\n"; - - uint8_t ui8Byte; - - if( cUSART.receiveByte( ui8Byte, 1000 ) ) - { - cUSART.transmitByte( ui8Byte ); - cUSART << "\r\n"; - } - } - - return 0; -} \ No newline at end of file diff --git a/usart/usart.cppproj b/usart/usart.cppproj deleted file mode 100644 index 2021324..0000000 --- a/usart/usart.cppproj +++ /dev/null @@ -1,215 +0,0 @@ - - - - 2.0 - 7.0 - com.Atmel.AVRGCC8.CPP - dce6c7e3-ee26-4d79-826b-08594b9ad897 - ATmega328P - none - Executable - CPP - $(MSBuildProjectName) - .elf - $(MSBuildProjectDirectory)\$(Configuration) - usart - usart - usart - Native - true - false - true - true - 0x20000000 - - true - exception_table - 2 - 0 - - - - - - - - - - - - - com.atmel.avrdbg.tool.stk500 - - 0x1E950F - - - - 1843200 - - ISP - - com.atmel.avrdbg.tool.stk500 - - - STK500 - - ISP - 1843200 - - - - - - - - com.atmel.avrdbg.tool.simulator - - - Simulator - - - - - - -mmcu=atmega328p -B "%24(PackRepoDir)\atmel\ATmega_DFP\1.0.106\gcc\dev\atmega328p" - True - True - True - True - True - False - True - True - - - %24(PackRepoDir)\atmel\ATmega_DFP\1.0.106\include - - - True - True - True - True - True - - - %24(PackRepoDir)\atmel\ATmega_DFP\1.0.106\include - - - True - True - True - True - -Wextra -std=c++11 - True - - - libm - libprintf_flt - - - - - %24(PackRepoDir)\atmel\ATmega_DFP\1.0.106\include - - - - - NDEBUG - - - Optimize for size (-Os) - - - NDEBUG - - - Optimize for size (-Os) - - - echo "C:\avrdude-6.2\avrdude.exe" -v -p$(avrdevice) %%* -Uflash:w:"$(OutputDirectory)\$(Name).hex":i > "$(MSBuildProjectDirectory)\avrdude.bat" - - - - - -mmcu=atmega328p -B "%24(PackRepoDir)\atmel\ATmega_DFP\1.0.106\gcc\dev\atmega328p" - True - True - True - True - True - False - True - True - - - %24(PackRepoDir)\atmel\ATmega_DFP\1.0.106\include - - - True - True - True - True - True - - - %24(PackRepoDir)\atmel\ATmega_DFP\1.0.106\include - - - True - True - True - True - -Wextra -std=c++11 - True - - - libm - libprintf_flt - - - - - %24(PackRepoDir)\atmel\ATmega_DFP\1.0.106\include - - - - - DEBUG - - - Optimize (-O1) - Default (-g2) - - - DEBUG - - - Optimize (-O1) - Default (-g2) - Default (-Wa,-g) - - - echo "C:\avrdude-6.2\avrdude.exe" -v -p$(avrdevice) %%* -Uflash:w:"$(OutputDirectory)\$(Name).hex":i > "$(MSBuildProjectDirectory)\avrdude.bat" - - - - compile - - - compile - - - compile - - - compile - - - compile - - - - - - - \ No newline at end of file