_CONTROLLER_ATTRIBUTE_FLAGS union

The CONTROLLER_ATTRIBUTE_FLAGS structure describes the hardware attributes of the general-purpose I/O (GPIO) controller device.

Syntax

typedef union _CONTROLLER_ATTRIBUTE_FLAGS {
  struct {
    ULONG MemoryMappedController : 1;
    ULONG ActiveInterruptsAutoClearOnRead : 1;
    ULONG FormatIoRequestsAsMasks : 1;
    ULONG DeviceIdlePowerMgmtSupported : 1;
    ULONG BankIdlePowerMgmtSupported : 1;
    ULONG EmulateDebouncing : 1;
    ULONG EmulateActiveBoth : 1;
    ULONG IndependentIoHwSupported : 1;
    ULONG Reserved : 24;
  };
  ULONG  AsULONG;
} CONTROLLER_ATTRIBUTE_FLAGS, *PCONTROLLER_ATTRIBUTE_FLAGS;

Members

Remarks

The Flags member of the CLIENT_CONTROLLER_BASIC_INFORMATION structure is a CONTROLLER_ATTRIBUTE_FLAGS structure.

GpioClx implements an interrupt service routine (ISR) to service interrupts from the GPIO controller. If the MemoryMappedController flag bit is set, this ISR directly accesses the hardware registers of the GPIO controller. Otherwise, the ISR schedules a worker thread to handle the interrupt, and this worker thread, which runs at IRQL = PASSIVE_LEVEL, calls the driver's interrupt-related callback functions to handle the interrupt. These functions use I/O requests to transfer data and control information to and from the GPIO controller's registers. Because these I/O requests are sent from a passive-level thread, they can be sent synchronously.

For more information about the MemoryMappedController flag bit, see Interrupt-Related Callbacks.

An active-both interrupt is an edge-triggered interrupt for which an interrupt request is indicated by a low-to-high or a high-to-low transition on the interrupt line. After a low-to-high transition signals an interrupt request, the interrupt line remains high until a high-to-low transition signals the next interrupt request. Similarly, after a high-to-low transition signals an interrupt request, the interrupt line remains low until a low-to-high transition signals the next interrupt request.

A push-button device is typically connected to an active-both interrupt. An interrupt is generated when the user presses the button, and another interrupt is generated when the button is released. If a device driver's ISR is connected to an active-both interrupt, the ISR is called on both rising and falling edges of the signal line.

Some GPIO controllers implement active-both interrupt inputs in hardware. However, if the hardware does not support active-both interrupts, the GPIO controller driver sets the EmulateActiveBoth flag to request that GpioClx emulate active-both interrupts in software. A driver that sets this flag must implement a CLIENT_ReconfigureInterrupt callback function. To emulate an active-both interrupt pin, GpioClx calls this function to alternately configure a GPIO pin for active-high and active-low level-mode interrupts.

Requirements

   
Windows version Supported starting with Windows 8.
Header gpioclx.h

See Also

CLIENT_CONTROLLER_BASIC_INFORMATION

CLIENT_QueryActiveInterrupts

CLIENT_ReadGpioPins

CLIENT_ReadGpioPinsUsingMask

CLIENT_ReconfigureInterrupt

CLIENT_WriteGpioPins

CLIENT_WriteGpioPinsUsingMask

GPIO_CLIENT_REGISTRATION_PACKET