23 #include "sol-common-buildopts.h"
49 #ifndef SOL_NO_API_VERSION
50 #define SOL_PIN_MUX_API_VERSION (2)
96 int (*
aio)(
int device,
int pin);
134 int (*
pwm)(
int device,
int channel);
143 #ifdef SOL_PIN_MUX_MODULE_EXTERNAL
144 #define SOL_PIN_MUX_DECLARE(_NAME, decl ...) \
145 SOL_API const struct sol_pin_mux SOL_PIN_MUX = { \
146 SOL_SET_API_VERSION(SOL_PIN_MUX_API_VERSION, ) \
150 #define SOL_PIN_MUX_DECLARE(_NAME, decl ...) \
151 SOL_API const struct sol_pin_mux SOL_PIN_MUX_ ## _NAME = { \
152 SOL_SET_API_VERSION(SOL_PIN_MUX_API_VERSION, ) \
int(* i2c)(uint8_t bus)
Callback to setup the pins used of the given i2c bus number to operate in I2C mode.
Definition: sol-pin-mux-modules.h:121
int(* init)(void)
Called after the module is successfully load by Soletta to allow it to do any initialization it may r...
Definition: sol-pin-mux-modules.h:61
These routines are used for Pin Multiplexing and Mapping under Soletta.
const char * plat_name
Name of this multiplexer target platform.
Definition: sol-pin-mux-modules.h:53
sol_io_protocol
Flags to describe pin capabilities (as the supported protocols).
Definition: sol-pin-mux.h:44
Structure to hold the configuration of a GPIO device.
Definition: sol-gpio.h:150
struct sol_pin_mux sol_pin_mux
Structure defining the API of a Pin Multiplexer module.
void(* shutdown)(void)
Called before the module is unloaded.
Definition: sol-pin-mux-modules.h:68
These routines are used for GPIO access under Soletta.
int(* pin_map)(const char *label, const enum sol_io_protocol prot, va_list args)
Callback to map a pin label to the parameters necessary so it works on the desired protocol...
Definition: sol-pin-mux-modules.h:83
int(* gpio)(uint32_t pin, const struct sol_gpio_config *config)
Callback to setup the given pin to operate in the given GPIO configuration.
Definition: sol-pin-mux-modules.h:109
int(* aio)(int device, int pin)
Callback to setup the given pin to operate as Analog I/O.
Definition: sol-pin-mux-modules.h:96
Structure defining the API of a Pin Multiplexer module.
Definition: sol-pin-mux-modules.h:48
uint16_t api_version
API version.
Definition: sol-pin-mux-modules.h:51
int(* pwm)(int device, int channel)
Callback to setup the given pin to operate as PWM.
Definition: sol-pin-mux-modules.h:134