mirror of
https://github.com/saymrwulf/uhd.git
synced 2026-05-16 21:10:10 +00:00
24 lines
489 B
C
24 lines
489 B
C
|
|
// Copyright 2012 Ettus Research LLC
|
|
|
|
#ifndef INCLUDED_WB_UTILS_H
|
|
#define INCLUDED_WB_UTILS_H
|
|
|
|
#include <stdint.h>
|
|
|
|
#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 */
|