Renesas Solution Starter Kit for RX23W
R20UT4449EG0100 Rev. 1.00
Page 54 of 64
Aug.30.19
In the same file, insert the following code in the user code area inside the
r_Config_SCI8_callback_receiveend function:
static void
r_Config_SCI8_callback_receiveend(
void
)
{
/* Start user code for r_Config_SCI8_callback_receiveend. Do not edit comment generated here */
/* Check the contents of g_rx_char */
if
((
'c'
==
g_rx_char)
||
(
'C'
==
g_rx_char))
{
g_adc_trigger
=
TRUE;
}
/* Set up SCI8 receive buffer and callback function again */
R_Config_SCI8_Serial_Receive((uint8_t
*
)
&
g_rx_char, 1);
/* End user code. Do not edit comment generated here */
}
At the end of the file, in the user code area for adding, add the following function definition:
/*******************************************************************************
* Function Name: R_SCI8_AsyncTransmit
* Description : This function sends SCI8 data and waits for the transmit end flag.
* Arguments : tx_buf -
* transfer buffer pointer
* tx_num -
* buffer size
* Return Value : status -
* MD_OK or MD_ARGERROR
*******************************************************************************/
MD_STATUS R_SCI8_AsyncTransmit(uint8_t
*
const
tx_buf,
const
uint16_t tx_num)
{
MD_STATUS status
=
MD_OK;
/* Clear the flag before initiating a new transmission */
gs_sci8_txdone
=
FALSE;
/* Send the data using the API */
status
=
R_Config_SCI8_Serial_Send(tx_buf, tx_num);
/* Wait for the transmit end flag */
while
(FALSE
==
gs_sci8_txdone)
{
/* Wait */
}
return
(status);
}
/*******************************************************************************
* End of function R_SCI8_AsyncTransmit
*******************************************************************************/
Summary of Contents for RSSK
Page 64: ...R20UT4449EG0100 RX23W Group ...