Commit Graph

105 Commits

Author SHA1 Message Date
Damien George
5ddd1488bd stm32/spi: Allow SPI peripheral state to persist across a soft reset.
The SPI sub-system is independent from the uPy state (eg the heap) and so
can safely persist across a soft reset.  And this is actually necessary for
drivers that rely on SPI and that also need to persist across soft reset
(eg external SPI flash memory).
2018-02-02 19:01:11 +11:00
Damien George
57d2ac1300 stm32/rng: Simplify RNG implementation by accessing raw peripheral regs.
It saves code size and RAM, and is more efficient to execute.
2018-02-02 18:22:57 +11:00
Damien George
c73360bfdb stm32: Allow to build a board without any hardware I2C ports defined.
This patch adds in internal config value MICROPY_HW_ENABLE_HW_I2C that is
automatically configured, and enabled only if one or more hardware I2C
ports are defined in the mpconfigboard.h file.  If none are defined then
the pyb.I2C class is excluded from the build, along with all supporting
code.  The machine.I2C class will still be available for software I2C.

Disabling all hardware I2C on an F4 board saves around 10,000 bytes of code
and 200 bytes of RAM.
2017-12-22 15:20:42 +11:00
Damien George
971699abe7 stm32: Add support for using the Python stack. 2017-12-11 13:49:09 +11:00
Damien George
01dd7804b8 ports: Make new ports/ sub-directory and move all ports there.
This is to keep the top-level directory clean, to make it clear what is
core and what is a port, and to allow the repository to grow with new ports
in a sustainable way.
2017-09-06 13:40:51 +10:00