- 26 Oct, 2017 3 commits
-
-
Paul Sokolovsky authored
-
Paul Sokolovsky authored
Use the "usocket" module name everywhere. Use "MicroPython port" terminology. Suggest to avoid using IPPROTO_* constants in socket() call.
-
Damien George authored
CPython only supports the server_hostname keyword arg via the SSLContext object, so use that instead of the top-level ssl.wrap_socket. This allows the test to run on CPython the same as uPy. Also add the "Host:" header to correctly make a GET request (for URLs that are hosted on other servers). This is not strictly needed to test the SSL connection but helps to debug things when printing the response.
-
- 25 Oct, 2017 1 commit
-
-
Paul Sokolovsky authored
-
- 24 Oct, 2017 2 commits
-
-
Paul Sokolovsky authored
These defined couple of functions added during initial experimentation, which aren't part of MicroPython API and no longer used or needed.
-
Damien George authored
This is the established way of doing it and reduces code size by a little bit.
-
- 23 Oct, 2017 1 commit
-
-
Paul Sokolovsky authored
Unix naming is historical, before current conventions were established. All other ports however have it as "modusocket.c", so rename for consistency and to avoid confusion.
-
- 21 Oct, 2017 1 commit
-
-
Paul Sokolovsky authored
Update makeqstrdata.py to sort strings starting with "__" to the beginning of qstr list, so they get low qstr id's, guaranteedly fitting in 8 bits. Then use this property to further compact op_id => qstr mapping arrays.
-
- 19 Oct, 2017 6 commits
-
-
Paul Sokolovsky authored
Per https://docs.python.org/3/library/sys.html#sys.getsizeof: getsizeof() calls the object’s __sizeof__ method. Previously, "getsizeof" was used mostly to save on new qstr, as we don't really support calling this method on arbitrary objects (so it was used only for reporting). However, normalize it all now.
-
Damien George authored
Not all compilers/analysers are smart enough to realise that this function is never called if MICROPY_ERROR_REPORTING is not TERSE, because the logic in the code uses if statements rather than #if to select whether to call this function or not (MSC in debug mode is an example of this, but there are others). So just unconditionally compile this helper function. The code-base anyway relies on the linker to remove unused functions.
-
Damien George authored
The legacy function pyb.repl_uart() is still provided and retains its original behaviour (it only accepts a UART object). uos.dupterm() will now accept any object with write/readinto methods. At the moment there is just 1 dupterm slot.
-
Damien George authored
Also simplifies the code by removing the specialised (and inefficient) cooked functions from UART and USB_VCP.
-
Damien George authored
Without this the board will crash when deactivating a stream that doesn't have a close() method (eg UART) or that raises an exception within the method (eg user-defined function).
-
Damien George authored
gcc is required for mpy-cross, and arm-none-eabi-newlib for ports using arm-none-eabi-gcc.
-
- 17 Oct, 2017 2 commits
-
-
Damien George authored
Now supports polling for read and write ability.
-
Damien George authored
The W5200 and W5500 can support up to 80MHz so 42MHz (the maximum the pyboard can do in its standard configuration) should be safe. Tested to give around 1050000 kbytes/sec TCP download speed on a W5500, which is about 10% more than with the previous SPI speed of 21MHz.
-
- 16 Oct, 2017 9 commits
-
-
Damien George authored
-
Damien George authored
-
Damien George authored
Which Wiznet chip to use is a compile-time option: MICROPY_PY_WIZNET5K should be set to either 5200 or 5500 to support either one of these Ethernet chips. The driver is called network.WIZNET5K in both cases. Note that this commit introduces a breaking-change at the build level because previously the valid values for MICROPY_PY_WIZNET5K were 0 and 1 but now they are 0, 5200 and 5500.
-
Damien George authored
This patch implements the basic SPI read/write functions for the W5500 chip. It also allows _WIZCHIP_ to be configured externally to select the specific Wiznet chip.
-
Li Weiwei authored
Use MICROPY_THREAD_YIELD() instead of HAL_Delay in busy waiting to improve the performance of connect, send, recv, sento and recvfrom.
-
Li Weiwei authored
-
Damien George authored
This matches the behaviour of getaddrinfo in extmod/modlwip.c.
-
Damien George authored
-
Damien George authored
-
- 15 Oct, 2017 1 commit
-
-
Paul Sokolovsky authored
To increase visibility of Contributors' Guidelines and Code Conventions docs.
-
- 13 Oct, 2017 3 commits
-
-
Damien George authored
The uos.dupterm() signature and behaviour is updated to reflect the latest enhancements in the docs. It has minor backwards incompatibility in that it no longer accepts zero arguments. The dupterm_rx helper function is moved from esp8266 to extmod and generalised to support multiple dupterm slots. A port can specify multiple slots by defining the MICROPY_PY_OS_DUPTERM config macro to an integer, being the number of slots it wants to have; 0 means to disable the dupterm feature altogether. The unix and esp8266 ports are updated to work with the new interface and are otherwise unchanged with respect to functionality.
-
Li Weiwei authored
-
Damien George authored
So that characters can be buffered before the USB device is connected (restoring behviour of the driver before recent state refactoring).
-
- 12 Oct, 2017 1 commit
-
-
Damien George authored
-
- 11 Oct, 2017 4 commits
-
-
Damien George authored
-
Vitor Massaru Iha authored
This patch also makes the code more concise by combining the checks for the password length.
-
Mike Causer authored
-
Damien George authored
-
- 10 Oct, 2017 6 commits
-
-
Damien George authored
Reduces code size by a tiny bit.
-
Damien George authored
NaN may have the sign bit set but it has no meaning, so don't print it out.
-
Damien George authored
-
Damien George authored
So that a pointer to it can be passed as a pointer to math_generic_1. This patch also makes the function work for single and double precision floating point.
-
Damien George authored
This patch changes how most of the plain math functions are implemented: there are now two generic math wrapper functions that take a pointer to a math function (like sin, cos) and perform the necessary conversion to and from MicroPython types. This helps to reduce code size. The generic functions can also check for math domain errors in a generic way, by testing if the result is NaN or infinity combined with finite inputs. The result is that, with this patch, all math functions now have full domain error checking (even gamma and lgamma) and code size has decreased for most ports. Code size changes in bytes for those with the math module are: unix x64: -432 unix nanbox: -792 stm32: -88 esp8266: +12 Tests are also added to check domain errors are handled correctly.
-
Mike Causer authored
-