Compare commits

...

3 Commits

6 changed files with 42 additions and 20 deletions

6
.gitmodules vendored
View File

@@ -7,6 +7,6 @@
[submodule "uart/flash"] [submodule "uart/flash"]
path = uart/flash path = uart/flash
url = git@git.blackmark.me:avr/flash.git url = git@git.blackmark.me:avr/flash.git
[submodule "uart/type"] [submodule "uart/util"]
path = uart/type path = uart/util
url = git@git.blackmark.me:avr/type.git url = git@git.blackmark.me:avr/util.git

View File

@@ -8,13 +8,17 @@
#include "io/io.hpp" #include "io/io.hpp"
#include "uart/uart.hpp" #include "uart/uart.hpp"
#define UART0_INT_VECTORS using uart0_interface_t =
#include "uart/hardware0.hpp" uart::Uart<uart::Hardware0<uart::Config<115200>, uart::Driven::INTERRUPT, uart::Mode::ASYNCHRONOUS>>;
using uart1_interface_t = uart::Uart1<>;
REGISTER_UART0_INT_VECTORS(uart0_interface_t);
REGISTER_UART1_INT_VECTORS(uart1_interface_t);
void doubleSpeedTest() void doubleSpeedTest()
{ {
using namespace uart; uart0_interface_t serial;
Uart<Hardware0<Config<115200>, Driven::INTERRUPT, Mode::ASYNCHRONOUS>> serial;
serial.init(); serial.init();
uint8_t counter = 100; uint8_t counter = 100;
@@ -27,6 +31,8 @@ void doubleSpeedTest()
} }
} }
serial << F("\r\n");
serial.flushTx(); serial.flushTx();
} }
@@ -62,9 +68,7 @@ void newUartUsage()
void newUartUsage2() void newUartUsage2()
{ {
using namespace uart; uart1_interface_t serial1;
Uart<Hardware0<Config<115200>, Driven::INTERRUPT>> serial1;
auto ramString = "Hello World from RAM. "; auto ramString = "Hello World from RAM. ";
auto flashString = F("Hello World from flash\r\n"); auto flashString = F("Hello World from flash\r\n");

Submodule uart/type deleted from ce31ef017f

View File

@@ -5,7 +5,7 @@
<ProjectVersion>7.0</ProjectVersion> <ProjectVersion>7.0</ProjectVersion>
<ToolchainName>com.Atmel.AVRGCC8.CPP</ToolchainName> <ToolchainName>com.Atmel.AVRGCC8.CPP</ToolchainName>
<ProjectGuid>dce6c7e3-ee26-4d79-826b-08594b9ad897</ProjectGuid> <ProjectGuid>dce6c7e3-ee26-4d79-826b-08594b9ad897</ProjectGuid>
<avrdevice>ATmega328P</avrdevice> <avrdevice>ATmega1284P</avrdevice>
<avrdeviceseries>none</avrdeviceseries> <avrdeviceseries>none</avrdeviceseries>
<OutputType>Executable</OutputType> <OutputType>Executable</OutputType>
<Language>CPP</Language> <Language>CPP</Language>
@@ -28,7 +28,8 @@
<ResetRule>0</ResetRule> <ResetRule>0</ResetRule>
<eraseonlaunchrule>0</eraseonlaunchrule> <eraseonlaunchrule>0</eraseonlaunchrule>
<EraseKey /> <EraseKey />
<avrtool>com.atmel.avrdbg.tool.atmelice</avrtool> <avrtool>
</avrtool>
<avrtoolserialnumber>J41800099437</avrtoolserialnumber> <avrtoolserialnumber>J41800099437</avrtoolserialnumber>
<avrdeviceexpectedsignature>0x1E950F</avrdeviceexpectedsignature> <avrdeviceexpectedsignature>0x1E950F</avrdeviceexpectedsignature>
<com_atmel_avrdbg_tool_jtagicemkii> <com_atmel_avrdbg_tool_jtagicemkii>
@@ -46,6 +47,17 @@
<avrtoolinterfaceclock>125000</avrtoolinterfaceclock> <avrtoolinterfaceclock>125000</avrtoolinterfaceclock>
<AAFDebugger> <AAFDebugger>
<AAFDebugFiles> <AAFDebugFiles>
<DebugFile>
<path>\Debug\uart.lss</path>
<AAFSetting>
<Label>Lss Files</Label>
<Extention>.lss</Extention>
<Regex>^\s*(?&lt;address&gt;[a-f0-9]*):\s*.*$</Regex>
<DebugEnabled>true</DebugEnabled>
<RegexGroups>address</RegexGroups>
<DebuggerExpression>$pc</DebuggerExpression>
</AAFSetting>
</DebugFile>
</AAFDebugFiles> </AAFDebugFiles>
</AAFDebugger> </AAFDebugger>
<AsfFrameworkConfig> <AsfFrameworkConfig>
@@ -76,7 +88,7 @@
<PropertyGroup Condition=" '$(Configuration)' == 'Release' "> <PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<ToolchainSettings> <ToolchainSettings>
<AvrGccCpp> <AvrGccCpp>
<avrgcc.common.Device>-mmcu=atmega1284p -B "%24(PackRepoDir)\Atmel\ATmega_DFP\1.3.300\gcc\dev\atmega1284p"</avrgcc.common.Device> <avrgcc.common.Device>-mmcu=atmega1284p</avrgcc.common.Device>
<avrgcc.common.optimization.RelaxBranches>True</avrgcc.common.optimization.RelaxBranches> <avrgcc.common.optimization.RelaxBranches>True</avrgcc.common.optimization.RelaxBranches>
<avrgcc.common.outputfiles.hex>True</avrgcc.common.outputfiles.hex> <avrgcc.common.outputfiles.hex>True</avrgcc.common.outputfiles.hex>
<avrgcc.common.outputfiles.lss>True</avrgcc.common.outputfiles.lss> <avrgcc.common.outputfiles.lss>True</avrgcc.common.outputfiles.lss>
@@ -134,7 +146,7 @@
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' "> <PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<ToolchainSettings> <ToolchainSettings>
<AvrGccCpp> <AvrGccCpp>
<avrgcc.common.Device>-mmcu=atmega1284p -B "%24(PackRepoDir)\Atmel\ATmega_DFP\1.3.300\gcc\dev\atmega1284p"</avrgcc.common.Device> <avrgcc.common.Device>-mmcu=atmega1284p</avrgcc.common.Device>
<avrgcc.common.optimization.RelaxBranches>True</avrgcc.common.optimization.RelaxBranches> <avrgcc.common.optimization.RelaxBranches>True</avrgcc.common.optimization.RelaxBranches>
<avrgcc.common.outputfiles.hex>True</avrgcc.common.outputfiles.hex> <avrgcc.common.outputfiles.hex>True</avrgcc.common.outputfiles.hex>
<avrgcc.common.outputfiles.lss>True</avrgcc.common.outputfiles.lss> <avrgcc.common.outputfiles.lss>True</avrgcc.common.outputfiles.lss>
@@ -204,9 +216,6 @@
<Compile Include="main.cpp"> <Compile Include="main.cpp">
<SubType>compile</SubType> <SubType>compile</SubType>
</Compile> </Compile>
<Compile Include="type\type.hpp">
<SubType>compile</SubType>
</Compile>
<Compile Include="uart\config.hpp"> <Compile Include="uart\config.hpp">
<SubType>compile</SubType> <SubType>compile</SubType>
</Compile> </Compile>
@@ -225,11 +234,20 @@
<Compile Include="uart\uart.hpp"> <Compile Include="uart\uart.hpp">
<SubType>compile</SubType> <SubType>compile</SubType>
</Compile> </Compile>
<Compile Include="util\func.hpp">
<SubType>compile</SubType>
</Compile>
<Compile Include="util\type.hpp">
<SubType>compile</SubType>
</Compile>
<Compile Include="util\util.hpp">
<SubType>compile</SubType>
</Compile>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Folder Include="io" /> <Folder Include="io" />
<Folder Include="flash" /> <Folder Include="flash" />
<Folder Include="type" /> <Folder Include="util" />
<Folder Include="uart" /> <Folder Include="uart" />
</ItemGroup> </ItemGroup>
<Import Project="$(AVRSTUDIO_EXE_PATH)\\Vs\\Compiler.targets" /> <Import Project="$(AVRSTUDIO_EXE_PATH)\\Vs\\Compiler.targets" />

1
uart/util Submodule

Submodule uart/util added at 81b3ae244c