| Commit message (Collapse) | Author | Age |
|
|
|
|
|
|
|
|
| |
For consistent Pin/Signal class hierarchy. With it, Signal is a proper
(while still ducktyped) subclass of a Pin, and any (direct) usage of Pin
can be replace with Signal.
As stmhal's class is reused both as machine.Pin and legacy pyb.Pin,
high/low methods actually retained there.
|
|
|
|
| |
Returns 0 or 1, corresponding to no or at least 1 char waiting.
|
| |
|
|
|
|
|
| |
This happened when the overflow counter for ticks_ms() was interrupted
by an external hard interrupt (issue #3076).
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Make esp8266_common.ld export size reserved to all code segments, and use
that in esp.flash_user_start() implementation.
|
|
|
|
| |
To accommodate both system and user frozen modules.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This implements the orginal idea is that Signal is a subclass of Pin, and
thus can accept all the same argument as Pin, and additionally, "inverted"
param. On the practical side, it allows to avoid many enclosed parenses for
a typical declararion, e.g. for Zephyr:
Signal(Pin(("GPIO_0", 1))).
Of course, passing a Pin to Signal constructor is still supported and is the
most generic form (e.g. Unix port will only support such form, as it doesn't
have "builtin" Pins), what's introduces here is just practical readability
optimization.
"value" kwarg is treated as applying to a Signal (i.e. accounts for possible
inversion).
|
| |
|
|
|
|
|
| |
It can still be overwritten by a port in mpconfigport.h but for almost
all cases one can use the provided default.
|
|
|
|
|
|
|
| |
This follows the pattern of how all other headers are now included, and
makes it explicit where the header file comes from. This patch also
removes -I options from Makefile's that specify the mp-readline/timeutils/
netutils directories, which are no longer needed.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The C nearbyint function has exactly the semantics that Python's round()
requires, whereas C's round() requires extra steps to handle rounding of
numbers half way between integers. So using nearbyint reduces code size
and potentially eliminates any source of errors in the handling of half-way
numbers.
Also, bare-metal implementations of nearbyint can be more efficient than
round, so further code size is saved (and efficiency improved).
nearbyint is provided in the C99 standard so it should be available on all
supported platforms.
|
|
|
|
|
|
| |
The -ansi flag is used for C dialect selection and it is equivalent to -std=c90.
Because it goes right before -std=gnu99 it is ignored as for conflicting flags
GCC always uses the last one.
|
| |
|
|
|
|
| |
Thanks to @robert-hh.
|
|
|
|
|
|
|
|
| |
All arguments to pin.irq are converted from keyword-only to positional, and
can still be specified by keyword so it's a backwards compatible change.
The default value for the "trigger" arg is changed from 0 (no trigger)
to rising+falling edge.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Allows to iterate over the following without allocating on the heap:
- tuple
- list
- string, bytes
- bytearray, array
- dict (not dict.keys, dict.values, dict.items)
- set, frozenset
Allows to call the following without heap memory:
- all, any, min, max, sum
TODO: still need to allocate stack memory in bytecode for iter_buf.
|
| |
|
| |
|
|
|
|
|
| |
Everyone should now be using the new ooFatFs library. The old one is no
longer supported and will be removed.
|
| |
|
| |
|
|
|
|
| |
For polymorphic interfacing on C level.
|
| |
|
|
|
|
|
|
| |
The VFS sub-system supports mounting of an arbitrary number of devices
(limited only by available RAM). The internal flash is now mounted at
"/flash".
|
|
|
|
| |
And move declaration of mp_fat_vfs_type to this file.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
This effectively reverts the change that introduced this new constant.
The reason is so that users do not need to rebuild the filesystem on
their modules when upgrading the firmware.
Users can change RESERVED_SECS by hand if they need the feature, and in
future firmware it may default to a non-zero value.
|
| |
|
|
|
|
|
|
|
| |
This code is no longer pertinent for some time - since switchover to
SDK2.0, there must be correct flash size set for bootloader, or there's
a risk of flash data corruption. And indeed, the correct flash size is
by default auto-detected by esptool.py 1.2.
|
|
|
|
|
| |
Otherwise, they serve reoccurring source of copy-paste mistakes and
breaking nanbox build.
|
|
|
|
|
|
| |
Starting at esp.flash_user_start(), the reserved sectors are for general
purpose use, for example for native code generation. There is currently
one sector reserved as such.
|