dm.h 744 B

1234567891011121314151617181920212223242526272829303132333435
  1. /*
  2. * Copyright (c) 2006-2021, RT-Thread Development Team
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. *
  6. * Change Logs:
  7. * Date Author Notes
  8. * 2023-04-20 ErikChan the first version
  9. */
  10. #ifndef __RT_DM_H__
  11. #define __RT_DM_H__
  12. #include <rthw.h>
  13. #include <rtdef.h>
  14. #include <drivers/misc.h>
  15. #include <drivers/byteorder.h>
  16. #ifndef RT_CPUS_NR
  17. #define RT_CPUS_NR 1
  18. #endif
  19. #ifndef RT_USING_SMP
  20. extern int rt_hw_cpu_id(void);
  21. #endif
  22. void rt_dm_secondary_cpu_init(void);
  23. int rt_dm_set_dev_name_auto(rt_device_t dev, const char *prefix);
  24. int rt_dm_get_dev_name_id(rt_device_t dev);
  25. int rt_dm_set_dev_name(rt_device_t dev, const char *format, ...);
  26. const char *rt_dm_get_dev_name(rt_device_t dev);
  27. #endif /* __RT_DM_H__ */