Skip to content

Commit 5cd34ac

Browse files
author
Daniel Campora
committed
cc3200: Use the correct ADC channel index when creating the object.
1 parent 95f19b4 commit 5cd34ac

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

cc3200/mods/pybadc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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,
139139
}
140140

141141
// disable the callback before re-configuring
142-
pyb_adc_obj_t *self = &pyb_adc_obj[channel];
142+
pyb_adc_obj_t *self = &pyb_adc_obj[num];
143143
self->base.type = &pyb_adc_type;
144144
self->channel = channel;
145145
self->num = num;

0 commit comments

Comments
 (0)