From c74f1afcac2319053fbd1645329d9f17be07931d Mon Sep 17 00:00:00 2001 From: BlackMark Date: Mon, 5 Aug 2019 19:43:00 +0200 Subject: [PATCH] Adapted to c++ clock header --- uart/{clock.h => clock.hpp} | 0 uart/main.cpp | 3 +- uart/uart | 2 +- uart/uart.cppproj | 110 ++++++++++++++++++------------------ 4 files changed, 58 insertions(+), 57 deletions(-) rename uart/{clock.h => clock.hpp} (100%) diff --git a/uart/clock.h b/uart/clock.hpp similarity index 100% rename from uart/clock.h rename to uart/clock.hpp diff --git a/uart/main.cpp b/uart/main.cpp index bfbc275..2874a2a 100644 --- a/uart/main.cpp +++ b/uart/main.cpp @@ -1,4 +1,4 @@ -#include "clock.h" +#include "clock.hpp" #include @@ -185,6 +185,7 @@ void spiTest() spi::spi uartSpi; } */ + static inline void initUart(const uint32_t baudRate) { UBRR1 = static_cast((F_CPU + 8 * baudRate) / (16 * baudRate) - 1); diff --git a/uart/uart b/uart/uart index 8153696..87e6936 160000 --- a/uart/uart +++ b/uart/uart @@ -1 +1 @@ -Subproject commit 8153696309a72ee551a37b17e4eb8ddcda62d0de +Subproject commit 87e693605143d019f1f6eb7b5ca40d914765c2e0 diff --git a/uart/uart.cppproj b/uart/uart.cppproj index 099b2b9..c89992a 100644 --- a/uart/uart.cppproj +++ b/uart/uart.cppproj @@ -144,64 +144,64 @@ - -mmcu=atmega1284p -B "%24(PackRepoDir)\Atmel\ATmega_DFP\1.3.300\gcc\dev\atmega1284p" - True - True - True - True - True - False - True - True - - - DEBUG - - - - - %24(PackRepoDir)\Atmel\ATmega_DFP\1.3.300\include - - - Optimize (-O1) - True - True - Default (-g2) - True - True - True - - - DEBUG - - - - - %24(PackRepoDir)\Atmel\ATmega_DFP\1.3.300\include - - - True - True - Maximum (-g3) - True - True - -Wextra -std=c++17 - - - libm - - - - - %24(PackRepoDir)\Atmel\ATmega_DFP\1.3.300\include - - - Default (-Wa,-g) - + -mmcu=atmega1284p -B "%24(PackRepoDir)\Atmel\ATmega_DFP\1.3.300\gcc\dev\atmega1284p" + True + True + True + True + True + False + True + True + + + DEBUG + + + + + %24(PackRepoDir)\Atmel\ATmega_DFP\1.3.300\include + + + Optimize (-O1) + True + True + Default (-g2) + True + True + True + + + DEBUG + + + + + %24(PackRepoDir)\Atmel\ATmega_DFP\1.3.300\include + + + True + True + Maximum (-g3) + True + True + -Wextra -std=c++17 + + + libm + + + + + %24(PackRepoDir)\Atmel\ATmega_DFP\1.3.300\include + + + Default (-Wa,-g) + - + compile