New kernel drivers and device migrations (#563)
This commit is contained in:
committed by
GitHub
parent
955416dac8
commit
8af6204ba1
@@ -0,0 +1,7 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
#pragma once
|
||||
|
||||
#include <tactility/bindings/bindings.h>
|
||||
#include <tactility/drivers/gpio_hog.h>
|
||||
|
||||
DEFINE_DEVICETREE(gpio_hog, struct GpioHogConfig)
|
||||
@@ -22,9 +22,9 @@ struct DeviceEventListener {
|
||||
void* callback_context;
|
||||
};
|
||||
|
||||
void device_listener_add(DeviceListenerCallback* callback, void* context);
|
||||
void device_listener_add(DeviceListenerCallback callback, void* context);
|
||||
|
||||
void device_listener_remove(DeviceListenerCallback* callback);
|
||||
void device_listener_remove(DeviceListenerCallback callback);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
#pragma once
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <tactility/drivers/gpio.h>
|
||||
|
||||
enum GpioHogMode {
|
||||
GPIO_HOG_MODE_OUTPUT_HIGH,
|
||||
GPIO_HOG_MODE_OUTPUT_LOW,
|
||||
GPIO_HOG_MODE_INPUT,
|
||||
};
|
||||
|
||||
struct GpioHogConfig {
|
||||
struct GpioPinSpec pin;
|
||||
enum GpioHogMode mode;
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,19 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Generic device type for i8080 (8080-series parallel) LCD bus controllers.
|
||||
*
|
||||
* Unlike SPI_CONTROLLER_TYPE, there is no locking API: an i80 bus only ever has one
|
||||
* consumer (a single display panel) in every known board, so no arbitration is needed.
|
||||
*/
|
||||
extern const struct DeviceType I8080_CONTROLLER_TYPE;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
Reference in New Issue
Block a user