The Callback List; Installing A Callback - Analog Devices VisualDSP++ 5.0 Service Manual

Visualdsp++ 5.0 device drivers and system for blackfin processors
Table of Contents

Advertisement

callback function from the real-time clock service interrupt handler. A
coding example appears later in this section which demonstrates how that
data structure can be used.

The Callback List

To process callbacks, the real-time clock maintains a table with an entry
for each of the eight events. Each entry contains a pointer to a callback
function, or to NULL if no callback has been installed. When the applica-
tion calls
adi_rtc_InstallCallback
clock service inserts a pointer to the callback function into the entry for
the event. When the event occurs, the real-time clock interrupt handler
uses the entry to find and execute the callback function designated for this
event. When the application calls
event, the callback pointer is removed from the callback list entry for that
event.

Installing a Callback

To install callback functionality for one of the real-time clock events, the
application simply calls the API function
ing the
Event ID
other information is passed to this function, such as the time that the
alarm should occur, or the duration of a stopwatch period. The
adi_rtc_InstallCallback
hardware registers to generate the interrupt at the appropriate time. An
optional data structure called
adi_rtc_InstallCallback
in the callback list and passed to the callback when it occurs.
VisualDSP++ 5.0 Device Drivers and System
Services Manual for Blackfin Processors
adi_rtc_RemoveCallback
. For some events, such as alarms and stopwatch events,
function uses this information to configure the
ClientHandle
function, containing information to be stored
Real-Time Clock Service
passing an
Event ID
adi_rtc_InstallCallback
is also passed to the
, the real-time
to disable an
pass-
11-9

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the VisualDSP++ 5.0 and is the answer not in the manual?

Table of Contents