Request AudioReQuest N.Series Manuál Strana 49

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 62
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 48
USB Audio Design Guide 49/61
/* Output to por t */
asm ( " out res [%0] , %1" ::"r"( XS1_P O RT_32 A ) , "r"(x));
}
/* Any actions req uire d on stre am stop e . g . DAC m ute - run every
* str eam stop
* For L1 USB A udi o Refer ence Design we exti nguis h LED B ( c onne cted
* to port 32A)
*/
void Audi o Strea m Stop ( void )
{
int x;
asm ( " peek %0 , res [%1] " : "=r"(x):"r " ( X S1_PO R T_32 A ) ) ;
x &= (~ P32A_ LED_ B ) ;
asm ( " out res [%0] , %1" ::"r"( XS1_P O RT_32 A ) , "r"(x));
}
4.3.3 The main program
The
main()
function is shared across all applications is therefore part of the
framework. It is located in sc_usb_audio and contains:
·
A declaration of all the ports used in the framework. These vary depending on
the PCB an application is running on.
·
A
main
function which declares some channels and then has a
par
statement
which runs the required cores in parallel.
The framework supports devices with multiple tiles so it uses the
on tile[n]:
syntax.
The first core run is the XUD driver:
# if ( AUDI O_CLA S S ==2)
on stdc ore [0]: XUD_ Manag e r ( c _xu d_o ut , EP_CNT_OUT , c_xud_in , EP_CNT_IN ,
c_sof , epTy peTa bleO ut , e pTyp eTableI n , p_usb_rst ,
clk , 1 , XUD_ SPE ED_H S , c_us b_tes t ) ;
# else
on stdc ore [0]: X UD_Ma nager ( c_xud_out , EP_ CNT _OU T , c_xud_in , EP_CN T_I N ,
c_sof , epTy peTa bleO ut , e pTyp eTableI n , p_usb_rst ,
clk , 1 , XUD_ SPE ED_F S , c_us b_tes t ) ;
# e ndi f
The make up of the channel arrays connecting to this driver are described in §5.3.
The channels connected to the XUD driver are fed into the buffer and decouple
cores:
on stdc ore [0]:
{
thre ad_sp e ed ();
/* Attach mclk cou nt port to mclk clock - blo ck ( for f eedb ack ) */
// set_p o rt_cl ock ( p _for _mclk_cou nt , clk_ a udio_ m clk ) ;
REV 6.1
Zobrazit stránku 48
1 2 ... 44 45 46 47 48 49 50 51 52 53 54 ... 61 62

Komentáře k této Příručce

Žádné komentáře