-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Mutexless Analog classes for interrupt usage
- Loading branch information
Showing
1 changed file
with
19 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#include "mbed.h" | ||
|
||
/* | ||
Overloaded Analog pin classes for use in interrupts | ||
Usage is analogous MbedOS Analog classes | ||
*/ | ||
class AnalogInMutexless : public AnalogIn { | ||
public: | ||
AnalogInMutexless(PinName pin) : AnalogIn(pin) { } | ||
virtual void lock() { } | ||
virtual void unlock() { } | ||
}; | ||
|
||
class AnalogOutMutexless : public AnalogOut { | ||
public: | ||
AnalogOutMutexless(PinName pin) : AnalogOut(pin) { } | ||
virtual void lock() { } | ||
virtual void unlock() { } | ||
}; |