This is a CAmkES component that is intended to abstract over a platform's GPIO and pin multiplexer controller, and multiplex client access to it.
This component needs to be used with the single-threaded module that performs the initialisation process, and client request routing the component relies on.
For clients to use the functionality exposed by the component, the clients will have to connect to the CAmkES interfaces that the following CPP defintions expose.
GPIOServer_server_interfaces(the_gpio) MUXServer_server_interfaces(the_mux)
The definitions exposes a GPIO and MUX RPC interface that is expected to be connected via the seL4RPCNoThreads connector. However, there are helper macros which simplifies this process and also registers a GPIO and mux interface on the client's interface registration service (ps_interface_ops_t).
ClockServer_client_connections(client_name, client, server_name, server) MUXServer_client_connections(client_name, client, server_name, server)
Currently, this component supports the following platforms:
Additional platforms require a corresponding GPIO and pin multiplexer controller driver to be implemented in the libplatsupport library of the util_libs repository, and the following CPP defintions to be created in the include folder of this component:
HARDWARE_GPIO_COMPONENTHARDWARE_GPIO_INTERFACESHARDWARE_GPIO_ATTRIBUTESHARDWARE_GPIO_COMPOSITIONHARDWARE_GPIO_CONFIGHARDWARE_MUX_COMPONENTHARDWARE_MUX_INTERFACESHARDWARE_MUX_ATTRIBUTESHARDWARE_MUX_COMPOSITIONHARDWARE_MUX_CONFIGThe pin multiplexing part of the component may interfere with the GPIO part of the component, that is, if a client requests that a feature be switched on via the pin multiplexer, another client may lose access to a GPIO pin. There is no form of access control with regards to both the GPIO pins and the pin multiplexer features.