diff --git a/Apps/GPIO/main/CMakeLists.txt b/Apps/GPIO/main/CMakeLists.txt index 0f54d39..7d924bb 100644 --- a/Apps/GPIO/main/CMakeLists.txt +++ b/Apps/GPIO/main/CMakeLists.txt @@ -7,6 +7,6 @@ idf_component_register( # Library headers must be included directly, # because all regular dependencies get stripped by elf_loader's cmake script INCLUDE_DIRS ../../../Libraries/TactilityCpp/Include - REQUIRES TactilitySDK + REQUIRES TactilitySDK driver ) diff --git a/Apps/GPIO/main/Source/Gpio.cpp b/Apps/GPIO/main/Source/Gpio.cpp index 525fed3..02ffe98 100644 --- a/Apps/GPIO/main/Source/Gpio.cpp +++ b/Apps/GPIO/main/Source/Gpio.cpp @@ -3,18 +3,18 @@ #include #include -#include #include #include #include +#include constexpr char* TAG = "GPIO"; void Gpio::updatePinStates() { // Update pin states for (int i = 0; i < pinStates.size(); ++i) { - pinStates[i] = tt_hal_gpio_get_level(i); + pinStates[i] = gpio_get_level((gpio_num_t)i); } } @@ -113,11 +113,10 @@ void Gpio::onShow(AppHandle app, lv_obj_t* parent) { mutex.lock(); - auto pin_count = tt_hal_gpio_get_pin_count(); - pinStates.resize(pin_count); - pinWidgets.resize(pin_count); + pinStates.resize(GPIO_PIN_COUNT); + pinWidgets.resize(GPIO_PIN_COUNT); - for (int i = 0; i < pin_count; ++i) { + for (int i = 0; i < GPIO_PIN_COUNT; ++i) { constexpr uint8_t offset_from_left_label = 4; // Add the GPIO number before the first item on a row diff --git a/Apps/GPIO/manifest.properties b/Apps/GPIO/manifest.properties index afd2e34..f95d8a2 100644 --- a/Apps/GPIO/manifest.properties +++ b/Apps/GPIO/manifest.properties @@ -5,6 +5,6 @@ sdk=0.7.0-dev platforms=esp32,esp32s3,esp32c6,esp32p4 [app] id=one.tactility.gpio -versionName=0.3.0 -versionCode=3 +versionName=0.4.0 +versionCode=4 name=GPIO