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.
This commit is contained in:
Ken Van Hoeylandt
2026-01-27 20:17:33 +01:00
committed by GitHub
parent c05d46a28c
commit d551e467b8
99 changed files with 278 additions and 179 deletions
@@ -2,4 +2,4 @@
#pragma once
#include <Tactility/drivers/Gpio.h>
#include <tactility/drivers/gpio.h>
@@ -2,8 +2,8 @@
#pragma once
#include <Tactility/bindings/bindings.h>
#include <Tactility/drivers/Root.h>
#include <tactility/bindings/bindings.h>
#include <tactility/drivers/root.h>
DEFINE_DEVICETREE(root, struct RootConfig)
@@ -4,7 +4,7 @@
extern "C" {
#endif
#include <Tactility/Log.h>
#include <tactility/log.h>
__attribute__((noreturn)) extern void __crash(void);
@@ -5,8 +5,8 @@
*/
#pragma once
#include <Tactility/Error.h>
#include <Tactility/FreeRTOS/FreeRTOS.h>
#include <tactility/freertos/freertos.h>
#include <tactility/error.h>
#ifdef __cplusplus
extern "C" {
@@ -8,9 +8,9 @@ extern "C" {
#include <stdbool.h>
#include <stdint.h>
#include <Tactility/Check.h>
#include <Tactility/Error.h>
#include <Tactility/FreeRTOS/event_groups.h>
#include <tactility/freertos/event_groups.h>
#include <tactility/check.h>
#include <tactility/error.h>
static inline void event_group_construct(EventGroupHandle_t* eventGroup) {
check(xPortInIsrContext() == pdFALSE);
@@ -5,8 +5,8 @@
#include <assert.h>
#include <stdbool.h>
#include <Tactility/Check.h>
#include <Tactility/FreeRTOS/semphr.h>
#include <tactility/freertos/semphr.h>
#include <tactility/check.h>
#ifdef __cplusplus
extern "C" {
@@ -2,9 +2,9 @@
#pragma once
#include <tactility/freertos/semphr.h>
#include <tactility/check.h>
#include <stdbool.h>
#include <Tactility/Check.h>
#include <Tactility/FreeRTOS/semphr.h>
#ifdef __cplusplus
extern "C" {
@@ -1,6 +1,6 @@
#pragma once
#include "Time.h"
#include "time.h"
#include <stdint.h>
#ifdef ESP_PLATFORM
@@ -9,8 +9,8 @@
#include <unistd.h>
#endif
#include <Tactility/Check.h>
#include "Tactility/FreeRTOS/FreeRTOS.h"
#include <tactility/freertos/freertos.h>
#include <tactility/check.h>
#ifdef __cplusplus
extern "C" {
@@ -2,7 +2,7 @@
#pragma once
#include "Driver.h"
#include "driver.h"
#ifdef __cplusplus
extern "C" {
@@ -12,8 +12,8 @@ extern "C" {
#include <stddef.h>
#include <stdint.h>
#include "Error.h"
#include <Tactility/concurrent/Mutex.h>
#include "error.h"
#include <tactility/concurrent/mutex.h>
struct Driver;
@@ -6,8 +6,8 @@
extern "C" {
#endif
#include "error.h"
#include <stdbool.h>
#include "Error.h"
struct Device;
struct DeviceType;
@@ -6,9 +6,9 @@
extern "C" {
#endif
#include <tactility/device.h>
#include <stdbool.h>
#include <stdint.h>
#include <Tactility/Device.h>
#define GPIO_OPTIONS_MASK 0x1f
@@ -6,8 +6,8 @@
extern "C" {
#endif
#include "Gpio.h"
#include <Tactility/Error.h>
#include "gpio.h"
#include <tactility/error.h>
struct GpioControllerApi {
error_t (*set_level)(struct Device* device, gpio_pin_t pin, bool high);
@@ -8,10 +8,10 @@ extern "C" {
#include <stdint.h>
#include "Gpio.h"
#include "gpio.h"
#include <Tactility/FreeRTOS/FreeRTOS.h>
#include <Tactility/Error.h>
#include <tactility/freertos/freertos.h>
#include <tactility/error.h>
struct I2cControllerApi {
error_t (*read)(struct Device* device, uint8_t address, uint8_t* data, size_t dataSize, TickType_t timeout);
@@ -2,7 +2,7 @@
#pragma once
#include "FreeRTOS.h"
#include "freertos.h"
#ifdef ESP_PLATFORM
#include <freertos/event_groups.h>
@@ -2,7 +2,7 @@
#pragma once
#include "FreeRTOS.h"
#include "freertos.h"
#ifndef ESP_PLATFORM
#define xPortInIsrContext() (pdFALSE)
@@ -2,7 +2,7 @@
#pragma once
#include "FreeRTOS.h"
#include "freertos.h"
#ifdef ESP_PLATFORM
#include <freertos/queue.h>
@@ -2,7 +2,7 @@
#pragma once
#include "FreeRTOS.h"
#include "freertos.h"
#ifdef ESP_PLATFORM
#include <freertos/semphr.h>
@@ -2,7 +2,7 @@
#pragma once
#include "FreeRTOS.h"
#include "freertos.h"
#ifdef ESP_PLATFORM
#include <freertos/task.h>
@@ -2,7 +2,7 @@
#pragma once
#include "FreeRTOS.h"
#include "freertos.h"
#ifdef ESP_PLATFORM
#include <freertos/timers.h>
@@ -2,7 +2,7 @@
#include <stdint.h>
#include "Tactility/FreeRTOS/task.h"
#include "tactility/freertos/task.h"
#ifdef ESP_PLATFORM
#include <esp_timer.h>
@@ -2,13 +2,13 @@
#include <queue>
#include <Tactility/concurrent/Dispatcher.h>
#include <tactility/concurrent/dispatcher.h>
#include "Tactility/Error.h"
#include "tactility/error.h"
#include <Tactility/Log.h>
#include <Tactility/concurrent/EventGroup.h>
#include <Tactility/concurrent/Mutex.h>
#include <tactility/concurrent/eventgroup.h>
#include <tactility/concurrent/mutex.h>
#include <tactility/log.h>
#include <atomic>
#define TAG LOG_TAG("Dispatcher")
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: Apache-2.0
#include <Tactility/concurrent/EventGroup.h>
#include <Tactility/Error.h>
#include <tactility/concurrent/eventgroup.h>
#include <tactility/error.h>
#ifdef __cplusplus
extern "C" {
@@ -1,5 +1,5 @@
#include <Tactility/Log.h>
#include <Tactility/FreeRTOS/task.h>
#include <tactility/freertos/task.h>
#include <tactility/log.h>
static const auto* TAG = LOG_TAG("Kernel");
@@ -1,9 +1,9 @@
// SPDX-License-Identifier: Apache-2.0
#include <Tactility/Device.h>
#include <Tactility/Error.h>
#include <Tactility/Driver.h>
#include <Tactility/Log.h>
#include <tactility/driver.h>
#include <tactility/device.h>
#include <tactility/error.h>
#include <tactility/log.h>
#include <ranges>
#include <cassert>
@@ -4,11 +4,11 @@
#include <ranges>
#include <vector>
#include <Tactility/concurrent/Mutex.h>
#include <Tactility/Device.h>
#include <Tactility/Driver.h>
#include <Tactility/Error.h>
#include <Tactility/Log.h>
#include <tactility/driver.h>
#include <tactility/concurrent/mutex.h>
#include <tactility/device.h>
#include <tactility/error.h>
#include <tactility/log.h>
#define TAG LOG_TAG(driver)
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: Apache-2.0
#include <Tactility/drivers/GpioController.h>
#include <Tactility/Driver.h>
#include <tactility/driver.h>
#include <tactility/drivers/gpio_controller.h>
#define GPIO_DRIVER_API(driver) ((struct GpioControllerApi*)driver->api)
@@ -1,8 +1,8 @@
// SPDX-License-Identifier: Apache-2.0
#include <Tactility/drivers/I2cController.h>
#include <Tactility/Driver.h>
#include <Tactility/Error.h>
#include <tactility/driver.h>
#include <tactility/drivers/i2c_controller.h>
#include <tactility/error.h>
#define I2C_DRIVER_API(driver) ((struct I2cControllerApi*)driver->api)
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: Apache-2.0
#include <Tactility/Driver.h>
#include <tactility/driver.h>
extern "C" {
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: Apache-2.0
#include <Tactility/drivers/Root.h>
#include <Tactility/Driver.h>
#include <tactility/driver.h>
#include <tactility/drivers/root.h>
extern "C" {
@@ -2,7 +2,7 @@
#ifndef ESP_PLATFORM
#include <Tactility/Log.h>
#include <tactility/log.h>
#include <stdio.h>
#include <stdarg.h>