platform_def.h 1.0 KB

123456789101112131415161718192021222324252627282930
  1. #ifndef ETHERNET_COMMON_PLATFORM_DEF_H_
  2. #define ETHERNET_COMMON_PLATFORM_DEF_H_
  3. #define platform_random luat_crypto_trng
  4. #define platform_send_event luat_send_event_to_task
  5. #define platform_wait_event luat_wait_event_from_task
  6. #define platform_create_task luat_rtos_task_create
  7. #define platform_get_current_task luat_get_current_task
  8. #define platform_task_sleep luat_timer_mdelay
  9. #define platform_create_timer luat_create_rtos_timer
  10. #define platform_start_timer luat_start_rtos_timer
  11. #define platform_stop_timer luat_stop_rtos_timer
  12. #define platform_release_timer luat_release_rtos_timer
  13. #define platform_create_mutex luat_mutex_create
  14. #define platform_lock_mutex luat_mutex_lock
  15. #define platform_unlock_mutex luat_mutex_unlock
  16. #define platform_release_mutex luat_mutex_release
  17. #define malloc luat_heap_malloc
  18. #define free luat_heap_free
  19. #define zalloc luat_heap_zalloc
  20. #define msleep luat_timer_mdelay
  21. #define OS_LOCK luat_task_suspend_all()
  22. #define OS_UNLOCK luat_task_resume_all()
  23. #endif /* ETHERNET_COMMON_PLATFORM_DEF_H_ */