Add uart for interfacing
This commit is contained in:
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
Submodule thermistor/flash added at 9245b49e4c
1
thermistor/io
Submodule
1
thermistor/io
Submodule
Submodule thermistor/io added at 80de36ee7e
@@ -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
Submodule thermistor/uart added at cb436b11a8
Reference in New Issue
Block a user