Rev.1.01 2007.02.16
RJJ10J1643-0101
199
__GetADCStatus
Synopsis
<Get the status of A/D converter>
Boolean __GetADCStatus(unsigned int *status)
status
Pointer to the buffer in which the register content indicating A/D converter
status is stored.
Description
Gets the status of a specified A/D converter.
The status of interrupt bit (when using the M16C or R8C) or the value of A/D end flag
(when using the H8/300H) is stored in the first low-order bit of *status. Furthermore,
the status of A/D conversion start flag is stored in the second low-order bit of *status.
When used in the M16C, the value of A/D conversion status register 0 is stored in the 8
high-order bits of *status.
[Configuration of *status]
Value of A/D conversion status
register 0 (for only the M16C; 0 for
the R8C and H8/300H)
Value of A/D conversion start flag (for only
the R8C; 0 for the M16C and H8/300H)
Return value
If A/D converter status was successfully acquired, RAPI_TRUE is returned; if failed,
RAPI_FALSE is returned.
Functionality
A/D converter
Reference
__ClearADCStatus
Program example
#include " rapi_ad_r8c_13.h"
void func( void )
{
unsigned int status;
/* Get status of A/D convertered */
__GetADCStatus( &status );
}
0
0
0
0
0
0
Value of interrupt
bit or A/D end flag