Forked
Fork of Multi_WS2811 by
Revision 1:39db2057b5da, committed 2014-12-09
- Comitter:
- antoniorohit
- Date:
- Tue Dec 09 23:42:23 2014 +0000
- Parent:
- 0:a8535703f23b
- Commit message:
- Forked;
Changed in this revision
WS2811.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r a8535703f23b -r 39db2057b5da WS2811.cpp --- a/WS2811.cpp Sat Jan 04 00:40:08 2014 +0000 +++ b/WS2811.cpp Tue Dec 09 23:42:23 2014 +0000 @@ -31,7 +31,7 @@ // #define DEBUG_PIN 4 /* PTD4 debugOut */ #ifdef DEBUG_PIN -#define DEBUG 1 +#define DEBUG 0 #endif #if DEBUG @@ -44,8 +44,8 @@ #define SET_DEBUG (void)0 #endif -static PORT_Type volatile * const IO_PORT = PORTD; -static GPIO_Type volatile * const IO_GPIO = PTD; +static PORT_Type volatile * const IO_PORT = PORTC; +static GPIO_Type volatile * const IO_GPIO = PTC; // 48 MHz clock, no prescaling. #define NSEC_TO_TICKS(nsec) ((nsec)*48/1000) @@ -126,7 +126,7 @@ /// Enable PORTD, DMA and TPM0 clocking void WS2811::clock_init() { - SIM->SCGC5 |= SIM_SCGC5_PORTD_MASK; + SIM->SCGC5 |= SIM_SCGC5_PORTC_MASK; SIM->SCGC6 |= SIM_SCGC6_DMAMUX_MASK | SIM_SCGC6_TPM0_MASK; // Enable clock to DMA mux and TPM0 SIM->SCGC7 |= SIM_SCGC7_DMA_MASK; // Enable clock to DMA