From 178ac3f1c9950d383c8f64b3df464c0f943c4a23 Mon Sep 17 00:00:00 2001 From: Ben Hilburn Date: Tue, 4 Feb 2014 11:04:07 -0800 Subject: Merging USRP X300 and X310 support!! --- firmware/x300/include/wb_utils.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 firmware/x300/include/wb_utils.h (limited to 'firmware/x300/include/wb_utils.h') diff --git a/firmware/x300/include/wb_utils.h b/firmware/x300/include/wb_utils.h new file mode 100644 index 000000000..34be51b8f --- /dev/null +++ b/firmware/x300/include/wb_utils.h @@ -0,0 +1,24 @@ + +// Copyright 2012 Ettus Research LLC + +#ifndef INCLUDED_WB_UTILS_H +#define INCLUDED_WB_UTILS_H + +#include + +#define localparam static const int + +static inline void wb_poke32(const uint32_t addr, const uint32_t data) +{ + *((volatile uint32_t *)addr) = data; +} + +static inline uint32_t wb_peek32(const uint32_t addr) +{ + const uint32_t data = *((volatile uint32_t *)addr); + return data; +} + +#define SR_ADDR(base, offset) ((base) + (offset)*4) + +#endif /* INCLUDED_WB_UTILS_H */ -- cgit v1.2.3