From 3591285091c781f8c25115660d53873af04e3bf6 Mon Sep 17 00:00:00 2001 From: mux Date: Tue, 14 Jan 2014 19:57:51 +0200 Subject: Implement initial ADC support * Add simple ADC driver, with support for ADC1 and all channels. * Export MicroPython ADC object with read_channel function. * Add stm32f4xx_adc.c and adc.c to Makefile. --- stm/main.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'stm/main.c') diff --git a/stm/main.c b/stm/main.c index 2085182c2..49faf7097 100644 --- a/stm/main.c +++ b/stm/main.c @@ -40,6 +40,7 @@ #include "pybwlan.h" #include "i2c.h" #include "usrsw.h" +#include "adc.h" int errno; @@ -839,6 +840,7 @@ soft_reset: rt_store_attr(m, qstr_from_str_static("I2C"), rt_make_function_n(2, pyb_I2C)); rt_store_attr(m, qstr_from_str_static("gpio"), (mp_obj_t)&pyb_gpio_obj); rt_store_attr(m, qstr_from_str_static("Usart"), rt_make_function_n(2, pyb_Usart)); + rt_store_attr(m, qstr_from_str_static("ADC"), rt_make_function_n(1, pyb_ADC)); rt_store_name(qstr_from_str_static("pyb"), m); rt_store_name(qstr_from_str_static("open"), rt_make_function_n(2, pyb_io_open)); -- cgit v1.2.3