summaryrefslogtreecommitdiff
path: root/docs
AgeCommit message (Collapse)Author
2022-12-15renesas-ra: Add the UART methods uart.txdone() and uart.flush().robert-hh
This required to add two functions down the stack to uart.c and ra.sci.c. - One for telling, whther the transmission is busy. - One for reporting the size of the TX buffer. Tested with a EK-RA6M2 board.
2022-12-14samd: Add a vref=num option to the ADC and DAC constructor.robert-hh
ADC: The argument of vref=num is an integer. Values for num are: SAMD21: 0 INT1V 1.0V voltage reference 1 INTVCC0 1/1.48 Analog voltage supply 2 INTVCC1 1/2 Analog voltage supply (only for VDDANA > 2.0V) 3 VREFA External reference 4 VREFB External reference SAMD51: 0 INTREF internal bandgap reference 1 INTVCC1 Analog voltage supply 2 INTVCC0 1/2 Analog voltage supply (only for VDDANA > 2.0v) 3 AREFA External reference A 4 AREFB External reference B 5 AREFC External reference C (ADC1 only) DAC: The argument of vref=num is an integer. Suitable values: SAMD21: 0 INT1V Internal voltage reference 1 VDDANA Analog voltage supply 2 VREFA External reference SAMD51: 0 INTREF Internal bandgap reference 1 VDDANA Analog voltage supply 2 VREFAU Unbuffered external voltage reference (not buffered in DAC) 4 VREFAB Buffered external voltage reference (buffered in DAC).
2022-12-13docs/differences: Add Python 3.10 page.David Lechner
This adds a new page for Python 3.10 implementation status similar to previous releases. Signed-off-by: David Lechner <david@pybricks.com>
2022-12-13docs/differences: Update Python 3.9 status.David Lechner
This marks PEP 584 as complete and notes a few PEPs as not relevant. Signed-off-by: David Lechner <david@pybricks.com>
2022-12-08py: Pass in address to compiled module instead of returning it.Damien George
This change makes it so the compiler and persistent code loader take a mp_compiled_module_t* as their last argument, instead of returning this struct. This eliminates a duplicate context variable for all callers of these functions (because the context is now stored in the mp_compiled_module_t by the caller), and also eliminates any confusion about which context to use after the mp_compile_to_raw_code or mp_raw_code_load function returns (because there is now only one context, that stored in mp_compiled_module_t.context). Reduces code size by 16 bytes on ARM Cortex-based ports. Signed-off-by: Damien George <damien@micropython.org>
2022-12-07docs/library/neopixel: Update GitHub URL for neopixel.py link.Jim Mussared
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2022-12-06docs/library/struct: Embed format tables.Laurens Valk
Also add note about long support. Signed-off-by: Laurens Valk <laurens@pybricks.com>
2022-12-06docs/library/struct: Fix buffer argument description.Laurens Valk
The buffer is the data in this case. There is no buffer argument. Signed-off-by: Laurens Valk <laurens@pybricks.com>
2022-11-25tools/mpremote: Only auto connect to serial device with USB VID/PID.Michael Mogenson
On MacOS and Windows there are a few default serial devices that are returned by `serial.tools.list_ports.comports()`. For example on MacOS: ``` {'description': 'n/a', 'device': '/dev/cu.Bluetooth-Incoming-Port', 'hwid': 'n/a', 'interface': None, 'location': None, 'manufacturer': None, 'name': 'cu.Bluetooth-Incoming-Port', 'pid': None, 'product': None, 'serial_number': None, 'vid': None} {'description': 'n/a', 'device': '/dev/cu.wlan-debug', 'hwid': 'n/a', 'interface': None, 'location': None, 'manufacturer': None, 'name': 'cu.wlan-debug', 'pid': None, 'product': None, 'serial_number': None, 'vid': None} ``` Users of mpremote most likely do not want to connect to these ports. It would be desirable if mpremote did not select this ports when using the auto connect behavior. These serial ports do not have USB VID or PID values and serial ports for Micropython boards with FTDI/serial-to-USB adapter or native USB CDC/ACM support do. Check for the presence of a USB VID / PID int value when selecting a serial port to auto connect to. All serial ports will still be listed by the `list` command and can still be selected by name when connecting. Signed-off-by: Michael Mogenson <michael.mogenson@gmail.com>
2022-11-23examples/usercmodule: Add example of a native C class.Laurens Valk
This shows how ports can add their own custom types/classes. It is part of the unix coverage build, so we can use it for tests too. Signed-off-by: Laurens Valk <laurens@pybricks.com>
2022-11-18stm32/i2c: Fix I2C frequency calc so it doesn't exceed requested rate.yn386
Prior to this commit, the actual I2C frequency can be faster than specified one and it may exceed the I2C's specification for Fast Mode. The frequency of SCL should be less than or equal to 400KHz in Fast Mode. This commit fixes this issue for F4 MCUs by rounding up the division in the frequency calculation.
2022-11-17docs/library/framebuf: Clarify docs for blit regarding palette.TPReal
Clarified the behaviour when both key and palette are specified.
2022-11-17mimxrt/network: Rename the argument clock_mode to ref_clk_mode.robert-hh
The definitions for LAN.IN and LAN.OUT are kept, but in the code Pin.IN and Pin.OUT can be used as well as values for the ref_clk_mode argument.
2022-11-16docs/library/uasyncio: Describe restriction on ThreadSafeFlag.Peter Hinch
As per Issue #7965, this class does not work on the Unix build.
2022-11-15docs/library/pyb.CAN: Update the recv example to take a 5-tuple.Sky
A supplement to commit 5cdf9645711cc12b45e602ef5795c33895116fc4
2022-11-15docs/library/array: Add docs for dunder methods.Howard Lovatt
Signed-off-by: Damien George <damien@micropython.org>
2022-11-15renesas-ra: Change file system size to 64KB for RA6M1.Takeo Takahashi
Changes in this commit: - Change file system size from 128KB to 64KB in ra6m1_ek.ld. - Change EK-RA6M1's file system size in renesas-ra port document. Signed-off-by: Takeo Takahashi <takeo.takahashi.xv@renesas.com>
2022-11-15docs/renesas-ra: Correct the internal file system size of EK-RA6M2.Takeo Takahashi
Signed-off-by: Takeo Takahashi <takeo.takahashi.xv@renesas.com>
2022-11-11docs/develop: Fix mp_compile snippet to match latest code.Damien George
Signed-off-by: Damien George <damien.p.george@gmail.com>
2022-11-08docs/samd/pinout: Fix the pin numbering for the default assignments.robert-hh
It still used the 'old' pin numbers.
2022-11-08docs/library/machine: Add machine.memX to docs with brief example.Matt Trentini
2022-10-27mimxrt/machine_timer: Use soft-timer implementation for machine.Timer.robert-hh
This releases the hardware timers for other tasks, which need a higher resolution and faster response. And it is less port-specific code.
2022-10-26docs/samd: Add documentation for the samd port.robert-hh
Includes a general overview, a quickref, pinout tables, and the beginnings of a tutorial.
2022-10-26docs/templates/layout.html: Indicate latest vs release docs.Jim Mussared
When looking at latest (the default for docs.micropython.org), make it clear that this isn't the release version. - Changes the version in the top-left to "latest". - Adds a message to the top of each page to explain. For future release versions, add a short message to link to the latest version. This work was funded through GitHub Sponsors. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2022-10-11py/py.mk: Make user-C-module handling self-contained in py.mk.Jim Mussared
Removes the need for the port to add anything to OBJS or SRC_QSTR. Also makes it possible for user-C-modules to differentiate between code that should be processed for QSTR vs other files (e.g. helpers and libraries). Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2022-10-11all: Use += rather than = everywhere for CFLAGS/LDFLAGS/LIBS.Jim Mussared
This avoids a surprise where an = can cancel out an earlier +=. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2022-10-01tools/mpremote: Add `mpremote mip install` to install packages.Jim Mussared
This supports the same package sources as the new `mip` tool. - micropython-lib (by name) - http(s) & github packages with json description - directly downloading a .py/.mpy file The version is specified with an optional `@version` on the end of the package name. The target dir, index, and mpy/no-mpy can be set through command line args. This work was funded through GitHub Sponsors. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2022-09-30top: Replace upip with mip everywhere.Jim Mussared
Updates all README.md and docs, and manifests to `require("mip")`. Also extend and improve the documentation on freezing and packaging. This work was funded through GitHub Sponsors. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2022-09-29docs/Makefile: Enable parallel compilation for Sphinx.Jim Mussared
This has a fairly dramatic (nearly 3x on a 6-core machine) speedup for docs compilation, with no impact on correctness. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2022-09-19py/persistentcode: Introduce .mpy sub-version.Jim Mussared
The intent is to allow us to make breaking changes to the native ABI (e.g. changes to dynruntime.h) without needing the bytecode version to increment. With this commit the two bits previously used for the feature flags (but now unused as of .mpy version 6) encode a sub-version. A bytecode-only .mpy file can be loaded as long as MPY_VERSION matches, but a native .mpy (i.e. one with an arch set) must also match MPY_SUB_VERSION. This allows 3 additional updates to the native ABI per bytecode revision. The sub-version is set to 1 because the previous commits that changed the layout of mp_obj_type_t have changed the native ABI. Signed-off-by: Jim Mussared <jim.mussared@gmail.com> Signed-off-by: Damien George <damien@micropython.org>
2022-09-13mimxrt/machine_spi: Allow a setting of -1 for cs in the constructor.robert-hh
In that case, no Pin will be configured for the CS signal, even if it is internally still generated. That setting allows to use any pin for CS, which then must be controlled by the Python script. Also make the default cs=-1 to match other ports (software CS).
2022-09-09extmod/modbluetooth: Replace def_handle with end_handle in char IRQ.Jim Mussared
This is technically a breaking change, but: a) We need the end handle to do descriptor discovery properly. b) We have no possible use for the existing definition handle in the characteristic result IRQ. None of the methods can use it, and therefore no existing code should be using it in a way that changing it to a different integer value should break. Unfortunately NimBLE doesn't make it easy to get the end handle, so also implement a mechanism to use the following characteristic to calculate the previous characteristic's end handle. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2022-09-06drivers/display: Don't include tests by default.Damien George
The tests can be copied to the board if needed. Also update the docs to reflect this change. Signed-off-by: Damien George <damien@micropython.org>
2022-08-31docs/renesas-ra: Add pin drive keyword argument description.Takeo Takahashi
Signed-off-by: Takeo Takahashi <takeo.takahashi.xv@renesas.com>
2022-08-31docs/library/machine.UART: Add docs for uart.flush() and uart.txdone().robert-hh
2022-08-31docs/library/machine.I2C: Add a note about I2C pull-up resistors.robert-hh
Quite regularly users complain about unexpected behavior of I2C, calling it a bug, when in fact the trouble is caused by missing pull-up resistors. So this commit adds a note to the documentation, in the slim hope that people will find and read it.
2022-08-30docs/templates/topindex.html: Update forum link.Jim Mussared
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2022-08-26docs/library/micropython: Fix spelling of compiler.Laurens Valk
Signed-off-by: Laurens Valk <laurens@pybricks.com>
2022-08-26docs/library: Fix nested rst styles not rendering.Laurens Valk
These can't be nested, so apply styling separately. Signed-off-by: Laurens Valk <laurens@pybricks.com>
2022-08-26docs/library/machine.UART: Add notes about UART init and deinit.Tomasz 'CeDeROM' CEDRO
* `init()` can be called multiple times to reconfigure UART. * After `deinit()` it is impossible to call `init()` again. Signed-off-by: Tomasz 'CeDeROM' CEDRO <tomek@cedro.info>
2022-08-26docs/esp32: Update UART quickref on input-only pins.Tomasz 'CeDeROM' CEDRO
Signed-off-by: Tomasz 'CeDeROM' CEDRO <tomek@cedro.info>
2022-08-26docs: Update CPython differences and improve the look of table layouts.Matt Trentini
Updated some of the CPython feature differences: - Updated status of some features. - Added CSS to fix table widths to 100% and word wrap. - Specified explicit table column ratios to improve layout appearance. - Added missing references to anchors. - Better consistency with use of formatting and case.
2022-08-26tools/mpremote: Print nicer errors for unsupported 'cp -r' arguments.Damien George
Also document support for 'cp :a :b'. Signed-off-by: Damien George <damien@micropython.org>
2022-08-26drivers/cc3000: Remove CC3000 WiFi driver files.Damien George
It's no longer used by any port. Signed-off-by: Damien George <damien@micropython.org>
2022-08-23rp2/machine_wdt: Check for the maximum timeout value of watchdog.robert-hh
The value will be checked for timeout <= 8388. Notes were added to the documentation.
2022-08-19extmod/modframebuf: Add polygon drawing methods.Mat Booth
Add method for drawing polygons. For non-filled polygons, uses the existing line-drawing code to render arbitrary polygons using the given coords list, at the given x,y position, in the given colour. For filled polygons, arbitrary closed polygons are rendered using a fast point-in-polygon algorithm to determine where the edges of the polygon lie on each pixel row. Tests and documentation updates are also included. Signed-off-by: Mat Booth <mat.booth@gmail.com>
2022-08-19extmod/modframebuf: Add ellipse drawing method.Peter Hinch
2022-08-19extmod/modframebuf: Add fill argument to rect().Jim Mussared
We plan to add `ellipse` and `poly` methods, but rather than having to implement a `fill_xyz` version of each, we can make them take an optional fill argument. This commit add this to `rect` as a starting point. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2022-08-18tools/mpremote: Add "edit" command.Jim Mussared
This allows a remote file to be edited locally by copying it over, running the local editor, then copying it back. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2022-08-18tools/pyboard.py: Add "touch" filesystem command.Jim Mussared
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>