Damien George
3770cd2e70
stmhal: Expose flash and SD card as proper objects with block protocol.
...
You can now create (singleton) objects representing the flash and SD
card, using:
flash = pyb.Flash()
sdcard = pyb.SDCard()
These objects provide the block protocol.
2016-02-10 23:40:10 +00:00
Paul Sokolovsky
5b85a86ce3
extmod/fsusermount: Introduce separate mkfs() function.
...
Per the previously discussed plan. mount() still stays backward-compatible,
and new mkfs() is rought and takes more args than needed. But is a step
in a forward direction.
2016-02-10 00:50:07 +02:00
Damien George
401af50dc0
stmhal: Add pyb.irq_stats() to get statistics about IRQ calls.
...
Adds a lot of code, makes IRQs a bit less efficient, but is very useful
for debugging. Usage: pyb.irq_stats() returns a memory view that can be
read and written, eg:
list(pyb.irq_stats())
pyb.irq_stats()[0]
pyb.irq_stats()[0] = 0
The patch provides general IRQ_ENTER() and IRQ_EXIT() macros that can be
modified to provide further IRQ statistics if desired.
2015-12-22 21:00:20 +00:00
Paul Sokolovsky
3a1bbcc2ef
extmod: Move fsusermount.c from stmhal for cross-port reuse.
2015-11-25 13:19:36 +02:00
Damien George
40274fec9c
lib/pyexec: Move header pyexec.h from stmhal directory.
2015-11-09 13:13:09 +00:00
Damien George
83158e0e7f
stmhal: Implement os.dupterm (was pyb.repl_uart).
...
pyb.repl_uart still exists but points to os.dupterm.
2015-10-19 21:57:41 +01:00
Damien George
d8066e999d
stmhal: Add sleep_{ms,us} and ticks_{ms,us,cpu,diff} to time module.
...
pyb module still has pyb.delay and pyb.udelay, but these now point to
time.sleep_ms and time.sleep_us respectively.
2015-10-19 21:45:51 +01:00
Dave Hylands
504420c51d
stmhal: Early version of machine module for stmhal.
2015-10-19 21:12:42 +01:00
Dave Hylands
8f59bacb92
stamhal: Add definitions for MCU_SERIES_F4 and MCU_SERIES_F7
2015-08-07 08:52:42 +01:00
Dave Hylands
5e11d2b349
stmhal: Enable SPI support for F7 MCUs.
2015-08-05 23:38:49 +01:00
Dave Hylands
34fe5a30c6
stmhal: Enable I2C support for F7 MCUs.
2015-08-05 23:38:24 +01:00
Dave Hylands
92d4b51ad5
stmhal: Add STM32F7DISC and associated changes.
2015-07-30 00:38:32 +01:00
Dave Hylands
ea8bf81058
stmhal: Replace #include "stm32f4xx_hal.h" with #include STM32_HAL_H.
2015-07-30 00:38:25 +01:00
Damien George
8657342973
stmhal: Correctly clear wake-up flag before entering standby mode.
2015-03-22 21:52:20 +00:00
Damien George
f44ace11fb
stmhal: Put flash in deep power-down mode when entering stop mode.
...
This can get PYBv1.0 stop current down to around 290uA.
2015-03-22 17:55:50 +00:00
Damien George
48ef64a729
stmhal: Make os.sync use disk_ioctl exclusively; reuse os.sync in pyb.
2015-03-04 20:38:28 +00:00
Damien George
4f94d90d4d
stmhal: Include fatfs headers using lib/fatfs prefix.
...
This helps make files reusable across other ports.
2015-03-04 20:35:41 +00:00
Damien George
0b32e50365
stmhal: Make pybstdio usable by other ports, and use it.
...
Now all ports can use pybstdio.c to provide sys.stdin/stdout/stderr, so
long as they implement mp_hal_stdin_* and mp_hal_stdout_* functions.
2015-02-13 15:04:53 +00:00
Damien George
d39c7aa517
stmhal: Add Python-configurable USB HID mode.
...
Different HID modes can be configured in Python. You can either use
predefined mouse or keyboard, or write your own report descriptor.
2015-02-13 14:02:51 +00:00
Dave Hylands
d7f199465f
stmhal: Add support for FEZ Cerb40 II board from ghielectronics.com.
2015-01-21 00:11:04 +00:00
Damien George
3b51b3e90f
stmhal: Collect all root pointers together in 1 place.
...
A GC in stmhal port now only scans true root pointers, not entire BSS.
This reduces base GC time from 1700ms to 900ms.
2015-01-07 23:38:50 +00:00
Damien George
2cf6dfa280
stmhal: Prefix includes with py/; remove need for -I../py.
2015-01-01 21:06:20 +00:00
Damien George
7690b13953
stmhal: Add ability to mount custom block device.
2014-12-27 20:20:51 +00:00
Damien George
008251180d
stmhal: Enhance pyb.freq to configure bus (AHB, APB1, APB2) freqs.
...
This is useful if you need precise control over the speed of
peripherals (eg SPI clock).
2014-12-08 21:32:55 +00:00
Damien George
1960475ed7
stmhal: Make pyb.[u]delay use systick with IRQs, busy loop otherwise.
...
pyb.delay and pyb.udelay now use systick if IRQs are enabled, otherwise
they use a busy loop. Thus they work correctly when IRQs are disabled.
The busy loop is computed from the current CPU frequency, so works no
matter the CPU frequency.
2014-11-30 21:23:25 +00:00