Add uart for interfacing
This commit is contained in:
parent
5cde5428e0
commit
100ba9c485
9
.gitmodules
vendored
Normal file
9
.gitmodules
vendored
Normal 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
thermistor/clock.hpp
Normal file
4
thermistor/clock.hpp
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#define F_CPU 16000000
|
||||||
|
#include <util/delay.h>
|
1
thermistor/flash
Submodule
1
thermistor/flash
Submodule
@ -0,0 +1 @@
|
|||||||
|
Subproject commit 9245b49e4c981098ca966343f396f5064f762fb5
|
1
thermistor/io
Submodule
1
thermistor/io
Submodule
@ -0,0 +1 @@
|
|||||||
|
Subproject commit 80de36ee7ee3e6b0842d5eaee81d54062cb496b2
|
@ -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;
|
||||||
}
|
}
|
||||||
|
@ -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
thermistor/uart
Submodule
1
thermistor/uart
Submodule
@ -0,0 +1 @@
|
|||||||
|
Subproject commit cb436b11a8428c2c40a11b51fedb4d2c7d38ece7
|
Loading…
Reference in New Issue
Block a user