From 99697380435b43bb02a3450c1fd7d0438d278e48 Mon Sep 17 00:00:00 2001 From: jedi Date: Sun, 29 May 2022 22:12:44 +0200 Subject: [PATCH] stash --- firmware/lux.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/firmware/lux.cpp b/firmware/lux.cpp index d5aa10c..4ccd1fd 100644 --- a/firmware/lux.cpp +++ b/firmware/lux.cpp @@ -28,18 +28,17 @@ extern "C" void lux_task(void *pvParameters) { gpio_enable(gpio5, GPIO_OUTPUT); spi_init(1, SPI_MODE0, SPI_FREQ_DIV_1M, 1, SPI_BIG_ENDIAN, 1); + uint8_t charset[] = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; + uint8_t cnt = 0; while(1) { - - //time = sdk_system_get_time(); - spi_transfer_8(1, cnt++); + vTaskDelay(1); spi_transfer_8(1, 0x00); - spi_transfer_16(1, 0x0000); - vTaskDelay(1000/portTICK_PERIOD_MS); + cnt %= sizeof(charset); } vTaskDelete(nullptr);