瀏覽代碼

Avoid spurios SPI error with 0-length transactions

master
jrhoffa 3 年之前
父節點
當前提交
b82f7900a3
共有 1 個檔案被更改,包括 3 行新增0 行删除
  1. +3
    -0
      main/spi_leds.cpp

+ 3
- 0
main/spi_leds.cpp 查看文件

@@ -107,6 +107,9 @@ static uint8_t* encode_byte(uint8_t *out, uint8_t in) {
}

void SPI_LEDs::show() {
// We generate a spurious SPI error with a 0-length transaction.
if (length <= 0) return;

static int index = 0;
int ret;
const Color *pixel = pixels;


Loading…
取消
儲存