www.pudn.com > Audio.rar > pip_audio.tci
/*
* ======== pip_audio.tci ========
*/
/*
* Import the board specific MEM creation, setup and placement
*/
utils.importFile(platformName + "_ddk.tci");
/*
* Import the board specific IOM driver configuration
*/
utils.importFile(platformName + "_udevCodec.tci");
/*
* Override the default params values for IOM uDevCodec
*/
udevCodec.params =
prog.extern(platformName.toUpperCase() + "_CODEC_DEVPARAMS");
/*
* ======== swiEcho ========
*/
var swiEcho = tibios.SWI.create("swiEcho");
swiEcho.fxn = prog.extern("echo");
swiEcho.mailbox = 3;
swiEcho.comment = "Echo audio data";
/*
* ======== pipRx ========
*/
var pipRx = tibios.PIP.create("pipRx");
pipRx.bufAlign = 32;
pipRx.frameSize = 128;
pipRx.numFrames = 2;
pipRx.monitor = "reader";
pipRx.notifyWriterFxn = prog.decl("PIO_rxPrime");
pipRx.notifyWriterArg0 = prog.decl("pioRx");
pipRx.notifyReaderFxn = prog.decl("SWI_andnHook");
pipRx.notifyReaderArg0 = prog.decl("swiEcho");
pipRx.notifyReaderArg1 = 0x1;
/*
* ======== pipTx ========
*/
var pipTx = tibios.PIP.create("pipTx");
pipTx.bufAlign = 32;
pipTx.frameSize = 128;
pipTx.numFrames = 2;
pipTx.monitor = "writer";
pipTx.notifyWriterFxn = prog.decl("SWI_andnHook");
pipTx.notifyWriterArg0 = prog.decl("swiEcho");
pipTx.notifyWriterArg1 = 0x2;
pipTx.notifyReaderFxn = prog.decl("PIO_txPrime");
pipTx.notifyReaderArg0 = prog.decl("pioTx");
/* Disable TSK Manger */
bios.disableTskManager(prog);