User`s manual
RX62N Group, RX621 Group 4. Library Reference
3) R_IIC_MasterSend
Synopsis
Write data to a slave device.
Prototype
bool R_IIC_MasterSend(
uint8_t data1,
// Channel selection
uint16_t data2,
// Channel configuration
uint16_t data3,
// Slave address
uint8_t * data4,
// Data start address
uint16_t data5,
// Data count
void * func,
// Callback function
uint8_t data6
// Interrupt priority level
);
Description
Transmit data on the specified channel.
[data1]
Select channel IICn (where n = 0 or 1).
[data2]
Configure the channel. If multiple selections are required, use "|" to separate each selection.
The default settings are shown in bold. Specify PDL_NO_DATA to use the defaults.
•
Start / Repeated Start condition control
PDL_IIC_START_ENABLE or
PDL_IIC_START_DISABLE
Choose whether or not to issue a Start or Repeated Start
condition at the beginning of the transfer.
•
Stop condition control
PDL_IIC_STOP_ENABLE or
PDL_IIC_STOP_DISABLE
Choose whether or not to issue a Stop condition at the end of
the transfer.
•
Slave address size override
PDL_IIC_10_BIT_SLAVE_ADDRESS
Specify this option if 10-bit address mode is to be
used instead of 7-bit mode when the slave address is
≤ FFh.
•
DMAC / DTC trigger control
PDL_IIC_DMAC_DTC_TRIGGER_DISABLE or
PDL_IIC_DMAC_TRIGGER_ENABLE or
PDL_IIC_DTC_TRIGGER_ENABLE
Disable or enable activation of the DMAC or
DTC when a data byte is transmitted.
[data3]
The address of the slave device. Ignored if the Start condition is disabled.
[data4]
The start address of the data to be sent.
If the DMAC or DTC shall be used to transfer the data, specify PDL_NO_PTR.
[data5]
The number of bytes to be sent.
If the DMAC or DTC shall be used to transfer the data, specify PDL_NO_DATA.
[func]
Specify PDL_NO_FUNC or a callback function name, depending on the required transfer method.
Transfer method
Parameter
Polling
PDL_NO_FUNC. This function will continue until the required number of
bytes has been sent (or another event occurs).
Interrupts
The function to be called when bus activity has stopped.
DMAC
Either the function to be called when each byte is sent, or PDL_NO_FUNC if
the callback function specified in R_DMAC_Create will be used.
DTC
The function to be called at the interval specified in R_DTC_Create.
R20UT0084EE0112 Rev.1.12 Page 4-193
July. 16, 2014