Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow interrupt-driven MACRAW operation
This commit adds methods to RawDevice that enable interrupt-driven operation. The enable_interrupt() method sets up SIMR so that socket-level (internal) interrupts on Socket 0 cause chip-level (external) interrupts (and as a convenience also sets S0_IR as required). The disable_interrupt() method reverses those changes. The clear_interrupt() method acknowledges all interrupts and is intended to be called from the interrupt handler (or from thread mode soon afterwards). There is no change to existing functionality or operation if enable_interrupt() is never called. I did see PR#34 before filing this, but that change is focused on TCP and UDP sockets, and my use case is MACRAW mode. Tested on a W5500-Pico-EVB board with the RP2040 successfully receiving and acting on active-low GPIO interrupts from W5500 via the INTn signal on W5500 pin 36.
- Loading branch information