forked from Archive/PX4-Autopilot
29 lines
906 B
C
29 lines
906 B
C
#ifndef _MEMORY_H
|
|
#define _MEMORY_H
|
|
|
|
#define __arch_getb(a) (*(volatile unsigned char *)(a))
|
|
#define __arch_getw(a) (*(volatile unsigned short *)(a))
|
|
#define __arch_getl(a) (*(volatile unsigned int *)(a))
|
|
|
|
#define __arch_putb(v,a) (*(volatile unsigned char *)(a) = (v))
|
|
#define __arch_putw(v,a) (*(volatile unsigned short *)(a) = (v))
|
|
#define __arch_putl(v,a) (*(volatile unsigned int *)(a) = (v))
|
|
|
|
#define __raw_writeb(v,a) __arch_putb(v,a)
|
|
#define __raw_writew(v,a) __arch_putw(v,a)
|
|
#define __raw_writel(v,a) __arch_putl(v,a)
|
|
|
|
#define __raw_readb(a) __arch_getb(a)
|
|
#define __raw_readw(a) __arch_getw(a)
|
|
#define __raw_readl(a) __arch_getl(a)
|
|
|
|
#define writeb(v,a) __arch_putb(v,a)
|
|
#define writew(v,a) __arch_putw(v,a)
|
|
#define writel(v,a) __arch_putl(v,a)
|
|
|
|
#define readb(a) __arch_getb(a)
|
|
#define readw(a) __arch_getw(a)
|
|
#define readl(a) __arch_getl(a)
|
|
|
|
#endif /* _MEMORY_H */
|