
USB Audio Design Guide 48/61
t when t i mera fter ( time ) : > int _ ;
/* Cod ec out of reset */
PORT 32A_P E EK ( tmp ) ;
tmp |= P32A_ COD_R S T ;
PORT 32A_O UT ( tmp ) ;
}
Since the clocks come from fixed oscillators on this board, the clock configuration
functions do not need to do anything. This will be different if the clocks came from
an external PLL chip:
/* These functions m ust be i m p l e m e n t e d for the clocki n g
arrangement of specific design */
void ClockingInit ( chanend ? c )
{
/* For L1 r e f e r e nce */
}
void Clocki n g C o n f ig ( unsigned mClkFreq , chanend ? c)
{
/* For L1 r e f e r e nce */
}
Finally, the application has functions for audio streaming start/stop that enable/dis-
able an LED on the board (also on port 32A):
# i nclu de < xs1 .h >
# i nclu de " por t32A . h "
/* Funct ions th at hand le fun c tion s tha t must o ccu r on stream
* sta rt / stop e . g . DAC mute / un - m ute . These nee d imple m entin g
* for a spec ific design .
*
* Implem entati o ns for the L1 USB Audi o Refer ence Design
*/
/* Any actions req uire d for stre am s tar t e .g. DAC un - mut e - run eve ry
* str eam start .
*
* For L1 USB A udi o Refer ence Design we illu minat e LED B ( c onne cted
* to port 32A)
*
* Sin ce thi s port is sha red w ith other funct i onali ty inli ne a ssembly
* is used to acc ess the p ort r esou rce .
*/
void Audi o Stream S tart ( void )
{
int x;
/* Peek at cur rent p ort value using por t 32A reso urce ID */
asm ( " peek %0 , res [%1] " : "=r"(x):"r " ( X S1_PO R T_32 A ) ) ;
x |= P32A_ LED_B ;
REV 6.1
Kommentare zu diesen Handbüchern