Led Code Integration - Renesas RX Series User Manual

Rx23w group. solution starter kit for rx23w smart configurator
Hide thumbs Also See for RX Series:
Table of Contents

Advertisement

Renesas Solution Starter Kit for RX23W
5.7

LED Code Integration

Open the file 'SC_Tutorial.c'. Add the following declaration to the near the top of the file:
#include
"r_smc_entry.h"
#include
"r_okaya_lcd.h"
#include
"r_cg_userdefine.h"
#include
"Config_S12AD0.h"
#include
"r_rssk_switch.h"
#include
"r_rssk_debug.h"
#include
"Config_SCI8.h"
#include
"rsskrx23wdef.h"
/* Variable for flagging user requested ADC conversion */
volatile
uint8_t g_adc_trigger
/* Prototype declaration for cb_switch_press */
static void
cb_switch_press (void);
/* Prototype declaration for get_adc */
static
uint16_t get_adc(void);
/* Prototype declaration for lcd_display_adc */
static void
lcd_display_adc
/* Prototype declaration for uart_display_adc */
static void uart_display_adc(const
/* Variable to store the A/D conversion count for user display */
static
uint8_t gs_adc_count
/* Prototype declaration for led_display_count */
static void led_display_count(const
Add the following highlighted code in the main function:
void
main(void)
{
/* Initialize the switch module */
R_SWITCH_Init();
/* Set the call back function when SW1 or SW2 is pressed */
R_SWITCH_SetPressCallback(cb_switch_press);
/* Initialize the debug LCD */
R_LCD_Init();
/* Displays the application name on the debug LCD */
R_LCD_Display(0, (uint8_t
R_LCD_Display(1, (uint8_t
R_LCD_Display(2, (uint8_t
/* Start the A/D converter */
R_Config_S12AD0_Start();
/* Set up SCI8 receive buffer and callback function */
R_Config_SCI8_Serial_Receive((uint8_t *)&g_rx_char, 1);
/* Enable SCI8 operations */
R_Config_SCI8_Start();
R20UT4449EG0100 Rev. 1.00
Aug.30.19
=
FALSE;
(const
uint16_t adc_result);
uint8_t gs_adc_count,
=
0;
uint8_t count);
*)" RSSKRX23W
");
*)" Tutorial
");
*)" Press Any Switch
const
uint16_t adc_result);
");
5. User Code Integration
Page 57 of 64

Advertisement

Table of Contents
loading

This manual is also suitable for:

Rx200 seriesRssk

Table of Contents