]> rtime.felk.cvut.cz Git - arc.git/blob - include/io.h
Updated IoHwAb
[arc.git] / include / io.h
1 /* -------------------------------- Arctic Core ------------------------------
2  * Copyright (C) 2009-2011 ArcCore AB <contact@arccore.com>
3  * Licensed under ArcCore Embedded Software License Agreement.
4  * -------------------------------- Arctic Core ------------------------------*/
5
6 #ifndef IO_H_
7 #define IO_H_
8
9 #define WRITE8(address, value)      (*(uint8_t*)(address) = (value))
10 #define READ8(address)              ((uint8_t)(*(uint8_t*)(address)))
11
12 #define WRITE16(address, value)     (*(vuint16_t*)(address) = (value))
13 #define READ16(address)             ((uint16_t)(*(vuint16_t*)(address)))
14
15 #define WRITE32(address, value)     (*(vuint32_t*)(address) = (value))
16 #define READ32(address)             ((uint32_t)(*(vuint32_t*)(address)))
17
18 #define WRITE64(address, value)     (*(vuint64_t*)(address) = (value))
19 #define READ64(address)             ((uint64_t)(*(vuint64_t*)(address)))
20
21
22 #endif /* IO_H_ */