platformSystem.h 581 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. #ifndef __platformSystem__
  2. #define __platformSystem__
  3. #ifdef __cplusplus
  4. extern "C" {
  5. #endif
  6. #include <stdio.h>
  7. #include <stdint.h>
  8. #include <string.h>
  9. #include <rtthread.h>
  10. #define platformAssert(EX) RT_ASSERT(EX)
  11. #define RyanMqttMemset rt_memset
  12. #define RyanMqttStrlen rt_strlen
  13. #define RyanMqttMemcpy rt_memcpy
  14. #define RyanMqttStrcmp rt_strcmp
  15. typedef struct
  16. {
  17. rt_thread_t thread;
  18. } platformThread_t;
  19. typedef struct
  20. {
  21. struct rt_mutex mutex;
  22. } platformMutex_t;
  23. typedef struct
  24. {
  25. rt_base_t level;
  26. } platformCritical_t;
  27. #ifdef __cplusplus
  28. }
  29. #endif
  30. #endif