浏览代码

Avoid spurios SPI error with 0-length transactions

S3
jrhoffa 3 年前
父节点
当前提交
1ba4562d8a
共有 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() { void SPI_LEDs::show() {
// We generate a spurious SPI error with a 0-length transaction.
if (length <= 0) return;

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


正在加载...
取消
保存