boot_override.c 1.5 KB

123456789101112131415161718192021222324252627282930313233
  1. /* Copyright (C) 2018 RDA Technologies Limited and/or its affiliates("RDA").
  2. * All rights reserved.
  3. *
  4. * This software is supplied "AS IS" without any warranties.
  5. * RDA assumes no responsibility or liability for the use of the software,
  6. * conveys no license or title under any patent, copyright, or mask work
  7. * right to the product. RDA reserves the right to make changes in the
  8. * software without notification. RDA also make no representation or
  9. * warranty that such application will be suitable for the specified use
  10. * without further testing or modification.
  11. */
  12. #include "osi_api.h"
  13. static uint32_t gBootCauses = 0;
  14. static osiBootCause_t gBootMode = OSI_BOOTMODE_NORMAL;
  15. void osiSetUpTime(int64_t ms) {}
  16. int64_t osiUpTime(void) { return 0; }
  17. int64_t osiEpochSecond(void) { return 0; }
  18. int64_t osiEpochTime(void) { return 0; }
  19. bool osiSetEpochTime(int64_t ms) { return false; }
  20. int64_t osiUpTimeToEpoch(int64_t uptime) { return 0; }
  21. uint32_t osiGetBootCauses(void) { return gBootCauses; }
  22. void osiSetBootCause(osiBootCause_t cause) { gBootCauses |= cause; }
  23. osiBootMode_t osiGetBootMode(void) { return gBootMode; }
  24. void osiSetBootMode(osiBootMode_t mode) { gBootMode = mode; }
  25. osiMutex_t *osiMutexCreate(void) { return (osiMutex_t *)1; }
  26. void osiMutexDelete(osiMutex_t *mutex) {}
  27. void osiMutexLock(osiMutex_t *mutex) {}
  28. void osiMutexUnlock(osiMutex_t *mutex) {}
  29. void osiThreadSleep(uint32_t ms) { osiDelayUS(ms * 1000); }
  30. void osiThreadSleepUS(uint32_t us) { osiDelayUS(us); }