Merge pull request #219 from twadleigh/patch-1
Fix up SD1 initialization for KL2x
This commit is contained in:
commit
03434195e0
|
@ -245,6 +245,7 @@
|
|||
#define TEENSY_PIN26_IOPORT IOPORT5
|
||||
#define TEENSY_PIN31_IOPORT IOPORT5
|
||||
|
||||
#define LINE_PIN0 PAL_LINE(TEENSY_PIN0_IOPORT, TEENSY_PIN0)
|
||||
#define LINE_PIN1 PAL_LINE(TEENSY_PIN1_IOPORT, TEENSY_PIN1)
|
||||
#define LINE_PIN2 PAL_LINE(TEENSY_PIN2_IOPORT, TEENSY_PIN2)
|
||||
#define LINE_PIN3 PAL_LINE(TEENSY_PIN3_IOPORT, TEENSY_PIN3)
|
||||
|
|
|
@ -245,6 +245,7 @@
|
|||
#define TEENSY_PIN26_IOPORT IOPORT5
|
||||
#define TEENSY_PIN31_IOPORT IOPORT5
|
||||
|
||||
#define LINE_PIN0 PAL_LINE(TEENSY_PIN0_IOPORT, TEENSY_PIN0)
|
||||
#define LINE_PIN1 PAL_LINE(TEENSY_PIN1_IOPORT, TEENSY_PIN1)
|
||||
#define LINE_PIN2 PAL_LINE(TEENSY_PIN2_IOPORT, TEENSY_PIN2)
|
||||
#define LINE_PIN3 PAL_LINE(TEENSY_PIN3_IOPORT, TEENSY_PIN3)
|
||||
|
|
|
@ -167,6 +167,7 @@
|
|||
#define TEENSY_PIN34_IOPORT IOPORT5
|
||||
#define TEENSY_PIN24_IOPORT IOPORT5
|
||||
|
||||
#define LINE_PIN0 PAL_LINE(TEENSY_PIN0_IOPORT, TEENSY_PIN0)
|
||||
#define LINE_PIN1 PAL_LINE(TEENSY_PIN1_IOPORT, TEENSY_PIN1)
|
||||
#define LINE_PIN2 PAL_LINE(TEENSY_PIN2_IOPORT, TEENSY_PIN2)
|
||||
#define LINE_PIN3 PAL_LINE(TEENSY_PIN3_IOPORT, TEENSY_PIN3)
|
||||
|
|
|
@ -238,6 +238,7 @@
|
|||
#define TEENSY_PIN25_IOPORT IOPORT5
|
||||
#define TEENSY_PIN26_IOPORT IOPORT5
|
||||
|
||||
#define LINE_PIN0 PAL_LINE(TEENSY_PIN0_IOPORT, TEENSY_PIN0)
|
||||
#define LINE_PIN1 PAL_LINE(TEENSY_PIN1_IOPORT, TEENSY_PIN1)
|
||||
#define LINE_PIN2 PAL_LINE(TEENSY_PIN2_IOPORT, TEENSY_PIN2)
|
||||
#define LINE_PIN3 PAL_LINE(TEENSY_PIN3_IOPORT, TEENSY_PIN3)
|
||||
|
|
|
@ -416,7 +416,7 @@ void sd_lld_init(void) {
|
|||
#if KINETIS_SERIAL_USE_UART0
|
||||
/* Driver initialization.*/
|
||||
#if ! KINETIS_SERIAL0_IS_LPUART
|
||||
sd_lld_init_driver(&SD1, UART0);
|
||||
sd_lld_init_driver(&SD1, (UART_TypeDef *)UART0);
|
||||
#else /* ! KINETIS_SERIAL0_IS_LPUART */
|
||||
/* little endian! */
|
||||
sdObjectInit(&SD1, NULL, notify);
|
||||
|
@ -431,6 +431,7 @@ void sd_lld_init(void) {
|
|||
SD1.uart.d_p = ((uint8_t *)&(LPUART0->DATA)) + 0; /* D: DATA, byte 4 */
|
||||
#endif /* ! KINETIS_SERIAL0_IS_LPUART */
|
||||
#if KINETIS_SERIAL0_IS_UARTLP
|
||||
SD1.uart.c4_p = &(UART0->C4); /* fix up misconfigured C4 register */
|
||||
SD1.uart.uartlp_p = UART0;
|
||||
SD1.uart.uart_p = NULL;
|
||||
#elif KINETIS_SERIAL0_IS_LPUART
|
||||
|
|
Loading…
Reference in New Issue