![]() |
Synergy Software Package User's Manual
|
#include <r_ioport_api.h>
IOPort driver structure. IOPort functions implemented at the HAL layer will follow this API.
| ssp_err_t(* ioport_api_t::init) (const ioport_cfg_t *p_cfg) |
Initialize internal driver data and initial pin configurations. Called during startup. Do not call this API during runtime. Use ioport_api_t::pinsCfg for runtime reconfiguration of multiple pins.
| [in] | p_cfg | Pointer to pin configuration data array. |
| ssp_err_t(* ioport_api_t::pinCfg) (ioport_port_pin_t pin, uint32_t cfg) |
Configure settings for an individual pin.
| [in] | pin | Pin to be read. |
| [in] | cfg | Configuration options for the pin. |
| ssp_err_t(* ioport_api_t::pinDirectionSet) (ioport_port_pin_t pin, ioport_direction_t direction) |
Set the pin direction of a pin.
| [in] | pin | Pin being configured. |
| [in] | direction | Direction to set pin to which is a member of ioport_direction_t. |
| ssp_err_t(* ioport_api_t::pinEthernetModeCfg) (ioport_ethernet_channel_t channel, ioport_ethernet_mode_t mode) |
Configure the PHY mode of the Ethernet channels.
| [in] | channel | Channel configuration will be set for. |
| [in] | mode | PHY mode to set the channel to. |
| ssp_err_t(* ioport_api_t::pinEventInputRead) (ioport_port_pin_t pin, ioport_level_t *p_pin_event) |
Read the event input data of the specified pin and return the level.
| [in] | pin | Pin to be read. |
| [in] | p_pin_event | Pointer to return the event data. |
| ssp_err_t(* ioport_api_t::pinEventOutputWrite) (ioport_port_pin_t pin, ioport_level_t pin_value) |
Write pin event data.
| [in] | pin | Pin event data is to be written to. |
| [in] | pin_value | Level to be written to pin output event. |
| ssp_err_t(* ioport_api_t::pinRead) (ioport_port_pin_t pin, ioport_level_t *p_pin_value) |
Read level of a pin.
| [in] | pin | Pin to be read. |
| [in] | p_pin_value | Pointer to return the pin level. |
| ssp_err_t(* ioport_api_t::pinsCfg) (const ioport_cfg_t *p_cfg) |
Configure multiple pins.
| [in] | p_cfg | Pointer to pin configuration data array. |
| ssp_err_t(* ioport_api_t::pinWrite) (ioport_port_pin_t pin, ioport_level_t level) |
Write specified level to a pin.
| [in] | pin | Pin to be written to. |
| [in] | level | State to be written to the pin. |
| ssp_err_t(* ioport_api_t::portDirectionSet) (ioport_port_t port, ioport_size_t direction_values, ioport_size_t mask) |
Set the direction of one or more pins on a port.
| [in] | port | Port being configured. |
| [in] | direction_values | Value controlling direction of pins on port (1 - output, 0 - input). |
| [in] | mask | Mask controlling which pins on the port are to be configured. |
| ssp_err_t(* ioport_api_t::portEventInputRead) (ioport_port_t port, ioport_size_t *p_event_data) |
Read captured event data for a port.
| [in] | port | Port to be read. |
| [in] | p_event_data | Pointer to return the event data. |
| ssp_err_t(* ioport_api_t::portEventOutputWrite) (ioport_port_t port, ioport_size_t event_data, ioport_size_t mask_value) |
Write event output data for a port.
| [in] | port | Port event data will be written to. |
| [in] | event_data | Data to be written as event data to specified port. |
| [in] | mask_value | Each bit set to 1 in the mask corresponds to that bit's value in event data. being written to port. |
| ssp_err_t(* ioport_api_t::portRead) (ioport_port_t port, ioport_size_t *p_port_value) |
Read states of pins on the specified port.
| [in] | port | Port to be read. |
| [in] | p_port_value | Pointer to return the port value. |
| ssp_err_t(* ioport_api_t::portWrite) (ioport_port_t port, ioport_size_t value, ioport_size_t mask) |
Write to multiple pins on a port.
| [in] | port | Port to be written to. |
| [in] | value | Value to be written to the port. |
| [in] | mask | Mask controlling which pins on the port are written to. |
| ssp_err_t(* ioport_api_t::versionGet) (ssp_version_t *p_data) |
Return the version of the IOPort driver.
| [out] | p_data | Memory address to return version information to. |