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

Fork of DMX by Suga koubou

Revision:
11:cb132e066057
Parent:
10:b748aab8404c
Child:
12:1f176eee2d28
--- a/DMX.cpp	Thu Sep 05 10:01:59 2013 +0000
+++ b/DMX.cpp	Fri Sep 20 01:52:31 2013 +0000
@@ -25,9 +25,9 @@
     is_sent = 0;
 
 #if defined(TARGET_LPC1768) || defined(TARGET_LPC2368)
-    if (p_rx == p10) {
-      _uart = LPC_UART3;
-      NVIC_SetPriority(UART3_IRQn, 1);
+    if (p_rx == P0_3) {
+      _uart = (LPC_UART_TypeDef*)LPC_UART0;
+      NVIC_SetPriority(UART0_IRQn, 1);
     } else
     if (p_rx == p14) {
       _uart = (LPC_UART_TypeDef*)LPC_UART1;
@@ -36,6 +36,10 @@
     if (p_rx == p27) {
       _uart = LPC_UART2;
       NVIC_SetPriority(UART2_IRQn, 1);
+    } else
+    if (p_rx == p10) {
+      _uart = LPC_UART3;
+      NVIC_SetPriority(UART3_IRQn, 1);
     }
 #elif defined(TARGET_LPC11U24)
     if (p_rx == p10) {
@@ -43,14 +47,11 @@
       NVIC_SetPriority(UART_IRQn, 1);
     }
 #elif defined(TARGET_LPC11XX)
+    // LPC1114 support by Stanly Chen
     if (p_rx == P1_6) {
       _uart = (LPC_UART_TypeDef*) UART_0;
       NVIC_SetPriority(UART_IRQn, 1);
     }
-    if (p_tx == P1_7) {
-      _uart = (LPC_UART_TypeDef*) UART_0;
-      NVIC_SetPriority(UART_IRQn, 1);
-    }
 #endif
 
     _dmx.baud(250000);