![]() ![]() Interrupts to their original state, before disable_irq() was called. This return value should be passed to the enable_irq() function to restore Returns the previous IRQ state which should be considered an opaque value. disable_irq () # Do a small amount of time-critical work here # Enable interrupts machine. ![]() Import machine # Disable interrupts state = machine. Interrupts should only be disabled for a minimum amount of timeĪnd then re-enabled to their previous state. Interrupts to operate correctly so disabling them for long periods mayĬompromise core functionality, for example watchdog timers may trigger The following functions allow control over interrupts. Which bootloader to enter, what to pass to it, or other things. Some ports support passing in an optional value argument which can control This is typically used to put theĭevice into a state where it can be programmed with new firmware. Reset the device and enter its bootloader. See constants for the possible return values. Is connected to the MicroPython REPL (eg serial, USB, Wifi). It tries to retain the method by which the user Performs a soft reset of the interpreter, deleting all Python objects and Resets the device in a manner similar to pushing the external RESET Top of real hardware and real hardware interrupts). With negative IDs like -1 (these “virtual” devices are still thin shims on This is true for both physical devices with IDs >= 0 and “virtual” devices Malfunction, lockups, crashes of your board, and in extreme cases, hardwareĪ note of callbacks used by functions and class methods of machine module:Īll these callbacks should be considered as executing in an interrupt context. Most functions in this module allow to achieve directĪnd unrestricted access to and control of hardware blocks on a system The machine module contains specific functions related to the hardware Machine - functions related to the hardware ¶ Quick reference for the SAMD21/SAMD51 family.Quick reference for the UNIX and Windows ports.MicroPython language and implementation.Extending built-in libraries from Python. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |