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T_GPIO_1BIT_58
, ALT_GPIO_1BIT_59
,
ALT_GPIO_1BIT_60
, ALT_GPIO_1BIT_61
, ALT_GPIO_1BIT_62
, ALT_GPIO_1BIT_63
,
ALT_GPIO_1BIT_64
, ALT_GPIO_1BIT_65
, ALT_GPIO_1BIT_66
, ALT_GPIO_1BIT_67
,
ALT_GPIO_1BIT_68
, ALT_GPIO_1BIT_69
, ALT_GPIO_1BIT_70
, ALT_HLGPI_0
,
ALT_HLGPI_1
, ALT_HLGPI_2
, ALT_HLGPI_3
, ALT_HLGPI_4
,
ALT_HLGPI_5
, ALT_HLGPI_6
, ALT_HLGPI_7
, ALT_HLGPI_8
,
ALT_HLGPI_9
, ALT_HLGPI_10
, ALT_HLGPI_11
, ALT_HLGPI_12
,
ALT_HLGPI_13
, ALT_HLGPI_14
, ALT_HLGPI_15
, ALT_GPIO_INVALID
,
ALT_END_OF_GPIO_SIGNALS = -1
, ALT_LAST_VALID_GPIO_BIT = ALT_HLGPI_15
} |
|
|
ALT_STATUS_CODE | alt_gpio_bit_config (ALT_GPIO_1BIT_t signal_num, ALT_GPIO_PIN_DIR_t dir, ALT_GPIO_PIN_TYPE_t type, ALT_GPIO_PIN_POL_t pol, ALT_GPIO_PIN_DEBOUNCE_t debounce, ALT_GPIO_PIN_DATA_t data) |
|
ALT_STATUS_CODE | alt_gpio_bitconfig_get (ALT_GPIO_1BIT_t signal_num, ALT_GPIO_CONFIG_RECORD_t *config) |
|
ALT_STATUS_CODE | alt_gpio_group_config (ALT_GPIO_CONFIG_RECORD_t *config_array, uint32_t len) |
|
ALT_STATUS_CODE | alt_gpio_group_config_get (ALT_GPIO_CONFIG_RECORD_t *config_array, uint32_t len) |
|
ALT_STATUS_CODE | alt_gpio_group_config_get2 (ALT_GPIO_1BIT_t *pinid_array, ALT_GPIO_CONFIG_RECORD_t *config_array, uint32_t len) |
|
This functional group presents a perspective of the General-Purpose IO signals as individual GPIO and GPI bits spread across a number of signals across several GPIO ports. This allows the programmer the freedom to generally ignore the underlying port and signal structure of the GPIO hardware if desired.
◆ ALT_GPIO_1BIT_t
This type definition enumerates the individual bits as one flat array spread across the multiple GPIO ports handled by the GPIO manager. The bit-ordering must match the hardware bit-ordering.
◆ ALT_GPIO_CONFIG_RECORD_t
This configuration record definition is used for configuring bits and groups of bits of the GPIO interface.
◆ ALT_GPIO_PIN_RECORD_t
This pin record type definition is comprised of the signal index and associated input or output data.
◆ ALT_GPIO_1BIT_e
This type definition enumerates the individual bits as one flat array spread across the multiple GPIO ports handled by the GPIO manager. The bit-ordering must match the hardware bit-ordering.
Enumerator |
---|
ALT_GPIO_1BIT_0 |
|
ALT_GPIO_1BIT_1 |
|
ALT_GPIO_1BIT_2 |
|
ALT_GPIO_1BIT_3 |
|
ALT_GPIO_1BIT_4 |
|
ALT_GPIO_1BIT_5 |
|
ALT_GPIO_1BIT_6 |
|
ALT_GPIO_1BIT_7 |
|
ALT_GPIO_1BIT_8 |
|
ALT_GPIO_1BIT_9 |
|
ALT_GPIO_1BIT_10 |
|
ALT_GPIO_1BIT_11 |
|
ALT_GPIO_1BIT_12 |
|
ALT_GPIO_1BIT_13 |
|
ALT_GPIO_1BIT_14 |
|
ALT_GPIO_1BIT_15 |
|
ALT_GPIO_1BIT_16 |
|
ALT_GPIO_1BIT_17 |
|
ALT_GPIO_1BIT_18 |
|
ALT_GPIO_1BIT_19 |
|
ALT_GPIO_1BIT_20 |
|
ALT_GPIO_1BIT_21 |
|
ALT_GPIO_1BIT_22 |
|
ALT_GPIO_1BIT_23 |
|
ALT_GPIO_1BIT_24 |
|
ALT_GPIO_1BIT_25 |
|
ALT_GPIO_1BIT_26 |
|
ALT_GPIO_1BIT_27 |
|
ALT_GPIO_1BIT_28 |
|
ALT_GPIO_1BIT_29 |
|
ALT_GPIO_1BIT_30 |
|
ALT_GPIO_1BIT_31 |
|
ALT_GPIO_1BIT_32 |
|
ALT_GPIO_1BIT_33 |
|
ALT_GPIO_1BIT_34 |
|
ALT_GPIO_1BIT_35 |
|
ALT_GPIO_1BIT_36 |
|
ALT_GPIO_1BIT_37 |
|
ALT_GPIO_1BIT_38 |
|
ALT_GPIO_1BIT_39 |
|
ALT_GPIO_1BIT_40 |
|
ALT_GPIO_1BIT_41 |
|
ALT_GPIO_1BIT_42 |
|
ALT_GPIO_1BIT_43 |
|
ALT_GPIO_1BIT_44 |
|
ALT_GPIO_1BIT_45 |
|
ALT_GPIO_1BIT_46 |
|
ALT_GPIO_1BIT_47 |
|
ALT_GPIO_1BIT_48 |
|
ALT_GPIO_1BIT_49 |
|
ALT_GPIO_1BIT_50 |
|
ALT_GPIO_1BIT_51 |
|
ALT_GPIO_1BIT_52 |
|
ALT_GPIO_1BIT_53 |
|
ALT_GPIO_1BIT_54 |
|
ALT_GPIO_1BIT_55 |
|
ALT_GPIO_1BIT_56 |
|
ALT_GPIO_1BIT_57 |
|
ALT_GPIO_1BIT_58 |
|
ALT_GPIO_1BIT_59 |
|
ALT_GPIO_1BIT_60 |
|
ALT_GPIO_1BIT_61 |
|
ALT_GPIO_1BIT_62 |
|
ALT_GPIO_1BIT_63 |
|
ALT_GPIO_1BIT_64 |
|
ALT_GPIO_1BIT_65 |
|
ALT_GPIO_1BIT_66 |
|
ALT_GPIO_1BIT_67 |
|
ALT_GPIO_1BIT_68 |
|
ALT_GPIO_1BIT_69 |
|
ALT_GPIO_1BIT_70 | The last of the input/output bits
|
ALT_HLGPI_0 | This and the following signals are not present on all SoCs.
If present, the selection between their use as 14 General-purpose inputs or use as 14 DDR interface signals is made in the IOCSR (IO Configuration Shift Register) and software to make this selection is in the IO Manager API. If they are present, they are restricted to using the same power supply voltage as the SDRAM module.
|
ALT_HLGPI_1 |
|
ALT_HLGPI_2 |
|
ALT_HLGPI_3 |
|
ALT_HLGPI_4 |
|
ALT_HLGPI_5 |
|
ALT_HLGPI_6 |
|
ALT_HLGPI_7 |
|
ALT_HLGPI_8 |
|
ALT_HLGPI_9 |
|
ALT_HLGPI_10 |
|
ALT_HLGPI_11 |
|
ALT_HLGPI_12 |
|
ALT_HLGPI_13 |
|
◆ alt_gpio_bit_config()
Configures all parameters for one bit (signal) of the GPIO ports.
- Parameters
-
signal_num | The GPIO port signal index. |
dir | The data direction for this signal. |
type | Edge-triggered or Level-triggered interrupt for this signal. |
pol | Active-high or active-low interrupt polarity for this signal. |
debounce | Enable the debounce flip-flops for this signal or not. |
data | If the GPIO signal is set to be an output, set it to this value |
- Return values
-
ALT_E_SUCCESS | The operation was successful. |
ALT_E_ERROR | The operation failed. |
ALT_E_BAD_ARG | Invalid input argument. |
◆ alt_gpio_bitconfig_get()
Returns the configuration parameters of a given GPIO bit.
- Parameters
-
signal_num | The GPIO port signal index. |
config | Pointer to a single GPIO_CONFIG_RECORD_s configuration record. The fields of this configuration record are filled in by the function. |
- Return values
-
ALT_E_SUCCESS | The operation was successful. |
ALT_E_ERROR | The operation failed. |
ALT_E_BAD_ARG | Invalid input argument. |
◆ alt_gpio_group_config()
Configures a list of GPIO bits. The GPIO bits do not have to be configured the same, as was the case for the mask version of this function, alt_gpio_port_config(). Each bit may be configured differently and bits may be listed in any order.
- Parameters
-
config_array | Pointer to an array of GPIO_CONFIG_RECORD_s configuration records. These definitions contain all the parameters needed to set up the listed pins. All or any subset of the GPIO signals can be configured. Signals do not have to be listed in numerical order or be unique. If a signal number is listed multiple times, the last configuration listed is used.
Configuration terminates either when len signals have been configured or if the next signal number index in the array is equal to ALT_END_OF_GPIO_SIGNALS (-1). |
len | Length of array to configure. |
- Return values
-
ALT_E_SUCCESS | The operation was successful. |
ALT_E_ERROR | The operation failed. |
ALT_E_BAD_ARG | Invalid input argument. |
◆ alt_gpio_group_config_get()
Returns a list of the pin signal indices and the associated configuration settings (data direction, interrupt type, polarity, and debounce) of that list of signals.
- Parameters
-
config_array | Pointer to an array of ALT_GPIO_CONFIG_RECORD_t configuration records. Only the signal indices in the first field of each configuration record need be filled in. This function will fill in all the other fields of the configuration record, returning all configuration parameters in the array. Signals do not have to be listed in numerical order or be unique. If a signal number is listed multiple times, the configuration record will contain multiple entries for that signal.
Configuration reading terminates either when len signal configurations have been read or if the next signal number index in the array is equal to ALT_END_OF_GPIO_SIGNALS (-1). |
len | Length of configuration array to read and return. |
- Return values
-
ALT_E_SUCCESS | The operation was successful. |
ALT_E_ERROR | The operation failed. |
ALT_E_BAD_ARG | Invalid input argument. |
◆ alt_gpio_group_config_get2()
Returns a list of the pin signal indices and the associated configuration settings (data direction, interrupt type, polarity, and debounce) of that list of signals. The difference between this version and alt_gpio_group_config_get() is this version follows a separate list of signal indices instead of having the signal list provided in the first field of the configuration records in the array.
- Parameters
-
pinid_array | Pointer to a list of signal index numbers. These indices are copied to the first field of each configuration record in the returned array. |
config_array | Pointer to an array of ALT_GPIO_CONFIG_RECORD_t configuration records. This function will fill in the fields of the configuration record, returning all configuration parameters in the array. Signals do not have to be listed in numerical order or be unique. If a signal number is listed multiple times, the configuration record array will contain multiple identical entries for that signal.
Configuration reading terminates either when len signal configurations have been read or if the next signal number index in the array is equal to ALT_END_OF_GPIO_SIGNALS (-1). |
len | Length of configuration array to read. |
- Return values
-
ALT_E_SUCCESS | The operation was successful. |
ALT_E_ERROR | The operation failed. |
ALT_E_BAD_ARG | Invalid input argument. |