mirror of
https://github.com/ByteWelder/Tactility.git
synced 2026-08-20 17:05:06 +00:00
Dependency cleanup
To avoid including GPL code
This commit is contained in:
parent
21d6e7fee2
commit
6595734492
@ -3,5 +3,5 @@ file(GLOB_RECURSE SOURCE_FILES source/*.c*)
|
|||||||
idf_component_register(
|
idf_component_register(
|
||||||
SRCS ${SOURCE_FILES}
|
SRCS ${SOURCE_FILES}
|
||||||
INCLUDE_DIRS "source"
|
INCLUDE_DIRS "source"
|
||||||
REQUIRES Tactility bq24295-module
|
REQUIRES TactilityKernel TactilityFreeRtos bq24295-module driver
|
||||||
)
|
)
|
||||||
|
|||||||
@ -10,8 +10,6 @@
|
|||||||
#include <tactility/log.h>
|
#include <tactility/log.h>
|
||||||
|
|
||||||
#include <Tactility/Thread.h>
|
#include <Tactility/Thread.h>
|
||||||
#include <Tactility/app/App.h>
|
|
||||||
#include <Tactility/kernel/Kernel.h>
|
|
||||||
|
|
||||||
#include <freertos/FreeRTOS.h>
|
#include <freertos/FreeRTOS.h>
|
||||||
#include <freertos/queue.h>
|
#include <freertos/queue.h>
|
||||||
@ -72,7 +70,7 @@ static int32_t nav_buttons_thread_main(UnphoneNavButtonsInternal* internal) {
|
|||||||
// The buttons might generate more than 1 click because of how they are built
|
// The buttons might generate more than 1 click because of how they are built
|
||||||
LOG_I(TAG, "Pressed button %d", button_index);
|
LOG_I(TAG, "Pressed button %d", button_index);
|
||||||
if (button_index == BUTTON1_INDEX) {
|
if (button_index == BUTTON1_INDEX) {
|
||||||
tt::app::stop();
|
// TODO: Stop app implementation
|
||||||
}
|
}
|
||||||
|
|
||||||
// Debounce all events for a short period of time
|
// Debounce all events for a short period of time
|
||||||
|
|||||||
@ -3,8 +3,7 @@
|
|||||||
|
|
||||||
#include <tactility/driver.h>
|
#include <tactility/driver.h>
|
||||||
#include <tactility/drivers/gpio_controller.h>
|
#include <tactility/drivers/gpio_controller.h>
|
||||||
#include <tactility/drivers/gpio_descriptor.h>
|
#include <tactility/error.h>
|
||||||
#include <tactility/error_esp32.h>
|
|
||||||
#include <tactility/log.h>
|
#include <tactility/log.h>
|
||||||
|
|
||||||
#include <driver/rtc_io.h>
|
#include <driver/rtc_io.h>
|
||||||
@ -67,7 +66,7 @@ error_t unphone_power_switch_is_on(Device* device, bool* on) {
|
|||||||
error_t unphone_power_switch_enable_wake(Device* device) {
|
error_t unphone_power_switch_enable_wake(Device* device) {
|
||||||
auto* internal = static_cast<UnphonePowerSwitchInternal*>(device_get_driver_data(device));
|
auto* internal = static_cast<UnphonePowerSwitchInternal*>(device_get_driver_data(device));
|
||||||
auto esp_error = esp_sleep_enable_ext0_wakeup(internal->native_pin, 1);
|
auto esp_error = esp_sleep_enable_ext0_wakeup(internal->native_pin, 1);
|
||||||
return esp_err_to_error(esp_error);
|
return esp_error == ESP_OK ? ERROR_NONE : ERROR_RESOURCE;
|
||||||
}
|
}
|
||||||
|
|
||||||
Driver unphone_power_switch_driver = {
|
Driver unphone_power_switch_driver = {
|
||||||
|
|||||||
@ -8,7 +8,6 @@
|
|||||||
#include <esp_sleep.h>
|
#include <esp_sleep.h>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
#include <Tactility/LogMessages.h>
|
|
||||||
#include <Tactility/Thread.h>
|
#include <Tactility/Thread.h>
|
||||||
|
|
||||||
constexpr auto* TAG = "unPhone";
|
constexpr auto* TAG = "unPhone";
|
||||||
@ -97,10 +96,10 @@ static bool power_on() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool init_boot() {
|
bool init_boot() {
|
||||||
LOG_I(TAG, LOG_MESSAGE_POWER_ON_START);
|
LOG_I(TAG, "Power on start");
|
||||||
|
|
||||||
if (!power_on()) {
|
if (!power_on()) {
|
||||||
LOG_E(TAG, LOG_MESSAGE_POWER_ON_FAILED);
|
LOG_E(TAG, "Power on failed");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user