kopia lustrzana https://github.com/micropython/micropython
docs/library/machine.UART: Extend the documentation for UART.irq.
For more ports and trigger options, based on the state of PR #14040. Signed-off-by: robert-hh <robert@hammelrath.com>pull/14041/head
rodzic
fb1446ada0
commit
2754f5095f
|
@ -193,6 +193,10 @@ Methods
|
||||||
|
|
||||||
- ``UART.IRQ_RXIDLE`` interrupt after receiving at least one character
|
- ``UART.IRQ_RXIDLE`` interrupt after receiving at least one character
|
||||||
and then the RX line goes idle.
|
and then the RX line goes idle.
|
||||||
|
- ``UART.IRQ_RX`` interrupt after each received character.
|
||||||
|
- ``UART.TX_IDLE`` interrupt after or while the last character(s) of
|
||||||
|
a message are of have been sent.
|
||||||
|
- ``UART.BREAK`` interrupt when a break state is detected at RX
|
||||||
|
|
||||||
- *hard* if true a hardware interrupt is used. This reduces the delay
|
- *hard* if true a hardware interrupt is used. This reduces the delay
|
||||||
between the pin change and the handler being called. Hard interrupt
|
between the pin change and the handler being called. Hard interrupt
|
||||||
|
@ -200,7 +204,39 @@ Methods
|
||||||
|
|
||||||
Returns an irq object.
|
Returns an irq object.
|
||||||
|
|
||||||
Availability: renesas-ra, stm32.
|
Due to limitations of the hardware not all trigger events are available at all ports.
|
||||||
|
|
||||||
|
.. table:: Availability of triggers
|
||||||
|
:align: center
|
||||||
|
|
||||||
|
============== ======= === ====== =====
|
||||||
|
Port / Trigger RX_IDLE RX TXIDLE BREAK
|
||||||
|
============== ======= === ====== =====
|
||||||
|
STM32 yes
|
||||||
|
ESP32 yes yes
|
||||||
|
RP2040 yes yes yes
|
||||||
|
MIMXRT yes yes
|
||||||
|
SAMD yes yes
|
||||||
|
RENESAS-RA yes
|
||||||
|
NRF yes yes
|
||||||
|
CC3200 yes
|
||||||
|
============== ======= === ====== =====
|
||||||
|
|
||||||
|
|
||||||
|
.. note::
|
||||||
|
- At the RP2040 port UART.TXIDLE is only triggered when the message
|
||||||
|
is longer than 5 characters and the trigger happens when still 5 characters
|
||||||
|
are to be sent.
|
||||||
|
|
||||||
|
- At the SAMD port UART.TXIDLE is triggered while the last character is sent.
|
||||||
|
|
||||||
|
- At the RP2040 port UART.BREAK needs receiving valid characters for triggering
|
||||||
|
again.
|
||||||
|
|
||||||
|
- The ESP32 port does not support the option hard=True.
|
||||||
|
|
||||||
|
|
||||||
|
Availability: renesas-ra, stm32, esp32, rp2040, mimxrt, samd, nrf, cc3200.
|
||||||
|
|
||||||
Constants
|
Constants
|
||||||
---------
|
---------
|
||||||
|
@ -213,7 +249,10 @@ Constants
|
||||||
Availability: esp32, mimxrt, renesas-ra, rp2, stm32.
|
Availability: esp32, mimxrt, renesas-ra, rp2, stm32.
|
||||||
|
|
||||||
.. data:: UART.IRQ_RXIDLE
|
.. data:: UART.IRQ_RXIDLE
|
||||||
|
UART.IRQ_RX
|
||||||
|
UART.IRQ_TXIDLE
|
||||||
|
UART.IRQ_BREAK
|
||||||
|
|
||||||
IRQ trigger sources.
|
IRQ trigger sources.
|
||||||
|
|
||||||
Availability: stm32.
|
Availability: renesas-ra, stm32, esp32, rp2040, mimxrt, samd, cc3200.
|
||||||
|
|
Ładowanie…
Reference in New Issue