Implemented test using Peter Fleury's c uart library
This commit is contained in:
@@ -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();
|
||||||
|
|
||||||
|
|||||||
Submodule uart/uart updated: 6ded0e1c8d...099be106a7
@@ -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>
|
||||||
|
|||||||
Reference in New Issue
Block a user