summaryrefslogtreecommitdiff
path: root/docs
AgeCommit message (Collapse)Author
2020-08-29LICENSE,docs: Update copyright year range to include 2020.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2020-08-26extmod/bluetooth: Support active scanning in BLE.gap_scan().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.
2020-08-25extmod/vfs_lfs: Add mtime support to littlefs files.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: Damien George <damien@micropython.org>
2020-08-21docs: Change `\*` to `*` in argument lists.Zenix27
Latest versions of Sphinx (at least 3.1.0) do not need the `*` escaped and will render the `\` in the output if it is there, so remove it. Fixes issue #6209.
2020-07-25docs/esp32: Fix machine.Timer quickref to specify HW timers.Josh Lloyd
Also remove trailing spaces on other lines.
2020-07-25docs/library: Update pyb.UART to correct pyboard UART availability.Howard Lovatt
On original pyboard UART 5 isn't available; added pyboard D availability.
2020-07-25docs/library: Update pyb.Timer to add missing args and defaults to init.Howard Lovatt
2020-07-25docs/library: Update pyb.SPI init method to add descr about "ti" arg.Howard Lovatt
2020-07-21docs/library: Update documentation of esp32's RMT.Jonathan Hogg
This explains how looping now works, and removes the warning about calling wait_done().
2020-07-20docs/library: For ubluetooth, add docs for _IRQ_GATTS_INDICATE_DONE.Jim Mussared
2020-07-18docs/library: Add gatts_indicate() doc to ubluetooth.rst.Jim Mussared
Also clarify behavior of `gatts_notify` and add some TODOs about adding an event for indication acknowledgement.
2020-06-30docs/esp32: Add info about PWM duty cycle range to esp32 quickref.spacemanspiff2007
See related #4581.
2020-06-30docs/library: Clarify that the arg to esp.deepsleep is in microseconds.victor
2020-06-17esp32/esp32_rmt: Extend RMT to support carrier feature.Jon Rob
The ESP32 RMT peripheral has hardware support for a carrier frequency, and this commit exposes it to Python with the keyword arguments carrier_freq and carrier_duty_percent in the constructor. Example usage: r = esp32.RMT(0, pin=Pin(2), clock_div=80, carrier_freq=38000, carrier_duty_percent=50)
2020-06-10docs/esp8266: Add quickref documentation for UART on esp8266.Nick Crabtree
This patch adds quickref documentation for the change in commit afd0701bf7a9dcb50c5ab46b0ae88b303fec6ed3. This commit added the ability to disable the REPL and hence use UART0 for serial communication on the esp8266, but was not previously documented anywhere. The text is largely taken from the commit message, with generic information on using the UART duplicated from the Wipy quickref document.
2020-06-10extmod/uasyncio: Add asyncio.wait_for_ms function.Damien George
Fixes issue #6107.
2020-06-05docs: Fix Sphinx 3.x warnings, and enable warnings-as-errors on build.David Lechner
This enables warnings as errors and fixes all current errors, namely: - reference to terms in the glossary must now be explicit (:term:) - method overloads must not be declared as a separate method or must use :noindex: - 2 cases where `` should have been used instead of `
2020-06-05extmod/modbluetooth: Ensure status=0 always on success.Jim Mussared
This commit makes sure that all discovery complete and read/write status events set the status to zero on success. The status value will be implementation-dependent on non-success cases.
2020-06-05docs/library: Update ubluetooth for new events and discover by uuid.Jim Mussared
2020-06-02docs/reference: Add note about multiple exceptions when heap is locked.Andrew Leech
2020-05-28esp32/machine_sdcard: Add "freq" keyword arg to SDCard constructor.cccc
To allow high speed access.
2020-05-16docs/develop: Fix module/source name in Makefile of native example.Damien George
2020-05-11extmod/modbluetooth: Add support for changing the GAP device name.Damien George
This commit allows the user to set/get the GAP device name used by service 0x1800, characteristic 0x2a00. The usage is: BLE.config(gap_name="myname") print(BLE.config("gap_name")) As part of this change the compile-time setting MICROPY_PY_BLUETOOTH_DEFAULT_NAME is renamed to MICROPY_PY_BLUETOOTH_DEFAULT_GAP_NAME to emphasise its link to GAP and this new "gap_name" config value. And the default value of this for the NimBLE bindings is changed from "PYBD" to "MPY NIMBLE" to be more generic.
2020-05-03esp32: Improve support for OTA updates.Thorsten von Eicken
This commit adds several small items to improve the support for OTA updates on an esp32: - a partition table for 4MB flash modules that has two OTA partitions ready to go to do updates - a GENERIC_OTA board that uses that partition table and that enables automatic roll-back in the bootloader - a new esp32.Partition.mark_app_valid_cancel_rollback() class-method to signal that the boot is successful and should not be rolled back at the next reset - an automated test for doing an OTA update - documentation updates
2020-05-02docs/library: Fix docs for machine.WDT to specify millisecond timeout.Thorsten von Eicken
2020-04-30docs/library: Note that machine.Pin.irq's hard arg may not be supported.Damien George
2020-04-29unix: Add support for modbluetooth and BLE using btstack.Jim Mussared
This commit adds full support to the unix port for Bluetooth using the common extmod/modbluetooth Python bindings. This uses the libusb HCI transport, which supports many common USB BT adaptors.
2020-04-23esp32/modesp32: Add idf_heap_info(capabilities) to esp32 module.Thorsten von Eicken
This commit adds an idf_heap_info(capabilities) method to the esp32 module which returns info about the ESP-IDF heaps. It's useful to get a bit of a picture of what's going on when code fails because ESP-IDF can't allocate memory anymore. Includes documentation and a test.
2020-04-19docs/library: Document that char_data/notify_data are also references.Thomas Friebel
2020-04-13extmod/uasyncio: Add Loop.new_event_loop method.Damien George
This commit adds Loop.new_event_loop() which is used to reset the singleton event loop. This functionality is put here instead of in Loop.close() to make it possible to write code that is compatible with CPython.
2020-04-09docs/library: Note that uasyncio.wait_for() can raise exception.Peter Hinch
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.