#ifndef __BUS_CONTROL_REGISTER_H__
#define __BUS_CONTROL_REGISTER_H__

#include <stdint.h>
#include "platform.h"

namespace BUS_CONTROL
{
	static const uint32_t BaseAddress = (KS8695PX_IO_BASE + KS8695PX_BUS_CONTROL_OFFSET);
	
	enum Registers
	{
		CLKCON	= 0x0004		// 0x00	- System Clock and Bus Control Register (rw)
	};
	
	inline volatile uint32_t *regAddress(Registers reg)
	{
	    return reinterpret_cast<volatile uint32_t*>(BaseAddress + reg);
	}
	
	inline uint32_t regRead(Registers reg)
	{
	    return *regAddress(reg);
	}
	
	inline void regWrite(Registers reg, uint32_t value)
	{
	    *regAddress(reg) = value;
	}

}

#endif // __BUS_CONTROL_REGISTER_H__
