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
Diff: DMX.cpp
- Revision:
- 1:f0d988e15810
- Parent:
- 0:cbff6bf41542
- Child:
- 2:d7677060f8eb
--- a/DMX.cpp Tue Jun 26 08:29:33 2012 +0000 +++ b/DMX.cpp Thu Jul 12 14:57:09 2012 +0000 @@ -100,7 +100,7 @@ // Data if (mode_tx == DMX_MODE_DATA) { if (addr_tx < DMX_SIZE) { -#ifdef DMX_DIRECT +#ifdef DMX_UART_DIRECT *uart_thr = (uint8_t)data_tx[addr_tx]; #else dmx.putc(data_tx[addr_tx]); @@ -119,7 +119,11 @@ int flg, dat; flg = *uart_lsr; +#ifdef DMX_UART_DIRECT + dat = *uart_rbr; +#else dat = dmx.getc(); +#endif if (flg & ((1 << 7)|(1 << 3)|(1 << 4))) { // Break Time