summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorDaniel Campora <daniel@wipy.io>2015-05-24 21:54:13 +0200
committerDaniel Campora <daniel@wipy.io>2015-05-25 21:14:46 +0200
commit5cd34aca27a9f2847a0441eac16fb8940a2a0fab (patch)
tree2e3dd891c6246b50d1703b46e3f837e7d0ffffff
parent95f19b4542733e5db2c355a31a37e9562658e26c (diff)
downloadmicropython-5cd34aca27a9f2847a0441eac16fb8940a2a0fab.tar.gz
micropython-5cd34aca27a9f2847a0441eac16fb8940a2a0fab.zip
cc3200: Use the correct ADC channel index when creating the object.
-rw-r--r--cc3200/mods/pybadc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/cc3200/mods/pybadc.c b/cc3200/mods/pybadc.c
index ae7de73eb9..72ec106296 100644
--- a/cc3200/mods/pybadc.c
+++ b/cc3200/mods/pybadc.c
@@ -139,7 +139,7 @@ STATIC mp_obj_t adc_make_new(mp_obj_t type_in, mp_uint_t n_args, mp_uint_t n_kw,
}
// disable the callback before re-configuring
- pyb_adc_obj_t *self = &pyb_adc_obj[channel];
+ pyb_adc_obj_t *self = &pyb_adc_obj[num];
self->base.type = &pyb_adc_type;
self->channel = channel;
self->num = num;