From 171aa72b2e7debdba3c115a84bcbc65f8d5fda75 Mon Sep 17 00:00:00 2001 From: BlackMark Date: Fri, 26 Jul 2019 13:55:35 +0200 Subject: [PATCH] Removed old example --- inout/clock.h | 14 ----- inout/main.cpp | 56 ------------------ inout.atsln => io.atsln | 2 +- inout/inout.cppproj => io/io.cppproj | 87 +++++++++++++--------------- io/main.cpp | 18 ++++++ 5 files changed, 58 insertions(+), 119 deletions(-) delete mode 100644 inout/clock.h delete mode 100644 inout/main.cpp rename inout.atsln => io.atsln (86%) rename inout/inout.cppproj => io/io.cppproj (76%) create mode 100644 io/main.cpp diff --git a/inout/clock.h b/inout/clock.h deleted file mode 100644 index 4b8cbff..0000000 --- a/inout/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 20000000 - -#include - -#endif \ No newline at end of file diff --git a/inout/main.cpp b/inout/main.cpp deleted file mode 100644 index 3832d35..0000000 --- a/inout/main.cpp +++ /dev/null @@ -1,56 +0,0 @@ -/* -* Copyright (c) by BlackMark 2015-2018 -* Date 26/04/2018 -* Version 1.5 -*/ - -#include "clock.h" -#include "inout/inout.h" - -int main() -{ - InOutPin::direction( InOut::Dir::OUT ); - InOutPin::write( true ); - _delay_ms( 3000 ); - InOutPin::write( false ); - _delay_ms( 3000 ); - - InOutPin cLED; - cLED.direction( InOut::Dir::OUT ); - cLED.write( false ); - - while( true ) - { - for( uint8_t i = 0; i < 3; ++i ) - { - cLED.write( true ); - _delay_ms( 100 ); - cLED.write( false ); - _delay_ms( 100 ); - } - - _delay_ms( 300 ); - - for( uint8_t i = 0; i < 3; ++i ) - { - cLED.write( true ); - _delay_ms( 300 ); - cLED.write( false ); - _delay_ms( 300 ); - } - - _delay_ms( 100 ); - - for( uint8_t i = 0; i < 3; ++i ) - { - cLED.write( true ); - _delay_ms( 100 ); - cLED.write( false ); - _delay_ms( 100 ); - } - - _delay_ms( 1000 ); - } - - return 0; -} \ No newline at end of file diff --git a/inout.atsln b/io.atsln similarity index 86% rename from inout.atsln rename to io.atsln index 7efe3e3..332cd5f 100644 --- a/inout.atsln +++ b/io.atsln @@ -3,7 +3,7 @@ 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}") = "inout", "inout\inout.cppproj", "{DCE6C7E3-EE26-4D79-826B-08594B9AD897}" +Project("{E66E83B9-2572-4076-B26E-6BE79FF3018A}") = "io", "io\io.cppproj", "{DCE6C7E3-EE26-4D79-826B-08594B9AD897}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution diff --git a/inout/inout.cppproj b/io/io.cppproj similarity index 76% rename from inout/inout.cppproj rename to io/io.cppproj index fa22c6f..766f691 100644 --- a/inout/inout.cppproj +++ b/io/io.cppproj @@ -12,9 +12,9 @@ $(MSBuildProjectName) .elf $(MSBuildProjectDirectory)\$(Configuration) - inout - inout - inout + io + io + io Native true false @@ -25,44 +25,45 @@ true exception_table 2 + 0 0 - - - - - - - - - - - - - com.atmel.avrdbg.tool.stk500 - + + com.atmel.avrdbg.tool.jtagicemkii + 070000004699 0x1E950F - + - 1843200 + 125000 ISP - com.atmel.avrdbg.tool.stk500 - - - STK500 - + com.atmel.avrdbg.tool.jtagicemkii + 070000004699 + JTAGICE mkII + ISP - 1843200 - 0 - + 125000 + + + + \Debug\io.lss + + + .lss + ^\s*(?<address>[a-f0-9]*):\s*.*$ + true + address + $pc + + + + - -mmcu=atmega328p -B "%24(PackRepoDir)\Atmel\ATmega_DFP\1.0.91\gcc\dev\atmega328p" - True + -mmcu=atmega328p -B "%24(PackRepoDir)\Atmel\ATmega_DFP\1.3.300\gcc\dev\atmega328p" True True True @@ -70,32 +71,31 @@ False True True - %24(PackRepoDir)\Atmel\ATmega_DFP\1.0.91\include + %24(PackRepoDir)\Atmel\ATmega_DFP\1.3.300\include True True True True True - %24(PackRepoDir)\Atmel\ATmega_DFP\1.0.91\include + %24(PackRepoDir)\Atmel\ATmega_DFP\1.3.300\include True True True True - -Wextra -std=c++14 + -Wextra -std=c++17 libm + %24(PackRepoDir)\Atmel\ATmega_DFP\1.3.300\include NDEBUG Optimize for size (-Os) NDEBUG Optimize for size (-Os) - echo "C:\bin\avrdude-6.3" -v -p$(avrdevice) %%* -Uflash:w:"$(OutputDirectory)\$(Name).hex":i > "$(MSBuildProjectDirectory)\avrdude.bat" - -mmcu=atmega328p -B "%24(PackRepoDir)\Atmel\ATmega_DFP\1.0.91\gcc\dev\atmega328p" - True + -mmcu=atmega328p -B "%24(PackRepoDir)\Atmel\ATmega_DFP\1.3.300\gcc\dev\atmega328p" True True True @@ -103,19 +103,20 @@ False True True - %24(PackRepoDir)\Atmel\ATmega_DFP\1.0.91\include + %24(PackRepoDir)\Atmel\ATmega_DFP\1.3.300\include True True True True True - %24(PackRepoDir)\Atmel\ATmega_DFP\1.0.91\include + %24(PackRepoDir)\Atmel\ATmega_DFP\1.3.300\include True True True True - -Wextra -std=c++14 + -Wextra -std=c++17 libm + %24(PackRepoDir)\Atmel\ATmega_DFP\1.3.300\include DEBUG Optimize (-O1) Default (-g2) @@ -125,21 +126,11 @@ Default (-Wa,-g) - echo "C:\bin\avrdude-6.3" -v -p$(avrdevice) %%* -Uflash:w:"$(OutputDirectory)\$(Name).hex":i > "$(MSBuildProjectDirectory)\avrdude.bat" - - compile - - - compile - compile - - - \ No newline at end of file diff --git a/io/main.cpp b/io/main.cpp new file mode 100644 index 0000000..5802d9c --- /dev/null +++ b/io/main.cpp @@ -0,0 +1,18 @@ +/* + * io.cpp + * + * Created: 26/07/2019 01:50:19 PM + * Author : BlackMark + */ + +#include + +int main(void) +{ + DDRB = (1 << PB5); + PORTB |= (1 << PB5); + + /* Replace with your application code */ + while (1) { + } +}