diff options
Diffstat (limited to 'main/main.cpp')
| -rw-r--r-- | main/main.cpp | 29 |
1 files changed, 25 insertions, 4 deletions
diff --git a/main/main.cpp b/main/main.cpp index 04762c7..f623e39 100644 --- a/main/main.cpp +++ b/main/main.cpp @@ -46,15 +46,36 @@ /* } */ +extern "C" void runDisplayTask(void* taskParams) { + InovaLedDisplay* display = (InovaLedDisplay*) taskParams; + display->runDisplay(); +} + + extern "C" void app_main(void) { InovaLedDisplay display = InovaLedDisplay(PIN_NUM_MISO, PIN_NUM_MOSI, PIN_NUM_CLK, PIN_NUM_CS, PIN_NUM_R_LATCH, PIN_NUM_R_CLK, PIN_NUM_R_ADDR_0, PIN_NUM_R_ADDR_1, PIN_NUM_R_ADDR_2); - display.drawPixel(0, 0, 3); + + display.fillScreen(0); display.drawPixel(80, 4, 3); - display.runDisplay(); - /* TaskHandle_t taskHandle; */ - /* xTaskCreate(updateDisplay, "updateDisplay", STACK_SIZE, NULL, tskIDLE_PRIORITY, &taskHandle); */ + display.setCursor(0, 0); + String some_string = "meow"; + display.print(some_string); + + //display.drawChar(0, 0, 'M', 3, 0, 1); + //display.drawChar(6, 0, 'e', 3, 0, 1); + //display.drawChar(12, 0, 'o', 3, 0, 1); + //display.drawChar(18, 0, 'w', 3, 0, 1); + + //TaskHandle_t taskHandle; + //xTaskCreate(runDisplayTask, "updateDisplay", STACK_SIZE, &display, tskIDLE_PRIORITY, &taskHandle); + + runDisplayTask(&display); + + while(true) { + vTaskDelay(100 / portTICK_PERIOD_MS); + } /* int j = NUM_COL; */ /* int color = 1; */ /* char* hello = "Hello World!! 0123456789"; */ |
