Seitenleiste


Access to information is restricted depending on your login. Request login-information through our contact form.

service:wince:drvlib:adc_sample

ADC_Sample

The function ADC_Sample gets samples of the analog voltage-value measured by the UCB1400-Controller on the Trizeps-Module.

int ADC_Sample(                
unsigned short * sample, 
unsigned short axis, 
int samples 
); 
int sampleADC(                
unsigned short * sample, 
unsigned short axis, 
int samples 
); 

Parameters

sample
Pointer of the variable, that receives the measured sample.

axis
Allowed values:

Value Description
ADC_INPUT_AD0 First ADC-Channel
ADC_INPUT_AD1 Second ADC-Channel
ADC_INPUT_AD2 Third ADC-Channel
ADC_INPUT_AD3 Fourth ADC-Channel
ADC_INPUT_TSPX Touch: X-Axis P
ADC_INPUT_TSMX Touch: X-Axis M
ADC_INPUT_TSPY Touch: Y-Axis P
ADC_INPUT_TSMY Touch: Y-Axis M

samples
Number of samples to get.

Return Values

If the function succeeds, the return value is 1.

If the function fails, the return value is -1.

Remarks

This function uses the AC97-Link functions. So you have to use AC97_Alloc before calling this function. Keep in mind you must protect the access to the AC97-Link! If you just want to read the ADC-values from AD0 to AD3, it is recommend to use ADC_Read. View UCB1400-Datasheet for details.

Requirements

OS Versions: Windows CE 4.2 and later.
Header: drvlib_app.h
Link Library: drvlib_app.lib

See Also

Cookies helfen bei der Bereitstellung von Inhalten. Durch die Nutzung dieser Seiten erklären Sie sich damit einverstanden, dass Cookies auf Ihrem Rechner gespeichert werden. Weitere Information
service/wince/drvlib/adc_sample.txt · Zuletzt geändert: 2008/05/27 09:51 von