Implemented test using Peter Fleury's c uart library
This commit is contained in:
parent
59a83a304b
commit
48e312d076
@ -6,6 +6,7 @@
|
|||||||
|
|
||||||
#include "flash/flash.hpp"
|
#include "flash/flash.hpp"
|
||||||
#include "io/io.hpp"
|
#include "io/io.hpp"
|
||||||
|
#include "uart/uart.h"
|
||||||
#include "uart/uart.hpp"
|
#include "uart/uart.hpp"
|
||||||
#include "uart/usart.h"
|
#include "uart/usart.h"
|
||||||
|
|
||||||
@ -164,11 +165,26 @@ void optimalUartTest()
|
|||||||
_delay_ms(1000);
|
_delay_ms(1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void cUartLibTest()
|
||||||
|
{
|
||||||
|
auto ramString = "Hello World from RAM. ";
|
||||||
|
auto flashString = F("Hello World from flash\r\n");
|
||||||
|
|
||||||
|
uart_init(UART_BAUD_SELECT(9600, F_CPU));
|
||||||
|
sei();
|
||||||
|
|
||||||
|
uart_puts(ramString);
|
||||||
|
uart_puts_p(reinterpret_cast<const char *>(flashString));
|
||||||
|
|
||||||
|
_delay_ms(1000);
|
||||||
|
}
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
newUartUsage();
|
newUartUsage();
|
||||||
// oldUsartUsage();
|
// oldUsartUsage();
|
||||||
// optimalUartTest();
|
// optimalUartTest();
|
||||||
|
// cUartLibTest();
|
||||||
|
|
||||||
// spiTest();
|
// spiTest();
|
||||||
|
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit 6ded0e1c8dc9596e86512d269ace36c5bc5a7a5e
|
Subproject commit 099be106a74689beddab26a630ab423d83200f41
|
@ -217,6 +217,12 @@
|
|||||||
<Compile Include="uart\software.hpp">
|
<Compile Include="uart\software.hpp">
|
||||||
<SubType>compile</SubType>
|
<SubType>compile</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<None Include="uart\uart.cpp">
|
||||||
|
<SubType>compile</SubType>
|
||||||
|
</None>
|
||||||
|
<Compile Include="uart\uart.h">
|
||||||
|
<SubType>compile</SubType>
|
||||||
|
</Compile>
|
||||||
<Compile Include="uart\uart.hpp">
|
<Compile Include="uart\uart.hpp">
|
||||||
<SubType>compile</SubType>
|
<SubType>compile</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
Loading…
Reference in New Issue
Block a user