Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Apps/GPIO/main/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
)

11 changes: 5 additions & 6 deletions Apps/GPIO/main/Source/Gpio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@
#include <Tactility/kernel/Kernel.h>

#include <tt_hal.h>
#include <tt_hal_gpio.h>
#include <tt_lvgl.h>
#include <tt_lvgl_toolbar.h>

#include <esp_log.h>
#include <driver/gpio.h>

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);
}
}

Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions Apps/GPIO/manifest.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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
Loading