summaryrefslogtreecommitdiff
path: root/docs/library
AgeCommit message (Collapse)Author
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/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-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-05-28esp32/machine_sdcard: Add "freq" keyword arg to SDCard constructor.cccc
To allow high speed access.
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-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-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-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-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-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-20docs/esp32: Add quickref and full docs for esp32.RMT class.Matt Trentini
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-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: 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-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