Example 4: Audio.c File
The first set is commands to the device manager, requesting
the device manager to take certain actions on behalf of the
device driver instance. These commands are defined in the
device manager header file (
with "
The second set is commands specific to the device driver
and start with "
driver. In our example, the driver identifiers start with
"
device driver where these commands are defined. For the
AD1980 codec driver, the header is
<drivers/codec/adi_ad1980.h>
• The third argument is a pointer-sized value that acts as the operand
for the command. If the operand is not needed, the argument is
ignored.
Listing 3-2
shows a call to
manager command (
(
ADI_DEV_MODE_CHAINED
should manage the flow of data buffers that the application will send later.
Listing 3-2. Configuring the Device Manager
if((Result = adi_dev_Control(
!= ADI_DEV_RESULT_SUCCESS)
{
printf("Failed to set dataflow method for audio output device,"
"Error Code: 0x%08X\n",Result);
break;
}
3-12
ADI_DEV_CMD_
ADI_xxx_CMD_
". There is a separate header file for each
ADI_AD1980_CMD_
adi_dev_Control()
ADI_DEV_CMD_SET_DATAFLOW_METHOD
). Together they specify how the device manager
AD1980DriverHandle,
ADI_DEV_CMD_SET_DATAFLOW_METHOD,
(void*)ADI_DEV_MODE_CHAINED))
Getting Started with ADSP-BF548 EZ-KIT Lite
<drivers/adi_dev.h>
".
", where "
.
, which is using a device
) and start
" identifies the
xxx
) and operand
Need help?
Do you have a question about the EZ-KIT and is the answer not in the manual?
Questions and answers