Damien George
c50772d19f
py: Add mp_obj_get_int_truncated and use it where appropriate.
...
mp_obj_get_int_truncated will raise a TypeError if the argument is not
an integral type. Use mp_obj_int_get_truncated only when you know the
argument is a small or big int.
2015-05-12 23:05:53 +01:00
blmorris
5df81de7af
sthmal/rtc.c: Add calibration() method to get/set RTC fine-tuning value.
2015-05-11 23:48:39 +01:00
Dave Hylands
ff987ccf11
stmhal: Move debug UART repl to after uart_init0 call.
2015-05-06 22:16:49 +01:00
Damien George
c98c128fe8
pyexec: Make raw REPL work with event-driven version of pyexec.
...
esp8266 port now has working raw and friendly REPL, as well as working
soft reset (CTRL-D at REPL, or raise SystemExit).
tools/pyboard.py now works with esp8266 port.
2015-05-06 00:02:58 +01:00
Paul Sokolovsky
3d3ef36e97
modstruct: Rename module to "ustruct", to allow full Python-level impl.
2015-05-04 16:53:52 +03:00
Josef Gajdusek
04ee5983fe
lib: Move some common mod_network_* functions to lib/netutils.
2015-05-04 11:48:40 +01:00
Eero af Heurlin
2378be4e93
stmhal: Allow to configure UART pins completely via mpconfigboard.h.
2015-05-03 13:48:26 +01:00
Dave Hylands
c3e37a0cde
stmhal: Automatically re-enable IRQs on the USB REPL.
...
This allows errors to be seen and prevents hanging
the board from doing: pyb.disable_irq()
2015-04-29 08:27:38 +01:00
Damien George
b7a4f15b34
mp-readline: Save "prompt" string in readline state.
2015-04-29 00:32:35 +01:00
Damien George
95f53461c2
py: Replace py-version.sh with makeversionhdr.py, written in Python.
...
Also rename py-version.h to mpversion.h for consistency with mpconfig.h.
2015-04-28 23:52:36 +01:00
Dave Hylands
fdcb3b7ebb
stmhal: Actually disable unhandled timer interrupts.
2015-04-28 00:17:05 -07:00
Dave Hylands
fd787c5e4e
stmhal: Reset the timer counter to zero after changing the auto reload.
...
Because if the counter is above the new value of the auto-reload register
then it may be a long time until the timer wraps around.
2015-04-22 23:31:56 +01:00
Damien George
d8837cea6f
stmhal: Implement os.uname() to get details of OS and hardware.
2015-04-21 14:51:49 +00:00
Damien George
f35b5d28db
stmhal/pyexec.c: Make raw REPL mode 8-bit clean.
2015-04-19 21:30:49 +01:00
Damien George
404b68da88
stmhal: Provide ADC capabilities for F401 and F411 MCUs.
...
Simply needed to define which pins have which ADC channel on them.
2015-04-18 22:39:06 +01:00
Damien George
b42a5050fb
stmhal: Add support for STM32F411 MCU.
2015-04-18 22:15:59 +01:00
Damien George
3e592531eb
stmhal: For flash storage use same params for F407 as F405.
2015-04-18 22:08:16 +01:00
Damien George
90e6d0c2ac
stmhal: Add support for Espruino Pico board.
...
To build:
make BOARD=ESPRUINO_PICO
To deploy: short the BOOT0/BTN contact on the back of the board (eg by
drawing over it with a graphite pencil), then hold down BTN while
inserting the board into the USB port. The board should then enter DFU
mode, and the firmware can be downloaded using:
make BOARD=ESPRUINO_PICO deploy
2015-04-18 21:40:59 +01:00
Damien George
e4b4e5aa31
stmhal: Add stm32f401.ld for linking F401 targets.
2015-04-18 21:40:59 +01:00
Damien George
0435e76250
stmhal: Make ld and af files configurable within Makefile.
...
Each board now needs an mpconfigboard.mk file which defines AF_FILE and
LD_FILE.
Also moved stm32f405.ld to boards/ directory to keep things organised.
2015-04-18 21:40:59 +01:00
Damien George
03ec6e4d01
stmhal: Add stm32f401_af.csv, for AF definitions of F401 MCUs.
2015-04-18 21:40:59 +01:00
Damien George
9253e7bdf7
stmhal: Rename stm32f4xx_af.csv to stm32f405_af.csv.
...
Since this file is only valid for F405 MCUs, not generic F4xx.
2015-04-18 21:40:59 +01:00
Damien George
6be0bbb886
stmhal: Add support for flash filesystem on F401 MCUs.
...
It uses a 16k cache buffer and so the filesystem size is limited.
2015-04-18 21:40:59 +01:00
Damien George
5a11086d64
stmhal: Allow extint.c to compile without USB HS support.
2015-04-18 21:40:59 +01:00
Damien George
d15fe5a6b3
stmhal: Make I2C busses and their pins configurable in mpconfigboard.h.
2015-04-18 21:40:59 +01:00