Kopīgot, izmantojot


gpiopin_request Struct

Header: #include <linux/gpio.h>

The drive strength configuration for one or more GPIO pins. The pins to be configured are specified in the lineoffsets array.

struct gpiopin_request {
    __u32 linecount;
    __u32 lineoffsets[GPIOHANDLES_MAX];
    __u32 config_type;
    __u32 config_arg;
};

Members

__u32 linecount

The number of GPIO pins to be configured.

__u32 lineoffsets[GPIOHANDLES_MAX]

An array that specifies the GPIO pins to be configured.

__u32 config_type

A pin_config_param_type value that specifies the units of current, in mA (milliamps) or uA (microamps). Set this member to GPIO_PIN_CONFIG_DRIVE_STRENGTH for mA or GPIO_PIN_CONFIG_DRIVE_STRENGTH_UA for uA. The default is mA.

__u32 config_arg

The amount of current that will drive the GPIO pins.

Remarks

The drive strength of a pin refers to the amount of current used to drive it. Once the drive strength configuration is specified in the gpiopin_request structure, you use GPIO_SET_PIN_CONFIG_IOCTL to set it.

In the MT3620, the current on GPIO pins is limited to mA.