- 08 9月, 2020 12 次提交
-
-
由 Jim Mussared 提交于
-
由 Jim Mussared 提交于
-
由 Jim Mussared 提交于
Changes `BLE.config('mac')` to return a tuple (addr_mode, addr). Adds `BLE.config(addr_mode=...)` to set the addressing mode.
-
由 Jim Mussared 提交于
This commit adds support for using Bluetooth on the unix port via a H4 serial interface (distinct from a USB dongle), with both BTstack and NimBLE Bluetooth stacks. Note that MICROPY_PY_BLUETOOTH is now disabled for the coverage variant. Prior to this commit Bluetooth was anyway not being built on Travis because libusb was not detected. But now that bluetooth works in H4 mode it will be built, and will lead to a large decrease in coverage because Bluetooth tests cannot be run on Travis.
-
由 Jim Mussared 提交于
-
由 Jim Mussared 提交于
-
由 Jim Mussared 提交于
-
由 Jim Mussared 提交于
-
由 Jim Mussared 提交于
Previously the interaction between the different layers of the Bluetooth stack was different on each port and each stack. This commit defines common interfaces between them and implements them for cyw43, btstack, nimble, stm32, unix.
-
由 Jim Mussared 提交于
And prefix the debug message with "btstack:" or "nimble:", depending on the context. Also use correct format specifier for %zu.
-
由 Jim Mussared 提交于
So that the IRQ handler does not need to be traced by the GC.
-
由 Jim Mussared 提交于
This will allow the HCI UART to use a non-heap mp_irq_obj_t, which avoids needing to make a root pointer for it.
-
- 04 9月, 2020 2 次提交
-
-
由 Damien George 提交于
mp_irq_init() is useful when the IRQ object is allocated by the caller. The mp_irq_methods_t.init method is not used anywhere so has been removed. Signed-off-by: NDamien George <damien@micropython.org>
-
由 Damien George 提交于
It's a useful core feature. Signed-off-by: NDamien George <damien@micropython.org>
-
- 03 9月, 2020 2 次提交
-
-
由 Damien George 提交于
Thanks to Jeff Epler for the idea. Signed-off-by: NDamien George <damien@micropython.org>
-
由 stijn 提交于
This is consistent with the other 'micro' modules and allows implementing additional features in Python via e.g. micropython-lib's sys. Note this is a breaking change (not backwards compatible) for ports which do not enable weak links, as "import sys" must now be replaced with "import usys".
-
- 02 9月, 2020 1 次提交
-
-
由 Damien George 提交于
Signed-off-by: NDamien George <damien@micropython.org>
-
- 01 9月, 2020 5 次提交
-
-
由 Damien George 提交于
Verifies mtime timestamps on files match the value returned by time.time(). Also update vfs_fat_ramdisk.py so it doesn't check FAT timestamp of the root, because that may change across runs/ports. Signed-off-by: NDamien George <damien@micropython.org>
-
由 Damien George 提交于
Signed-off-by: NDamien George <damien@micropython.org>
-
由 Damien George 提交于
By setting MICROPY_EPOCH_IS_1970 a port can opt to use 1970/1/1 as the Epoch for timestamps returned by stat(). And this setting is enabled on the unix and windows ports because that's what they use. Signed-off-by: NDamien George <damien@micropython.org>
-
由 Damien George 提交于
On 32-bit builds these stat fields will overflow a small-int, so use mp_obj_new_int_from_uint to construct the int object. Signed-off-by: NDamien George <damien@micropython.org>
-
由 Damien George 提交于
On ports like unix where the Epoch is 1970/1/1 and atime/mtime/ctime are in seconds since the Epoch, this value will overflow a small-int on 32-bit systems. So far this is only an issue on 32-bit unix builds that use the VFS layer (eg dev and coverage unix variants) but the fix (using mp_obj_new_int_from_uint instead of MP_OBJ_NEW_SMALL_INT) is there for all ports so as to not complicate the code, and because they will need the range one day. Also apply a similar fix to other fields in VfsPosix.stat because they may also be large. Signed-off-by: NDamien George <damien@micropython.org>
-
- 30 8月, 2020 3 次提交
-
-
由 Damien George 提交于
gettimeofday returns seconds since 2000/1/1 so needs to be adjusted to seconds since 1970/1/1 to give the correct return value of mp_hal_time_ns. Signed-off-by: NDamien George <damien@micropython.org>
-
由 Damien George 提交于
This regressed in bd2fff66Signed-off-by: NDamien George <damien@micropython.org>
-
由 Damien George 提交于
This commit fixes the cases when a TCP socket is in STATE_NEW, STATE_LISTENING or STATE_CONNECTING and recv() is called on it. It now raises ENOTCONN instead of a random error code due to it previously indexing beyond the start of error_lookup_table[]. Signed-off-by: NDamien George <damien@micropython.org>
-
- 29 8月, 2020 4 次提交
-
-
由 Damien George 提交于
Updating to Black v20.8b1 there are two changes that affect the code in this repository: - If there is a trailing comma in a list (eg [], () or function call) then that list is now written out with one line per element. So remove such trailing commas where the list should stay on one line. - Spaces at the start of """ doc strings are removed. Signed-off-by: NDamien George <damien@micropython.org>
-
由 Damien George 提交于
So they can be skipped if __rOP__'s are not supported on the target. Also fix the typo in the complex_special_methods.py filename. Signed-off-by: NDamien George <damien@micropython.org>
-
由 Damien George 提交于
Signed-off-by: NDamien George <damien@micropython.org>
-
由 Damien George 提交于
Signed-off-by: NDamien George <damien@micropython.org>
-
- 28 8月, 2020 1 次提交
-
-
由 Damien George 提交于
Signed-off-by: NDamien George <damien@micropython.org>
-
- 27 8月, 2020 4 次提交
-
-
由 Michael Buesch 提交于
The memory operation functions read_mem() and write_mem() create a temporary buffer on the local C stack for the address bytes with the size of 4 bytes. This buffer is filled in a loop from the user supplied address and address length. If the user supplied 'addrsize' is bigger than 32, the local buffer is overrun. Fix this by raising an exception for invalid 'addrsize' values. Signed-off-by: NMichael Buesch <m@bues.ch>
-
由 stijn 提交于
A configurable result directory is advantageous because it enables using a dedicated location, eventually outside of the source tree, instead of forcing the output files into a fixed directory which might also contain other files already. For that reason the default output directory also has been changed to tests/results/.
-
由 stijn 提交于
Replace some usages of paths relative to the current working directory with absolute paths relative to the tests directory. Fixes and resulting changes: - default values of MICROPYTHON and MPYCROSS are absolute paths and always correct - likewise, the correct full paths for tools and extmod directories are appended to sys.path - printing/cleaning failures works properly since it expects the .exp and .out files in the tests directory which is also where they are written to now, plus no more need for changing directories This fixes #5872 and allows running custom tests which use run-tests without having to cd to the tests directory first, and the test output still is in the tests/ directory instead of the current working directory. Discovery of tests and all skip test logic based on paths relative to the current working directory remains unchanged which essentially means that for running most of MicroPython's own tests, run-tests must still be ran from within it's directory, so document that.
-
由 Roberto Colistete Jr 提交于
Add CFLAGS_EXTRA to CFLAGS. Include LDFLAGS_MOD to the compilation. And, add SRC_MOD to SRC_QSTR.
-
- 26 8月, 2020 4 次提交
-
-
由 Damien George 提交于
With sleep(0.2) a multiple of sleep(0.1), the order of task 2 and 3 execution is not well defined, and depends on the precision of the system clock and how fast the rest of the code runs. So change 0.2 to 0.18 to make the test more reliable. Also fix a typo of t3/t4, and cancel t4 at the end. Signed-off-by: NDamien George <damien@micropython.org>
-
由 Andrew Leech 提交于
This adds an additional optional parameter to gap_scan() to select active scanning, where scan responses are returned as well as normal scan results. This parameter is False by default which retains the existing behaviour.
-
由 Jim Mussared 提交于
The READ_REQUEST callback is handled as a hard interrupt (because the BLE stack needs an immediate response from it so it can continue) and so calls to Python require extra protection: - the caller-owned tuple passed into the callback must be separate from the tuple used by other callback events (which are soft interrupts); - the GC and scheduler must be locked during callback execution.
-
由 Jim Mussared 提交于
This commit makes scanning work when duration_ms is set to zero. Prior to this it would not work with duration_ms set to zero.
-
- 25 8月, 2020 1 次提交
-
-
由 Damien George 提交于
This commit adds support for modification time of files on littlefs v2 filesystems, using file attributes. For some background see issue #6114. Features/properties of this implementation: - Only supported on littlefs2 (not littlefs1). - Uses littlefs2's general file attributes to store the timestamp. - The timestamp is 64-bits and stores nanoseconds since 1970/1/1 (if the range to the year 2554 is not enough then additional bits can be added to this timestamp by adding another file attribute). - mtime is enabled by default but can be disabled in the constructor, eg: uos.mount(uos.VfsLfs2(bdev, mtime=False), '/flash') - It's fully backwards compatible, existing littlefs2 filesystems will work without reformatting and timestamps will be added transparently to existing files (once they are opened for writing). - Files without timestamps will open correctly, and stat will just return 0 for their timestamp. - mtime can be disabled or enabled each mount time and timestamps will only be updated if mtime is enabled (otherwise they will be untouched). Signed-off-by: NDamien George <damien@micropython.org>
-
- 22 8月, 2020 1 次提交
-
-
由 Damien George 提交于
This should return a 64-bit value being the number of nanoseconds since 1970/1/1. Signed-off-by: NDamien George <damien@micropython.org>
-