R_RIICn_Master_Send


Starts RIIC master transmission.

Remarks 1.

This API function handles RIIC master transmission to the slave device at the address specified by the argument adr and the R/W#bit. RIIC master transmission in byte units is repeated the number of times specified by the argument tx_num from the buffer at the location specified by the argument tx_buf.

Remarks 2.

This API function internally calls R_RIICn_StartCondition to handle processing to start RIIC master transmission.

Remarks 3.

When performing a RIIC master transmission, R_RIICn_Start must be called before this API function is called.

[Syntax]

#include    "r_cg_macrodriver.h"
MD_STATUS   R_RIICn_Master_Send ( uint8_t adr, uint8_t * const tx_buf, uint16_t tx_num );

Remark

n is the channel number.

[Argument(s)]

I/O

Argument

Description

I

uint8_t         adr;

Slave address

I

uint8_t * const tx_buf;

Pointer to a buffer storing the transmission data

I

uint16_t        tx_num;

Total amount of data to send

[Return value]

Macro

Description

MD_OK

Normal completion

MD_ERROR1

Bus busy

MD_ERROR2

Invalid argument adr specification