Renesas Solution Starter Kit for RX23W
R20UT4449EG0100 Rev. 1.00
Page 53 of 64
Aug.30.19
5.6
UART Code Integration
5.6.1
SCI Code
In the e
2
studio Project Tree, expand the ‘src\smc_gen\Config_SCI8’ folder and open the file ‘Config_SCI8.h’
by double-clicking on it. Insert the following code in the user code area at the end of the file:
/* Start user code for function. Do not edit comment generated here */
/* Exported functions used to transmit a number of bytes and wait for completion */
MD_STATUS R_SCI8_AsyncTransmit(uint8_t
*
const
tx_buf,
const
uint16_t tx_num);
/* Character is used to receive key presses from PC terminal */
extern
uint8_t g_rx_char;
/* End user code. Do not edit comment generated here */
Open the file ‘Config_SCI8_user.c’. Insert the following code in the user area for global near the beginning of
the file:
/* Start user code for global. Do not edit comment generated here */
/* Global used to receive a character from the PC terminal */
uint8_t g_rx_char;
/* Flag used locally to detect transmission complete */
static
volatile
uint8_t gs_sci8_txdone;
/* End user code. Do not edit comment generated here */
In the same file, insert the following code in the user code area inside the
r_Config_SCI8_callback_transmitend function:
static void
r_Config_SCI8_callback_transmitend (
void
)
{
/* Start user code for r_Config_SCI8_callback_transmitend. Do not edit comment generated here */
gs_sci8_txdone
=
TRUE;
/* End user code. Do not edit comment generated here */
}
Содержание RSSK
Страница 64: ...R20UT4449EG0100 RX23W Group ...