2018-12-26 12:50:52 +08:00
|
|
|
/*
|
2021-04-09 10:52:34 +08:00
|
|
|
* Copyright (c) 2006-2021, RT-Thread Development Team
|
2018-12-26 12:50:52 +08:00
|
|
|
*
|
2021-04-09 10:52:34 +08:00
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
2018-12-26 12:50:52 +08:00
|
|
|
*
|
|
|
|
* Change Logs:
|
|
|
|
* Date Author Notes
|
|
|
|
* 2011-01-13 weety first version
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __ASM_ARCH_IO_H
|
|
|
|
#define __ASM_ARCH_IO_H
|
|
|
|
|
2021-04-09 10:52:34 +08:00
|
|
|
#define IO_SPACE_LIMIT 0xFFFFFFFF
|
2018-12-26 12:50:52 +08:00
|
|
|
|
2021-04-09 10:52:34 +08:00
|
|
|
#define readb(a) (*(volatile unsigned char *)(a))
|
|
|
|
#define readw(a) (*(volatile unsigned short *)(a))
|
|
|
|
#define readl(a) (*(volatile unsigned int *)(a))
|
2018-12-26 12:50:52 +08:00
|
|
|
|
2021-04-09 10:52:34 +08:00
|
|
|
#define writeb(v,a) (*(volatile unsigned char *)(a) = (v))
|
|
|
|
#define writew(v,a) (*(volatile unsigned short *)(a) = (v))
|
|
|
|
#define writel(v,a) (*(volatile unsigned int *)(a) = (v))
|
2018-12-26 12:50:52 +08:00
|
|
|
|
|
|
|
#endif
|
|
|
|
|