__ReadIOPortRegister
Synopsis
<Read from I/O port register>
Boolean __ReadIOPortRegister(unsigned long data1, unsigned int *data2)
Gets the value of a specified I/O port from each relevant register.
Description
[data1]
Specify an I/O port register from which data is read. The definition values
corresponding to each I/O port register are listed below.
If the I/O port register specification is incorrect, RAPI_FALSE is returned; otherwise,
Return value
RAPI_TRUE is returned.
I/O port
Functionality
Reference
__SetIOPort, __ReadIOPort, __WriteIOPort, __SetIOPortRegister,
__WriteIOPortRegister
•
Remark
Program example
#include " rapi_io_port_m16c_62p.h"
void func( void )
{
}
Rev.1.00
2007.11.1
REC10B0002-0100
data1
Setup data 1
data2
Pointer to the variable in which the value read from I/O port register is stored.
RAPI_PORT_0
Port P0 register
RAPI_PORT_2
Port P2 register
RAPI_PORT_4
Port P4 register
RAPI_PORT_6
Port P6 register
RAPI_PORT_8
Port P8 register
RAPI_PORT_10
Port P10 register
RAPI_PORT_12
Port P12 register
RAPI_PORT_14
Port P14 register
If an undefined value is specified in the first argument, operation of the API cannot
be guaranteed.
unsigned int data;
/* Get the value of port P1 register */
__ReadIOPortRegister( RAPI_PORT_1, &data );
RAPI_PORT_1
RAPI_PORT_3
RAPI_PORT_5
RAPI_PORT_7
RAPI_PORT_9
RAPI_PORT_11
RAPI_PORT_13
80
Port P1 register
Port P3 register
Port P5 register
Port P7 register
Port P9 register
Port P11 register
Port P13 register