Преглед изворни кода

Pin 35 on Teensy 4.1 requires different mux setting

main_ledos
PaulStoffregen пре 4 година
родитељ
комит
5cd821c889
2 измењених фајлова са 15 додато и 10 уклоњено
  1. +5
    -1
      WS2812Serial.cpp
  2. +10
    -9
      readme.md

+ 5
- 1
WS2812Serial.cpp Прегледај датотеку

@@ -194,7 +194,11 @@ bool WS2812Serial::begin()
uart->CTRL = (LPUART_CTRL_TE /*| LPUART_CTRL_TIE */ | LPUART_CTRL_TXINV); // enable transmitter and invert
// We need to configure the TX pin now.
*(portControlRegister(pin)) = IOMUXC_PAD_SRE | IOMUXC_PAD_DSE(3) | IOMUXC_PAD_SPEED(3);
*(portConfigRegister(pin)) = 2; // from hardware table for each one, but I think they are all 2...
uint32_t pinmuxval = 2; // most of them use mux ALT2
#if defined(ARDUINO_TEENSY41)
if (pin == 35) pinmuxval = 1;
#endif
*(portConfigRegister(pin)) = pinmuxval;

dma->destination((volatile uint8_t&)uart->DATA);
//Serial.printf("HWTrigger: %x\n", hwtrigger);

+ 10
- 9
readme.md Прегледај датотеку

@@ -25,15 +25,16 @@ used to transmit the data, making that port unavailable for other uses.

## Supported Pins & Serial Ports

| Port | Teensy LC | Teensy 3.2 | Teensy 3.5 | Teensy 3.6 | Teensy 4.0 |
| :------ | :---------: | :--------: | :--------: | :--------: | :--------: |
| Serial1 | 1, 4, 5, 24 | 1, 5 | 1, 5, 26 | 1, 5, 26 | 1 |
| Serial2 | | 10, 31 | 10 | 10 | 8 |
| Serial3 | | 8 | 8 | 8 | 14 |
| Serial4 | | | 32 | 32 | 17 |
| Serial5 | | | 33 | 33 | 20, 39 |
| Serial6 | | | 48 | | 24 |
| Serial7 | | | | | 29 |
| Port | Teensy LC | Teensy 3.2 | Teensy 3.5 | Teensy 3.6 | Teensy 4.0 | Teensy 4.1 |
| :------ | :---------: | :--------: | :--------: | :--------: | :--------: | :--------: |
| Serial1 | 1, 4, 5, 24 | 1, 5 | 1, 5, 26 | 1, 5, 26 | 1 | 1, 53 |
| Serial2 | | 10, 31 | 10 | 10 | 8 | 8 |
| Serial3 | | 8 | 8 | 8 | 14 | 14 |
| Serial4 | | | 32 | 32 | 17 | 17 |
| Serial5 | | | 33 | 33 | 20, 39 | 20, 47 |
| Serial6 | | | 48 | | 24 | 24 |
| Serial7 | | | | | 29 | 29 |
| Serial8 | | | | | | 35 |

Serial2 & Serial3 on Teensy LC are not supported, due to lack of configurable
oversampling needed to run at the high speed required.

Loading…
Откажи
Сачувај