drv_ioremap.h 513 B

1234567891011121314151617181920212223242526
  1. /*
  2. * Copyright (c) 2006-2024, RT-Thread Development Team
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. *
  6. * Change Logs:
  7. * Date Author Notes
  8. * 2024/07/24 heyuanjie87 first version
  9. */
  10. #ifndef __DRV_IOREMAP_H__
  11. #define __DRV_IOREMAP_H__
  12. #include <rtconfig.h>
  13. #ifdef RT_USING_SMART
  14. #include <ioremap.h>
  15. #define DRV_IOREMAP(addr, size) rt_ioremap(addr, size)
  16. #define DRV_IOUNMAP(addr) rt_iounmap(addr)
  17. #else
  18. #define DRV_IOREMAP(addr, size) (addr)
  19. #define DRV_IOUNMAP(addr)
  20. #endif
  21. #endif