www.pudn.com > Audio.rar > swi_audio.tci


/*
 *  ======== swi_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");

/*
 *  Add instance of DIO object to use the configured codec. This is the device
 *  SIO streams use.
 */
var dioCodec = tibios.DIO.create("dioCodec");
dioCodec.comment = "DIO Adapter for IOM Codec driver" ;
dioCodec.deviceName = prog.get("udevCodec");
dioCodec.useCallBackFxn = true;
dioCodec.chanParams = null;


/* create swiEcho thread */
var swiEcho = tibios.SWI.create("swiEcho");
swiEcho.fxn = prog.extern("echo");
swiEcho.mailbox = 3;
swiEcho.comment = "Echo audio data";