Getadc - Renesas M16C/62P Group Reference Manual

Group renesas embedded application programming interface
Hide thumbs Also See for M16C/62P Group:
Table of Contents

Advertisement

__GetADC

Synopsis
<Get A/D converted value (register specified)>
Boolean __GetADC(unsigned long data1, unsigned int *data2)
Gets the A/D converted value from a specified A/D register.
Description
For data1, the following values can be set.
Return value
If A/D converted value was successfully acquired, RAPI_TRUE is returned; if failed,
RAPI_FALSE is returned.
Functionality
A/D converter
__CreateADC, __EnableADC, __DestroyADC,
Reference
Remark
Program example
#include "rapi_ad_m16c_62p.h"
void func( void )
{
unsigned int data;
/* Get an A/D convertered data of A/D register 0 */
__GetADC( RAPI_AD0, &data );
}
Rev.1.00
2007.11.1
REC10B0002-0100
data1
Setup data 1
data2
Pointer to the buffer in which A/D converted value is stored.
RAPI_AD0
Selects A/D register 0.
RAPI_AD1
Selects A/D register 1.
RAPI_AD2
Selects A/D register 2.
RAPI_AD3
Selects A/D register 3.
RAPI_AD4
Selects A/D register 4.
RAPI_AD5
Selects A/D register 5.
RAPI_AD6
Selects A/D register 6.
RAPI_AD7
Selects A/D register 7.
If an undefined value is specified in the first argument, operation of the API cannot
be guaranteed.
__GetADCAll
96

Advertisement

Table of Contents
loading

Table of Contents