aboutsummaryrefslogtreecommitdiff
path: root/novena-eim.h
diff options
context:
space:
mode:
authorRob Austein <sra@hactrn.net>2015-07-05 16:16:34 -0400
committerRob Austein <sra@hactrn.net>2015-07-05 16:16:34 -0400
commit785230990d43a1aaf11ebd102ce66e1c788cc4da (patch)
treea6ccb205a66a5f1fc1983dc0da2b80834b8ff89c /novena-eim.h
parent65f663450cfadb06b33166092aecae705a20e9bc (diff)
novena-eim.h had an invisible dependency on <sys/types.h>, at least on
Debian Wheezy (ie, on the Novena).
Diffstat (limited to 'novena-eim.h')
-rw-r--r--novena-eim.h19
1 files changed, 16 insertions, 3 deletions
diff --git a/novena-eim.h b/novena-eim.h
index 5228529..2ef0fea 100644
--- a/novena-eim.h
+++ b/novena-eim.h
@@ -34,24 +34,37 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+#ifndef _NOVENA_EIM_H_
+#define _NOVENA_EIM_H_
+
#include <stdint.h>
+#include <sys/types.h> /* Required for off_t, at least on Debian Wheezy. */
+
#define EIM_BASE_ADDR 0x08000000
-/* Set up EIM bus.
+/*
+ * Set up EIM bus.
* Returns 0 on success, -1 on failure.
*/
+
int eim_setup(void);
-/* Write a 32-bit word to EIM.
+/*
+ * Write a 32-bit word to EIM.
* If EIM is not set up correctly, this will abort with a bus error.
*/
+
void eim_write_32(off_t, uint32_t *);
-/* Read a 32-bit word from EIM.
+/*
+ * Read a 32-bit word from EIM.
* If EIM is not set up correctly, this will abort with a bus error.
*/
+
void eim_read_32(off_t, uint32_t *);
+#endif /* _NOVENA_EIM_H_ */
+
/*
* Local variables:
* indent-tabs-mode: nil