Chris Johns commented on a discussion on cpukit/include/dev/gpio/gpio.h: 
https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1499#note_159743

 > + *
 > + * The pin must already be configured with a trigger other than
 > + * #RTEMS_GPIO_TRIGGER_NONE.
 > + *
 > + * @param fd is the descriptor for the controller's device node.
 > + *
 > + * @param pin is the logical pin whose interrupt to deliver.
 > + *
 > + * @param handler is the handler to call.
 > + *
 > + * @param arg is the argument to pass to the handler.
 > + *
 > + * @retval 0 Successful operation.
 > + * @retval -1 An error occurred.  The errno is set to indicate the error.
 > + */
 > +int rtems_gpio_pin_irq_enable(int fd, uint32_t pin,

It should be one handler per pin? I thought I checked but now you ask I am not 
sure. I see it as a way to get low level access on state change for a specific 
pin. You need GPIO hardware capable of interrupts, edge or level to be usable. 
How the GPIO hardware is wired to the interrupts and how edges or levels are 
managed is part of the driver for that hardware and not visible to this API.  
Maybe we need a way to control interrupts, ie enable, disable, edge or level? 
This API would instruct the driver which can access the call or say not 
supported.

For the `iodev` driver Aaron (@egleirony) as used a blocking driver model where 
the user waits in the `ioctl` call and the driver wakes the thread on an 
interrupt. It is a cleaner model while hooking the interrupt gives you high 
speed access for time critical operations. I thought the block driver model 
could be added after this is merged.  Would the block model resolve the second 
point?

-- 
View it on GitLab: 
https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1499#note_159743
You're receiving this email because of your account on gitlab.rtems.org. 
Unsubscribe from this thread: 
https://gitlab.rtems.org/-/namespace/49/sent_notifications/5-1bq4cjsk1wqgajzf8otqdd0le-1d/unsubscribe
 | Manage all notifications: https://gitlab.rtems.org/-/profile/notifications | 
Help: https://gitlab.rtems.org/help


_______________________________________________
bugs mailing list
[email protected]
http://lists.rtems.org/mailman/listinfo/bugs

Reply via email to