This is a fork for okini3939's great DMX library with added support for the EA LPC4088 QuickStart mbed-enabled board. I have added support and tested the 3 UARTs which are accessible on the DIP pins. This forked of okini3939's library was created in the hopes a pull request could be accepted and re-integrated into the library. Important Note: To use the special UART on "pins 41" (rx) and "pin 42" (tx) you must access them by their port names, which are P0_3 (rx) and P0_2 (tx), because the symbols p41 and p42 do not exist in the mbed world (yet).
Fork of DMX by
Revision 13:197c0fea0c62, committed 2013-12-02
- Comitter:
- robodude
- Date:
- Mon Dec 02 06:49:25 2013 +0000
- Parent:
- 12:1f176eee2d28
- Commit message:
- Tested and added support for EA LPC4088 QuickStart mbed.
Changed in this revision
DMX.cpp | Show annotated file Show diff for this revision Revisions of this file |
DMX.h | Show annotated file Show diff for this revision Revisions of this file |
diff -r 1f176eee2d28 -r 197c0fea0c62 DMX.cpp --- a/DMX.cpp Mon Sep 23 09:15:57 2013 +0000 +++ b/DMX.cpp Mon Dec 02 06:49:25 2013 +0000 @@ -37,6 +37,20 @@ _uart = LPC_UART3; NVIC_SetPriority(UART3_IRQn, 1); } +#elif defined(TARGET_LPC4088) + // EA LPC4088 QuickStart Board mbed support by Robbie King + if (p_rx == P0_3) { // P0_3 ==> mbed "pin 41" on the EA LPC4088 QuickStart Board + _uart = (LPC_UART_TypeDef*)LPC_UART0; + NVIC_SetPriority(UART0_IRQn, 1); + } else + if (p_rx == p31) { + _uart = (LPC_UART_TypeDef*)LPC_UART4; + NVIC_SetPriority(UART4_IRQn, 1); + } else + if (p_rx == p10) { + _uart = LPC_UART3; + NVIC_SetPriority(UART3_IRQn, 1); + } #elif defined(TARGET_LPC11U24) if (p_rx == p10) { _uart = LPC_USART;
diff -r 1f176eee2d28 -r 197c0fea0c62 DMX.h --- a/DMX.h Mon Sep 23 09:15:57 2013 +0000 +++ b/DMX.h Mon Dec 02 06:49:25 2013 +0000 @@ -91,7 +91,7 @@ unsigned char data_rx[DMX_SIZE]; private: -#if defined(TARGET_LPC1768) || defined(TARGET_LPC2368) +#if defined(TARGET_LPC1768) || defined(TARGET_LPC2368) || defined(TARGET_LPC4088) LPC_UART_TypeDef *_uart; #elif defined(TARGET_LPC11U24) LPC_USART_Type *_uart;