cc3200: Use the correct ADC channel index when creating the object.

This commit is contained in:
Daniel Campora 2015-05-24 21:54:13 +02:00
parent 95f19b4542
commit 5cd34aca27
1 changed files with 1 additions and 1 deletions

View File

@ -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;