This commit is contained in:
刘可亮
2024-09-03 11:16:08 +08:00
parent cf270df8d6
commit 803cac77d5
2931 changed files with 614364 additions and 31222 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2022, ArtInChip Technology Co., Ltd
* Copyright (c) 2022-2024, ArtInChip Technology Co., Ltd
*
* SPDX-License-Identifier: Apache-2.0
*
@@ -22,6 +22,9 @@
#ifdef AIC_DMA_DRV
#include "drv_dma.h"
#endif
#ifdef AIC_GPIO_DRV
#include "aic_drv_gpio.h"
#endif
#ifdef AIC_USING_SID
#include "efuse.h"
@@ -31,6 +34,10 @@
#include <osrce.h>
#endif
#ifdef LPKG_CHERRYUSB_OTG
#include <usb_otg.h>
#endif
#ifdef LPKG_CHERRYUSB_HOST
#include <usbh_core.h>
#include <usbh_hub.h>
@@ -106,6 +113,14 @@ int main(void)
drv_dma_init();
#endif
#ifdef AIC_RTC_DRV
drv_rtc_init();
#endif
#ifdef AIC_GPIO_DRV
drv_pin_init();
#endif
#ifdef TLSF_MEM_HEAP
aic_tlsf_heap_test();
#endif
@@ -188,17 +203,10 @@ int main(void)
#endif
#ifdef AIC_WRI_DRV
aic_get_reboot_reason();
aic_clr_reboot_reason();
aic_show_startup_time();
#endif
#ifdef LPKG_CHERRYUSB_HOST
usbh_init();
while(1)
{
usbh_hub_poll();
}
#endif
#ifdef LPKG_LWIP_EXAMPLES
/* LwIP test loop */
lwip_test_example_main_loop(NULL);
@@ -210,14 +218,14 @@ int main(void)
#endif /* LV_USE_LOG */
lv_init();
lv_port_disp_init();
int end_flag = 0;
#ifdef AIC_LVGL_GIF_DEMO
void gif_ui_init(int *end_flag);
gif_ui_init(&end_flag);
#else
lv_user_gui_init();
#ifdef AIC_LVGL_GIF_DEMO
extern int gif_check_finish(void);
while(!gif_check_finish())
#else
while(1)
#endif
while(!end_flag)
{
lv_task_handler();
aicos_mdelay(1);
@@ -233,6 +241,10 @@ int main(void)
}
#endif
#ifdef LPKG_CHERRYUSB_OTG
usb_otg_init();
#endif
#ifdef LPKG_CHERRYUSB_DEVICE
#ifdef LPKG_CHERRYUSB_DEVICE_MSC_RAM_TEMPLATE
extern void msc_ram_init(void);
@@ -262,6 +274,21 @@ int main(void)
}
#endif
#ifdef LPKG_CHERRYUSB_HOST
usbh_init();
while(1)
{
#ifdef LPKG_CHERRYUSB_OTG
unsigned int auto_flg, mode;
usbh_otg_thread_poll(NULL);
usb_otg_get_mode(&auto_flg, &mode);
if (mode == OTG_MODE_DEVICE)
continue;
#endif
usbh_hub_poll();
}
#endif
#ifdef AIC_CONSOLE_BARE_DRV
/* Console shell loop */
console_init();