Adapted example slightly and updated submodules

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

@ -1 +1 @@
Subproject commit 2215491c0b0606d734dcf44e6c4213e36176d25f Subproject commit 2c66479a49953a6649a375c0b3e5999f64b2223d

@ -1 +1 @@
Subproject commit 387bc5f1107fb27684c0ed96f558a8c65c470cfe Subproject commit 1265702325432ee16a35ff29ae1e67e7222ceefa

View File

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

@ -1 +1 @@
Subproject commit c4f38cbcdf722c2c41325617066f5910c4a8cfea Subproject commit 16c9015f43f5218ce8676098e6de3e16b1a97f9c

View File

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