Opening a Flag
After the service is initialized, any flags used can be opened. In this exam-
ple, two flags are used.
Result = adi_flag_Open(ADI_FLAG_PF0);
Result = adi_flag_Open(ADI_FLAG_PF1);
The
adi_flag_Open
processor hardware for use as a programmable flag.
Setting Flag Direction
After the flags are opened, they must be set to the proper direction. In this
example, one flag is configured for input and one for output.
Result = adi_flag_SetDirection(ADI_FLAG_PF0,
Result = adi_flag_SetDirection(ADI_FLAG_PF1,
Once the flag direction has been established, the flag can be controlled.
Controlling an Output Flag
After a flag is configured for the output direction, its value can be set with
any of the following functions.
Result = adi_flag_Set(ADI_FLAG_PF0);
Result = adi_flag_Clear(ADI_FLAG_PF0);
Result = adi_flag_Toggle(ADI_FLAG_PF0);
VisualDSP++ 5.0 Device Drivers and System
Services Manual for Blackfin Processors
function takes any action necessary to configure the
ADI_FLAG_DIRECTION_INPUT);
ADI_FLAG_DIRECTION_OUTPUT);
// sets output value to logical high (1)
// sets output value to logical low (0)
// toggles from current value
Programmable Flag Service
7-11
Need help?
Do you have a question about the VisualDSP++ 5.0 and is the answer not in the manual?