diff options
Diffstat (limited to 'stmhal/adc.c')
-rw-r--r-- | stmhal/adc.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/stmhal/adc.c b/stmhal/adc.c index 57e2e60d24..92df7aee5e 100644 --- a/stmhal/adc.c +++ b/stmhal/adc.c @@ -212,6 +212,7 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_1(adc_read_obj, adc_read); /// print(val) # print the value out /// /// This function does not allocate any memory. +#if defined(TIM6) STATIC mp_obj_t adc_read_timed(mp_obj_t self_in, mp_obj_t buf_in, mp_obj_t freq_in) { pyb_obj_adc_t *self = self_in; @@ -274,10 +275,13 @@ STATIC mp_obj_t adc_read_timed(mp_obj_t self_in, mp_obj_t buf_in, mp_obj_t freq_ return mp_obj_new_int(bufinfo.len); } STATIC MP_DEFINE_CONST_FUN_OBJ_3(adc_read_timed_obj, adc_read_timed); +#endif STATIC const mp_map_elem_t adc_locals_dict_table[] = { { MP_OBJ_NEW_QSTR(MP_QSTR_read), (mp_obj_t)&adc_read_obj}, + #if defined(TIM6) { MP_OBJ_NEW_QSTR(MP_QSTR_read_timed), (mp_obj_t)&adc_read_timed_obj}, + #endif }; STATIC MP_DEFINE_CONST_DICT(adc_locals_dict, adc_locals_dict_table); |