User`s manual
RX62N Group, RX621 Group 4. Library Reference
5) R_IO_PORT_Write
Synopsis
Write data to an I/O port.
Prototype
bool R_IO_PORT_Write(
uint16_t data1,
// Port or port pin selection
uint8_t data2
// The data to be written to the I/O port or port pin.
);
Description
Write data to an I/O port or I/O port pin.
[data1]
Use either one of the following definition values (from §4.2.3).
•
One port definition or
•
One port pin definition.
[data2]
The value must be between 0x00 and 0xFF for a port, 0 or 1 for a pin.
Return value
True if the parameters are valid; otherwise false.
Category
I/O port
References
None.
Remarks
•
If an invalid port or pin is specified, the operation of the function cannot be guaranteed.
Program example
/* RPDL definitions */
#include "r_pdl_io_port.h"
/* RPDL device-specific definitions */
#include "r_pdl_definitions.h"
void func( void )
{
/* Set the output of port pin P05 */
R_IO_PORT_Write(
PDL_IO_PORT_0_5,
0
);
/* Set the output of port 6 */
R_IO_PORT_Write(
PDL_IO_PORT_6,
0x55
);
}
R20UT0084EE0112 Rev.1.12 Page 4-34
July. 16, 2014