- 17 10月, 2018 1 次提交
-
-
由 Danielle Madeley 提交于
-
- 15 10月, 2018 2 次提交
-
-
由 Damien George 提交于
Prior to this commit the USB CDC used the USB start-of-frame (SOF) IRQ to regularly check if buffered data needed to be sent out to the USB host. This wasted resources (CPU, power) if no data needed to be sent. This commit changes how the USB CDC transmits buffered data: - When new data is first available to send the data is queued immediately on the USB IN endpoint, ready to be sent as soon as possible. - Subsequent additions to the buffer (via usbd_cdc_try_tx()) will wait. - When the low-level USB driver has finished sending out the data queued in the USB IN endpoint it calls usbd_cdc_tx_ready() which immediately queues any outstanding data, waiting for the next IN frame. The benefits on this new approach are: - SOF IRQ does not need to run continuously so device has a better chance to sleep for longer, and be more responsive to other IRQs. - Because SOF IRQ is off, current consumption is reduced by a small amount, roughly 200uA when USB is connected (measured on PYBv1.0). - CDC tx throughput (USB IN) on PYBv1.0 is about 2.3 faster (USB OUT is unchanged). - When USB is connected, Python code that is executing is slightly faster because SOF IRQ no longer interrupts continuously. - On F733 with USB HS, CDC tx throughput is about the same as prior to this commit. - On F733 with USB HS, Python code is about 5% faster because of no SOF. As part of this refactor, the serial port should no longer echo initial characters when the serial port is first opened (this only used to happen rarely on USB FS, but on USB HS is was more evident).
-
由 Damien George 提交于
pyb.USB_VCP().isconnected() will now return False if the USB is disconnected after having previously been connected. See issue #4210.
-
- 14 10月, 2018 5 次提交
-
-
由 Damien George 提交于
So these constant objects can be loaded by dereferencing the REG_FUN_TABLE pointer instead of loading immediate values. This reduces the size of generated native code (when such constants are used), and means that pointers to these constants are no longer stored in the assembly code.
-
由 Damien George 提交于
This shifts the work of loading the constant None object on to load_reg_stack_imm(), making the handling of None more centralised.
-
由 Damien George 提交于
-
由 Damien George 提交于
This commit adds the helper function load_reg_stack_imm() which deals with constant immediate values and converting them to Python objects if needed.
-
由 Peter Hinch 提交于
-
- 13 10月, 2018 12 次提交
-
-
由 Peter Hinch 提交于
-
由 Damien George 提交于
Otherwise there is really nothing that can be done, it can't be unlocked by the user because there is no way to allocate memory to execute the unlock. See issue #4205 and #4209.
-
由 Paul Sokolovsky 提交于
Just a copy of uctypes_sizeof.py with minimal changes.
-
由 Paul Sokolovsky 提交于
Using OrderedDict (i.e. stable order of fields) would for example allow to automatically calculate field offsets in structures.
-
由 Damien George 提交于
-
由 Damien George 提交于
-
由 Damien George 提交于
The maximum index into mp_fun_table is currently less than 1024 and should stay that way to keep things efficient for all architectures, so there is no need to handle loading the pointer directly via a literal in this function.
-
由 Damien George 提交于
All architectures now have a dedicated register to hold the pointer to the native function table mp_fun_table, and so they all need to load this register at the start of the native function. This commit makes the loading of this register uniform across architectures by passing the pointer in the constant table for the native function, and then loading the register from the constant table. Doing it this way means that the pointer is not stored in the assembly code, helping to make the code more portable.
-
由 Damien George 提交于
Instead of storing the function pointer directly in the assembly code. This makes the generated code more independent of the runtime (so easier to relocate the code), and reduces the generated code size.
-
由 Damien George 提交于
The esp register is always a fixed distance below ebp, and using esp to reference locals on the stack frees up the ebp register for general purpose use (which is important for an architecture with only 8 user registers).
-
由 Damien George 提交于
Instead of storing the function pointer directly in the assembly code. This makes the generated code more independent of the runtime (so easier to relocate the code), and reduces the generated code size.
-
由 Damien George 提交于
The rsp register is always a fixed distance below rbp, and using rsp to reference locals on the stack frees up the rbp register for general purpose use.
-
- 12 10月, 2018 1 次提交
-
-
由 Glenn Ruben Bakke 提交于
For s132 and s140, GAP_ADV_MAX_SIZE was currently set to BLE_GATT_ATT_MTU_DEFAULT, which is 23. The correct value should have been 31, but there are no define for this in the s132/s140 header files as for s110. Updating define in ble_drv.c to the correct value of 31.
-
- 05 10月, 2018 8 次提交
-
-
由 Andrew Leech 提交于
The macros are MICROPY_HEAP_START and MICROPY_HEAP_END, and if not defined by a board then the default values will be used (maximum heap from SRAM as defined by linker symbols). As part of this commit the SDRAM initialisation is moved to much earlier in main() to potentially make it available to other peripherals and avoid re-initialisation on soft-reboot. On boards with SDRAM enabled the heap has been set to use that.
-
由 stijn 提交于
Add some more POSIX compatibility by adding a d_type field to the dirent structure and defining corresponding macros so listdir_next in the unix' port modos.c can use it, end result being uos.ilistdir now reports the file type.
-
由 stijn 提交于
-
由 Paul Sokolovsky 提交于
This value is unused. It was an artifact of early draft design, but bitfields were optimized to use scalar one-word encoding, to allow compact encoding of typical multiple bitfields in MCU control registers.
-
由 Paul Sokolovsky 提交于
E.g., register() can be called again for the same object, while modify() will raise exception if object was not register()ed before.
-
由 Paul Sokolovsky 提交于
This test doesn't check the actual I/O behavior, just "static" invariants like behavior on duplicate calls or calls when I/O object is not registered with poller.
-
由 Paul Sokolovsky 提交于
Previously, the function silently succeeded. The new behavior is consistent with both baremetal uselect implementation and CPython 3.
-
由 Paul Sokolovsky 提交于
As the case for e.g. Android's Bionic Libc.
-
- 02 10月, 2018 1 次提交
-
-
由 Damien George 提交于
-
- 01 10月, 2018 10 次提交
-
-
由 Damien George 提交于
This follows how it's already done in MP_OBJ_IS_OBJ: the objects are considered 64-bit unsigned ints for the purpose of bitwise manipulation.
-
由 Damien George 提交于
A non-zero level has been supported for some time now.
-
由 Damien George 提交于
-
由 Damien George 提交于
-
由 Damien George 提交于
-
由 Damien George 提交于
With this commit there is now only one entry point into the whole documentation, which describes the general MicroPython language, and then from there there are links to information about specific platforms/ports. This commit doesn't change content (almost, it does fix a few internal links), it just reorganises things.
-
由 Damien George 提交于
-
由 Damien George 提交于
This commit adds first class support for yield and yield-from in the native emitter, including send and throw support, and yields enclosed in exception handlers (which requires pulling down the NLR stack before yielding, then rebuilding it when resuming). This has been fully tested and is working on unix x86 and x86-64, and stm32. Also basic tests have been done with the esp8266 port. Performance of existing native code is unchanged.
-
由 Damien George 提交于
The nlr_buf_t doesn't need to be part of the Python value stack (as it was before this commit), it's simpler to have it separated as auxiliary state that lives on the C stack. This will help adding yield support because in that case the nlr_buf_t and Python value stack live in separate memory areas (C stack and heap respectively).
-
由 Damien George 提交于
Instead of hard-coding it to 4 bytes. This allows for there to be other data stored at the very start of the emitted native code.
-