Arduino DUE (SAM3X8E) DMX in and out deployed on hardware USART (updated DmxDue required)

This commit is contained in:
2018-01-21 03:36:47 +03:00
parent c4527b9090
commit 97fbe269c9
3 changed files with 18 additions and 13 deletions

View File

@@ -325,7 +325,7 @@ RingBuffer tx_buffer2;
RingBuffer tx_buffer3; RingBuffer tx_buffer3;
RingBuffer tx_buffer4; RingBuffer tx_buffer4;
USARTClass Serial1(USART0, USART0_IRQn, ID_USART0, &rx_buffer2, &tx_buffer2); ///USARTClass Serial1(USART0, USART0_IRQn, ID_USART0, &rx_buffer2, &tx_buffer2);
void serialEvent1() __attribute__((weak)); void serialEvent1() __attribute__((weak));
void serialEvent1() { } void serialEvent1() { }
USARTClass Serial2(USART1, USART1_IRQn, ID_USART1, &rx_buffer3, &tx_buffer3); USARTClass Serial2(USART1, USART1_IRQn, ID_USART1, &rx_buffer3, &tx_buffer3);
@@ -336,28 +336,30 @@ void serialEvent3() __attribute__((weak));
void serialEvent3() { } void serialEvent3() { }
// IT handlers // IT handlers
void USART0_Handler(void)
{
Serial1.IrqHandler();
}
///void USART1_Handler(void) ///void USART0_Handler(void)
///{ ///{
/// Serial2.IrqHandler(); /// Serial1.IrqHandler();
///} ///}
void USART1_Handler(void)
{
Serial2.IrqHandler();
}
void USART3_Handler(void) void USART3_Handler(void)
{ {
Serial3.IrqHandler(); Serial3.IrqHandler();
} }
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
void serialEventRun(void) void serialEventRun(void)
{ {
if (Serial.available()) serialEvent(); if (Serial.available()) serialEvent();
if (Serial1.available()) serialEvent1(); /// if (Serial1.available()) serialEvent1();
/// if (Serial2.available()) serialEvent2(); if (Serial2.available()) serialEvent2();
if (Serial3.available()) serialEvent3(); if (Serial3.available()) serialEvent3();
} }

View File

@@ -51,14 +51,17 @@ For patched libraries, appropriate GitHub repo URL provided:
* Ethernet https://github.com/anklimov/Ethernet * Ethernet https://github.com/anklimov/Ethernet
* SPI (standard) * SPI (standard)
Portation from AVR Mega 2560 to SAM3X8E (Arduino DUE) and ESP is not completed yet. Portation from AVR Mega 2560 to SAM3X8E (Arduino DUE) is done since v 0.96
Core is mostly migrated Next step ESP portation
#Platforms specific details:
AVR version is basic and have all functions AVR version is basic and have all functions
*DMX-out is software (DMXSimple) on pin3
Another platforms limitations (todo):
SAM3X8E: SAM3X8E:
*DMX-in - not deployed yet *default PWM frequency
*both, DMX-in and DMX-out are hardware USART based. Use USART1 (pins 18 and 19) for DMX-out and DMX-in
ESP: ESP:
*Wifi instead Ether not implemented yet *Wifi instead Ether not implemented yet

Binary file not shown.