Add uart for interfacing

This commit is contained in:
BlackMark committed 2020-03-29 01:46:11 +01:00
1 parent 5cde5428e0
commit 100ba9c485
7 files changed
+66

No files matched your search

+9
View File
@@ -0,0 +1,9 @@
[submodule "thermistor/uart"]
path = thermistor/uart
url = git@git.blackmark.me:avr/uart.git
[submodule "thermistor/flash"]
path = thermistor/flash
url = git@git.blackmark.me:avr/flash.git
[submodule "thermistor/io"]
path = thermistor/io
url = git@git.blackmark.me:avr/io.git
+4
View File
@@ -0,0 +1,4 @@
#pragma once
#define F_CPU 16000000
#include <util/delay.h>
+1
Submodule thermistor/flash added at 9245b49e4c.
Submodule
+1
Submodule thermistor/io added at 80de36ee7e.
+17
View File
@@ -1,4 +1,21 @@
#include "clock.hpp"
#include <stdint.h>
#include "flash/flash.hpp"
#include "uart/uart.hpp"
#define UART0_INT_VECTORS
#include "uart/hardware0.hpp"
int main() int main()
{ {
uart::Uart0<> serial;
serial.init();
serial << F("Thermistor reader\r\n");
serial.flushTx();
return 0; return 0;
} }
+33
View File
@@ -176,11 +176,44 @@
</ToolchainSettings> </ToolchainSettings>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Compile Include="clock.hpp">
<SubType>compile</SubType>
</Compile>
<Compile Include="flash\flash.hpp">
<SubType>compile</SubType>
</Compile>
<Compile Include="io\io.hpp">
<SubType>compile</SubType>
</Compile>
<Compile Include="main.cpp"> <Compile Include="main.cpp">
<SubType>compile</SubType> <SubType>compile</SubType>
</Compile> </Compile>
<Compile Include="uart\config.hpp">
<SubType>compile</SubType>
</Compile>
<Compile Include="uart\hardware.hpp">
<SubType>compile</SubType>
</Compile>
<Compile Include="uart\hardware0.hpp">
<SubType>compile</SubType>
</Compile>
<Compile Include="uart\hardware1.hpp">
<SubType>compile</SubType>
</Compile>
<Compile Include="uart\software.hpp">
<SubType>compile</SubType>
</Compile>
<Compile Include="uart\uart.hpp">
<SubType>compile</SubType>
</Compile>
<Compile Include="uart\utils.hpp">
<SubType>compile</SubType>
</Compile>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Folder Include="flash" />
<Folder Include="io" />
<Folder Include="uart" />
</ItemGroup> </ItemGroup>
<Import Project="$(AVRSTUDIO_EXE_PATH)\\Vs\\Compiler.targets" /> <Import Project="$(AVRSTUDIO_EXE_PATH)\\Vs\\Compiler.targets" />
</Project> </Project>
+1
Submodule thermistor/uart added at cb436b11a8.