From 58ec23fdf707329088f3d2f7537a94e8cd77b167 Mon Sep 17 00:00:00 2001 From: Glenn Ruben Bakke Date: Fri, 20 Apr 2018 01:11:48 +0200 Subject: [PATCH] nrf/modules/machine/adc: Fix to make adc.c compile for nrf51 targets --- ports/nrf/modules/machine/adc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/nrf/modules/machine/adc.c b/ports/nrf/modules/machine/adc.c index 66897426d7..bbb5221540 100644 --- a/ports/nrf/modules/machine/adc.c +++ b/ports/nrf/modules/machine/adc.c @@ -157,7 +157,7 @@ int16_t machine_adc_value_read(machine_adc_obj_t * adc_obj) { .config.resolution = NRF_ADC_CONFIG_RES_8BIT, .config.input = NRF_ADC_CONFIG_SCALING_INPUT_TWO_THIRDS, .config.reference = NRF_ADC_CONFIG_REF_VBG, - .config.input = self->ain, + .config.input = adc_obj->ain, .config.extref = ADC_CONFIG_EXTREFSEL_None << ADC_CONFIG_EXTREFSEL_Pos // Currently not defined in nrfx/hal. };