Skip to content

Commit e06fb01

Browse files
quytranpzzKhiemNguyenT
authored andcommitted
hal: renesas: rx: Remove unsed variable in r_s12ad_rx261.c
r_adc_close initialized unused variable in adc source of RX261, remove to avoid the build warning Signed-off-by: Quy Tran <quy.tran.pz@renesas.com>
1 parent 60bc252 commit e06fb01

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

drivers/rx/README

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,3 +91,7 @@ Patch List:
9191
* Add the header file <stdint.h>
9292
Impacted files:
9393
drivers/rx/rdp/src/r_bsp/mcu/rx130/mcu_clocks.h
94+
95+
* Remove unsed variables to fix build warnings
96+
Impacted files:
97+
drivers/rx/rdp/src/r_s12ad_rx/src/targets/rx261/r_s12ad_rx261.c

drivers/rx/rdp/src/r_s12ad_rx/src/targets/rx261/r_s12ad_rx261.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -202,9 +202,9 @@ adc_err_t adc_open(uint8_t const unit,
202202

203203
p_regs->ADADS0.WORD = 0;
204204
p_regs->ADADS1.WORD = 0;
205-
205+
206206
p_regs->ADADC.BYTE = 0;
207-
207+
208208
p_regs->ADCER.WORD = 0;
209209
p_regs->ADSTRGR.WORD = 0;
210210

@@ -252,7 +252,7 @@ adc_err_t adc_open(uint8_t const unit,
252252
p_regs->ADCMPBSR.BYTE = 0; /* target bit clear by read-modify-write */
253253
p_regs->ADBUFEN.BYTE = 0;
254254
p_regs->ADBUFPTR.BYTE = 0;
255-
255+
256256
/* SET MODE RELATED REGISTER FIELDS */
257257
g_dcb.mode = mode;
258258

@@ -1099,7 +1099,6 @@ static void adc_enable_s12gbadi(void)
10991099
*******************************************************************************/
11001100
adc_err_t adc_close(uint8_t const unit)
11011101
{
1102-
volatile uint8_t i;
11031102
uint32_t adc_wait_microsecs;
11041103

11051104
/* Get S12AD register address */
@@ -1151,7 +1150,7 @@ adc_err_t adc_close(uint8_t const unit)
11511150
adc_wait_microsecs = (uint32_t)((3000000 + (BSP_PCLKD_HZ - 1)) / BSP_PCLKD_HZ);
11521151
}
11531152
R_BSP_SoftwareDelay (adc_wait_microsecs, BSP_DELAY_MICROSECS);
1154-
1153+
11551154
/* Power down peripheral */
11561155
R_BSP_RegisterProtectDisable(BSP_REG_PROTECT_LPC_CGC_SWR);
11571156

0 commit comments

Comments
 (0)