Adapt to new interrupt handling interface and change example back to atmega1284p
This commit is contained in:
parent
8bb1bd7397
commit
6b90c1779f
@ -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");
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit bcd18db494de771ebe786817e74d3585a94312e9
|
Subproject commit dfb076cda8e9f935e51b2c36ae09ad7c9e759b09
|
@ -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>
|
||||||
@ -76,7 +77,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 +135,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>
|
||||||
|
Loading…
Reference in New Issue
Block a user