This commit is contained in:
j3d1 2022-05-29 22:12:44 +02:00
parent e3e97ee96b
commit 9969738043

View file

@ -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);