kpi.h 700 B

1234567891011121314151617181920212223
  1. /**
  2. * RT-Thread RuiChing
  3. *
  4. * COPYRIGHT (C) 2024-2025 Shanghai Real-Thread Electronic Technology Co., Ltd.
  5. * All rights reserved.
  6. *
  7. * The license and distribution terms for this file may be
  8. * found in the file LICENSE in this distribution.
  9. */
  10. #ifndef __KPI_H__
  11. #define __KPI_H__
  12. #include <rttypes.h>
  13. #define KPI_DEFINED(symbol) __kpi_##symbol symbol
  14. #define KPI_EXTERN(symbol) extern __kpi_##symbol symbol
  15. #define KPI_IMPORT(symbol, index) \
  16. (__kpi_##symbol)( \
  17. *(rt_ubase_t *)(__kpi_start + ((index - 1) * sizeof(rt_ubase_t))));
  18. void kpi_init(void);
  19. #endif /* __KPI_H__ */