Coding Example - Analog Devices VisualDSP++ 5.0 Service Manual

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

Advertisement

real-time clock service interrupt handler. The interrupt handler uses the
callback list to find the address of the callback and the
information that it must pass to the callback.

Coding Example

A
PeriodicStopwatch
example demonstrates the use of the functions
and
adi_rtc_RemoveCallback
ing it within a callback. It demonstrates the use of the
adi_rtc_ResetStopwatch
the use of the
ClientHandle
periodic stopwatch event occurs repeatedly every five seconds for twenty
seconds, and then stops.
In the following code examaple, a data structure is defined, called
STOPWATCH_INFO
the callback. The first field indicates that this event is periodic. The sec-
ond field indicates the number of seconds that the callback function uses
when it re-enables the stopwatch event, in this case, five. The third field
tells the callback how many times to re-enable the stopwatch event, in this
case, three. If this field is set to 0, the event recurs continuously. The
argument is used to pass this data structure to the
entHandle
adi_rtc_InstallCallback
typedef struct
{
u32 PeriodicFlag;
or one-shot */
u32 SecondsCounter;
count register when re-enabling the stopwatch */
u32 NumRepetitions;
stopwatch */
VisualDSP++ 5.0 Device Drivers and System
Services Manual for Blackfin Processors
example is installed with VisualDSP++ 5.0. This
for setting up a stopwatch event and servic-
function to re-enable the stopwatch event, and
to creatively control event handling, so that a
, which has three fields of information that are passed to
function.
/* whether the callback shall be periodic
/* value to place in the stopwatch
/* how many times to re-enable the
Real-Time Clock Service
ClientHandle
adi_rtc_InstallCallback
Cli-
11-11

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?

Subscribe to Our Youtube Channel

Table of Contents