Use TT logging instead of ESP
This commit is contained in:
parent
468bbdc308
commit
aa6f05e54c
@ -1,28 +1,26 @@
|
|||||||
#include "check.h"
|
#include "check.h"
|
||||||
#include "devices_i.h"
|
#include "devices_i.h"
|
||||||
#include "esp_check.h"
|
|
||||||
#include "esp_err.h"
|
|
||||||
|
|
||||||
#define TAG "hardware"
|
#define TAG "hardware"
|
||||||
|
|
||||||
Hardware tt_hardware_init(const HardwareConfig _Nonnull* config) {
|
Hardware tt_hardware_init(const HardwareConfig _Nonnull* config) {
|
||||||
if (config->bootstrap != NULL) {
|
if (config->bootstrap != NULL) {
|
||||||
ESP_LOGI(TAG, "Bootstrapping");
|
TT_LOG_I(TAG, "Bootstrapping");
|
||||||
config->bootstrap();
|
config->bootstrap();
|
||||||
}
|
}
|
||||||
|
|
||||||
tt_check(config->display_driver != NULL, "no display driver configured");
|
tt_check(config->display_driver != NULL, "no display driver configured");
|
||||||
DisplayDriver display_driver = config->display_driver();
|
DisplayDriver display_driver = config->display_driver();
|
||||||
ESP_LOGI(TAG, "display with driver %s", display_driver.name);
|
TT_LOG_I(TAG, "display with driver %s", display_driver.name);
|
||||||
DisplayDevice* display = tt_display_device_alloc(&display_driver);
|
DisplayDevice* display = tt_display_device_alloc(&display_driver);
|
||||||
|
|
||||||
TouchDevice* touch = NULL;
|
TouchDevice* touch = NULL;
|
||||||
if (config->touch_driver != NULL) {
|
if (config->touch_driver != NULL) {
|
||||||
TouchDriver touch_driver = config->touch_driver();
|
TouchDriver touch_driver = config->touch_driver();
|
||||||
ESP_LOGI(TAG, "touch with driver %s", touch_driver.name);
|
TT_LOG_I(TAG, "touch with driver %s", touch_driver.name);
|
||||||
touch = tt_touch_alloc(&touch_driver);
|
touch = tt_touch_alloc(&touch_driver);
|
||||||
} else {
|
} else {
|
||||||
ESP_LOGI(TAG, "no touch configured");
|
TT_LOG_I(TAG, "no touch configured");
|
||||||
touch = NULL;
|
touch = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user