timer: place global timer as a global variable
This commit is contained in:
1
Timer/.gitignore
vendored
Normal file
1
Timer/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
/Debug/
|
||||
@@ -12,6 +12,8 @@
|
||||
#include <atomic>
|
||||
#include <climits>
|
||||
|
||||
static volatile std::atomic_int timer;
|
||||
|
||||
extern "C"
|
||||
{
|
||||
/**
|
||||
@@ -69,7 +71,6 @@ public:
|
||||
|
||||
private:
|
||||
volatile std::atomic_int counter;
|
||||
volatile std::atomic_int timer;
|
||||
uint32_t freq;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user