Starts SCI transmission/reception (clock synchronous mode).
Remark 1. This API function repeats SCI transmission in byte units the number of times specified by the argument tx_num from the buffer at the location specified by the argument tx_buf.
Remark 2. This API function repeats SCI reception processing in byte units the number of times specified by the argument rx_num and then stores the received data in the buffer at the location specified by the argument rx_buf.
Remark 3. When performing a SCI transmission/reception, R_SCIn_Start must be called before this API function is called.
[Syntax]
#include "r_cg_macrodriver.h"
MD_STATUS R_SCIn_Serial_Send_Receive ( uint8_t * const tx_buf, uint16_t tx_num,
uint8_t * const rx_buf, uint16_t rx_num );
Remark n is the channel number.
[Argument(s)]
I/O |
Argument |
Description |
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 |
O |
uint8_t * const rx_buf; |
Pointer to a buffer to store the reception data |
I |
uint16_t rx_num; |
Total amount of data to receive |
[Return value]
Macro |
Description |
MD_OK |
Normal completion |
MD_ARGERROR |
Invalid argument tx_num specification |