-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Description
I notice that the gpio_callback structure has a union that's documented as identifying the pins that trigger a callback, expressed as either a single ordinal (pin) or a mask of pins (pin_mask). The union documentation in the header explicitly states that the application may change the pins associated with the callback at any time. (Oddly, documentation for members of the struct does not appear to be generated.)
There's nothing in the structure that clearly indicates which union member is valid.
As best I can tell, the gpio_utils.h assumes that the pin_mask field is the one used; this is also the one initialized by gpio_init_callback().
However, gpio_intel_apl references the pin element.
Something's hinky here. Probably the union should be replaced by the pin_mask field, any resulting compilation errors fixed, and the suggestion that callbacks can be controlled by pin ordinals removed from the documentation.