User`s manual

RX62N Group, RX621 Group 4. Library Reference
7) R_SCI_GetStatus
Synopsis
Check the status of an SCI channel.
Prototype
bool R_SCI_GetStatus(
uint8_t data1,
// Channel selection
uint8_t * data2,
// Status flags
uint8_t * data3,
// Last byte received
uint16_t * data4,
// Bytes transmitted
uint16_t * data5
// Bytes received
);
Description
Acquires the channel status and the byte counts
[data1]
Select channel SCIn (where n = 0 to 6, but not 4).
[data2]
The status flags shall be stored in the format:
Asynchronous or Synchronous mode:
b7
b6
b5
b4
b3
b2
b1
b0
Buffer status
Reception error detection
Transmit
status
0
RxD pin
level
Transmit
Receive
Overrun
Framing
Parity
0: Full
1: Empty
0: Empty
1: Full
0: No error
1: Detected
0: No error
1: Detected
0: No error
1: Detected
0: Active
1: Idle
0: Low
1: High
Smart card mode:
b7
b6
b5
b4
b3
b2
b1
b0
Buffer status
Error detection
Transmit
status
0
RxD pin
level
Transmit
Receive
Overrun
Error signal
Parity
0: Full
1: Empty
0: Empty
1: Full
0: No error
1: Detected
0: No error
1: Detected
0: No error
1: Detected
0: Active
1: Idle
0: Low
1: High
[data3]
The storage location for the last byte that was received. Specify PDL_NO_PTR if this information is
not required.
[data4]
The storage location for the number of characters that are have been transmitted in the current
transmission. Specify PDL_NO_PTR if this information is not required.
[data5]
The storage location for the number of characters that are have been received in the current
reception process. Specify PDL_NO_PTR if this information is not required.
Return value
True if all parameters are valid and the operation completed; false if a parameter was out of range.
Category
SCI
Reference
R_SCI_Send, R_SCI_Receive
Remarks
The error flags are not modified by this function. They are cleared when a new reception
process is started.
R20UT0084EE0112 Rev.1.12 Page 4-181
July. 16, 2014