some cleanup of previous edits
parent
3bd5b123b1
commit
10164fa150
|
@ -53,12 +53,14 @@ Some guidelines if adding a new Python library feature (like a new function or a
|
|||
|
||||
### Adding Python syntax features
|
||||
|
||||
If you want to change the Python language features exposed by MicroPython, it's a good idea to discuss this with the maintainers first.
|
||||
If you want to change the Python language features supported by MicroPython, then it's a good idea to discuss this with the maintainers first.
|
||||
|
||||
### Adding hardware features
|
||||
|
||||
* If implementing an existing [machine](https://docs.micropython.org/en/latest/library/machine.html) API on a new port (for example, to add `machine.I2S` to a port which has I2S hardware but no MicroPython driver yet), then the API must match the existing `machine` API whenever possible. Additions that substantially change an existing `machine` API for a single port only, or have too many "special case" notes, may be better suited as port-specific APIs (see below).
|
||||
* Contributing a new [machine](https://docs.micropython.org/en/latest/library/machine.html) API that adds brand new functionality (for example, adding a `machine.TenGbpsEthernet` class for 10Gbps Ethernet controllers) must be very carefully implemented and designed. These APIs must be as generic to work on multiple ports, while still being efficient and small in code size. If you're planning to contribute such a driver, please discuss with the maintainers and the community first. You could start with a [Discussion](https://github.com/micropython/micropython/discussions) or make a Pull Request that only adds the docs for your proposed API.
|
||||
New hardware driver support or functionality is always welcome:
|
||||
|
||||
* If implementing an existing [machine](https://docs.micropython.org/en/latest/library/machine.html) API for a new port (for example, adding `machine.I2S` to a port which has I2S hardware but no MicroPython driver yet), then the API must match the existing `machine` API whenever possible. Additions that substantially change an existing `machine` API for a single port only, or have non-trivial "special case" notes, may be better suited as port-specific APIs (see below).
|
||||
* Contributing a new [machine](https://docs.micropython.org/en/latest/library/machine.html) API that adds brand new functionality (for example, adding a `machine.TenGbpsEthernet` class for 10Gbps Ethernet controllers) must be very carefully implemented and designed. These APIs must be generic to work on multiple ports, while still being efficient and small in code size. If you're planning to contribute such a driver, please discuss with the maintainers and the community first. You could start with a [Discussion](https://github.com/micropython/micropython/discussions) or make a Pull Request that only adds the docs for your proposed API.
|
||||
* If a new driver has port- or hardware-specific features that aren't suitable for a [machine](https://docs.micropython.org/en/latest/library/machine.html) API then consider adding them to a [port-specific library](https://docs.micropython.org/en/latest/library/index.html#port-specific-libraries). (Except `pyb`, this is legacy and new code should go into `stm` instead). This allows more freedom to expose the hardware's exact capabilities.
|
||||
|
||||
## Ports
|
||||
|
|
Loading…
Reference in New Issue