User Manual

UG_1x22_053 73M1822/73M1922 Control Module User Guide
Rev. 1.0 75
7.12.7 M1X22_GPIO_INTR_POLARITY
Description
GPIO Interrupt signal transition edge selection. The defines the interrupt source as being either on a
rising or a falling edge of the corresponding GPIO pin. If configured as M1X22_GPIO_POL_RISING a
rising edge will trigger an interrupt from the corresponding GPIO pin. If configured as
M1X22_GPIO_POL_FALLING a falling edge will trigger an interrupt from the corresponding GPIO pin.
Prototype
typedef enum {
M1X22_GPIO_POL_RISING = 0, /* Sig transition edge polarity - RISING */
M1X22_GPIO_POL_FALLING = 1 /* Sig transition edge polarity - FALLING */
}
M1X22_GPIO_INTR_POLARITY;
Parameters
Name Value Description
M1X22_GPIO_POL_RISING
0
Interrupt edge selection RISING.
M1X22_GPIO_POL_FALLING
1
Interrupt edge selection FALLING.
7.12.8 M1X22_GPIO_CONFIG_t
Description
This structure is used by the M1X22_GPIO_CONFIG IOCTLs to read or write GPIO configuration. The
first field in the config structure is the command action field GET or SET. For the GET command the
“direction” and “polarityfields are returned if successful.
Prototype
typedef struct gpio_config
{
M1X22_GPIO_CONFIG_COMMAND command; /* command */
M1X22_GPIO_NUMBER gpio; /* GPIO number */
M1X22_GPIO_SIGNAL_DIR direction; /* signal direction */
M1X22_GPIO_INTR_POLARITY polarity; /* intr edge selection */
}
M1X22_GPIO_CONFIG_t;
Parameters
Data Type Name Description
M1X22_GPIO_CONFIG_COMMAND
command
GET or SET GPIO config command.
M1X22_GPIO_NUMBER
gpio
GPIO number.
M1X22_GPIO_DIRECTION
direction
GPIO pin direction input/output.
M1X22_GPIO_INTR_POLARITY
polarity
Interrupt on signal transition edge polarity.