PICO micropython 开发的一些函数详解
承接上篇文章,由于对Pico Python开发手册raspberry-pi-pico-python-sdk阅读的并不是很仔细,找不到详细的函数解释,再经过详细的寻找之后发现这篇手册上是有链接的,就紧跟在Chapter 3.The RP2024 Port后面。
然后不费吹灰之力就找到了我需要的函数
The following functions allow control over interrupts. Some systems require interrupts to operate correctly so disabling them for long periods may compromise core functionality, for example watchdog timers may trigger unexpectedly. Interrupts should only be disabled for a minimum amount of time and then re-enabled to their previous state. For example:
import machine
# Disable interrupts
state = machine.disable_irq()
# Do a small amount of time-critical work here
# Enable interrupts
machine.enable_irq(state)
下面还有个外设的库的链接以供详细查询
这篇比较短,希望大家能用到的可以点个赞,谢谢大家啦