kdb_type.h 747 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /*
  2. * Copyright (c) 2006-2020, RT-Thread Development Team
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. *
  6. * Change Logs:
  7. * Date Author Notes
  8. * 2020-06-09 tyx first version.
  9. */
  10. #ifndef __KDB_TYPE_H__
  11. #define __KDB_TYPE_H__
  12. #include <rtthread.h>
  13. #include "kdb_core.h"
  14. #ifdef __cplusplus
  15. extern "C" {
  16. #endif
  17. #ifndef KDB_TYPE_NUM
  18. #define KDB_TYPE_NUM (8)
  19. #endif
  20. #define KDB_TYPE_INVALID (0)
  21. typedef void(*kdb_dump_t)(kdb_head_t head, void *data);
  22. struct kdb_type
  23. {
  24. rt_uint16_t type;
  25. kdb_dump_t dump;
  26. };
  27. rt_err_t kdb_type_register(rt_uint16_t type, kdb_dump_t dump);
  28. void kdb_type_unregister(rt_uint16_t type);
  29. void kdb_type_dump(kdb_head_t head, void *data);
  30. #ifdef __cplusplus
  31. }
  32. #endif
  33. #endif