TaskManagerIO
Loading...
Searching...
No Matches
BasicInterruptAbstraction.h
1/*
2 * Copyright (c) 2018 https://www.thecoderscorner.com (Dave Cherry)..
3 * This product is licensed under an Apache license, see the LICENSE file in the top-level directory.
4 */
5
6#ifndef TASKMANAGERIO_BASICINTERRUPTABSTRACTION_H
7#define TASKMANAGERIO_BASICINTERRUPTABSTRACTION_H
8
9#include "TaskPlatformDeps.h"
10#include "TaskManagerIO.h"
11
12#ifdef IOA_USE_ARDUINO
13
14inline void internalHandleInterrupt(pintype_t pin, RawIntHandler fn, uint8_t mode) {
15#if defined(ARDUINO_MBED_MODE) || (ARDUINO_API_VERSION >= 10200)
16 ::attachInterrupt(pin, fn, (PinStatus)mode);
17#elif defined(PARTICLE)
18 ::attachInterrupt(pin, fn, (InterruptMode)mode);
19#else
20 ::attachInterrupt(digitalPinToInterrupt(pin), fn, mode);
21#endif // Interrupt mode conditionals
22}
23
30 void attachInterrupt(pintype_t pin, RawIntHandler fn, uint8_t mode) override {
31 internalHandleInterrupt(pin, fn, mode);
32 }
33};
34#endif // IOA_USE_ARDUINO - Arduino Only
35
36#endif //TASKMANAGERIO_BASICINTERRUPTABSTRACTION_H
Task manager is a simple co-routine style implementation for Arduino which supports scheduling work t...
void(* RawIntHandler)()
Definition TaskManagerIO.h:43
provides the platform specific configuration for task manager
Definition BasicInterruptAbstraction.h:29
Definition TaskManagerIO.h:59