- Sep 27, 2018
-
-
Damien George authored
No need to call DECODE_UINT since the value will always be either 2 or 3.
-
- Sep 26, 2018
-
-
stijn authored
When obj.h is compiled as C++ code, the cl compiler emits a warning about possibly unsafe mixing of size_t and bool types in the or operation in MP_OBJ_FUN_MAKE_SIG. Similarly there's an implicit narrowing integer conversion in runtime.h. This commit fixes this by being explicit.
-
Paul Sokolovsky authored
-
Paul Sokolovsky authored
This is an improvement over previous behavior when str was returned for both str and bytes input format. This new behaviour is also consistent with how the % operator works, as well as many other str/bytes methods. It should be noted that it's not how current versions of CPython work, where there's a gap in the functionality and bytes.format() is not supported.
-
Peter Hinch authored
-
Paul Sokolovsky authored
This will allow to e.g. implement HTTP Digest authentication. Adds 540 bytes for x86_32, 332 for arm_thumb2 (for Unix port, which already includes axTLS library).
-
Damien George authored
-
Christopher Swenson authored
This commit adds the math.factorial function in two variants: - squared difference, which is faster than the naive version, relatively compact, and non-recursive; - a mildly optimised recursive version, faster than the above one. There are some more optimisations that could be done, but they tend to take more code, and more storage space. The recursive version seems like a sensible compromise. The new function is disabled by default, and uses the non-optimised version by default if it is enabled. The options are MICROPY_PY_MATH_FACTORIAL and MICROPY_OPT_MATH_FACTORIAL.
-
Damien George authored
The CDC maximum packet size is 512 bytes, or 128 32-bit words, and the TX FIFO must be configured to have at least this size.
-
Damien George authored
-
- Sep 24, 2018
-
-
Damien George authored
Configuring clocks is a critical operation and is best to avoid when possible. If the clocks really need to be reset to the same values then one can pass in a slightly higher value, eg 168000001 Hz to get 168MHz.
-
Damien George authored
-
Damien George authored
-
Damien George authored
This ensures that on first boot the most optimal settings are used for the voltage scaling and flash latency (for F7 MCUs). This commit also provides more fine-grained control for the flash latency settings.
-
Damien George authored
APB1/APB2 are derived from AHB, so if the user sets AHB!=SYSCLK then the APB1/APB2 dividers must be computed from the new AHB.
-
Damien George authored
Power and clock control is low-level functionality and it makes sense to have it in a dedicated file, at least so it can be reused by other parts of the code.
-
Damien George authored
On F7s PLLSAI is used as a 48MHz clock source if the main PLL cannot provide such a frequency, and on L4s PLLSAI1 is always used as a clock source for the peripherals. This commit makes sure these PLLs are re-enabled upon waking from stop mode so the peripherals work. See issues #4022 and #4178 (L4 specific).
-
- Sep 21, 2018
-
-
Damien George authored
-
Damien George authored
-
Andrew Leech authored
-
Andrew Leech authored
There appears to be an issue on Windows with CPython >= 3.6, sys.stdout.flush() raises an exception: OSError: [WinError 87] The parameter is incorrect It works fine to just catch and ignore the error on the flush line. Tested on Windows 10 x64 1803 (Build 17134.228), Python 3.6.4 amd64.
-
- Sep 20, 2018
-
-
Damien George authored
They need time (around 4us for VREFINT) to obtain accurate results. Fixes issue #4022.
-
Damien George authored
-
Damien George authored
-
Romain Goyet authored
This patches avoids multiplying with negative powers-of-10 when parsing floating-point values, when those powers-of-10 can be exactly represented as a positive power. When represented as a positive power and used to divide, the resulting float will not have any rounding errors. The issue is that mp_parse_num_decimal will sometimes not give the closest floating representation of the input string. Eg for "0.3", which can't be represented exactly in floating point, mp_parse_num_decimal gives a slightly high (by 1LSB) result. This is because it computes the answer as 3 * 0.1, and since 0.1 also can't be represented exactly, multiplying by 3 multiplies up the rounding error in the 0.1. Computing it as 3 / 10, as now done by the change in this commit, gives an answer which is as close to the true value of "0.3" as possible.
-
Damien George authored
-
Damien George authored
-
Peter Hinch authored
-
Damien George authored
This is required for DEBUG=1 builds when MICROPY_FLOAT_IMPL=double. Thanks to Andrew Leech.
-
Andrew Leech authored
This provides a double variant of the float copysignf from libm/math.c which is required for DEBUG=1 builds when MICROPY_FLOAT_IMPL=double
-
Peter Hinch authored
pyb.mount(None, mountpoint) functionality is also removed and replaced by uos.umount.
-
Peter Hinch authored
pyb.umount(None, mountpoint) no longer works.
-
Damien George authored
Changes made: - make use of MP_OBJ_TO_PTR and MP_OBJ_FROM_PTR where necessary - fix shadowing of index variable i, renamed to j - fix type of above variable to size_t to prevent comparison warning - fix shadowing of res variable - use "(void)" instead of "()" for functions that take no arguments
-
Paul Sokolovsky authored
And thus be buildable again.
-
Damien George authored
This commit implements PEP479 which disallows raising StopIteration inside a generator to signal that it should be finished. Instead, the generator should simply return when it is complete. See https://www.python.org/dev/peps/pep-0479/ for details.
-
Andrew Leech authored
This part is functionally similar to STM32F767xx (they share a datasheet) so support is generally comparable. When adding board support the stm32f767_af.csv and stm32f767.ld should be used.
-
Paul Sokolovsky authored
Instead of redirecting to str.__mod__(), use str.format() in this case.
-
Paul Sokolovsky authored
Default is enabled, disabled for minimal builds. Saves 1296 bytes on x86, 976 bytes on ARM.
-
Damien George authored
-
Damien George authored
In 0e80f345 the inplace operations __iadd__ and __isub__ were made unconditionally available, so the comment about this section is changed to reflect that.
-