Skip to content

Commit e1acb06

Browse files
committed
[NUC472] Rename variable name in analog-in
1 parent bb1617c commit e1acb06

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

targets/TARGET_NUVOTON/TARGET_NUC472/analogin_api.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
#include "PeripheralPins.h"
2424
#include "nu_modutil.h"
2525

26-
static uint32_t adc_modinit_mask = 0;
26+
static uint32_t eadc_modinit_mask = 0;
2727

2828
static const struct nu_modinit_s adc_modinit_tab[] = {
2929
{ADC_0_0, EADC_MODULE, CLK_CLKSEL1_ADCSEL_PLL, CLK_CLKDIV0_ADC(5), ADC_RST, EADC0_IRQn, NULL},
@@ -57,7 +57,7 @@ void analogin_init(analogin_t *obj, PinName pin)
5757
EADC_T *eadc_base = (EADC_T *) NU_MODBASE(obj->adc);
5858

5959
// NOTE: All channels (identified by ADCName) share a ADC module. This reset will also affect other channels of the same ADC module.
60-
if (! adc_modinit_mask) {
60+
if (! eadc_modinit_mask) {
6161
// Reset this module if no channel enabled
6262
SYS_ResetModule(modinit->rsetidx);
6363

@@ -78,7 +78,7 @@ void analogin_init(analogin_t *obj, PinName pin)
7878
// Configure the sample module Nmod for analog input channel Nch and software trigger source
7979
EADC_ConfigSampleModule(eadc_base, chn, EADC_SOFTWARE_TRIGGER, chn % 8);
8080

81-
adc_modinit_mask |= 1 << chn;
81+
eadc_modinit_mask |= 1 << chn;
8282
}
8383

8484
uint16_t analogin_read_u16(analogin_t *obj)

0 commit comments

Comments
 (0)