MCPcopy Create free account
hub / github.com/bdring/FluidNC / attachInterrupt

Function attachInterrupt

X86TestSupport/TestSupport/Arduino.cpp:13–22  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11}
12
13void attachInterrupt(uint8_t pin, void (*callback)(void), int mode) {
14 attachInterruptArg(
15 pin,
16 [](void* arg) {
17 auto callback = reinterpret_cast<void (*)()>(arg);
18 callback();
19 },
20 reinterpret_cast<void*>(callback),
21 mode);
22}
23
24void attachInterruptArg(uint8_t pin, void (*callback)(void*, bool), void* arg, int mode) {
25 SoftwareGPIO::instance().attachISR(pin, callback, arg, mode);

Callers

nothing calls this directly

Calls 1

attachInterruptArgFunction · 0.85

Tested by

no test coverage detected