Starts RIIC master reception.
Remarks 1. | This API function handles RIIC master transmission to the slave device at the slave address specified by the argument adr. RIIC master reception in byte units is repeated the number of times specified by the argument rx_num and the received data are stored in the buffer at the location specified by the argument rx_buf. |
Remarks 2. | This API function internally calls R_RIICn_StartCondition to handle processing to start RIIC master reception. |
Remarks 3. | When performing a RIIC master reception, R_RIICn_Start must be called before this API function is called. |
[Syntax]
#include "r_cg_macrodriver.h"
MD_STATUS R_RIICn_Master_Receive ( uint8_t adr, uint8_t * const rx_buf, uint16_t rx_num );
|
Remark | n is the channel number. |
[Argument(s)]
|
|
|
|
uint8_t adr;
|
Slave address
|
|
uint8_t * const rx_buf;
|
Pointer to a buffer to store the reception data
|
|
uint16_t rx_num;
|
Total amount of data to receive
|
[Return value]
|
|
MD_OK
|
Normal completion
|
MD_ERROR1
|
Bus busy
|
MD_ERROR2
|
Invalid argument adr specification
|