| Age | Commit message (Collapse) | Author |
|
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.
|
|
This is to have consistency across the whole repository.
|
|
This upgrades the HAL to the versions:
- F4 V1.16.0
- F7 V1.7.0
- L4 V1.8.1
The main changes were in the SD card driver. The vendor changed the SD
read/write functions to accept block number intead of byte address, so
there is no longer any need for a custom patch for this in stm32lib.
The CardType values also changed, so pyb.SDCard().info() will return
different values for the 3rd element of the tuple, but this function was
never documented.
|
|
|
|
Allows for simpler, smaller and faster code at run time when selecting the
boards frequency, and allows more customisation opportunities for the PLL
values depending on the target MCU.
|
|
Changes for F7 are:
- machine.reset_cause() now reports DEEPSLEEP_RESET correctly;
- machine.sleep() is further optimised to reduce power consumption;
- machine.deepsleep() is now implemented and working.
|
|
|
|
- Changed: ValueError, TypeError, NotImplementedError
- OSError invocations unchanged, because the corresponding utility
function takes ints, not strings like the long form invocation.
- OverflowError, IndexError and RuntimeError etc. not changed for now
until we decide whether to add new utility functions.
|
|
|
|
pyb.UART has a superset of machine.UART functionality so can be used to
provide compatibility with other ports that also implement machine.UART.
|
|
|
|
|
|
This patch changes the threading implementation from simple round-robin
with busy waits on mutexs, to proper scheduling whereby threads that are
waiting on a mutex are only scheduled when the mutex becomes available.
|
|
|
|
vfs.h is for generic VFS declarations, and vfs_fat.h is for VfsFat
specific things.
|
|
This patch makes the following configuration changes:
- MICROPY_FSUSERMOUNT is disabled, removing old mounting infrastructure
- MICROPY_VFS is enabled, giving new VFS sub-system
- MICROPY_VFS_FAT is enabled, giving uos.VfsFat type
- MICROPY_FATFS_OO is enabled, to use new ooFatFs lib, R0.12b
User facing API should be almost unchanged. Most notable changes are
removal of os.mkfs (use os.VfsFat.mkfs instead) and pyb.mount doesn't
allow unmounting by passing None as the device.
|
|
|
|
|
|
Includes both software and hardware SPI implementations.
|
|
To reset the flags we should write to the single bit only, not the entire
register (otherwise all other settings in the register are cleared).
Fixes #2457.
|
|
One can instead lookup __name__ in the modules dict to get the value.
|
|
machine.POWER_ON is renamed to machine.PWRON_RESET to match other
reset-cause constants that all end in _RESET. The cc3200 port keeps a
legacy definition of POWER_ON for backwards compatibility.
|
|
|
|
Usage:
import machine
wdt = machine.WDT(0, 5000) # 5 second timeout
wdt.feed()
Thanks to Moritz for the initial implementation.
|
|
Also raise an exception for machine.freq and machine.deepsleep on this
MCU, since they are not yet implemented.
|
|
|
|
|
|
TIM3 is no longer used by USB CDC for triggering outgoing data, so we
can now make it available to the user.
PWM fading on LED(4) is now gone, but will be reinstated in a new way.
|
|
They are no longer needed because stm constants can now be 32 bits wide.
|
|
This uses the newly factored machine_mem functions.
|
|
To let unix port implement "machine" functionality on Python level, and
keep consistent naming in other ports (baremetal ports will use magic
module "symlinking" to still load it on "import machine").
Fixes #1701.
|
|
|
|
If RTC is already running at boot then it's left alone. Otherwise, RTC is
started at boot but startup function returns straight away. RTC startup
is then finished the first time it is used. Fallback to LSI if LSE fails
to start in a certain time.
Also included:
MICROPY_HW_CLK_LAST_FREQ
hold pyb.freq() parameters in RTC backup reg
MICROPY_HW_RTC_USE_US
option to present datetime sub-seconds in microseconds
MICROPY_HW_RTC_USE_CALOUT
option to enable RTC calibration output
CLK_LAST_FREQ and RTC_USE_CALOUT are enabled for PYBv1.0.
|
|
In new hardware API, these classes implement master modes of interfaces,
and "mode" parameter is not accepted. Trying to implement new HW API
in terms of older pyb module leaves variuos corner cases:
In new HW API, I2C(1) means "I2C #1 in master mode" (? depends on
interpretation), while in old API, it means "I2C #1, with no settings
changes".
For I2C class, it's easy to make mode optional, because that's last
positional param, but for SPI, there's "baudrate" after it (which
is inconsistent with I2C, which requires "baudrate" to be kwonly-arg).
|
|
py/mphal.h contains declarations for generic mp_hal_XXX functions, such
as stdio and delay/ticks, which ports should provide definitions for. A
port will also provide mphalport.h with further HAL declarations.
|
|
|
|
Looks like we can use the same Pin class for legacy pyb module and new
machine module.
|
|
|