mirror of
https://github.com/ByteWelder/Tactility.git
synced 2026-02-20 07:25:06 +00:00
**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
29 lines
1003 B
C
29 lines
1003 B
C
#pragma once
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
#include "Gpio.h"
|
|
#include <stdbool.h>
|
|
|
|
struct GpioControllerApi {
|
|
bool (*set_level)(struct Device* device, gpio_pin_t pin, bool high);
|
|
bool (*get_level)(struct Device* device, gpio_pin_t pin, bool* high);
|
|
bool (*set_options)(struct Device* device, gpio_pin_t pin, gpio_flags_t options);
|
|
bool (*get_options)(struct Device* device, gpio_pin_t pin, gpio_flags_t* options);
|
|
};
|
|
|
|
bool gpio_controller_set_level(struct Device* device, gpio_pin_t pin, bool high);
|
|
bool gpio_controller_get_level(struct Device* device, gpio_pin_t pin, bool* high);
|
|
bool gpio_controller_set_options(struct Device* device, gpio_pin_t pin, gpio_flags_t options);
|
|
bool gpio_controller_get_options(struct Device* device, gpio_pin_t pin, gpio_flags_t* options);
|
|
|
|
inline bool gpio_set_options_config(struct Device* device, struct GpioPinConfig* config) {
|
|
return gpio_controller_set_options(device, config->pin, config->dt_flags);
|
|
}
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|