timer: correct systicks data type

This commit is contained in:
Vasily Davydov 2022-10-22 13:04:10 +03:00
parent 626e36c6e4
commit a2b3cc7e86
2 changed files with 3 additions and 3 deletions

View File

@ -13,7 +13,7 @@
#include <climits> #include <climits>
static volatile std::atomic_int timer; static volatile std::atomic_int timer;
static volatile unsigned int systicks = 0; static volatile std::atomic_int systicks;
extern "C" extern "C"
{ {
@ -26,7 +26,6 @@ extern "C"
uint32_t millis (); uint32_t millis ();
class Timer class Timer
{ {
public: public:

View File

@ -25,6 +25,7 @@ Timer::Timer (uint32_t freq) : freq (freq)
SysTick_Config (sysTickRate / freq); SysTick_Config (sysTickRate / freq);
counter = 0; counter = 0;
timer = 0; timer = 0;
systicks = 0;
} }
Timer::~Timer () Timer::~Timer ()