#ifndef __SYSTICK_H__
#define __SYSTICK_H__

#include "base_addresses.h"
#include "hw_register.h"

namespace Systick {
	enum  { CTRL	= SYSTICK_BASE + 0x00 };
	enum  { RELOAD	= SYSTICK_BASE + 0x04 };
	enum  { CURR	= SYSTICK_BASE + 0x08 };
	enum  { CALIB	= SYSTICK_BASE + 0x0C };

	typedef hw_register<CTRL, 0x1, 0, rw_t> 		Count;
	typedef hw_register<CTRL, 0x1, 1, rw_t> 		Interrupt;
	typedef hw_register<CTRL, 0x1, 2, rw_t> 		ClockSource;
	typedef hw_register<CTRL, 0x3, 0, rw_t> 		Enables;

	typedef hw_register<RELOAD, 0xFFFFFF, 0, rw_t> 	Reload;
	typedef hw_register<CURR,   0xFFFFFF, 0, rw_t> 	Current;
	typedef hw_register<CALIB,  0xFFFFFF, 0, rw_t> 	Calibration;
}

#endif // __SYSTICK_REGISTERS_H__
