16 lines
331 B
C
16 lines
331 B
C
#ifndef SYSTICK_H
|
|
#define SYSTICK_H
|
|
|
|
#include <stdint.h>
|
|
|
|
#define TIMER_DELAY 1000
|
|
#define SYSTICK_ONE_MILLISECOND \
|
|
(uint32_t)(FUNCONF_SYSTEM_CORE_CLOCK / TIMER_DELAY)
|
|
#define millis() (systick_millis)
|
|
|
|
// ms counter incremented by SysTick
|
|
extern volatile uint32_t systick_millis;
|
|
void systick_init(void);
|
|
|
|
#endif // SYSTICK_H
|