aboutsummaryrefslogtreecommitdiff
path: root/docs
AgeCommit message (Collapse)Author
2020-04-04esp8266: Change from FAT to littlefs v2 as default filesystem.Damien George
This commit changes the esp8266 boards to use littlefs v2 as the filesystem, rather than FAT. Since the esp8266 doesn't expose the filesystem to the PC over USB there's no strong reason to keep it as FAT. Littlefs is smaller in code size, is more efficient in use of flash to store data, is resilient over power failure, and using it saves about 4k of heap RAM, which can now be used for other things. This is a backwards incompatible change because all existing esp8266 boards will need to update their filesystem after installing new firmware (eg backup old files, install firmware, restore files to new filesystem). As part of this commit the memory layout of the default board (GENERIC) has changed. It now allocates all 1M of memory-mapped flash to the firmware, so the filesystem area starts at the 2M point. This is done to allow more frozen bytecode to be stored in the 1M of memory-mapped flash. This requires an esp8266 module with 2M or more of flash to work, so a new board called GENERIC_1M is added which has the old memory-mapping (but still changed to use littlefs for the filesystem). In summary there are now 3 esp8266 board definitions: - GENERIC_512K: for 512k modules, doesn't have a filesystem. - GENERIC_1M: for 1M modules, 572k for firmware+frozen code, 396k for filesystem (littlefs). - GENERIC: for 2M (or greater) modules, 968k for firmware+frozen code, 1M+ for filesystem (littlefs), FAT driver also included in firmware for use on, eg, external SD cards.
2020-04-04docs,tests: Add docs and test for uasyncio custom exc handler methods.Damien George
2020-04-02extmod/uasyncio: Add StreamReader/StreamWriter as aliases of Stream cls.Damien George
To be compatible with CPython. Fixes issue #5847.
2020-04-02extmod/uasyncio: Implement Loop.stop() to stop the event loop.Damien George
2020-03-30tools/pyboard.py: Add -d as an alias for --device.Lars Kellogg-Stedman
2020-03-30tools/pyboard.py: Support setting device/baudrate from shell env vars.Lars Kellogg-Stedman
Allow defaults for --device and --baudrate to be set in the environment using PYBOARD_DEVICE and PYBOARD_BAUDRATE.
2020-03-26docs/library: Add initial docs for uasyncio module.Damien George
2020-03-11py/modmicropython: Add heap_locked function to test state of heap.Andrew Leech
This commit adds micropython.heap_locked() which returns the current lock-depth of the heap, and can be used by Python code to check if the heap is locked or not. This new function is configured via MICROPY_PY_MICROPYTHON_HEAP_LOCKED and is disabled by default. This commit also changes the return value of micropython.heap_unlock() so it returns the current lock-depth as well.
2020-03-11extmod/modbluetooth: Change scan result's "connectable" to "adv_type".Damien George
This commit changes the BLE _IRQ_SCAN_RESULT data from: addr_type, addr, connectable, rssi, adv_data to: addr_type, addr, adv_type, rssi, adv_data This allows _IRQ_SCAN_RESULT to handle all scan result types (not just connectable and non-connectable passive scans), and to distinguish between them using adv_type which is an integer taking values 0x00-0x04 per the BT specification. This is a breaking change to the API, albeit a very minor one: the existing connectable value was a boolean and True now becomes 0x00, False becomes 0x02. Documentation is updated and a test added. Fixes #5738.
2020-02-18extmod/modbluetooth: Implement config getter for BLE rxbuf size.Thomas Friebel
Knowing the buffer size can be important, to ensure that valid data will be received.
2020-02-16docs/develop: Detail how to add symbols to mp_fun_table for native mods.Thorsten von Eicken
2020-02-11windows: Improve default search path.stijn
The default value for MICROPYPATH used in unix/main.c is "~/.micropython/lib:/usr/lib/micropython" which has 2 problems when used in the Windows port: - it has a ':' as path separator but the port uses ';' so the entire string is effectively discarded since it gets interpreted as a single path which doesn't exist - /usr/lib/micropython is not a valid path in a standard Windows environment Override the value with a suitable default.
2020-02-10docs/library: Fix framebuf monochrome 1-bit modes, swapping HLSB/HMSB.Peter Hinch
This fix can be demonstrated by the following: b = bytearray(32) f = framebuf.FrameBuffer(b, 32, 8, framebuf.MONO_HLSB) f.pixel(0, 0, 1) print('MONO_HLSB', hex(b[0])) b = bytearray(32) f = framebuf.FrameBuffer(b, 32, 8, framebuf.MONO_HMSB) f.pixel(0, 0, 1) print('MONO_HMSB', hex(b[0])) Outcome: MONO_HLSB 0x80 MONO_HMSB 0x1
2020-02-04unix/main: Add command-line -h option for printing help text.David Lechner
This adds a -h option to print the usage help text and adds a new, shorter error message that is printed when invalid arguments are given. This behaviour follows CPython (and other tools) more closely.
2020-02-04docs/unix: Add a new new quickref page for the UNIX port.David Lechner
This adds a new quickstart page for the UNIX port that documents the command line options and environment variables.
2020-02-03docs/esp8266: In TCP tutorial, add HTTP response code and content-type.Jesse Andrews
Show how to send an HTTP response code and content-type. Without the response code Safari/iOS will fail. Without the content-type Lynx/Links will fail.
2020-01-22esp32/modnetwork: Add max_clients kw-arg to WLAN.config for AP setting.adzierzanowski
This allows the user to configure the maximum number of clients that are connected to the access point. Resolves #5125.
2020-01-22docs/library/uos.rst: Improve block devices section, and ioctl ret vals.Peter Hinch
2020-01-12docs/library: Add / to indicate positional-only args in library docs.Jason Neal
Removes the confusion of positional-only arguments which have defaults that look like keyword arguments.
2020-01-12docs/library/machine: Document machine.soft_reset() function.Thorsten von Eicken
2020-01-12docs/README: Add short paragraph about using readthedocs.Thorsten von Eicken
This adds a short paragraph on how to hook readthedocs.org up. The main goal is to make people aware of the option, to help with contributing to the documentation.
2020-01-06docs/library/machine.UART.rst: Detail timeout behaviour of read methods.Jason Neal
Also document existence of "invert" argument to constructor.
2020-01-06docs/library/machine.I2C.rst: Use positional-only arguments syntax.Jason Neal
Addresses issue #5196.
2020-01-06docs: More consistent capitalization and use of articles in headings.Jason Neal
See issue #3188.
2019-12-20all: Bump version to 1.12.Damien George
2019-12-20docs/esp32: Add quickref and full docs for esp32.RMT class.Matt Trentini
2019-12-19docs/develop: Add documentation on how to build native .mpy modules.Damien George
2019-12-19docs/reference: Add documentation describing use of .mpy files.Damien George
Including information about .mpy versioning and how to debug failed imports of .mpy files.
2019-12-17docs/esp8266/quickref: Add note that machine.RTC is not fully supported.ketograph
See issues #3220 and #3710.
2019-12-16docs/library/uos.rst: Clarify why the extended interface exists.Jim Mussared
2019-12-10docs/library/uos: Add notes and links about littlefs failures.Damien George
2019-12-10docs/library/ubluetooth: Add note about API being under development.Damien George
2019-12-09docs/reference/filesystem: Add note and example about using filesystem.Damien George
2019-12-09docs/reference/filesystem: Fix typo in block device code example.Daniel Mizyrycki
2019-12-05extmod/modbluetooth: Allow setting ringbuf size via BLE.config(rxbuf=).Damien George
The size of the event ringbuf was previously fixed to compile-time config value, but it's necessary to sometimes increase this for applications that have large characteristic buffers to read, or many events at once. With this commit the size can be set via BLE.config(rxbuf=512), for example. This also resizes the internal event data buffer which sets the maximum size of incoming data passed to the event handler.
2019-12-04extmod/modbluetooth: Add optional 4th arg to gattc_write for write mode.Damien George
This allows the user to explicitly select the behaviour of the write to the remote peripheral. This is needed for peripherals that have characteristics with WRITE_NO_RESPONSE set (instead of normal WRITE). The function's signature is now: BLE.gattc_write(conn_handle, value_handle, data, mode=0) mode=0 means write without response, while mode=1 means write with response. The latter was the original behaviour so this commit is a change in behaviour of this method, and one should specify 1 as the 4th argument to get back the old behaviour. In the future there could be more modes supported, such as long writes.
2019-12-04docs: Add littlefs docs and a filesystem tutorial.Jim Mussared
2019-12-04docs/library: Add docs for pyb.Flash class.Jim Mussared
2019-12-04docs/reference: Add docs describing use of pyboard.py.Jim Mussared
2019-12-04docs: Remove spaces on lines that are empty.Damien George
2019-11-25extmod/modbluetooth: Simplify management of pre-allocated event data.Jim Mussared
The address, adv payload and uuid fields of the event are pre-allocated by modbluetooth, and reused in the IRQ handler. Simplify this and move all storage into the `mp_obj_bluetooth_ble_t` instance. This now allows users to hold on to a reference to these instances without crashes, although they may be overwritten by future events. If they want to hold onto the values longer term they need to copy them.
2019-11-12docs/library/ubluetooth: Fix name and link to FLAG_xxx constants.Damien George
2019-11-07docs/library/machine.SDCard.rst: Fix various typos.Jim Mussared
2019-11-07docs/templates/topindex.html: Replace usage of deprecated defindex.html.Jim Mussared
defindex.html (used by topindex.html) is deprecated, but topindex.html was already identical other than setting the title, so just inherit directly from layout.html.
2019-11-07docs/conf.py: Fix path to favicon.ico.Jim Mussared
2019-10-29docs/library/ubluetooth: Add docs for gatts_set_buffer.Jim Mussared
2019-10-29docs/library: Add documentation for extended block device protocol.Damien George
2019-10-23docs: Move ubluetooth under "MicroPython-specific libraries".Mike Wadsten
CPython does not have a bluetooth module, so it is not appropriate to call ubluetooth a Python standard library or micro-library.
2019-10-22docs/library/bluetooth: Rename to "ubluetooth".Jim Mussared
2019-10-22docs/library: Rename "array" module to "uarray".Damien George