6.4.  Callbacks, events and interrupts

Continuous acquisition is tyically an asynchronous activity: the function call that has set the acquisition in motion has returned before the acquisition has finished (or even started). So, not only the acquired data must be sent back to the user's buffer in the background, but various types of asynchronous event handling can be needed during the acquisition:

The interrupt handlers are registered through the functions mentioned before The event handling is done in the existing Comedi drivers in statements such as this one:


   s->async->events |= COMEDI_CB_EOA | COMEDI_CB_ERROR

It fills in the bits corresponding to particular events in the comedi_async data structure. The possible event bits are: