Reference Driver

UG_1x66B_015 73M1866B/73M1966B Reference Driver User Guide
Rev. 2.7 85
7.12.7 M1966_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 M1966_GPIO_POL_RISING a
rising edge will trigger an interrupt from the corresponding GPIO pin. If configured as
M1966_GPIO_POL_FALLING a falling edge will trigger an interrupt from the corresponding GPIO pin.
Prototype
typedef enum {
M1966_GPIO_POL_RISING = 0, /* Sig transition edge polarity - RISING */
M1966_GPIO_POL_FALLING = 1 /* Sig transition edge polarity - FALLING */
}
M1966_GPIO_INTR_POLARITY;
Parameters
Name Value Description
M1966_GPIO_POL_RISING
0
Interrupt edge selection RISING.
M1966_GPIO_POL_FALLING
1
Interrupt edge selection FALLING.
7.12.8 M1966_GPIO_CONFIG_t
Description
This structure is used by the M1966_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 “polarity” fields are returned if successful.
Prototype
typedef struct gpio_config
{
M1966_GPIO_CONFIG_COMMAND command; /* command */
M1966_GPIO_NUMBER gpio; /* GPIO number */
M1966_GPIO_SIGNAL_DIR direction; /* signal direction */
M1966_GPIO_INTR_POLARITY polarity; /* intr edge selection */
}
M1966_GPIO_CONFIG_t;
Parameters
Data Type Name Description
M1966_GPIO_CONFIG_COMMAND
command
GET or SET GPIO config command.
M1966_GPIO_NUMBER
gpio
GPIO number.
M1966_GPIO_DIRECTION
direction
GPIO pin direction input/output.
M1966_GPIO_INTR_POLARITY
polarity
Interrupt on signal transition edge polarity.