beautypg.com

Configserialdrivernotify – Renesas M16C/62P Group User Manual

Page 31

background image

Rev.1.00 2007.11.1
REC10B0002-0100

29

__ConfigSerialDriverNotify

Synopsis

Boolean __ConfigSerialDriverNotify(unsigned long data, VoidFuncNotify *func)

data Setup

data

func

Function pointer to be registered

Description

Registers the notification function necessary to get various transmit/receive information

of serial communication.

[data]

For data, the following values can be set.

RAPI_COM1 UART0

RAPI_COM2 UART1

RAPI_COM3 UART2

RAPI_COM4 SI/O3

RAPI_COM5 SI/O4

[func]

The function to be registered in func must be supplied to the serial I/O driver by the

user.

The serial I/O driver calls the function registered in func.

The serial I/O driver notifies the user of the transmit/receive status by an argument.

The type of the function to be registered is shown below.

void “any function name” (unsigned char notify);

The argument is detailed below.

(UART0, UART1, UART2)

(SI/O3,SI/O4)

b7 b6 b5 b4 b3 b2 b1 b0

0

0 X

X

0

0

0

0

0 Not completed
1 Completed

0 Not completed
1 Completed

Reception completed

Transmission completed

b7 b6 b5 b4 b3 b2 b1 b0

0

0 X

X

0 X

X

X

0 No error
1 Error occurred

0 No error
1 Error occurred

0 No error
1 Error occurred

0 Not completed
1 Completed

0 Not completed
1 Completed

Transmission completed

Reception completed

Overrun error

Framing error

Parity error