Ken Van Hoeylandt 4b6ed871a9
Implemented TactilityKernel and DevicetreeCompiler, updated licenses & copyrights (#452)
**New features**

- Created a devicetree DTS and YAML parser in Python
- Created new modules:
  - TactilityKernel (LGPL v3.0 license)
  - Platforms/PlatformEsp32 (LGPL v3.0 license) 
  - Platforms/PlatformPosix (LGPL v3.0 license)
  - Tests/TactilityKernelTests

Most boards have a placeholder DTS file, while T-Lora Pager has a few devices attached.

**Licenses**

Clarified licenses and copyrights better.

- Add explanation about the intent behind them.
- Added explanation about licenses for past and future subprojects
- Added more details explanations with regards to the logo usage
- Copied licenses to subprojects to make it more explicit
2026-01-24 15:47:11 +01:00

29 lines
993 B
C++

#include <Tactility/drivers/GpioController.h>
#include <Tactility/Driver.h>
#define GPIO_DRIVER_API(driver) ((struct GpioControllerApi*)driver->api)
extern "C" {
bool gpio_controller_set_level(Device* device, gpio_pin_t pin, bool high) {
const auto* driver = device_get_driver(device);
return GPIO_DRIVER_API(driver)->set_level(device, pin, high);
}
bool gpio_controller_get_level(Device* device, gpio_pin_t pin, bool* high) {
const auto* driver = device_get_driver(device);
return GPIO_DRIVER_API(driver)->get_level(device, pin, high);
}
bool gpio_controller_set_options(Device* device, gpio_pin_t pin, gpio_flags_t options) {
const auto* driver = device_get_driver(device);
return GPIO_DRIVER_API(driver)->set_options(device, pin, options);
}
bool gpio_controller_get_options(Device* device, gpio_pin_t pin, gpio_flags_t* options) {
const auto* driver = device_get_driver(device);
return GPIO_DRIVER_API(driver)->get_options(device, pin, options);
}
}