Renesas M16C/62P Group Computer Hardware User Manual


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