Browse Source

Fix high ouput timing to 417/833 ns widths

This has the side effect of lengthening the low time proportionally,
to a total of 417 ns longer than necessary.  This does not appear to
have any observable negative impact.
master
Nathaniel Walizer 3 years ago
parent
commit
b90187af90
2 changed files with 4 additions and 2 deletions
  1. +1
    -1
      main/main.cpp
  2. +3
    -1
      main/spi_leds.cpp

+ 1
- 1
main/main.cpp View File

@@ -106,7 +106,7 @@ extern "C" void app_main(void) {
// ScreenLEDs()
// SPI_LEDs(39);
LEDStrip *LEDs = new SPI_LEDs(39);
int frequency = 60;
int frequency = 30;

while (true) {
// Trash the old preset in case we can't find the set effect


+ 3
- 1
main/spi_leds.cpp View File

@@ -54,7 +54,9 @@ SPI_LEDs::SPI_LEDs(int _gpio, int length) :
.cs_ena_posttrans = 0, // moot
// Datasheet implies 3.2 MHz => 1.25 us / 4
// We can get away with 4.4_ MHz => 900 ns / 4
.clock_speed_hz = 3200000,
// HOWEVER, better implementations divide 1.25 us into thirds!
// Thus, 2.4 MHz has the same H times and slightly longer L times.
.clock_speed_hz = 2400000,
.input_delay_ns = 0, // moot
.spics_io_num = -1,
.flags = 0, // Keep it MSB first


Loading…
Cancel
Save