From fdc98571431255abb50c376c7fe30a645df10b1a Mon Sep 17 00:00:00 2001 From: Ken Van Hoeylandt Date: Tue, 27 Jan 2026 17:30:50 +0100 Subject: [PATCH 1/3] Moved and renamed files for consistent C code style --- .../DevicetreeCompiler/source/generator.py | 6 +- CODING_STYLE_C.md | 96 +++++++++++++++++++ CODING_STYLE.md => CODING_STYLE_CPP.md | 7 +- Devices/lilygo-tlora-pager/Source/Drivers.cpp | 2 +- .../Source/bindings/tlora_pager.h | 4 +- .../Source/drivers/Register.cpp | 2 +- .../Source/drivers/TloraPager.cpp | 2 +- .../Source/drivers/TloraPager.h | 2 +- .../lilygo-tlora-pager/lilygo,tlora-pager.dts | 4 +- Devices/placeholder.dts | 2 +- Devices/simulator/Source/LvglTask.cpp | 4 +- Devices/simulator/Source/hal/SdlDisplay.h | 2 +- Devices/simulator/Source/hal/SdlKeyboard.h | 4 +- Devices/simulator/Source/hal/SdlTouch.h | 2 +- Devices/simulator/simulator.dts | 2 +- Drivers/DRV2605/Source/Drv2605.cpp | 2 +- Drivers/EspLcdCompat/Source/EspLcdDisplay.cpp | 6 +- Drivers/EspLcdCompat/Source/EspLcdDisplay.h | 2 +- .../EspLcdCompat/Source/EspLcdDisplayV2.cpp | 6 +- Drivers/EspLcdCompat/Source/EspLcdDisplayV2.h | 4 +- Drivers/RgbDisplay/Source/RgbDisplay.cpp | 2 +- Firmware/Source/Main.cpp | 2 +- .../bindings/esp32_gpio.h | 4 +- .../bindings/esp32_i2c.h | 4 +- .../drivers/esp32_gpio.h} | 0 .../drivers/esp32_i2c.h} | 2 +- .../ErrorEsp32.h => tactility/error_esp32.h} | 2 +- .../drivers/{Esp32Gpio.cpp => esp32_gpio.cpp} | 12 +-- .../drivers/{Esp32I2c.cpp => esp32_i2c.cpp} | 11 +-- .../drivers/{Register.cpp => register.cpp} | 2 +- .../{ErrorEsp32.cpp => error_esp32.cpp} | 2 +- Platforms/PlatformPosix/Source/Register.cpp | 2 +- Tactility/Private/Tactility/app/AppInstance.h | 2 +- .../Source/app/appdetails/AppDetails.cpp | 2 +- Tactility/Source/app/files/View.cpp | 14 +-- Tactility/Source/app/fileselection/View.cpp | 14 +-- Tactility/Source/app/settings/Settings.cpp | 2 +- .../app/wifiapsettings/WifiApSettings.cpp | 10 +- Tactility/Source/hal/Hal.cpp | 4 +- Tactility/Source/hal/gps/GpsInit.cpp | 4 +- Tactility/Source/hal/i2c/I2c.cpp | 2 +- Tactility/Source/kernel/SystemEvents.cpp | 2 +- Tactility/Source/lvgl/Statusbar.cpp | 14 +-- Tactility/Source/lvgl/Toolbar.cpp | 4 +- Tactility/Source/service/gui/Keyboard.cpp | 2 +- .../Source/service/statusbar/Statusbar.cpp | 8 +- .../service/webserver/WebServerService.cpp | 2 +- Tactility/Source/service/wifi/Wifi.cpp | 2 +- Tactility/Source/service/wifi/WifiEsp.cpp | 2 +- Tactility/Source/service/wifi/WifiMock.cpp | 2 +- .../Source/settings/{Time.cpp => time.cpp} | 0 TactilityC/Source/tt_hal_device.cpp | 2 +- TactilityC/Source/tt_hal_display.cpp | 9 +- TactilityCore/Source/CpuAffinity.cpp | 2 +- TactilityCore/Source/crypt/Crypt.cpp | 2 +- .../bindings/bindings.h | 0 .../{Tactility => tactility}/bindings/gpio.h | 2 +- .../{Tactility => tactility}/bindings/root.h | 4 +- .../{Tactility/Check.h => tactility/check.h} | 2 +- .../concurrent/dispatcher.h} | 4 +- .../concurrent/eventgroup.h} | 6 +- .../Mutex.h => tactility/concurrent/mutex.h} | 4 +- .../concurrent/recursivemutex.h} | 4 +- .../{Tactility/Delay.h => tactility/delay.h} | 6 +- .../Device.h => tactility/device.h} | 6 +- .../Driver.h => tactility/driver.h} | 2 +- .../Gpio.h => tactility/drivers/gpio.h} | 2 +- .../drivers/gpio_controller.h} | 4 +- .../drivers/i2c_controller.h} | 6 +- .../Root.h => tactility/drivers/root.h} | 0 .../{Tactility/Error.h => tactility/error.h} | 0 .../FreeRTOS => tactility/freertos}/README.md | 0 .../freertos}/event_groups.h | 2 +- .../freertos/freertos.h} | 0 .../FreeRTOS => tactility/freertos}/port.h | 2 +- .../FreeRTOS => tactility/freertos}/queue.h | 2 +- .../FreeRTOS => tactility/freertos}/semphr.h | 2 +- .../FreeRTOS => tactility/freertos}/task.h | 2 +- .../FreeRTOS => tactility/freertos}/timers.h | 2 +- .../{Tactility/Log.h => tactility/log.h} | 0 .../{Tactility/Time.h => tactility/time.h} | 2 +- .../{Dispatcher.cpp => dispatcher.cpp} | 10 +- .../{EventGroup.cpp => event_group.cpp} | 4 +- .../Source/{Crash.cpp => crash.cpp} | 4 +- .../Source/{Device.cpp => device.cpp} | 8 +- .../Source/{Driver.cpp => driver.cpp} | 10 +- ...GpioController.cpp => gpio_controller.cpp} | 4 +- .../{I2cController.cpp => i2c_controller.cpp} | 6 +- .../drivers/{Register.cpp => register.cpp} | 2 +- .../Source/drivers/{Root.cpp => root.cpp} | 4 +- TactilityKernel/Source/{Log.cpp => log.cpp} | 2 +- Tests/TactilityKernel/DeviceTest.cpp | 2 +- Tests/TactilityKernel/DispatcherTest.cpp | 2 +- .../TactilityKernel/DriverIntegrationTest.cpp | 4 +- Tests/TactilityKernel/DriverTest.cpp | 2 +- Tests/TactilityKernel/MutexTest.cpp | 2 +- Tests/TactilityKernel/RecursiveMutexTest.cpp | 2 +- Tests/TactilityKernel/TimeAndDelay.cpp | 4 +- 98 files changed, 275 insertions(+), 176 deletions(-) create mode 100644 CODING_STYLE_C.md rename CODING_STYLE.md => CODING_STYLE_CPP.md (86%) rename Platforms/PlatformEsp32/Include/{Tactility => tactility}/bindings/esp32_gpio.h (68%) rename Platforms/PlatformEsp32/Include/{Tactility => tactility}/bindings/esp32_i2c.h (68%) rename Platforms/PlatformEsp32/Include/{Tactility/drivers/Esp32Gpio.h => tactility/drivers/esp32_gpio.h} (100%) rename Platforms/PlatformEsp32/Include/{Tactility/drivers/Esp32I2c.h => tactility/drivers/esp32_i2c.h} (89%) rename Platforms/PlatformEsp32/Include/{Tactility/ErrorEsp32.h => tactility/error_esp32.h} (73%) rename Platforms/PlatformEsp32/Source/drivers/{Esp32Gpio.cpp => esp32_gpio.cpp} (93%) rename Platforms/PlatformEsp32/Source/drivers/{Esp32I2c.cpp => esp32_i2c.cpp} (93%) rename Platforms/PlatformEsp32/Source/drivers/{Register.cpp => register.cpp} (89%) rename Platforms/PlatformEsp32/Source/{ErrorEsp32.cpp => error_esp32.cpp} (92%) rename Tactility/Source/settings/{Time.cpp => time.cpp} (100%) rename TactilityKernel/Include/{Tactility => tactility}/bindings/bindings.h (100%) rename TactilityKernel/Include/{Tactility => tactility}/bindings/gpio.h (60%) rename TactilityKernel/Include/{Tactility => tactility}/bindings/root.h (56%) rename TactilityKernel/Include/{Tactility/Check.h => tactility/check.h} (96%) rename TactilityKernel/Include/{Tactility/concurrent/Dispatcher.h => tactility/concurrent/dispatcher.h} (97%) rename TactilityKernel/Include/{Tactility/concurrent/EventGroup.h => tactility/concurrent/eventgroup.h} (95%) rename TactilityKernel/Include/{Tactility/concurrent/Mutex.h => tactility/concurrent/mutex.h} (95%) rename TactilityKernel/Include/{Tactility/concurrent/RecursiveMutex.h => tactility/concurrent/recursivemutex.h} (95%) rename TactilityKernel/Include/{Tactility/Delay.h => tactility/delay.h} (91%) rename TactilityKernel/Include/{Tactility/Device.h => tactility/device.h} (98%) rename TactilityKernel/Include/{Tactility/Driver.h => tactility/driver.h} (98%) rename TactilityKernel/Include/{Tactility/drivers/Gpio.h => tactility/drivers/gpio.h} (98%) rename TactilityKernel/Include/{Tactility/drivers/GpioController.h => tactility/drivers/gpio_controller.h} (95%) rename TactilityKernel/Include/{Tactility/drivers/I2cController.h => tactility/drivers/i2c_controller.h} (92%) rename TactilityKernel/Include/{Tactility/drivers/Root.h => tactility/drivers/root.h} (100%) rename TactilityKernel/Include/{Tactility/Error.h => tactility/error.h} (100%) rename TactilityKernel/Include/{Tactility/FreeRTOS => tactility/freertos}/README.md (100%) rename TactilityKernel/Include/{Tactility/FreeRTOS => tactility/freertos}/event_groups.h (87%) rename TactilityKernel/Include/{Tactility/FreeRTOS/FreeRTOS.h => tactility/freertos/freertos.h} (100%) rename TactilityKernel/Include/{Tactility/FreeRTOS => tactility/freertos}/port.h (87%) rename TactilityKernel/Include/{Tactility/FreeRTOS => tactility/freertos}/queue.h (86%) rename TactilityKernel/Include/{Tactility/FreeRTOS => tactility/freertos}/semphr.h (86%) rename TactilityKernel/Include/{Tactility/FreeRTOS => tactility/freertos}/task.h (85%) rename TactilityKernel/Include/{Tactility/FreeRTOS => tactility/freertos}/timers.h (86%) rename TactilityKernel/Include/{Tactility/Log.h => tactility/log.h} (100%) rename TactilityKernel/Include/{Tactility/Time.h => tactility/time.h} (97%) rename TactilityKernel/Source/concurrent/{Dispatcher.cpp => dispatcher.cpp} (95%) rename TactilityKernel/Source/concurrent/{EventGroup.cpp => event_group.cpp} (96%) rename TactilityKernel/Source/{Crash.cpp => crash.cpp} (95%) rename TactilityKernel/Source/{Device.cpp => device.cpp} (98%) rename TactilityKernel/Source/{Driver.cpp => driver.cpp} (96%) rename TactilityKernel/Source/drivers/{GpioController.cpp => gpio_controller.cpp} (92%) rename TactilityKernel/Source/drivers/{I2cController.cpp => i2c_controller.cpp} (90%) rename TactilityKernel/Source/drivers/{Register.cpp => register.cpp} (84%) rename TactilityKernel/Source/drivers/{Root.cpp => root.cpp} (81%) rename TactilityKernel/Source/{Log.cpp => log.cpp} (92%) diff --git a/Buildscripts/DevicetreeCompiler/source/generator.py b/Buildscripts/DevicetreeCompiler/source/generator.py index ebb3e5909..7b60c6f98 100644 --- a/Buildscripts/DevicetreeCompiler/source/generator.py +++ b/Buildscripts/DevicetreeCompiler/source/generator.py @@ -144,9 +144,9 @@ def generate_devicetree_c(filename: str, items: list[object], bindings: list[Bin with open(filename, "w") as file: file.write(dedent('''\ // Default headers - #include - #include - #include + #include + #include + #include // DTS headers ''')) diff --git a/CODING_STYLE_C.md b/CODING_STYLE_C.md new file mode 100644 index 000000000..642976d6d --- /dev/null +++ b/CODING_STYLE_C.md @@ -0,0 +1,96 @@ +# C++ coding Style + +## Naming + +### Files + +Files are lower snake case. + +- Files: `^[0-9a-z_]+$` +- Directories: `^[0-9a-z_]+$` + +Example: +```c++ +some_feature.c +some_feature.h +``` + +### Folders + +Project folders include: +- `source` for source files and public header files +- `private` for private header files +- `include` for projects that require separate header files + +### Macros and consts + +These are all upper snake case: + +```c +#define MY_CONST 1 +#define PRINT_SOMETHING() printf("something") +const int ANOTHER_CONST = 1; +``` + +### Variables + +Variable names and function parameters are lower snake case: + +```c +int some_variable; +``` + +### Enumerations and Structs + +Enums and struct types are upper camel case. +Its fields use lower snake case. + +```c +struct ThreadData { + int some_attribute; +}; +``` + +```c++ +enum SomeResult { + Ok, + NotSupported, + Error +}; +``` + +### Function names + +Function names are lower snake case. + +Example: + +```c++ +void get_limit() { + // ... +} +``` + +If a set of functions relates to a `struct`, the CamelCase struct name is converted to a snake_case_ prefix for the function name: + +```c +struct TextMessage { + // ... +}; + +void text_message_set(struct TextMessage* message) { /* ... */ } + +void text_message_get(struct TextMessage* message) { /* ... */ } + +``` + +### Typedef of simple value types + +Typedefs for simple value types (such as int, int64_t, char) are lower snake case. +They are postfixed with `_t` + +Examples: + +```c++ +typedef uint32_t thread_id_t; +``` diff --git a/CODING_STYLE.md b/CODING_STYLE_CPP.md similarity index 86% rename from CODING_STYLE.md rename to CODING_STYLE_CPP.md index 0001c02d1..c0923ae96 100644 --- a/CODING_STYLE.md +++ b/CODING_STYLE_CPP.md @@ -6,6 +6,10 @@ All code should target C++ language revision 20. If you use CLion, please enable the setting called "Enable ClangFormat" under Settings > Editor > Code Style. +# C projects with C++ code + +In projects that expose a C API with internal C++ code, the C naming conventions are used for language features that are shared. + ## Naming ### Files @@ -21,8 +25,7 @@ SomeFeature.cpp SomeFeature.h ``` -Private/internal headers are postfixed with `Private` before the file extension. -Like `SomeFeaturePrivate.h` +Private/internal headers are placed in a `Private/` directory. ### Folders diff --git a/Devices/lilygo-tlora-pager/Source/Drivers.cpp b/Devices/lilygo-tlora-pager/Source/Drivers.cpp index 1eee16a40..3da59c43f 100644 --- a/Devices/lilygo-tlora-pager/Source/Drivers.cpp +++ b/Devices/lilygo-tlora-pager/Source/Drivers.cpp @@ -1,4 +1,4 @@ -#include +#include extern "C" { diff --git a/Devices/lilygo-tlora-pager/Source/bindings/tlora_pager.h b/Devices/lilygo-tlora-pager/Source/bindings/tlora_pager.h index b550f1d99..a126dd079 100644 --- a/Devices/lilygo-tlora-pager/Source/bindings/tlora_pager.h +++ b/Devices/lilygo-tlora-pager/Source/bindings/tlora_pager.h @@ -4,8 +4,8 @@ extern "C" { #endif -#include -#include +#include +#include #include DEFINE_DEVICETREE(tlora_pager, struct RootConfig) diff --git a/Devices/lilygo-tlora-pager/Source/drivers/Register.cpp b/Devices/lilygo-tlora-pager/Source/drivers/Register.cpp index 1eee16a40..3da59c43f 100644 --- a/Devices/lilygo-tlora-pager/Source/drivers/Register.cpp +++ b/Devices/lilygo-tlora-pager/Source/drivers/Register.cpp @@ -1,4 +1,4 @@ -#include +#include extern "C" { diff --git a/Devices/lilygo-tlora-pager/Source/drivers/TloraPager.cpp b/Devices/lilygo-tlora-pager/Source/drivers/TloraPager.cpp index 9b2fea736..0ff150c05 100644 --- a/Devices/lilygo-tlora-pager/Source/drivers/TloraPager.cpp +++ b/Devices/lilygo-tlora-pager/Source/drivers/TloraPager.cpp @@ -1,6 +1,6 @@ #include "TloraPager.h" -#include +#include #include diff --git a/Devices/lilygo-tlora-pager/Source/drivers/TloraPager.h b/Devices/lilygo-tlora-pager/Source/drivers/TloraPager.h index 07a900101..7f30b2b43 100644 --- a/Devices/lilygo-tlora-pager/Source/drivers/TloraPager.h +++ b/Devices/lilygo-tlora-pager/Source/drivers/TloraPager.h @@ -4,7 +4,7 @@ extern "C" { #endif -#include +#include #ifdef __cplusplus } diff --git a/Devices/lilygo-tlora-pager/lilygo,tlora-pager.dts b/Devices/lilygo-tlora-pager/lilygo,tlora-pager.dts index bdd0f9b1d..06aca8f8d 100644 --- a/Devices/lilygo-tlora-pager/lilygo,tlora-pager.dts +++ b/Devices/lilygo-tlora-pager/lilygo,tlora-pager.dts @@ -1,8 +1,8 @@ /dts-v1/; #include -#include -#include +#include +#include / { compatible = "lilygo,tlora-pager"; diff --git a/Devices/placeholder.dts b/Devices/placeholder.dts index dddca7a85..52596c734 100644 --- a/Devices/placeholder.dts +++ b/Devices/placeholder.dts @@ -1,6 +1,6 @@ /dts-v1/; -#include +#include / { compatible = "root"; diff --git a/Devices/simulator/Source/LvglTask.cpp b/Devices/simulator/Source/LvglTask.cpp index 530a99046..eaddf328a 100644 --- a/Devices/simulator/Source/LvglTask.cpp +++ b/Devices/simulator/Source/LvglTask.cpp @@ -1,9 +1,9 @@ #include "LvglTask.h" -#include -#include #include #include +#include +#include #include #include diff --git a/Devices/simulator/Source/hal/SdlDisplay.h b/Devices/simulator/Source/hal/SdlDisplay.h index eb02f4daf..fca3cb243 100644 --- a/Devices/simulator/Source/hal/SdlDisplay.h +++ b/Devices/simulator/Source/hal/SdlDisplay.h @@ -1,7 +1,7 @@ #pragma once #include "SdlTouch.h" -#include +#include #include /** Hack: variable comes from LvglTask.cpp */ diff --git a/Devices/simulator/Source/hal/SdlKeyboard.h b/Devices/simulator/Source/hal/SdlKeyboard.h index e8476405b..6fc1513e2 100644 --- a/Devices/simulator/Source/hal/SdlKeyboard.h +++ b/Devices/simulator/Source/hal/SdlKeyboard.h @@ -1,8 +1,8 @@ #pragma once -#include -#include #include +#include +#include class SdlKeyboard final : public tt::hal::keyboard::KeyboardDevice { diff --git a/Devices/simulator/Source/hal/SdlTouch.h b/Devices/simulator/Source/hal/SdlTouch.h index be32c97a6..0c3bead69 100644 --- a/Devices/simulator/Source/hal/SdlTouch.h +++ b/Devices/simulator/Source/hal/SdlTouch.h @@ -1,8 +1,8 @@ #pragma once #include "Tactility/hal/touch/TouchDevice.h" -#include #include +#include class SdlTouch final : public tt::hal::touch::TouchDevice { diff --git a/Devices/simulator/simulator.dts b/Devices/simulator/simulator.dts index ce2f44c2c..d3c0fe018 100644 --- a/Devices/simulator/simulator.dts +++ b/Devices/simulator/simulator.dts @@ -1,6 +1,6 @@ /dts-v1/; -#include +#include / { model = "Simulator"; diff --git a/Drivers/DRV2605/Source/Drv2605.cpp b/Drivers/DRV2605/Source/Drv2605.cpp index eba470201..b7e85a1a7 100644 --- a/Drivers/DRV2605/Source/Drv2605.cpp +++ b/Drivers/DRV2605/Source/Drv2605.cpp @@ -1,6 +1,6 @@ #include "Drv2605.h" -#include +#include #include static const auto LOGGER = tt::Logger("DRV2605"); diff --git a/Drivers/EspLcdCompat/Source/EspLcdDisplay.cpp b/Drivers/EspLcdCompat/Source/EspLcdDisplay.cpp index 794deadf6..07c108bca 100644 --- a/Drivers/EspLcdCompat/Source/EspLcdDisplay.cpp +++ b/Drivers/EspLcdCompat/Source/EspLcdDisplay.cpp @@ -1,11 +1,11 @@ #include "EspLcdDisplay.h" #include "EspLcdDisplayDriver.h" -#include -#include -#include #include +#include #include +#include +#include static const auto LOGGER = tt::Logger("EspLcdDisplay"); diff --git a/Drivers/EspLcdCompat/Source/EspLcdDisplay.h b/Drivers/EspLcdCompat/Source/EspLcdDisplay.h index 3ca4e3e6b..d9ae558d1 100644 --- a/Drivers/EspLcdCompat/Source/EspLcdDisplay.h +++ b/Drivers/EspLcdCompat/Source/EspLcdDisplay.h @@ -1,7 +1,7 @@ #pragma once #include -#include +#include #include #include diff --git a/Drivers/EspLcdCompat/Source/EspLcdDisplayV2.cpp b/Drivers/EspLcdCompat/Source/EspLcdDisplayV2.cpp index fe277bdb8..cc316a4a3 100644 --- a/Drivers/EspLcdCompat/Source/EspLcdDisplayV2.cpp +++ b/Drivers/EspLcdCompat/Source/EspLcdDisplayV2.cpp @@ -1,11 +1,11 @@ #include "EspLcdDisplayV2.h" #include "EspLcdDisplayDriver.h" -#include -#include -#include #include +#include #include +#include +#include static const auto LOGGER = tt::Logger("EspLcdDispV2"); diff --git a/Drivers/EspLcdCompat/Source/EspLcdDisplayV2.h b/Drivers/EspLcdCompat/Source/EspLcdDisplayV2.h index ab431dccc..fc318d87d 100644 --- a/Drivers/EspLcdCompat/Source/EspLcdDisplayV2.h +++ b/Drivers/EspLcdCompat/Source/EspLcdDisplayV2.h @@ -1,9 +1,9 @@ #pragma once -#include -#include #include +#include #include +#include #include #include diff --git a/Drivers/RgbDisplay/Source/RgbDisplay.cpp b/Drivers/RgbDisplay/Source/RgbDisplay.cpp index b0d231785..15d583472 100644 --- a/Drivers/RgbDisplay/Source/RgbDisplay.cpp +++ b/Drivers/RgbDisplay/Source/RgbDisplay.cpp @@ -1,6 +1,6 @@ #include "RgbDisplay.h" -#include +#include #include #include diff --git a/Firmware/Source/Main.cpp b/Firmware/Source/Main.cpp index d5477ff5a..aa48542d4 100644 --- a/Firmware/Source/Main.cpp +++ b/Firmware/Source/Main.cpp @@ -1,6 +1,6 @@ #include -#include +#include #include #ifdef ESP_PLATFORM diff --git a/Platforms/PlatformEsp32/Include/Tactility/bindings/esp32_gpio.h b/Platforms/PlatformEsp32/Include/tactility/bindings/esp32_gpio.h similarity index 68% rename from Platforms/PlatformEsp32/Include/Tactility/bindings/esp32_gpio.h rename to Platforms/PlatformEsp32/Include/tactility/bindings/esp32_gpio.h index f11ecdb2e..03b3cf69a 100644 --- a/Platforms/PlatformEsp32/Include/Tactility/bindings/esp32_gpio.h +++ b/Platforms/PlatformEsp32/Include/tactility/bindings/esp32_gpio.h @@ -1,8 +1,8 @@ // SPDX-License-Identifier: Apache-2.0 #pragma once -#include -#include +#include +#include #ifdef __cplusplus extern "C" { diff --git a/Platforms/PlatformEsp32/Include/Tactility/bindings/esp32_i2c.h b/Platforms/PlatformEsp32/Include/tactility/bindings/esp32_i2c.h similarity index 68% rename from Platforms/PlatformEsp32/Include/Tactility/bindings/esp32_i2c.h rename to Platforms/PlatformEsp32/Include/tactility/bindings/esp32_i2c.h index 0a02de04d..16f1e59b3 100644 --- a/Platforms/PlatformEsp32/Include/Tactility/bindings/esp32_i2c.h +++ b/Platforms/PlatformEsp32/Include/tactility/bindings/esp32_i2c.h @@ -1,8 +1,8 @@ // SPDX-License-Identifier: Apache-2.0 #pragma once -#include -#include +#include +#include #ifdef __cplusplus extern "C" { diff --git a/Platforms/PlatformEsp32/Include/Tactility/drivers/Esp32Gpio.h b/Platforms/PlatformEsp32/Include/tactility/drivers/esp32_gpio.h similarity index 100% rename from Platforms/PlatformEsp32/Include/Tactility/drivers/Esp32Gpio.h rename to Platforms/PlatformEsp32/Include/tactility/drivers/esp32_gpio.h diff --git a/Platforms/PlatformEsp32/Include/Tactility/drivers/Esp32I2c.h b/Platforms/PlatformEsp32/Include/tactility/drivers/esp32_i2c.h similarity index 89% rename from Platforms/PlatformEsp32/Include/Tactility/drivers/Esp32I2c.h rename to Platforms/PlatformEsp32/Include/tactility/drivers/esp32_i2c.h index c30a8325d..b57d51de6 100644 --- a/Platforms/PlatformEsp32/Include/Tactility/drivers/Esp32I2c.h +++ b/Platforms/PlatformEsp32/Include/tactility/drivers/esp32_i2c.h @@ -1,7 +1,7 @@ // SPDX-License-Identifier: Apache-2.0 #pragma once -#include +#include #include #ifdef __cplusplus diff --git a/Platforms/PlatformEsp32/Include/Tactility/ErrorEsp32.h b/Platforms/PlatformEsp32/Include/tactility/error_esp32.h similarity index 73% rename from Platforms/PlatformEsp32/Include/Tactility/ErrorEsp32.h rename to Platforms/PlatformEsp32/Include/tactility/error_esp32.h index 425478c8b..e0ab898c3 100644 --- a/Platforms/PlatformEsp32/Include/Tactility/ErrorEsp32.h +++ b/Platforms/PlatformEsp32/Include/tactility/error_esp32.h @@ -2,6 +2,6 @@ #include -#include +#include error_t esp_err_to_error(esp_err_t error); diff --git a/Platforms/PlatformEsp32/Source/drivers/Esp32Gpio.cpp b/Platforms/PlatformEsp32/Source/drivers/esp32_gpio.cpp similarity index 93% rename from Platforms/PlatformEsp32/Source/drivers/Esp32Gpio.cpp rename to Platforms/PlatformEsp32/Source/drivers/esp32_gpio.cpp index 119fc7127..13f861329 100644 --- a/Platforms/PlatformEsp32/Source/drivers/Esp32Gpio.cpp +++ b/Platforms/PlatformEsp32/Source/drivers/esp32_gpio.cpp @@ -1,13 +1,13 @@ // SPDX-License-Identifier: Apache-2.0 #include -#include -#include +#include +#include -#include -#include -#include -#include +#include +#include +#include +#include #define TAG LOG_TAG(esp32_gpio) diff --git a/Platforms/PlatformEsp32/Source/drivers/Esp32I2c.cpp b/Platforms/PlatformEsp32/Source/drivers/esp32_i2c.cpp similarity index 93% rename from Platforms/PlatformEsp32/Source/drivers/Esp32I2c.cpp rename to Platforms/PlatformEsp32/Source/drivers/esp32_i2c.cpp index d8f0f19a4..081ed2994 100644 --- a/Platforms/PlatformEsp32/Source/drivers/Esp32I2c.cpp +++ b/Platforms/PlatformEsp32/Source/drivers/esp32_i2c.cpp @@ -1,13 +1,12 @@ // SPDX-License-Identifier: Apache-2.0 #include -#include -#include +#include +#include +#include -#include "Tactility/ErrorEsp32.h" - -#include -#include +#include +#include #define TAG LOG_TAG(esp32_i2c) diff --git a/Platforms/PlatformEsp32/Source/drivers/Register.cpp b/Platforms/PlatformEsp32/Source/drivers/register.cpp similarity index 89% rename from Platforms/PlatformEsp32/Source/drivers/Register.cpp rename to Platforms/PlatformEsp32/Source/drivers/register.cpp index 133e01f9c..4bdba9e4d 100644 --- a/Platforms/PlatformEsp32/Source/drivers/Register.cpp +++ b/Platforms/PlatformEsp32/Source/drivers/register.cpp @@ -1,5 +1,5 @@ // SPDX-License-Identifier: Apache-2.0 -#include +#include extern "C" { diff --git a/Platforms/PlatformEsp32/Source/ErrorEsp32.cpp b/Platforms/PlatformEsp32/Source/error_esp32.cpp similarity index 92% rename from Platforms/PlatformEsp32/Source/ErrorEsp32.cpp rename to Platforms/PlatformEsp32/Source/error_esp32.cpp index 9b0d7135a..62f72dd59 100644 --- a/Platforms/PlatformEsp32/Source/ErrorEsp32.cpp +++ b/Platforms/PlatformEsp32/Source/error_esp32.cpp @@ -1,5 +1,5 @@ // SPDX-License-Identifier: Apache-2.0 -#include +#include error_t esp_err_to_error(esp_err_t error) { switch (error) { diff --git a/Platforms/PlatformPosix/Source/Register.cpp b/Platforms/PlatformPosix/Source/Register.cpp index b390c12f7..ff1f5e83f 100644 --- a/Platforms/PlatformPosix/Source/Register.cpp +++ b/Platforms/PlatformPosix/Source/Register.cpp @@ -1,5 +1,5 @@ // SPDX-License-Identifier: Apache-2.0 -#include +#include extern "C" { diff --git a/Tactility/Private/Tactility/app/AppInstance.h b/Tactility/Private/Tactility/app/AppInstance.h index dfd10d27b..3e54ee8f5 100644 --- a/Tactility/Private/Tactility/app/AppInstance.h +++ b/Tactility/Private/Tactility/app/AppInstance.h @@ -5,7 +5,7 @@ #include #include -#include +#include #include #include diff --git a/Tactility/Source/app/appdetails/AppDetails.cpp b/Tactility/Source/app/appdetails/AppDetails.cpp index 3614d8e7c..88a6ef78e 100644 --- a/Tactility/Source/app/appdetails/AppDetails.cpp +++ b/Tactility/Source/app/appdetails/AppDetails.cpp @@ -4,7 +4,7 @@ #include #include #include -#include +#include #include #include diff --git a/Tactility/Source/app/files/View.cpp b/Tactility/Source/app/files/View.cpp index 074089767..c0af852b9 100644 --- a/Tactility/Source/app/files/View.cpp +++ b/Tactility/Source/app/files/View.cpp @@ -1,20 +1,20 @@ #include #include +#include +#include +#include +#include +#include #include #include #include #include -#include -#include +#include #include #include -#include -#include -#include #include -#include -#include +#include #include #include diff --git a/Tactility/Source/app/fileselection/View.cpp b/Tactility/Source/app/fileselection/View.cpp index 3acd453d2..f2cf15989 100644 --- a/Tactility/Source/app/fileselection/View.cpp +++ b/Tactility/Source/app/fileselection/View.cpp @@ -1,15 +1,15 @@ #include -#include -#include -#include -#include #include -#include -#include -#include +#include #include #include +#include +#include +#include +#include +#include +#include #include #include diff --git a/Tactility/Source/app/settings/Settings.cpp b/Tactility/Source/app/settings/Settings.cpp index 38a202d2d..8f6e93615 100644 --- a/Tactility/Source/app/settings/Settings.cpp +++ b/Tactility/Source/app/settings/Settings.cpp @@ -3,7 +3,7 @@ #include #include -#include +#include #include #include diff --git a/Tactility/Source/app/wifiapsettings/WifiApSettings.cpp b/Tactility/Source/app/wifiapsettings/WifiApSettings.cpp index 973566f0d..f2ae9c3e0 100644 --- a/Tactility/Source/app/wifiapsettings/WifiApSettings.cpp +++ b/Tactility/Source/app/wifiapsettings/WifiApSettings.cpp @@ -1,16 +1,16 @@ #include "Tactility/lvgl/LvglSync.h" -#include -#include +#include +#include #include #include #include #include -#include -#include -#include +#include #include #include +#include +#include #include diff --git a/Tactility/Source/hal/Hal.cpp b/Tactility/Source/hal/Hal.cpp index 9c58cae11..3423470ce 100644 --- a/Tactility/Source/hal/Hal.cpp +++ b/Tactility/Source/hal/Hal.cpp @@ -1,5 +1,6 @@ +#include #include -#include +#include #include #include #include @@ -7,7 +8,6 @@ #include #include #include -#include #include #include diff --git a/Tactility/Source/hal/gps/GpsInit.cpp b/Tactility/Source/hal/gps/GpsInit.cpp index c20eb6bb2..3aefdacad 100644 --- a/Tactility/Source/hal/gps/GpsInit.cpp +++ b/Tactility/Source/hal/gps/GpsInit.cpp @@ -1,9 +1,9 @@ -#include +#include +#include #include #include #include #include -#include #include diff --git a/Tactility/Source/hal/i2c/I2c.cpp b/Tactility/Source/hal/i2c/I2c.cpp index d01457dd6..7f9703824 100644 --- a/Tactility/Source/hal/i2c/I2c.cpp +++ b/Tactility/Source/hal/i2c/I2c.cpp @@ -1,8 +1,8 @@ #include -#include #include #include +#include namespace tt::hal::i2c { diff --git a/Tactility/Source/kernel/SystemEvents.cpp b/Tactility/Source/kernel/SystemEvents.cpp index 89df4816f..e1e0bd3cc 100644 --- a/Tactility/Source/kernel/SystemEvents.cpp +++ b/Tactility/Source/kernel/SystemEvents.cpp @@ -1,8 +1,8 @@ #include -#include #include #include +#include #include #include diff --git a/Tactility/Source/lvgl/Statusbar.cpp b/Tactility/Source/lvgl/Statusbar.cpp index 90cc80bf5..1bfe3d559 100644 --- a/Tactility/Source/lvgl/Statusbar.cpp +++ b/Tactility/Source/lvgl/Statusbar.cpp @@ -1,17 +1,17 @@ #define LV_USE_PRIVATE_API 1 // For actual lv_obj_t declaration -#include -#include -#include #include -#include -#include -#include +#include #include #include -#include #include #include +#include +#include +#include +#include +#include +#include #include diff --git a/Tactility/Source/lvgl/Toolbar.cpp b/Tactility/Source/lvgl/Toolbar.cpp index 4c1a2f973..a370683b8 100644 --- a/Tactility/Source/lvgl/Toolbar.cpp +++ b/Tactility/Source/lvgl/Toolbar.cpp @@ -2,9 +2,9 @@ #include -#include -#include +#include #include +#include namespace tt::lvgl { diff --git a/Tactility/Source/service/gui/Keyboard.cpp b/Tactility/Source/service/gui/Keyboard.cpp index 99d775b8c..e2d58423a 100644 --- a/Tactility/Source/service/gui/Keyboard.cpp +++ b/Tactility/Source/service/gui/Keyboard.cpp @@ -1,8 +1,8 @@ #include "Tactility/lvgl/Keyboard.h" -#include "Tactility/Check.h" #include "Tactility/lvgl/LvglSync.h" #include "Tactility/service/gui/GuiService.h" +#include #include #include diff --git a/Tactility/Source/service/statusbar/Statusbar.cpp b/Tactility/Source/service/statusbar/Statusbar.cpp index 6f2c2aa77..34c6dca82 100644 --- a/Tactility/Source/service/statusbar/Statusbar.cpp +++ b/Tactility/Source/service/statusbar/Statusbar.cpp @@ -1,18 +1,18 @@ #include -#include +#include +#include +#include +#include #include #include -#include #include #include -#include #include #include #include #include #include -#include namespace tt::service::statusbar { diff --git a/Tactility/Source/service/webserver/WebServerService.cpp b/Tactility/Source/service/webserver/WebServerService.cpp index e95ea03d0..f6bca3270 100644 --- a/Tactility/Source/service/webserver/WebServerService.cpp +++ b/Tactility/Source/service/webserver/WebServerService.cpp @@ -1,6 +1,6 @@ #ifdef ESP_PLATFORM -#include +#include #include #include #include diff --git a/Tactility/Source/service/wifi/Wifi.cpp b/Tactility/Source/service/wifi/Wifi.cpp index 01fdde021..e6e9226df 100644 --- a/Tactility/Source/service/wifi/Wifi.cpp +++ b/Tactility/Source/service/wifi/Wifi.cpp @@ -1,7 +1,7 @@ #include -#include #include +#include #include #include diff --git a/Tactility/Source/service/wifi/WifiEsp.cpp b/Tactility/Source/service/wifi/WifiEsp.cpp index 4c58f7cfd..eac21186f 100644 --- a/Tactility/Source/service/wifi/WifiEsp.cpp +++ b/Tactility/Source/service/wifi/WifiEsp.cpp @@ -6,7 +6,7 @@ #include -#include +#include #include #include #include diff --git a/Tactility/Source/service/wifi/WifiMock.cpp b/Tactility/Source/service/wifi/WifiMock.cpp index d316c514c..47c0c9055 100644 --- a/Tactility/Source/service/wifi/WifiMock.cpp +++ b/Tactility/Source/service/wifi/WifiMock.cpp @@ -7,8 +7,8 @@ #include #include -#include #include +#include #include #include diff --git a/Tactility/Source/settings/Time.cpp b/Tactility/Source/settings/time.cpp similarity index 100% rename from Tactility/Source/settings/Time.cpp rename to Tactility/Source/settings/time.cpp diff --git a/TactilityC/Source/tt_hal_device.cpp b/TactilityC/Source/tt_hal_device.cpp index 0393b13ac..eefc1b374 100644 --- a/TactilityC/Source/tt_hal_device.cpp +++ b/TactilityC/Source/tt_hal_device.cpp @@ -1,6 +1,6 @@ #include "tt_hal_device.h" -#include "Tactility/Check.h" +#include #include diff --git a/TactilityC/Source/tt_hal_display.cpp b/TactilityC/Source/tt_hal_display.cpp index eb35e2375..fbe533a21 100644 --- a/TactilityC/Source/tt_hal_display.cpp +++ b/TactilityC/Source/tt_hal_display.cpp @@ -1,9 +1,10 @@ #include "tt_hal_display.h" -#include "Tactility/Check.h" -#include "Tactility/hal/Device.h" -#include "Tactility/hal/display/DisplayDevice.h" -#include "Tactility/hal/display/DisplayDriver.h" +#include + +#include +#include +#include static ColorFormat toColorFormat(tt::hal::display::ColorFormat format) { switch (format) { diff --git a/TactilityCore/Source/CpuAffinity.cpp b/TactilityCore/Source/CpuAffinity.cpp index 8cdcfce92..86666e7a6 100644 --- a/TactilityCore/Source/CpuAffinity.cpp +++ b/TactilityCore/Source/CpuAffinity.cpp @@ -4,7 +4,7 @@ #include "Tactility/CpuAffinity.h" -#include +#include namespace tt { diff --git a/TactilityCore/Source/crypt/Crypt.cpp b/TactilityCore/Source/crypt/Crypt.cpp index 9d5a1b54f..d8ed13cb7 100644 --- a/TactilityCore/Source/crypt/Crypt.cpp +++ b/TactilityCore/Source/crypt/Crypt.cpp @@ -1,7 +1,7 @@ #include -#include #include +#include #include #include diff --git a/TactilityKernel/Include/Tactility/bindings/bindings.h b/TactilityKernel/Include/tactility/bindings/bindings.h similarity index 100% rename from TactilityKernel/Include/Tactility/bindings/bindings.h rename to TactilityKernel/Include/tactility/bindings/bindings.h diff --git a/TactilityKernel/Include/Tactility/bindings/gpio.h b/TactilityKernel/Include/tactility/bindings/gpio.h similarity index 60% rename from TactilityKernel/Include/Tactility/bindings/gpio.h rename to TactilityKernel/Include/tactility/bindings/gpio.h index b7958b98a..5b9ded5c0 100644 --- a/TactilityKernel/Include/Tactility/bindings/gpio.h +++ b/TactilityKernel/Include/tactility/bindings/gpio.h @@ -2,4 +2,4 @@ #pragma once -#include +#include diff --git a/TactilityKernel/Include/Tactility/bindings/root.h b/TactilityKernel/Include/tactility/bindings/root.h similarity index 56% rename from TactilityKernel/Include/Tactility/bindings/root.h rename to TactilityKernel/Include/tactility/bindings/root.h index 063f00097..59883c1cd 100644 --- a/TactilityKernel/Include/Tactility/bindings/root.h +++ b/TactilityKernel/Include/tactility/bindings/root.h @@ -2,8 +2,8 @@ #pragma once -#include -#include +#include +#include DEFINE_DEVICETREE(root, struct RootConfig) diff --git a/TactilityKernel/Include/Tactility/Check.h b/TactilityKernel/Include/tactility/check.h similarity index 96% rename from TactilityKernel/Include/Tactility/Check.h rename to TactilityKernel/Include/tactility/check.h index a3f7c9da1..fcaf5b7f4 100644 --- a/TactilityKernel/Include/Tactility/Check.h +++ b/TactilityKernel/Include/tactility/check.h @@ -4,7 +4,7 @@ extern "C" { #endif -#include +#include __attribute__((noreturn)) extern void __crash(void); diff --git a/TactilityKernel/Include/Tactility/concurrent/Dispatcher.h b/TactilityKernel/Include/tactility/concurrent/dispatcher.h similarity index 97% rename from TactilityKernel/Include/Tactility/concurrent/Dispatcher.h rename to TactilityKernel/Include/tactility/concurrent/dispatcher.h index 81fd014b8..d704f5eed 100644 --- a/TactilityKernel/Include/Tactility/concurrent/Dispatcher.h +++ b/TactilityKernel/Include/tactility/concurrent/dispatcher.h @@ -5,8 +5,8 @@ */ #pragma once -#include -#include +#include +#include #ifdef __cplusplus extern "C" { diff --git a/TactilityKernel/Include/Tactility/concurrent/EventGroup.h b/TactilityKernel/Include/tactility/concurrent/eventgroup.h similarity index 95% rename from TactilityKernel/Include/Tactility/concurrent/EventGroup.h rename to TactilityKernel/Include/tactility/concurrent/eventgroup.h index bb99b3550..b6f5579c6 100644 --- a/TactilityKernel/Include/Tactility/concurrent/EventGroup.h +++ b/TactilityKernel/Include/tactility/concurrent/eventgroup.h @@ -8,9 +8,9 @@ extern "C" { #include #include -#include -#include -#include +#include +#include +#include static inline void event_group_construct(EventGroupHandle_t* eventGroup) { check(xPortInIsrContext() == pdFALSE); diff --git a/TactilityKernel/Include/Tactility/concurrent/Mutex.h b/TactilityKernel/Include/tactility/concurrent/mutex.h similarity index 95% rename from TactilityKernel/Include/Tactility/concurrent/Mutex.h rename to TactilityKernel/Include/tactility/concurrent/mutex.h index 600b9558f..4d5e3b980 100644 --- a/TactilityKernel/Include/Tactility/concurrent/Mutex.h +++ b/TactilityKernel/Include/tactility/concurrent/mutex.h @@ -5,8 +5,8 @@ #include #include -#include -#include +#include +#include #ifdef __cplusplus extern "C" { diff --git a/TactilityKernel/Include/Tactility/concurrent/RecursiveMutex.h b/TactilityKernel/Include/tactility/concurrent/recursivemutex.h similarity index 95% rename from TactilityKernel/Include/Tactility/concurrent/RecursiveMutex.h rename to TactilityKernel/Include/tactility/concurrent/recursivemutex.h index 357255505..afa6d8b20 100644 --- a/TactilityKernel/Include/Tactility/concurrent/RecursiveMutex.h +++ b/TactilityKernel/Include/tactility/concurrent/recursivemutex.h @@ -2,9 +2,9 @@ #pragma once +#include +#include #include -#include -#include #ifdef __cplusplus extern "C" { diff --git a/TactilityKernel/Include/Tactility/Delay.h b/TactilityKernel/Include/tactility/delay.h similarity index 91% rename from TactilityKernel/Include/Tactility/Delay.h rename to TactilityKernel/Include/tactility/delay.h index 516f0d4e6..5e60bcbf7 100644 --- a/TactilityKernel/Include/Tactility/Delay.h +++ b/TactilityKernel/Include/tactility/delay.h @@ -1,6 +1,6 @@ #pragma once -#include "Time.h" +#include "time.h" #include #ifdef ESP_PLATFORM @@ -9,8 +9,8 @@ #include #endif -#include -#include "Tactility/FreeRTOS/FreeRTOS.h" +#include "tactility/freertos/FreeRTOS.h" +#include #ifdef __cplusplus extern "C" { diff --git a/TactilityKernel/Include/Tactility/Device.h b/TactilityKernel/Include/tactility/device.h similarity index 98% rename from TactilityKernel/Include/Tactility/Device.h rename to TactilityKernel/Include/tactility/device.h index cb6104b46..0fc772473 100644 --- a/TactilityKernel/Include/Tactility/Device.h +++ b/TactilityKernel/Include/tactility/device.h @@ -2,7 +2,7 @@ #pragma once -#include "Driver.h" +#include "driver.h" #ifdef __cplusplus extern "C" { @@ -12,8 +12,8 @@ extern "C" { #include #include -#include "Error.h" -#include +#include "error.h" +#include struct Driver; diff --git a/TactilityKernel/Include/Tactility/Driver.h b/TactilityKernel/Include/tactility/driver.h similarity index 98% rename from TactilityKernel/Include/Tactility/Driver.h rename to TactilityKernel/Include/tactility/driver.h index 341def6fa..f90ca2e39 100644 --- a/TactilityKernel/Include/Tactility/Driver.h +++ b/TactilityKernel/Include/tactility/driver.h @@ -6,8 +6,8 @@ extern "C" { #endif +#include "error.h" #include -#include "Error.h" struct Device; struct DeviceType; diff --git a/TactilityKernel/Include/Tactility/drivers/Gpio.h b/TactilityKernel/Include/tactility/drivers/gpio.h similarity index 98% rename from TactilityKernel/Include/Tactility/drivers/Gpio.h rename to TactilityKernel/Include/tactility/drivers/gpio.h index 1e26ce1b8..05150781a 100644 --- a/TactilityKernel/Include/Tactility/drivers/Gpio.h +++ b/TactilityKernel/Include/tactility/drivers/gpio.h @@ -6,9 +6,9 @@ extern "C" { #endif +#include #include #include -#include #define GPIO_OPTIONS_MASK 0x1f diff --git a/TactilityKernel/Include/Tactility/drivers/GpioController.h b/TactilityKernel/Include/tactility/drivers/gpio_controller.h similarity index 95% rename from TactilityKernel/Include/Tactility/drivers/GpioController.h rename to TactilityKernel/Include/tactility/drivers/gpio_controller.h index 6b3e31ce7..15038dc81 100644 --- a/TactilityKernel/Include/Tactility/drivers/GpioController.h +++ b/TactilityKernel/Include/tactility/drivers/gpio_controller.h @@ -6,8 +6,8 @@ extern "C" { #endif -#include "Gpio.h" -#include +#include "gpio.h" +#include struct GpioControllerApi { error_t (*set_level)(struct Device* device, gpio_pin_t pin, bool high); diff --git a/TactilityKernel/Include/Tactility/drivers/I2cController.h b/TactilityKernel/Include/tactility/drivers/i2c_controller.h similarity index 92% rename from TactilityKernel/Include/Tactility/drivers/I2cController.h rename to TactilityKernel/Include/tactility/drivers/i2c_controller.h index c33a8d2f5..2995002bc 100644 --- a/TactilityKernel/Include/Tactility/drivers/I2cController.h +++ b/TactilityKernel/Include/tactility/drivers/i2c_controller.h @@ -8,10 +8,10 @@ extern "C" { #include -#include "Gpio.h" +#include "gpio.h" -#include -#include +#include +#include struct I2cControllerApi { error_t (*read)(struct Device* device, uint8_t address, uint8_t* data, size_t dataSize, TickType_t timeout); diff --git a/TactilityKernel/Include/Tactility/drivers/Root.h b/TactilityKernel/Include/tactility/drivers/root.h similarity index 100% rename from TactilityKernel/Include/Tactility/drivers/Root.h rename to TactilityKernel/Include/tactility/drivers/root.h diff --git a/TactilityKernel/Include/Tactility/Error.h b/TactilityKernel/Include/tactility/error.h similarity index 100% rename from TactilityKernel/Include/Tactility/Error.h rename to TactilityKernel/Include/tactility/error.h diff --git a/TactilityKernel/Include/Tactility/FreeRTOS/README.md b/TactilityKernel/Include/tactility/freertos/README.md similarity index 100% rename from TactilityKernel/Include/Tactility/FreeRTOS/README.md rename to TactilityKernel/Include/tactility/freertos/README.md diff --git a/TactilityKernel/Include/Tactility/FreeRTOS/event_groups.h b/TactilityKernel/Include/tactility/freertos/event_groups.h similarity index 87% rename from TactilityKernel/Include/Tactility/FreeRTOS/event_groups.h rename to TactilityKernel/Include/tactility/freertos/event_groups.h index 180577816..0dfa02470 100644 --- a/TactilityKernel/Include/Tactility/FreeRTOS/event_groups.h +++ b/TactilityKernel/Include/tactility/freertos/event_groups.h @@ -2,7 +2,7 @@ #pragma once -#include "FreeRTOS.h" +#include "freertos.h" #ifdef ESP_PLATFORM #include diff --git a/TactilityKernel/Include/Tactility/FreeRTOS/FreeRTOS.h b/TactilityKernel/Include/tactility/freertos/freertos.h similarity index 100% rename from TactilityKernel/Include/Tactility/FreeRTOS/FreeRTOS.h rename to TactilityKernel/Include/tactility/freertos/freertos.h diff --git a/TactilityKernel/Include/Tactility/FreeRTOS/port.h b/TactilityKernel/Include/tactility/freertos/port.h similarity index 87% rename from TactilityKernel/Include/Tactility/FreeRTOS/port.h rename to TactilityKernel/Include/tactility/freertos/port.h index 8ef156998..7618269c8 100644 --- a/TactilityKernel/Include/Tactility/FreeRTOS/port.h +++ b/TactilityKernel/Include/tactility/freertos/port.h @@ -2,7 +2,7 @@ #pragma once -#include "FreeRTOS.h" +#include "freertos.h" #ifndef ESP_PLATFORM #define xPortInIsrContext() (pdFALSE) diff --git a/TactilityKernel/Include/Tactility/FreeRTOS/queue.h b/TactilityKernel/Include/tactility/freertos/queue.h similarity index 86% rename from TactilityKernel/Include/Tactility/FreeRTOS/queue.h rename to TactilityKernel/Include/tactility/freertos/queue.h index aef059493..d2137164a 100644 --- a/TactilityKernel/Include/Tactility/FreeRTOS/queue.h +++ b/TactilityKernel/Include/tactility/freertos/queue.h @@ -2,7 +2,7 @@ #pragma once -#include "FreeRTOS.h" +#include "freertos.h" #ifdef ESP_PLATFORM #include diff --git a/TactilityKernel/Include/Tactility/FreeRTOS/semphr.h b/TactilityKernel/Include/tactility/freertos/semphr.h similarity index 86% rename from TactilityKernel/Include/Tactility/FreeRTOS/semphr.h rename to TactilityKernel/Include/tactility/freertos/semphr.h index b94ea2b0d..bdf71ca7e 100644 --- a/TactilityKernel/Include/Tactility/FreeRTOS/semphr.h +++ b/TactilityKernel/Include/tactility/freertos/semphr.h @@ -2,7 +2,7 @@ #pragma once -#include "FreeRTOS.h" +#include "freertos.h" #ifdef ESP_PLATFORM #include diff --git a/TactilityKernel/Include/Tactility/FreeRTOS/task.h b/TactilityKernel/Include/tactility/freertos/task.h similarity index 85% rename from TactilityKernel/Include/Tactility/FreeRTOS/task.h rename to TactilityKernel/Include/tactility/freertos/task.h index b3bbda926..fd0f7b57d 100644 --- a/TactilityKernel/Include/Tactility/FreeRTOS/task.h +++ b/TactilityKernel/Include/tactility/freertos/task.h @@ -2,7 +2,7 @@ #pragma once -#include "FreeRTOS.h" +#include "freertos.h" #ifdef ESP_PLATFORM #include diff --git a/TactilityKernel/Include/Tactility/FreeRTOS/timers.h b/TactilityKernel/Include/tactility/freertos/timers.h similarity index 86% rename from TactilityKernel/Include/Tactility/FreeRTOS/timers.h rename to TactilityKernel/Include/tactility/freertos/timers.h index 61ccd9976..c541bf205 100644 --- a/TactilityKernel/Include/Tactility/FreeRTOS/timers.h +++ b/TactilityKernel/Include/tactility/freertos/timers.h @@ -2,7 +2,7 @@ #pragma once -#include "FreeRTOS.h" +#include "freertos.h" #ifdef ESP_PLATFORM #include diff --git a/TactilityKernel/Include/Tactility/Log.h b/TactilityKernel/Include/tactility/log.h similarity index 100% rename from TactilityKernel/Include/Tactility/Log.h rename to TactilityKernel/Include/tactility/log.h diff --git a/TactilityKernel/Include/Tactility/Time.h b/TactilityKernel/Include/tactility/time.h similarity index 97% rename from TactilityKernel/Include/Tactility/Time.h rename to TactilityKernel/Include/tactility/time.h index 17dcbbcf7..0701ddeb3 100644 --- a/TactilityKernel/Include/Tactility/Time.h +++ b/TactilityKernel/Include/tactility/time.h @@ -2,7 +2,7 @@ #include -#include "Tactility/FreeRTOS/task.h" +#include "tactility/freertos/task.h" #ifdef ESP_PLATFORM #include diff --git a/TactilityKernel/Source/concurrent/Dispatcher.cpp b/TactilityKernel/Source/concurrent/dispatcher.cpp similarity index 95% rename from TactilityKernel/Source/concurrent/Dispatcher.cpp rename to TactilityKernel/Source/concurrent/dispatcher.cpp index ae72fb9d0..9fbc8f2a6 100644 --- a/TactilityKernel/Source/concurrent/Dispatcher.cpp +++ b/TactilityKernel/Source/concurrent/dispatcher.cpp @@ -2,13 +2,13 @@ #include -#include +#include -#include "Tactility/Error.h" +#include "tactility/error.h" -#include -#include -#include +#include +#include +#include #include #define TAG LOG_TAG("Dispatcher") diff --git a/TactilityKernel/Source/concurrent/EventGroup.cpp b/TactilityKernel/Source/concurrent/event_group.cpp similarity index 96% rename from TactilityKernel/Source/concurrent/EventGroup.cpp rename to TactilityKernel/Source/concurrent/event_group.cpp index 26ea21a01..a2c3d6036 100644 --- a/TactilityKernel/Source/concurrent/EventGroup.cpp +++ b/TactilityKernel/Source/concurrent/event_group.cpp @@ -1,7 +1,7 @@ // SPDX-License-Identifier: Apache-2.0 -#include -#include +#include +#include #ifdef __cplusplus extern "C" { diff --git a/TactilityKernel/Source/Crash.cpp b/TactilityKernel/Source/crash.cpp similarity index 95% rename from TactilityKernel/Source/Crash.cpp rename to TactilityKernel/Source/crash.cpp index 4edb98137..ff728d9fc 100644 --- a/TactilityKernel/Source/Crash.cpp +++ b/TactilityKernel/Source/crash.cpp @@ -1,5 +1,5 @@ -#include -#include +#include +#include static const auto* TAG = LOG_TAG("Kernel"); diff --git a/TactilityKernel/Source/Device.cpp b/TactilityKernel/Source/device.cpp similarity index 98% rename from TactilityKernel/Source/Device.cpp rename to TactilityKernel/Source/device.cpp index d90e393d3..ffa42421e 100644 --- a/TactilityKernel/Source/Device.cpp +++ b/TactilityKernel/Source/device.cpp @@ -1,9 +1,9 @@ // SPDX-License-Identifier: Apache-2.0 -#include -#include -#include -#include +#include +#include +#include +#include #include #include diff --git a/TactilityKernel/Source/Driver.cpp b/TactilityKernel/Source/driver.cpp similarity index 96% rename from TactilityKernel/Source/Driver.cpp rename to TactilityKernel/Source/driver.cpp index 97a25b0d7..e32ffa92b 100644 --- a/TactilityKernel/Source/Driver.cpp +++ b/TactilityKernel/Source/driver.cpp @@ -4,11 +4,11 @@ #include #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #define TAG LOG_TAG(driver) diff --git a/TactilityKernel/Source/drivers/GpioController.cpp b/TactilityKernel/Source/drivers/gpio_controller.cpp similarity index 92% rename from TactilityKernel/Source/drivers/GpioController.cpp rename to TactilityKernel/Source/drivers/gpio_controller.cpp index 4fbbd4d74..f37eab50a 100644 --- a/TactilityKernel/Source/drivers/GpioController.cpp +++ b/TactilityKernel/Source/drivers/gpio_controller.cpp @@ -1,7 +1,7 @@ // SPDX-License-Identifier: Apache-2.0 -#include -#include +#include +#include #define GPIO_DRIVER_API(driver) ((struct GpioControllerApi*)driver->api) diff --git a/TactilityKernel/Source/drivers/I2cController.cpp b/TactilityKernel/Source/drivers/i2c_controller.cpp similarity index 90% rename from TactilityKernel/Source/drivers/I2cController.cpp rename to TactilityKernel/Source/drivers/i2c_controller.cpp index 28a507f61..1efaf2565 100644 --- a/TactilityKernel/Source/drivers/I2cController.cpp +++ b/TactilityKernel/Source/drivers/i2c_controller.cpp @@ -1,8 +1,8 @@ // SPDX-License-Identifier: Apache-2.0 -#include -#include -#include +#include +#include +#include #define I2C_DRIVER_API(driver) ((struct I2cControllerApi*)driver->api) diff --git a/TactilityKernel/Source/drivers/Register.cpp b/TactilityKernel/Source/drivers/register.cpp similarity index 84% rename from TactilityKernel/Source/drivers/Register.cpp rename to TactilityKernel/Source/drivers/register.cpp index 776c19962..baec05947 100644 --- a/TactilityKernel/Source/drivers/Register.cpp +++ b/TactilityKernel/Source/drivers/register.cpp @@ -1,6 +1,6 @@ // SPDX-License-Identifier: Apache-2.0 -#include +#include extern "C" { diff --git a/TactilityKernel/Source/drivers/Root.cpp b/TactilityKernel/Source/drivers/root.cpp similarity index 81% rename from TactilityKernel/Source/drivers/Root.cpp rename to TactilityKernel/Source/drivers/root.cpp index 7229b6403..e8fef4fbe 100644 --- a/TactilityKernel/Source/drivers/Root.cpp +++ b/TactilityKernel/Source/drivers/root.cpp @@ -1,7 +1,7 @@ // SPDX-License-Identifier: Apache-2.0 -#include -#include +#include +#include extern "C" { diff --git a/TactilityKernel/Source/Log.cpp b/TactilityKernel/Source/log.cpp similarity index 92% rename from TactilityKernel/Source/Log.cpp rename to TactilityKernel/Source/log.cpp index 5c378ffe2..cb404dfbe 100644 --- a/TactilityKernel/Source/Log.cpp +++ b/TactilityKernel/Source/log.cpp @@ -2,7 +2,7 @@ #ifndef ESP_PLATFORM -#include +#include #include #include diff --git a/Tests/TactilityKernel/DeviceTest.cpp b/Tests/TactilityKernel/DeviceTest.cpp index 922066ad7..fb6473740 100644 --- a/Tests/TactilityKernel/DeviceTest.cpp +++ b/Tests/TactilityKernel/DeviceTest.cpp @@ -3,7 +3,7 @@ #include #include -#include +#include TEST_CASE("device_construct and device_destruct should set and unset the correct fields") { Device device = { 0 }; diff --git a/Tests/TactilityKernel/DispatcherTest.cpp b/Tests/TactilityKernel/DispatcherTest.cpp index 8270e8d78..da3e0c936 100644 --- a/Tests/TactilityKernel/DispatcherTest.cpp +++ b/Tests/TactilityKernel/DispatcherTest.cpp @@ -1,6 +1,6 @@ #include "doctest.h" #include -#include +#include TEST_CASE("dispatcher test") { DispatcherHandle_t dispatcher = dispatcher_alloc(); diff --git a/Tests/TactilityKernel/DriverIntegrationTest.cpp b/Tests/TactilityKernel/DriverIntegrationTest.cpp index c97cfd759..f8708d546 100644 --- a/Tests/TactilityKernel/DriverIntegrationTest.cpp +++ b/Tests/TactilityKernel/DriverIntegrationTest.cpp @@ -1,6 +1,6 @@ #include "doctest.h" -#include -#include +#include +#include struct IntegrationDriverConfig { int startResult; diff --git a/Tests/TactilityKernel/DriverTest.cpp b/Tests/TactilityKernel/DriverTest.cpp index c5201b5c3..df3262955 100644 --- a/Tests/TactilityKernel/DriverTest.cpp +++ b/Tests/TactilityKernel/DriverTest.cpp @@ -1,5 +1,5 @@ #include "doctest.h" -#include +#include TEST_CASE("driver_construct and driver_destruct should set and unset the correct fields") { Driver driver = { 0 }; diff --git a/Tests/TactilityKernel/MutexTest.cpp b/Tests/TactilityKernel/MutexTest.cpp index a5eb8a1bc..3d8a32b24 100644 --- a/Tests/TactilityKernel/MutexTest.cpp +++ b/Tests/TactilityKernel/MutexTest.cpp @@ -1,5 +1,5 @@ #include "doctest.h" -#include +#include TEST_CASE("mutex_construct and mutex_destruct should properly set the handle") { Mutex mutex = { 0 }; diff --git a/Tests/TactilityKernel/RecursiveMutexTest.cpp b/Tests/TactilityKernel/RecursiveMutexTest.cpp index 1eda5a651..2d2594615 100644 --- a/Tests/TactilityKernel/RecursiveMutexTest.cpp +++ b/Tests/TactilityKernel/RecursiveMutexTest.cpp @@ -1,5 +1,5 @@ #include "doctest.h" -#include +#include TEST_CASE("recursive_mutex_construct and mutex_destruct should properly set the handle") { RecursiveMutex mutex = { 0 }; diff --git a/Tests/TactilityKernel/TimeAndDelay.cpp b/Tests/TactilityKernel/TimeAndDelay.cpp index 753368f14..4f6512445 100644 --- a/Tests/TactilityKernel/TimeAndDelay.cpp +++ b/Tests/TactilityKernel/TimeAndDelay.cpp @@ -1,6 +1,6 @@ #include "doctest.h" -#include -#include +#include +#include TEST_CASE("delay ticks should be accurate within 1 tick") { auto start_time = get_ticks(); From 1f898587280d13ceaa4fa403ebe94b7c42471e91 Mon Sep 17 00:00:00 2001 From: Ken Van Hoeylandt Date: Tue, 27 Jan 2026 17:46:02 +0100 Subject: [PATCH 2/3] Fixes --- CODING_STYLE_C.md | 10 +++++----- .../concurrent/{recursivemutex.h => recursive_mutex.h} | 0 TactilityKernel/Include/tactility/delay.h | 2 +- Tests/TactilityKernel/DeviceTest.cpp | 2 +- Tests/TactilityKernel/DispatcherTest.cpp | 4 ++-- Tests/TactilityKernel/DriverIntegrationTest.cpp | 2 +- Tests/TactilityKernel/Main.cpp | 2 +- Tests/TactilityKernel/MutexTest.cpp | 2 +- Tests/TactilityKernel/RecursiveMutexTest.cpp | 2 +- Tests/TactilityKernel/TimeAndDelay.cpp | 4 ++-- 10 files changed, 15 insertions(+), 15 deletions(-) rename TactilityKernel/Include/tactility/concurrent/{recursivemutex.h => recursive_mutex.h} (100%) diff --git a/CODING_STYLE_C.md b/CODING_STYLE_C.md index 642976d6d..f48219db6 100644 --- a/CODING_STYLE_C.md +++ b/CODING_STYLE_C.md @@ -1,4 +1,4 @@ -# C++ coding Style +# C coding Style ## Naming @@ -10,7 +10,7 @@ Files are lower snake case. - Directories: `^[0-9a-z_]+$` Example: -```c++ +```c some_feature.c some_feature.h ``` @@ -51,7 +51,7 @@ struct ThreadData { }; ``` -```c++ +```c enum SomeResult { Ok, NotSupported, @@ -65,7 +65,7 @@ Function names are lower snake case. Example: -```c++ +```c void get_limit() { // ... } @@ -91,6 +91,6 @@ They are postfixed with `_t` Examples: -```c++ +```c typedef uint32_t thread_id_t; ``` diff --git a/TactilityKernel/Include/tactility/concurrent/recursivemutex.h b/TactilityKernel/Include/tactility/concurrent/recursive_mutex.h similarity index 100% rename from TactilityKernel/Include/tactility/concurrent/recursivemutex.h rename to TactilityKernel/Include/tactility/concurrent/recursive_mutex.h diff --git a/TactilityKernel/Include/tactility/delay.h b/TactilityKernel/Include/tactility/delay.h index 5e60bcbf7..2d969e797 100644 --- a/TactilityKernel/Include/tactility/delay.h +++ b/TactilityKernel/Include/tactility/delay.h @@ -9,7 +9,7 @@ #include #endif -#include "tactility/freertos/FreeRTOS.h" +#include #include #ifdef __cplusplus diff --git a/Tests/TactilityKernel/DeviceTest.cpp b/Tests/TactilityKernel/DeviceTest.cpp index fb6473740..b0060d034 100644 --- a/Tests/TactilityKernel/DeviceTest.cpp +++ b/Tests/TactilityKernel/DeviceTest.cpp @@ -3,7 +3,7 @@ #include #include -#include +#include TEST_CASE("device_construct and device_destruct should set and unset the correct fields") { Device device = { 0 }; diff --git a/Tests/TactilityKernel/DispatcherTest.cpp b/Tests/TactilityKernel/DispatcherTest.cpp index da3e0c936..5eb834964 100644 --- a/Tests/TactilityKernel/DispatcherTest.cpp +++ b/Tests/TactilityKernel/DispatcherTest.cpp @@ -1,6 +1,6 @@ #include "doctest.h" -#include -#include +#include +#include TEST_CASE("dispatcher test") { DispatcherHandle_t dispatcher = dispatcher_alloc(); diff --git a/Tests/TactilityKernel/DriverIntegrationTest.cpp b/Tests/TactilityKernel/DriverIntegrationTest.cpp index f8708d546..1a30de27e 100644 --- a/Tests/TactilityKernel/DriverIntegrationTest.cpp +++ b/Tests/TactilityKernel/DriverIntegrationTest.cpp @@ -1,6 +1,6 @@ #include "doctest.h" #include -#include +#include struct IntegrationDriverConfig { int startResult; diff --git a/Tests/TactilityKernel/Main.cpp b/Tests/TactilityKernel/Main.cpp index 6498121d1..6adf361fa 100644 --- a/Tests/TactilityKernel/Main.cpp +++ b/Tests/TactilityKernel/Main.cpp @@ -2,7 +2,7 @@ #include "doctest.h" #include -#include +#include typedef struct { int argc; diff --git a/Tests/TactilityKernel/MutexTest.cpp b/Tests/TactilityKernel/MutexTest.cpp index 3d8a32b24..bc5d70b74 100644 --- a/Tests/TactilityKernel/MutexTest.cpp +++ b/Tests/TactilityKernel/MutexTest.cpp @@ -1,5 +1,5 @@ #include "doctest.h" -#include +#include TEST_CASE("mutex_construct and mutex_destruct should properly set the handle") { Mutex mutex = { 0 }; diff --git a/Tests/TactilityKernel/RecursiveMutexTest.cpp b/Tests/TactilityKernel/RecursiveMutexTest.cpp index 2d2594615..30bf6c435 100644 --- a/Tests/TactilityKernel/RecursiveMutexTest.cpp +++ b/Tests/TactilityKernel/RecursiveMutexTest.cpp @@ -1,5 +1,5 @@ #include "doctest.h" -#include +#include TEST_CASE("recursive_mutex_construct and mutex_destruct should properly set the handle") { RecursiveMutex mutex = { 0 }; diff --git a/Tests/TactilityKernel/TimeAndDelay.cpp b/Tests/TactilityKernel/TimeAndDelay.cpp index 4f6512445..e959f8bb5 100644 --- a/Tests/TactilityKernel/TimeAndDelay.cpp +++ b/Tests/TactilityKernel/TimeAndDelay.cpp @@ -1,6 +1,6 @@ #include "doctest.h" -#include -#include +#include +#include TEST_CASE("delay ticks should be accurate within 1 tick") { auto start_time = get_ticks(); From dab76ca3a66c78a7c39a778d0938a79c6fa399b8 Mon Sep 17 00:00:00 2001 From: Ken Van Hoeylandt Date: Tue, 27 Jan 2026 20:11:21 +0100 Subject: [PATCH 3/3] Add missing type --- CODING_STYLE_CPP.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CODING_STYLE_CPP.md b/CODING_STYLE_CPP.md index c0923ae96..7086cabec 100644 --- a/CODING_STYLE_CPP.md +++ b/CODING_STYLE_CPP.md @@ -72,7 +72,7 @@ struct ThreadData { `enum class` or `enum struct` is preferred over plain `enum` because of scoping. It's styled like this: ```c++ -enum class { +enum class SomeType { Ok, NotSupported, Error