bsal_osif.c 614 B

123456789101112131415161718192021222324252627282930313233343536373839
  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-05-28 Supperthomas the first version
  9. */
  10. #include <stdio.h>
  11. #include <stdbool.h>
  12. #include <string.h>
  13. #include <stdarg.h>
  14. #include "bsal_osif.h"
  15. #include "os_mem.h"
  16. #include "os_sched.h"
  17. void *bsal_osif_malloc(uint32_t len)
  18. {
  19. void *p = NULL;
  20. p = os_mem_alloc(RAM_TYPE_DATA_ON, len);
  21. memset(p, 0, len);
  22. return p;
  23. }
  24. void bsal_osif_free(void *p)
  25. {
  26. os_mem_free(p);
  27. }
  28. void bsal_osif_delay(uint32_t ms)
  29. {
  30. os_delay(ms);
  31. }