diff options
author | John R. Lenton <jlenton@gmail.com> | 2014-01-14 23:58:05 +0000 |
---|---|---|
committer | John R. Lenton <jlenton@gmail.com> | 2014-01-14 23:58:05 +0000 |
commit | ff8007c7d6497b108e8abe80ab3311945a03fe52 (patch) | |
tree | e2f6974d6476cc46b7414ba0626cb519142c3e3d /stm/main.c | |
parent | 9daa78943e58602f74c89a2b5b1ed225f4ccf6cc (diff) | |
parent | c6920d31e2b03205fe2851f74a6a4b48d0165608 (diff) | |
download | micropython-ff8007c7d6497b108e8abe80ab3311945a03fe52.tar.gz micropython-ff8007c7d6497b108e8abe80ab3311945a03fe52.zip |
Merge remote-tracking branch 'upstream/master' into builtins
Diffstat (limited to 'stm/main.c')
-rw-r--r-- | stm/main.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/stm/main.c b/stm/main.c index 2085182c29..ab8cced6a9 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; @@ -390,7 +391,7 @@ void do_repl(void) { stdout_tx_str("Type \"help()\" for more information.\r\n"); vstr_t line; - vstr_init(&line); + vstr_init(&line, 32); for (;;) { vstr_reset(&line); @@ -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)); @@ -1178,6 +1180,7 @@ soft_reset: goto soft_reset; } +/* now supplied by libgcc library double __aeabi_f2d(float x) { // TODO return 0.0; @@ -1187,6 +1190,7 @@ float __aeabi_d2f(double x) { // TODO return 0.0; } +*/ double sqrt(double x) { // TODO |