beautypg.com

Ad535_writehwi, Ad535_writereg – Texas Instruments TMS320C6000 User Manual

Page 29

background image

AD535_writeReg

2-17

AD535 API Module

Writes value to input of DAC

AD535_writeHwi

Function

void AD535_writeHwi(
AD535_Handle hAD535,
int val
);

Arguments

hAD535

Handle to codec channel, see

AD535_open()

val

Value to be written to DAC.

Return Value

none

Description

Writes value to the input of the DAC. Unlike the

AD535_write

API, it

does not use polling to establish that the McBSP is ready to write another
sample. Rather, it requires the McBSP to already be ready. In other words,
the AD535_writeHwi is for use within an Interrupt Service Routine. The
face that you arrived at an McBSP transmit ISR signifies that the McBSP
is ready with another sample.

Example

/* The function is included in the ISR associated to
McBSP receive event XEVT */

void AD535_writeIsr(){
Uint val = 0x0066;
AD535_writeHwi(hAD535,val);
}

Writes value to specified control register

AD535_writeReg

Function

void AD535_writeReg(
AD535_Handle hAD535,
AD535_Reg ad535Register,
Uint32 val
);

Arguments

hAD535

Handle to codec channel, see AD535_open()

ad535Register

Control register enumeration:

-

AD535_REG_CTRL0

-

AD535_REG_CTRL1

-

AD535_REG_CTRL2

-

AD535_REG_CTRL3

-

AD535_REG_CTRL4

-

AD535_REG_CTRL5

val

Value to be written to specified register

Return Value

none