diff options
author | mux <freelancer.c@gmail.com> | 2014-01-14 19:57:51 +0200 |
---|---|---|
committer | mux <freelancer.c@gmail.com> | 2014-01-14 19:57:51 +0200 |
commit | 3591285091c781f8c25115660d53873af04e3bf6 (patch) | |
tree | 93df6658ed7570abc69510e7c5be765ce2c40eb3 /stm/main.c | |
parent | b4e374f1389a7be114594a50681a767d30b8ae2d (diff) | |
download | micropython-3591285091c781f8c25115660d53873af04e3bf6.tar.gz micropython-3591285091c781f8c25115660d53873af04e3bf6.zip |
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.
Diffstat (limited to 'stm/main.c')
-rw-r--r-- | stm/main.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/stm/main.c b/stm/main.c index 2085182c29..49faf70976 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)); |