hpocapp.c 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  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. //#define OSI_LOG_TAG OSI_MAKE_LOG_TAG()
  13. #include "main.h"
  14. #include "lsapi_types.h"
  15. #include "lsapi_sys.h"
  16. #include "lsapi_os.h"
  17. /*
  18. appimg_exit
  19. 仅在程序退出时打印
  20. */
  21. void appimg_exit(void){
  22. LSAPI_Log_Debug("application image exit");
  23. }
  24. static void mainTask(void *param){
  25. hpocRun();//应用主程序(pt)
  26. }
  27. /*
  28. appimg_enter
  29. cat one入口函数
  30. */
  31. int appimg_enter(void *param){
  32. LSAPI_OSI_ThreadCreate("main", mainTask, NULL, LSAPI_OSI_PRIORITY_NORMAL, PT_THREAD_STACK, 4);
  33. #ifdef USE_DETECTED_THREAD
  34. LSAPI_OSI_ThreadCreate("detector", detector, NULL, LSAPI_OSI_PRIORITY_NORMAL, 1024*2, 4);
  35. #endif
  36. return 0;
  37. }