From d551e467b88c3629321f2dfacc3dba4340da6034 Mon Sep 17 00:00:00 2001 From: Ken Van Hoeylandt Date: Tue, 27 Jan 2026 20:17:33 +0100 Subject: [PATCH] Moved and renamed files for consistent C code style (#463) * **Documentation** * Added new C coding style guide detailing naming conventions for files, directories, macros, constants, variables, functions, and type definitions with illustrative examples. * Updated C++ coding style documentation with clarifications on C naming conventions and header directory organization patterns. * **Refactor** * Updated header include paths throughout the codebase to use lowercase naming conventions consistently. --- .../DevicetreeCompiler/source/generator.py | 6 +- CODING_STYLE_C.md | 96 +++++++++++++++++++ CODING_STYLE.md => CODING_STYLE_CPP.md | 9 +- 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/recursive_mutex.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 | 4 +- .../TactilityKernel/DriverIntegrationTest.cpp | 4 +- Tests/TactilityKernel/DriverTest.cpp | 2 +- Tests/TactilityKernel/Main.cpp | 2 +- Tests/TactilityKernel/MutexTest.cpp | 2 +- Tests/TactilityKernel/RecursiveMutexTest.cpp | 2 +- Tests/TactilityKernel/TimeAndDelay.cpp | 4 +- 99 files changed, 278 insertions(+), 179 deletions(-) create mode 100644 CODING_STYLE_C.md rename CODING_STYLE.md => CODING_STYLE_CPP.md (85%) 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/recursive_mutex.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 (82%) 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} (90%) diff --git a/Buildscripts/DevicetreeCompiler/source/generator.py b/Buildscripts/DevicetreeCompiler/source/generator.py index ebb3e590..7b60c6f9 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 00000000..f48219db --- /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 85% rename from CODING_STYLE.md rename to CODING_STYLE_CPP.md index 0001c02d..7086cabe 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 @@ -69,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 diff --git a/Devices/lilygo-tlora-pager/Source/Drivers.cpp b/Devices/lilygo-tlora-pager/Source/Drivers.cpp index 1eee16a4..3da59c43 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 b550f1d9..a126dd07 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 1eee16a4..3da59c43 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 9b2fea73..0ff150c0 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 07a90010..7f30b2b4 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 bdd0f9b1..06aca8f8 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 dddca7a8..52596c73 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 530a9904..eaddf328 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 eb02f4da..fca3cb24 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 e8476405..6fc1513e 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 be32c97a..0c3bead6 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 ce2f44c2..d3c0fe01 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 eba47020..b7e85a1a 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 794deadf..07c108bc 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 3ca4e3e6..d9ae558d 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 fe277bdb..cc316a4a 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 ab431dcc..fc318d87 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 b0d23178..15d58347 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 d5477ff5..aa48542d 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 f11ecdb2..03b3cf69 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 0a02de04..16f1e59b 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 c30a8325..b57d51de 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 425478c8..e0ab898c 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 119fc712..13f86132 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 d8f0f19a..081ed299 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 133e01f9..4bdba9e4 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 9b0d7135..62f72dd5 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 b390c12f..ff1f5e83 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 dfd10d27..3e54ee8f 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 3614d8e7..88a6ef78 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 07408976..c0af852b 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 3acd453d..f2cf1598 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 38a202d2..8f6e9361 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 973566f0..f2ae9c3e 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 9c58cae1..3423470c 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 c20eb6bb..3aefdaca 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 d01457dd..7f970382 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 89df4816..e1e0bd3c 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 90cc80bf..1bfe3d55 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 4c1a2f97..a370683b 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 99d775b8..e2d58423 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 6f2c2aa7..34c6dca8 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 e95ea03d..f6bca327 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 01fdde02..e6e9226d 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 4c58f7cf..eac21186 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 d316c514..47c0c905 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 0393b13a..eefc1b37 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 eb35e237..fbe533a2 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 8cdcfce9..86666e7a 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 9d5a1b54..d8ed13cb 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 b7958b98..5b9ded5c 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 063f0009..59883c1c 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 a3f7c9da..fcaf5b7f 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 81fd014b..d704f5ee 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 bb99b355..b6f5579c 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 600b9558..4d5e3b98 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/recursive_mutex.h similarity index 95% rename from TactilityKernel/Include/Tactility/concurrent/RecursiveMutex.h rename to TactilityKernel/Include/tactility/concurrent/recursive_mutex.h index 35725550..afa6d8b2 100644 --- a/TactilityKernel/Include/Tactility/concurrent/RecursiveMutex.h +++ b/TactilityKernel/Include/tactility/concurrent/recursive_mutex.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 516f0d4e..2d969e79 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 +#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 cb6104b4..0fc77247 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 341def6f..f90ca2e3 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 1e26ce1b..05150781 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 6b3e31ce..15038dc8 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 c33a8d2f..2995002b 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 18057781..0dfa0247 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 8ef15699..7618269c 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 aef05949..d2137164 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 82% rename from TactilityKernel/Include/Tactility/FreeRTOS/semphr.h rename to TactilityKernel/Include/tactility/freertos/semphr.h index b94ea2b0..bdf71ca7 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 b3bbda92..fd0f7b57 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 61ccd997..c541bf20 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 17dcbbcf..0701ddeb 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 ae72fb9d..9fbc8f2a 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 26ea21a0..a2c3d603 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 4edb9813..ff728d9f 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 d90e393d..ffa42421 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 97a25b0d..e32ffa92 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 4fbbd4d7..f37eab50 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 28a507f6..1efaf256 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 776c1996..baec0594 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 7229b640..e8fef4fb 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 90% rename from TactilityKernel/Source/Log.cpp rename to TactilityKernel/Source/log.cpp index 5c378ffe..cb404dfb 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 922066ad..b0060d03 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 8270e8d7..5eb83496 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 c97cfd75..1a30de27 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 c5201b5c..df326295 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/Main.cpp b/Tests/TactilityKernel/Main.cpp index 6498121d..6adf361f 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 a5eb8a1b..bc5d70b7 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 1eda5a65..30bf6c43 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 753368f1..e959f8bb 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();