![]() |
S32 SDK
|
The S32 SDK Pins Driver provides a set of API/services to configure the Port Control and Interrupt IP: PORT.
The Port Control and Interrupt (PORT) module provides support for port control, digital filtering, and external interrupt functions. Most functions can be configured independently for each pin in the 32-bit port and affect the pin regardless of its pin muxing state. There is one instance of the PORT module for each port. Not all pins within each port are implemented on a specific device. The PORT module has the following features:
The Pins driver is developed on top of the PORT HAL. Pins Driver is designed for:
The graphical user interface for routing functionality consists of two main views: Collapsed View and Pins View.
The Collapsed view is designed for pin routing configuration. The Pin/Signal Selection column displays the list of pins that can be configured for selected Function or Signal. If not configured, "No pin routed" is displayed, which means no user requirement for configuration. You can see the popup menu for setting on/off automatic value. The Direction column contains the list of directions that can be configured for selected function or signal, if direction configuration is supported. For fixed direction signals, the direction text is displayed and grayed-out.
The Pins view allows the configuration of electrical properties of pins and displays all pins. It displays the pad configuration that is available in Processor view where each pin is associated with signal name and function. If you want to view specific pin, use Pin Filter. It filters the User Pin/Signal Name column as shown below. You can also sort the first two columns, Pin and User Pin/Signal Name.
Functional Properties view allows configuration of functional properties on pins. The user graphical interface is mapped over the port control features.
The Driver uses structures for configuration. The user application can use the default for most settings, changing only what is necessary. All port control features are part of data structure configuration.Please see pin_settings_config_t.
This is an example to write a pin configuration:
Modules | |
Port Control and Interrupts (PORT) | |
This module covers the functionality of the PORT peripheral. | |
Data Structures | |
struct | pin_settings_config_t |
Defines the converter configuration. More... | |
Enumerations | |
enum | port_data_direction_t { GPIO_INPUT_DIRECTION = 0x0U, GPIO_OUTPUT_DIRECTION = 0x1U, GPIO_UNSPECIFIED_DIRECTION = 0x2U } |
Configures the port data direction Implements : port_data_direction_t_Class. More... | |
Pins DRV. | |
status_t | PINS_DRV_Init (const uint32_t pin_count, const pin_settings_config_t config[]) |
Initializes the pins with the given configuration structure. More... | |
Configures the port data direction Implements : port_data_direction_t_Class.
Enumerator | |
---|---|
GPIO_INPUT_DIRECTION |
General purpose input direction. |
GPIO_OUTPUT_DIRECTION |
General purpose output direction. |
GPIO_UNSPECIFIED_DIRECTION |
General purpose unspecified direction. |
Definition at line 122 of file pins_driver.h.
status_t PINS_DRV_Init | ( | const uint32_t | pin_count, |
const pin_settings_config_t | config[] | ||
) |
Initializes the pins with the given configuration structure.
This function configures the pins with the options provided in the provided structure.
[in] | pin_count | the number of configured pins in structure |
[in] | config | the configuration structure |
Definition at line 58 of file pins_driver.c.