Partial reimplementation of TactilityC GPIO (#469)
* **New Features** * Added a GPIO hardware abstraction layer for reading pin levels from applications. * Applications can now query the number of available GPIO pins so they can adapt to different devices. * **Chores** * Integrations updated so GPIO capabilities are discoverable and exported to running applications.
This commit is contained in:
committed by
GitHub
parent
c9185740d7
commit
399dca5e14
@@ -27,4 +27,11 @@ error_t gpio_controller_get_options(Device* device, gpio_pin_t pin, gpio_flags_t
|
||||
return GPIO_DRIVER_API(driver)->get_options(device, pin, options);
|
||||
}
|
||||
|
||||
error_t gpio_controller_get_pin_count(struct Device* device, uint32_t* count) {
|
||||
const auto* driver = device_get_driver(device);
|
||||
return GPIO_DRIVER_API(driver)->get_pin_count(device, count);
|
||||
}
|
||||
|
||||
const struct DeviceType GPIO_CONTROLLER_TYPE { 0 };
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user