/*
 *
 * Project name: EVPU-defence, Video Processing Board
 *
 * (C) Copyright 2018 DFC Design, s.r.o., Brno, Czech Republic
 * Author: Jakub Hadamek (j.hadamek@dfcdesign.cz)
 *
 * This document contains register write and read functions used in
 * almost all sources of this project
*/

#ifndef SRC_COMMON_H_
#define SRC_COMMON_H_

#include "xil_io.h"

static INLINE void register_write(UINTPTR Addr, u32 Value)
{
	volatile u32 *LocalAddr = (volatile u32 *)Addr;
	*LocalAddr = Value;
}

static INLINE u32 register_read(UINTPTR Addr)
{
	volatile u32 *LocalAddr = (volatile u32 *)Addr;
	return *LocalAddr;
}

#endif /* SRC_COMMON_H_ */
