drv_common.h 574 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. * 2022-05-16 shelton first version
  9. */
  10. #ifndef __DRV_COMMON_H__
  11. #define __DRV_COMMON_H__
  12. #include <rtthread.h>
  13. #include <rthw.h>
  14. #ifdef RT_USING_DEVICE
  15. #include <rtdevice.h>
  16. #endif
  17. #include "board.h"
  18. #ifdef __cplusplus
  19. extern "C" {
  20. #endif
  21. void _Error_Handler(char *s, int num);
  22. #ifndef Error_Handler
  23. #define Error_Handler() _Error_Handler(__FILE__, __LINE__)
  24. #endif
  25. #ifdef __cplusplus
  26. }
  27. #endif
  28. #endif