Texas Instruments TMS320C6000 사용자 설명서

다운로드
페이지 62
AD535_read
2-14
 
Returns value of ouput from ADC
AD535_read
Function
int AD535_read(
  AD535_Handle hAD535
);
Arguments
hAD535
Handle to codec channel, see 
AD535_open()
Return Value
int
Value returned from output of ADC.
Description
Returns the value of the ouput from the ADC.
Example
int val; 
val = AD535_read(hAD535);
Display Code at Selected Address
AD535_readHwi
Function
int AD535_readHwi(
  AD535_Handle hAD535
);
Arguments
hAD535
Handle to codec channel, see 
AD535_open()
Return Value
int
Value returned from output of ADC.
Description
Allows the user to read the output value of ADC. Unlike the 
AD535_read
API, it does not use polling to establish that the McBSP is ready for
another sample. Rather, it requires the McBSP to always be ready. In
other words, the AD535_readHwi routine is for use with an Interrupt
Service Routine. The fact that you arrived at an McBSP receive ISR
signifies that the McBSP is ready with another sample.
Example
/* The function is included in the ISR associated to
McBSP receive event  REVT */
 
void AD535_readIsr(){
Uint16 val; 
val = AD535_readHwi(hAD535);
}
Returns value of specified control register
AD535_readReg
Function
Uint32 AD535_readReg(
  AD535_Handle  hAD535,
  AD535_Reg     ad535Register
);
Arguments
hAD535
Handle to codec channel, see 
AD535_open()