Skip to content

Commit

Permalink
Use TT logging instead of ESP
Browse files Browse the repository at this point in the history
  • Loading branch information
KenVanHoeylandt committed Jan 17, 2024
1 parent 468bbdc commit aa6f05e
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions components/tactility/src/devices.c
Original file line number Diff line number Diff line change
@@ -1,28 +1,26 @@
#include "check.h"
#include "devices_i.h"
#include "esp_check.h"
#include "esp_err.h"

#define TAG "hardware"

Hardware tt_hardware_init(const HardwareConfig _Nonnull* config) {
if (config->bootstrap != NULL) {
ESP_LOGI(TAG, "Bootstrapping");
TT_LOG_I(TAG, "Bootstrapping");
config->bootstrap();
}

tt_check(config->display_driver != NULL, "no display driver configured");
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);

TouchDevice* touch = NULL;
if (config->touch_driver != NULL) {
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);
} else {
ESP_LOGI(TAG, "no touch configured");
TT_LOG_I(TAG, "no touch configured");
touch = NULL;
}

Expand Down

0 comments on commit aa6f05e

Please sign in to comment.