User`s manual
RX62N Group, RX621 Group 4. Library Reference
9) R_IIC_GetStatus
Synopsis
Read the status for an I²C channel.
Prototype
bool R_IIC_GetStatus(
uint8_t data1,
// Channel selection
uint32_t * data2,
// Status flags
uint16_t * data3,
// Transmitted bytes
uint16_t * data4
// Received bytes
);
Description
Read the status registers for the selected I²C channel.
[data1]
Select channel IICn (where n = 0 or 1).
[data2]
The status flags shall be stored in the format below.
Specify PDL_NO_PTR if this information is not required.
b31 – b18
b17
b16
0
Buffer status
Transmit
Receive
0: Full
1: Empty
0: Empty
1: Full
b15
b14
b13
b12
b11
b10
b9
b8
Bus state
Pin level
Event detection (0 = Not detected, 1 = detected)
0: Idle
1: Busy
SCL SDA NACK
Stop
condition
Start
condition
Arbitration lost Timeout
b7
b6
b5
b4
b3
b2
b1
b0
Transmission
Mode
Address detection (0 = Not detected, 1= detected)
0: Active
1: Idle
0: Receive
1: Transmit
SMBus host Device-ID General call
Slave
2
1
0
[data3]
The address for storing the number of bytes that are have been transmitted in the current transfer.
Specify PDL_NO_PTR if this information is not required.
[data4]
The address for storing for the number of bytes that are have been received in the current transfer.
Specify PDL_NO_PTR if this information is not required.
Return value
True if all parameters are valid; otherwise false.
Category
I²C
Reference
R_IIC_Create
Remarks
•
The flags are not modified by this function. The event detection flags are cleared when a new
transfer is started.
R20UT0084EE0112 Rev.1.12 Page 4-202
July. 16, 2014