diff options
Diffstat (limited to 'main/main.c')
-rw-r--r-- | main/main.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/main/main.c b/main/main.c index 82fff1e..3b8c284 100644 --- a/main/main.c +++ b/main/main.c @@ -4,12 +4,11 @@ #include "esp_system.h" #include "freertos/FreeRTOS.h" #include "freertos/task.h" +#include "http_server.h" #include "sdkconfig.h" - #include "station.h" -#include "http_server.h" -#include "ws2812b_writer.h" #include "tcp_server.h" +#include "ws2812b_writer.h" #ifdef CONFIG_IDF_TARGET_ESP32 #define LCD_HOST HSPI_HOST @@ -52,7 +51,7 @@ static ws_params_t ws_params; * to the led strip. */ portTASK_FUNCTION(time_keeper, params_) { - ws_params_t* params = (ws_params_t*) params_; + ws_params_t* params = (ws_params_t*)params_; TickType_t last_wake; const TickType_t freq = 1; @@ -60,11 +59,10 @@ portTASK_FUNCTION(time_keeper, params_) // Initialise the xLastWakeTime variable with the current time. last_wake = xTaskGetTickCount(); - for( ;; ) - { - // Wait for the next cycle. - vTaskDelayUntil( &last_wake, freq ); - params->state.time += params->state.timetick; + for (;;) { + // Wait for the next cycle. + vTaskDelayUntil(&last_wake, freq); + params->state.time += params->state.timetick; } } @@ -93,7 +91,7 @@ void app_main(void) printf("miso: %d\n", PIN_NUM_MISO); printf("mosi: %d\n", PIN_NUM_MOSI); printf("sclk: %d\n", PIN_NUM_CLK); - printf("Tick period ms: %d\n", (int) portTICK_PERIOD_MS); + printf("Tick period ms: %d\n", (int)portTICK_PERIOD_MS); error = spi_bus_initialize(HSPI_HOST, &cfg, SPI_DMA_CH_AUTO); printf("Bus Init\n"); |