lvgl.c 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. /*
  2. * Copyright (c) 2020 Actions Technology Co., Ltd
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. */
  6. /*********************
  7. * INCLUDES
  8. *********************/
  9. #include "../lvgl_porting.h"
  10. #include "../decoder/lv_img_decoder_acts.h"
  11. #ifdef CONFIG_LVGL_USE_IMG_DECODER_ACTS
  12. # include <lvgl/lvgl_img_decoder.h>
  13. #endif
  14. #ifdef CONFIG_LVGL_USE_IMG_DECODER_ACTS_RES
  15. # include <lvgl/lvgl_img_res_decoder.h>
  16. #endif
  17. #if LV_USE_THORVG
  18. # if LV_USE_THORVG_EXTERNAL
  19. # include <thorvg_capi.h>
  20. # else
  21. # include "../../src/extra/libs/thorvg/thorvg_capi.h"
  22. # endif
  23. #endif
  24. /**********************
  25. * GLOBAL FUNCTIONS
  26. **********************/
  27. lv_res_t lv_port_init(void)
  28. {
  29. lv_init();
  30. lv_img_decoder_acts_basic_init();
  31. #ifdef CONFIG_LVGL_USE_IMG_DECODER_ACTS
  32. lvgl_img_decoder_acts_init();
  33. #elif LV_USE_GPU_ACTS_JPG
  34. lv_img_decoder_acts_raw_init();
  35. #endif
  36. #if defined(CONFIG_LVGL_USE_IMG_DECODER_ACTS_RES)
  37. lvgl_img_decoder_acts_res_init();
  38. #endif
  39. #if LV_USE_THORVG
  40. tvg_engine_init(TVG_ENGINE_SW, 0);
  41. #endif
  42. return LV_RES_OK;
  43. }