#ifndef __TICKER_H__
#define __TICKER_H__
#include "systick.h"
#include "timer.h"

class Ticker
{

	public:
		Ticker() {}
		void Start(void) 				{ Systick::Count::write(1);		}
		void Stop(void)					{ Systick::Count::write(0);		}
		void EnableInterrupt(void) 		{ Systick::Interrupt::write(1);	}
		void DisableInterrupt(void)		{ Systick::Interrupt::write(0);	}
		void Configure(uint32_t ticks)	{
			Systick::Reload::write(ticks);
			Systick::Current::write(0);
			Systick::Enables::write(3);
		}
};

#endif // __TICKER_H__
