#include "Scheduler.h"
#include "Timer.h"
#include "stm32f1xx_ll_utils.h"

void (*it_callback_SysTick)(void); 

void SysTick_Handler(void)
{
	(*it_callback_SysTick)();
}	

void Scheduler_conf(void (*it_callback) (void))
{
	it_callback_SysTick = it_callback;
	SysTick->CTRL &= ~(SysTick_CTRL_CLKSOURCE_Msk);
	SysTick->CTRL |= SysTick_CTRL_TICKINT_Msk;
	SysTick->LOAD = 9000;
}

void Scheduler_start(void)
{
	SysTick->CTRL |= SysTick_CTRL_ENABLE_Msk;
}
