beautypg.com

Renesas RJJ10J1643-0101 User Manual

Page 38

background image

Rev.1.01 2007.02.16
RJJ10J1643-0101

36

__OpenSerialDriver

Synopsis

Boolean __OpenSerialDriver(unsigned long data)

data Setup

data

Description

Opens and initializes a specified serial port.

[data]

For data, the following values can be set.

(M16C)

RAPI_COM1 UART0

RAPI_COM2 UART1

RAPI_COM3 UART2

RAPI_COM4 SI/O3

RAPI_COM5 SI/O4

(R8C)

RAPI_COM1 UART0

RAPI_COM2 UART1

(H8/300H)

RAPI_COM1

SCI3 channel 1

RAPI_COM2

SCI3 channel 2

SIO3_COM3

SIO3 channel 3

Return value

If the serial port specification is incorrect, RAPI_FALSE is returned; otherwise,
RAPI_TRUE is returned.

Functionality

Serial I/O

Reference

__CloseSerialDriver

Remark

The specifiable serial ports differ with each CPU used.

If an undefined value is specified in the argument, operation of the API cannot be

guaranteed.

When used for the H8/300H, this API opens and initializes a specified serial port
when freeing it from module standby state.

Program example

#include ”rapi_sif_r8c_13.h”

void func( void )
{
………………
/* Open serial driver */
return __OpenSerialDriver( RAPI_COM1 );
………………
}