DMX512 send/recv library with STM32 slave support originally from http://mbed.org/users/okini3939/notebook/dmx512

Fork of DMX by Suga koubou

Revision:
16:4eeb749806e5
Parent:
15:4ea4a31c7609
Child:
17:c9198630ba05
--- a/DMX.cpp	Tue Aug 26 13:25:24 2014 +0000
+++ b/DMX.cpp	Thu Aug 20 09:21:28 2015 +0000
@@ -19,6 +19,8 @@
     mode_rx = DMX_MODE_BEGIN;
     is_recived = 0;
     is_sent = 0;
+    memset(data_tx, 0, sizeof(data_tx));
+    memset(data_rx, 0, sizeof(data_rx));
 
 #if defined(TARGET_LPC1768) || defined(TARGET_LPC2368)
     if (p_rx == P0_3) {
@@ -38,13 +40,25 @@
       NVIC_SetPriority(UART3_IRQn, 1);
     }
 #elif defined(TARGET_LPC4088)
-    if (p_rx == p10) {
+    if (p_rx == p10 || p_rx == P0_26 || p_rx == P4_29) {
       _uart = LPC_UART3;
       NVIC_SetPriority(UART3_IRQn, 1);
     } else
     if (p_rx == p31) {
       _uart = (LPC_UART_TypeDef*)LPC_UART4;
       NVIC_SetPriority(UART4_IRQn, 1);
+    } else
+    if (p_rx == P0_3) {
+      _uart = LPC_UART0;
+      NVIC_SetPriority(UART0_IRQn, 1);
+    } else
+    if (p_rx == P0_16 || p_rx == P2_1 || p_rx == P3_17) {
+      _uart = (LPC_UART_TypeDef*)LPC_UART1;
+      NVIC_SetPriority(UART1_IRQn, 1);
+    } else
+    if (p_rx == P0_11 || p_rx == P2_9 || p_rx == P4_23) {
+      _uart = LPC_UART2;
+      NVIC_SetPriority(UART2_IRQn, 1);
     }
 #elif defined(TARGET_LPC11UXX)
     if (p_rx == p10) {