Adapted example slightly and updated submodules

This commit is contained in:
2019-08-14 20:00:40 +02:00
parent 0354bc3020
commit fcdce7cc1d
5 changed files with 21 additions and 17 deletions

Submodule uart/io updated: 387bc5f110...1265702325

View File

@@ -11,7 +11,7 @@
void newUartUsage()
{
using namespace uart;
Uart<Hardware1<Config<115200>, Driven::INTERRUPT, Mode::ASYNCHRONOUS>> serial1;
Uart<Hardware1<Config<115200>, Driven::BLOCKING, Mode::ASYNCHRONOUS>> serial1;
serial1.init();
serial1 << "New uart hi from RAM. " << F("New uart hi from flash\r\n");
@@ -42,15 +42,17 @@ void newUartUsage2()
{
using namespace uart;
using config = Config<115200, DataBits::EIGHT, Parity::NONE, StopBits::ONE>;
using uart0 = Hardware0<config, Driven::INTERRUPT, Mode::ASYNCHRONOUS>;
Uart<Hardware1<Config<115200>, Driven::BLOCKING>> serial1;
Uart<uart0> serial;
serial.init();
auto ramString = "Hello World from RAM. ";
auto flashString = F("Hello World from flash\r\n");
serial << "Hello World from RAM. " << F("Hello World from flash\r\n");
serial1.init();
_delay_ms(1000);
serial1 << ramString;
serial1 << flashString;
serial1.flushTx();
}
void newUartStreamOverloads()
@@ -238,14 +240,16 @@ void optimalUartTest()
int main()
{
sei();
newUartUsage();
optimalUartTest();
newUartStreamOverloads();
txString(F("\r\n"));
flushTx();
newUartUsage2();
// optimalUartTest();
// newUartStreamOverloads();
spiTest();
// txString(F("\r\n"));
// flushTx();
// spiTest();
return 0;
}

View File

@@ -42,7 +42,7 @@
<ToolNumber>070000004699</ToolNumber>
<ToolName>JTAGICE mkII</ToolName>
</com_atmel_avrdbg_tool_jtagicemkii>
<avrtoolinterface>JTAG</avrtoolinterface>
<avrtoolinterface>ISP</avrtoolinterface>
<avrtoolinterfaceclock>5000000</avrtoolinterfaceclock>
<AAFDebugger>
<AAFDebugFiles>
@@ -77,7 +77,7 @@
<IspClock>125000</IspClock>
<JtagDbgClock>5000000</JtagDbgClock>
</InterfaceProperties>
<InterfaceName>JTAG</InterfaceName>
<InterfaceName>ISP</InterfaceName>
</ToolOptions>
<ToolType>com.atmel.avrdbg.tool.atmelice</ToolType>
<ToolNumber>J41800099437</ToolNumber>