User`s manual
RX62N Group, RX621 Group 4. Library Reference
5) R_IIC_MasterReceiveLast
Synopsis
Complete a DMAC or DTC-based read process.
Prototype
bool R_IIC_MasterReceiveLast(
uint8_t data1,
// Channel selection
uint8_t * data2
// Data storage address
);
Description
Read one data byte with NACK and stop.
[data1]
Select channel IICn (where n = 0 or 1).
[data2]
The storage location for the data byte.
Return value
True if all parameters are valid and the function completed; otherwise false.
Category
I²C
Reference
R_IIC_GetStatus
Remarks
•
This function must only be used to terminate a Read process that has used the DMAC or DTC.
•
Use R_IIC_GetStatus to determine if the transfer was successful.
•
Please specify one byte less in the Transfer Count when using with the DMAC or DTC.
Program example
/* RPDL definitions */
#include "r_pdl_iic.h"
/* RPDL device-specific definitions */
#include "r_pdl_definitions.h"
volatile uint8_t data_array[5];
void func(void)
{
/* Read 1 byte on channel 1 and stop */
R_IIC_MasterReceiveLast(
1,
&data_array[4]
);
}
R20UT0084EE0112 Rev.1.12 Page 4-197
July. 16, 2014