Usage example
Transfer and write data ot external device by SPI transmission. After that, read the data for verify check.
※Please use SA-Designer together.
[GUI setting example]
SPI interface |
||||
SPI |
Used | |||
Analog IC operation setting |
Used | |||
Baudrate |
300(bps) (Actual value:300.481) |
[API setting example]
r_cg_main.c
/* Start user code for global. Do not edit comment generated here */
uint8_t g_flag;
smartanalog_t gp_sa_read_buf[];
extern const smartanalog_t gp_smartanalog_data[];
/* End user code. Do not edit comment generated here */
void main(void)
{
R_MAIN_UserInit();
/* Start user code. Do not edit comment generated here */
while (1U)
{
if (1U == g_flag)
{
/* Write SAIC register */
R_SAIC_Write(gp_smartanalog_data);
/* Read SAIC register */
R_SAIC_Read(gp_smartanalog_data, gp_sa_read_buf);
/** read after write verify **/
}
}
/* End user code. Do not edit comment generated here */
}