minix/kernel/arch/earm/include/io.h
Lionel Sambuc b1c4ba4ab6 ARM updates
Due to the ABI we are using we have to use the earm architecture
moniker for the build system to behave correctly. This involves
then some headers to move around.

There is also a few related Makefile updates as well as minor
source code corrections.
2013-01-17 10:03:58 +01:00

16 lines
405 B
C

#ifndef _ARM_IO_H_
#define _ARM_IO_H_
#ifndef __ASSEMBLY__
#include <sys/types.h>
/* Access memory-mapped I/O devices */
#define mmio_read(a) (*(volatile u32_t *)(a))
#define mmio_write(a,v) (*(volatile u32_t *)(a) = (v))
#define mmio_set(a,v) mmio_write((a), mmio_read((a)) | (v))
#define mmio_clear(a,v) mmio_write((a), mmio_read((a)) & ~(v))
#endif /* __ASSEMBLY__ */
#endif /* _ARM_IO_H_ */