├── .gitignore ├── .gitmodules ├── .travis.yml ├── .vscode └── ipch │ └── 386eab4720923aef │ └── mmap_address.bin ├── CHANGELOG.md ├── CMakeLists.txt ├── LICENSE ├── README.md ├── brun.sh ├── brun_auto.sh ├── cmake ├── CMakeLists.txt ├── README.md ├── common.cmake ├── compile-flags.cmake ├── dump-config.cmake ├── executable.cmake ├── fix-9985.cmake ├── macros.cmake ├── macros.internal.cmake └── toolchain.cmake ├── gdb.sh ├── lds └── kendryte.ld ├── lib ├── CMakeLists.txt ├── bsp │ ├── crt.S │ ├── entry.c │ ├── entry_user.c │ ├── include │ │ ├── atomic.h │ │ ├── bsp.h │ │ ├── dump.h │ │ ├── encoding.h │ │ ├── entry.h │ │ ├── interrupt.h │ │ ├── platform.h │ │ ├── printf.h │ │ ├── sleep.h │ │ ├── syscalls.h │ │ └── util.h │ ├── interrupt.c │ ├── printf.c │ ├── sleep.c │ └── syscalls.c ├── drivers │ ├── aes.c │ ├── apu.c │ ├── clint.c │ ├── dmac.c │ ├── dvp.c │ ├── fft.c │ ├── fpioa.c │ ├── gpio.c │ ├── gpiohs.c │ ├── i2c.c │ ├── i2s.c │ ├── include │ │ ├── aes.h │ │ ├── apu.h │ │ ├── clint.h │ │ ├── dmac.h │ │ ├── dvp.h │ │ ├── fft.h │ │ ├── fpioa.h │ │ ├── gpio.h │ │ ├── gpio_common.h │ │ ├── gpiohs.h │ │ ├── i2c.h │ │ ├── i2s.h │ │ ├── io.h │ │ ├── kpu.h │ │ ├── plic.h │ │ ├── pwm.h │ │ ├── rtc.h │ │ ├── sha256.h │ │ ├── spi.h │ │ ├── sysctl.h │ │ ├── timer.h │ │ ├── uart.h │ │ ├── uarths.h │ │ ├── utils.h │ │ └── wdt.h │ ├── kpu.c │ ├── plic.c │ ├── pwm.c │ ├── rtc.c │ ├── sha256.c │ ├── spi.c │ ├── sysclock.c │ ├── sysctl.c │ ├── timer.c │ ├── uart.c │ ├── uarths.c │ ├── utils.c │ └── wdt.c ├── freertos │ ├── conf │ │ └── FreeRTOSConfig.h │ ├── core_sync.c │ ├── croutine.c │ ├── event_groups.c │ ├── include │ │ ├── FreeRTOS.h │ │ ├── StackMacros.h │ │ ├── core_sync.h │ │ ├── croutine.h │ │ ├── event_groups.h │ │ ├── list.h │ │ ├── message_buffer.h │ │ ├── mpu_prototypes.h │ │ ├── mpu_wrappers.h │ │ ├── portable.h │ │ ├── projdefs.h │ │ ├── queue.h │ │ ├── semphr.h │ │ ├── stack_macros.h │ │ ├── stdint.readme │ │ ├── stream_buffer.h │ │ ├── task.h │ │ └── timers.h │ ├── list.c │ ├── locks.c │ ├── os_entry.c │ ├── portable │ │ ├── heap_4.c │ │ ├── port.c │ │ ├── portasm.S │ │ └── portmacro.h │ ├── pthread.c │ ├── queue.c │ ├── readme.txt │ ├── stream_buffer.c │ ├── tasks.c │ └── timers.c └── utils │ └── include │ └── syslog.h ├── make.sh └── src ├── .gitignore ├── ai_demo_sim ├── ai_demo_sim.bin ├── board_config.h ├── cnn.c ├── cnn.h ├── font.h ├── gencode_output.c ├── lcd.c ├── lcd.h ├── main.c ├── nt35310.c ├── nt35310.h ├── ov2640.c ├── ov2640.h ├── ov5640.c ├── ov5640.h ├── ov5640cfg.h ├── region_layer.c └── region_layer.h ├── auto.sh ├── dvp_ov ├── README.md ├── board_config.h ├── dvp_ov.bin ├── font.h ├── lcd.c ├── lcd.h ├── main.c ├── nt35310.c ├── nt35310.h ├── ov2640.c ├── ov2640.h ├── ov5640.c ├── ov5640.h └── ov5640cfg.h ├── face_detect ├── board_config.h ├── face_detect.bin ├── font.h ├── gen_array.py ├── gencode_output.c ├── lcd.c ├── lcd.h ├── main.c ├── nt35310.c ├── nt35310.h ├── ov2640.c ├── ov2640.h ├── ov5640.c ├── ov5640.h ├── ov5640cfg.h ├── region_layer.c ├── region_layer.h └── region_layer_array.include ├── face_detect_kmodel_flash ├── README.md ├── board_config.h ├── face_detect_kmodel_flash.bin ├── font.h ├── gencode_output.c ├── gencode_output.h ├── incbin.h ├── kfpkg │ ├── aug.kmodel │ ├── face_detect_kmodel_flash.bin │ ├── face_detect_kmodel_flash.kfpkg │ └── flash-list.json ├── lcd.c ├── lcd.h ├── main.c ├── nt35310.c ├── nt35310.h ├── ov2640.c ├── ov2640.h ├── ov5640.c ├── ov5640.h ├── ov5640cfg.h ├── region_layer.c ├── region_layer.h ├── w25qxx.c └── w25qxx.h ├── gpiohs_led ├── README.md ├── gpiohs_led.bin └── main.c ├── hello_world ├── hello_world.bin └── main.c ├── jpeg_decode ├── img.c ├── jpeg │ ├── picojpeg.c │ ├── picojpeg.h │ ├── picojpeg_util.c │ └── picojpeg_util.h ├── jpeg_decode.bin ├── lcd │ ├── font.h │ ├── lcd.c │ ├── lcd.h │ ├── nt35310.c │ └── nt35310.h └── main.c ├── kpu_conv ├── board_config.h ├── data.h ├── font.h ├── kpu_conv.bin ├── layer.c ├── layer.h ├── lcd.c ├── lcd.h ├── main.c ├── nt35310.c ├── nt35310.h ├── ov2640.c ├── ov2640.h └── readme.txt ├── lcd ├── README.md ├── board_config.h ├── font.h ├── lcd.bin ├── lcd.c ├── lcd.h ├── main.c ├── nt35310.c └── nt35310.h ├── lvgl ├── board_config.h ├── ds │ └── InderNS2009EN.PDF ├── lcd │ ├── font.h │ ├── lcd.c │ ├── lcd.h │ ├── nt35310.c │ └── nt35310.h ├── lvgl.bin ├── lvgl │ ├── .gitignore │ ├── .gitmodules │ ├── README.md │ ├── docs │ │ ├── CODE_OF_CONDUCT.md │ │ ├── CONTRIBUTING.md │ │ ├── astyle_c │ │ └── astyle_h │ ├── licence.txt │ ├── lv_conf.h │ ├── lv_conf_templ.h │ ├── lv_core │ │ ├── lv_core.mk │ │ ├── lv_group.c │ │ ├── lv_group.h │ │ ├── lv_indev.c │ │ ├── lv_indev.h │ │ ├── lv_obj.c │ │ ├── lv_obj.h │ │ ├── lv_refr.c │ │ ├── lv_refr.h │ │ ├── lv_style.c │ │ ├── lv_style.h │ │ ├── lv_vdb.c │ │ └── lv_vdb.h │ ├── lv_draw │ │ ├── lv_draw.c │ │ ├── lv_draw.h │ │ ├── lv_draw.mk │ │ ├── lv_draw_arc.c │ │ ├── lv_draw_arc.h │ │ ├── lv_draw_img.c │ │ ├── lv_draw_img.h │ │ ├── lv_draw_label.c │ │ ├── lv_draw_label.h │ │ ├── lv_draw_line.c │ │ ├── lv_draw_line.h │ │ ├── lv_draw_rbasic.c │ │ ├── lv_draw_rbasic.h │ │ ├── lv_draw_rect.c │ │ ├── lv_draw_rect.h │ │ ├── lv_draw_triangle.c │ │ ├── lv_draw_triangle.h │ │ ├── lv_draw_vbasic.c │ │ └── lv_draw_vbasic.h │ ├── lv_ex_conf.h │ ├── lv_examples │ │ ├── .gitignore │ │ ├── README.md │ │ ├── docs │ │ │ ├── astyle_c │ │ │ └── astyle_h │ │ ├── lv_apps │ │ │ ├── benchmark │ │ │ │ ├── benchmark.c │ │ │ │ ├── benchmark.h │ │ │ │ ├── benchmark.mk │ │ │ │ ├── benchmark_bg.c │ │ │ │ └── benchmark_bg.png │ │ │ ├── demo │ │ │ │ ├── bubble_pattern.png │ │ │ │ ├── demo.c │ │ │ │ ├── demo.h │ │ │ │ ├── demo.mk │ │ │ │ └── img_bubble_pattern.c │ │ │ ├── sysmon │ │ │ │ ├── sysmon.c │ │ │ │ ├── sysmon.h │ │ │ │ └── sysmon.mk │ │ │ ├── terminal │ │ │ │ ├── terminal.c │ │ │ │ ├── terminal.h │ │ │ │ └── terminal.mk │ │ │ └── tpcal │ │ │ │ ├── tpcal.c │ │ │ │ ├── tpcal.h │ │ │ │ └── tpcal.mk │ │ ├── lv_ex_conf_templ.h │ │ ├── lv_examples.h │ │ ├── lv_tests │ │ │ ├── lv_test.h │ │ │ ├── lv_test_group │ │ │ │ ├── lv_test_group.c │ │ │ │ ├── lv_test_group.h │ │ │ │ ├── lv_test_group.mk │ │ │ │ └── lv_test_group_1.png │ │ │ ├── lv_test_misc │ │ │ │ ├── lv_test_task.c │ │ │ │ └── lv_test_task.h │ │ │ ├── lv_test_obj │ │ │ │ ├── lv_test_obj.c │ │ │ │ ├── lv_test_obj.h │ │ │ │ ├── lv_test_obj.mk │ │ │ │ └── lv_test_object_1.png │ │ │ ├── lv_test_objx │ │ │ │ ├── lv_test_arc │ │ │ │ │ ├── lv_test_arc.c │ │ │ │ │ ├── lv_test_arc.h │ │ │ │ │ ├── lv_test_arc.mk │ │ │ │ │ └── lv_test_arc_1.png │ │ │ │ ├── lv_test_bar │ │ │ │ │ ├── lv_test_bar.c │ │ │ │ │ ├── lv_test_bar.h │ │ │ │ │ ├── lv_test_bar.mk │ │ │ │ │ └── lv_test_bar_1.png │ │ │ │ ├── lv_test_btn │ │ │ │ │ ├── lv_test_btn.c │ │ │ │ │ ├── lv_test_btn.h │ │ │ │ │ ├── lv_test_btn.mk │ │ │ │ │ └── lv_test_btn_1.png │ │ │ │ ├── lv_test_btnm │ │ │ │ │ ├── lv_test_btnm.c │ │ │ │ │ ├── lv_test_btnm.h │ │ │ │ │ ├── lv_test_btnm.mk │ │ │ │ │ └── lv_test_btnm_1.png │ │ │ │ ├── lv_test_cb │ │ │ │ │ ├── lv_test_cb.c │ │ │ │ │ ├── lv_test_cb.h │ │ │ │ │ ├── lv_test_cb.mk │ │ │ │ │ └── lv_test_cb_1.png │ │ │ │ ├── lv_test_chart │ │ │ │ │ ├── lv_test_chart.c │ │ │ │ │ ├── lv_test_chart.h │ │ │ │ │ ├── lv_test_chart.mk │ │ │ │ │ └── lv_test_chart_1.png │ │ │ │ ├── lv_test_cont │ │ │ │ │ ├── lv_test_cont.c │ │ │ │ │ ├── lv_test_cont.h │ │ │ │ │ ├── lv_test_cont.mk │ │ │ │ │ ├── lv_test_cont_1.png │ │ │ │ │ └── lv_test_cont_2.png │ │ │ │ ├── lv_test_ddlist │ │ │ │ │ ├── lv_test_ddlist.c │ │ │ │ │ ├── lv_test_ddlist.h │ │ │ │ │ ├── lv_test_ddlist.mk │ │ │ │ │ └── lv_test_ddlist_1.png │ │ │ │ ├── lv_test_gauge │ │ │ │ │ ├── lv_test_gauge.c │ │ │ │ │ ├── lv_test_gauge.h │ │ │ │ │ ├── lv_test_gauge.mk │ │ │ │ │ └── lv_test_gauge_1.png │ │ │ │ ├── lv_test_img │ │ │ │ │ ├── flower_icon.png │ │ │ │ │ ├── img_flower_icon.c │ │ │ │ │ ├── lv_test_img.c │ │ │ │ │ ├── lv_test_img.h │ │ │ │ │ ├── lv_test_img.mk │ │ │ │ │ └── lv_test_img_1.png │ │ │ │ ├── lv_test_imgbtn │ │ │ │ │ ├── imgbtn_img_1.c │ │ │ │ │ ├── imgbtn_img_2.c │ │ │ │ │ ├── imgbtn_img_3.c │ │ │ │ │ ├── imgbtn_img_4.c │ │ │ │ │ ├── lv_test_imgbtn.c │ │ │ │ │ ├── lv_test_imgbtn.h │ │ │ │ │ ├── lv_test_imgbtn.mk │ │ │ │ │ └── lv_test_imgbtn_1.png │ │ │ │ ├── lv_test_kb │ │ │ │ │ ├── lv_test_kb.c │ │ │ │ │ ├── lv_test_kb.h │ │ │ │ │ ├── lv_test_kb.mk │ │ │ │ │ ├── lv_test_kb_1.png │ │ │ │ │ └── lv_test_kb_2.png │ │ │ │ ├── lv_test_label │ │ │ │ │ ├── lv_test_label.c │ │ │ │ │ ├── lv_test_label.h │ │ │ │ │ ├── lv_test_label.mk │ │ │ │ │ ├── lv_test_label_1.png │ │ │ │ │ ├── lv_test_label_2.png │ │ │ │ │ ├── lv_test_label_3.png │ │ │ │ │ └── lv_test_label_4.png │ │ │ │ ├── lv_test_led │ │ │ │ │ ├── lv_test_led.c │ │ │ │ │ ├── lv_test_led.h │ │ │ │ │ ├── lv_test_led.mk │ │ │ │ │ └── lv_test_led_1.png │ │ │ │ ├── lv_test_line │ │ │ │ │ ├── lv_test_line.c │ │ │ │ │ ├── lv_test_line.h │ │ │ │ │ ├── lv_test_line.mk │ │ │ │ │ └── lv_test_line_1.png │ │ │ │ ├── lv_test_list │ │ │ │ │ ├── lv_test_list.c │ │ │ │ │ ├── lv_test_list.h │ │ │ │ │ ├── lv_test_list.mk │ │ │ │ │ └── lv_test_list_1.png │ │ │ │ ├── lv_test_lmeter │ │ │ │ │ ├── lv_test_lmeter.c │ │ │ │ │ ├── lv_test_lmeter.h │ │ │ │ │ ├── lv_test_lmeter.mk │ │ │ │ │ └── lv_test_lmeter_1.png │ │ │ │ ├── lv_test_mbox │ │ │ │ │ ├── lv_test_mbox.c │ │ │ │ │ ├── lv_test_mbox.h │ │ │ │ │ ├── lv_test_mbox.mk │ │ │ │ │ └── lv_test_mbox_1.png │ │ │ │ ├── lv_test_page │ │ │ │ │ ├── lv_test_page.c │ │ │ │ │ ├── lv_test_page.h │ │ │ │ │ ├── lv_test_page.mk │ │ │ │ │ ├── lv_test_page_1.png │ │ │ │ │ └── lv_test_page_2.png │ │ │ │ ├── lv_test_preload │ │ │ │ │ ├── lv_test_preload.c │ │ │ │ │ ├── lv_test_preload.h │ │ │ │ │ ├── lv_test_preload.mk │ │ │ │ │ └── lv_test_preload_1.png │ │ │ │ ├── lv_test_roller │ │ │ │ │ ├── lv_test_roller.c │ │ │ │ │ ├── lv_test_roller.h │ │ │ │ │ ├── lv_test_roller.mk │ │ │ │ │ └── lv_test_roller_1.png │ │ │ │ ├── lv_test_slider │ │ │ │ │ ├── lv_test_slider.c │ │ │ │ │ ├── lv_test_slider.h │ │ │ │ │ ├── lv_test_slider.mk │ │ │ │ │ └── lv_test_slider_1.png │ │ │ │ ├── lv_test_sw │ │ │ │ │ ├── lv_test_sw.c │ │ │ │ │ ├── lv_test_sw.h │ │ │ │ │ ├── lv_test_sw.mk │ │ │ │ │ └── lv_test_sw_1.png │ │ │ │ ├── lv_test_ta │ │ │ │ │ ├── lv_test_ta.c │ │ │ │ │ ├── lv_test_ta.h │ │ │ │ │ ├── lv_test_ta.mk │ │ │ │ │ ├── lv_test_ta_1.png │ │ │ │ │ └── lv_test_ta_2.png │ │ │ │ ├── lv_test_table │ │ │ │ │ ├── lv_test_table.c │ │ │ │ │ ├── lv_test_table.h │ │ │ │ │ ├── lv_test_table.mk │ │ │ │ │ ├── lv_test_table_1.png │ │ │ │ │ └── lv_test_table_2.png │ │ │ │ ├── lv_test_tabview │ │ │ │ │ ├── lv_test_tabview.c │ │ │ │ │ ├── lv_test_tabview.h │ │ │ │ │ ├── lv_test_tabview.mk │ │ │ │ │ └── lv_test_tabview_1.png │ │ │ │ ├── lv_test_tileview │ │ │ │ │ ├── lv_test_tileview.c │ │ │ │ │ ├── lv_test_tileview.h │ │ │ │ │ ├── lv_test_tileview.mk │ │ │ │ │ └── lv_test_tileview_1.gif │ │ │ │ └── lv_test_win │ │ │ │ │ ├── lv_test_win.c │ │ │ │ │ ├── lv_test_win.h │ │ │ │ │ ├── lv_test_win.mk │ │ │ │ │ └── lv_test_win_1.png │ │ │ ├── lv_test_stress │ │ │ │ ├── lv_test_stress.c │ │ │ │ ├── lv_test_stress.h │ │ │ │ ├── lv_test_stress.mk │ │ │ │ └── lv_test_stress.png │ │ │ └── lv_test_theme │ │ │ │ ├── lv_test_theme.mk │ │ │ │ ├── lv_test_theme_1.c │ │ │ │ ├── lv_test_theme_1.h │ │ │ │ ├── lv_test_theme_1.png │ │ │ │ ├── lv_test_theme_2.c │ │ │ │ ├── lv_test_theme_2.h │ │ │ │ └── lv_test_theme_2.png │ │ └── lv_tutorial │ │ │ ├── 0_porting │ │ │ ├── lv_tutorial_porting.c │ │ │ ├── lv_tutorial_porting.h │ │ │ └── lv_tutorial_porting.mk │ │ │ ├── 10_keyboard │ │ │ ├── lv_tutorial_keyboard.c │ │ │ ├── lv_tutorial_keyboard.h │ │ │ └── lv_tutorial_keyboard.mk │ │ │ ├── 1_hello_world │ │ │ ├── lv_tutorial_hello_world.c │ │ │ ├── lv_tutorial_hello_world.h │ │ │ └── lv_tutorial_hello_world.mk │ │ │ ├── 2_objects │ │ │ ├── lv_tutorial_objects.c │ │ │ ├── lv_tutorial_objects.h │ │ │ └── lv_tutorial_objects.mk │ │ │ ├── 3_styles │ │ │ ├── lv_tutorial_styles.c │ │ │ ├── lv_tutorial_styles.h │ │ │ └── lv_tutorial_styles.mk │ │ │ ├── 4_themes │ │ │ ├── lv_tutorial_themes.c │ │ │ ├── lv_tutorial_themes.h │ │ │ └── lv_tutorial_themes.mk │ │ │ ├── 5_antialiasing │ │ │ ├── apple.png │ │ │ ├── apple_chroma.png │ │ │ ├── apple_icon_alpha.c │ │ │ ├── apple_icon_chroma.c │ │ │ ├── lv_tutorial_antialiasing.c │ │ │ ├── lv_tutorial_antialiasing.h │ │ │ └── lv_tutorial_antialiasing.mk │ │ │ ├── 6_images │ │ │ ├── blue_flower.jpg │ │ │ ├── blue_flower_16.bin │ │ │ ├── blue_flower_16_swap.bin │ │ │ ├── blue_flower_32.bin │ │ │ ├── blue_flower_8.bin │ │ │ ├── lv_tutorial_images.c │ │ │ ├── lv_tutorial_images.h │ │ │ ├── lv_tutorial_images.mk │ │ │ ├── red_flower.c │ │ │ └── red_flower.png │ │ │ ├── 7_fonts │ │ │ ├── arial_ascii_20.c │ │ │ ├── arial_cyrillic_20.c │ │ │ ├── arial_math_20.c │ │ │ ├── lv_tutorial_fonts.c │ │ │ ├── lv_tutorial_fonts.h │ │ │ └── lv_tutorial_fonts.mk │ │ │ ├── 8_animations │ │ │ ├── lv_tutorial_animations.c │ │ │ ├── lv_tutorial_animations.h │ │ │ └── lv_tutorial_animations.mk │ │ │ └── 9_responsive │ │ │ ├── lv_tutorial_responsive.c │ │ │ ├── lv_tutorial_responsive.h │ │ │ └── lv_tutorial_responsive.mk │ ├── lv_fonts │ │ ├── lv_font_builtin.c │ │ ├── lv_font_builtin.h │ │ ├── lv_font_dejavu_10.c │ │ ├── lv_font_dejavu_10_cyrillic.c │ │ ├── lv_font_dejavu_10_latin_sup.c │ │ ├── lv_font_dejavu_20.c │ │ ├── lv_font_dejavu_20_cyrillic.c │ │ ├── lv_font_dejavu_20_latin_sup.c │ │ ├── lv_font_dejavu_30.c │ │ ├── lv_font_dejavu_30_cyrillic.c │ │ ├── lv_font_dejavu_30_latin_sup.c │ │ ├── lv_font_dejavu_40.c │ │ ├── lv_font_dejavu_40_cyrillic.c │ │ ├── lv_font_dejavu_40_latin_sup.c │ │ ├── lv_font_monospace_8.c │ │ ├── lv_font_symbol_10.c │ │ ├── lv_font_symbol_20.c │ │ ├── lv_font_symbol_30.c │ │ ├── lv_font_symbol_40.c │ │ └── lv_fonts.mk │ ├── lv_hal │ │ ├── lv_hal.h │ │ ├── lv_hal.mk │ │ ├── lv_hal_disp.c │ │ ├── lv_hal_disp.h │ │ ├── lv_hal_indev.c │ │ ├── lv_hal_indev.h │ │ ├── lv_hal_tick.c │ │ └── lv_hal_tick.h │ ├── lv_misc │ │ ├── lv_anim.c │ │ ├── lv_anim.h │ │ ├── lv_area.c │ │ ├── lv_area.h │ │ ├── lv_circ.c │ │ ├── lv_circ.h │ │ ├── lv_color.c │ │ ├── lv_color.h │ │ ├── lv_font.c │ │ ├── lv_font.h │ │ ├── lv_fs.c │ │ ├── lv_fs.h │ │ ├── lv_ll.c │ │ ├── lv_ll.h │ │ ├── lv_log.c │ │ ├── lv_log.h │ │ ├── lv_math.c │ │ ├── lv_math.h │ │ ├── lv_mem.c │ │ ├── lv_mem.h │ │ ├── lv_misc.mk │ │ ├── lv_symbol_def.h │ │ ├── lv_task.c │ │ ├── lv_task.h │ │ ├── lv_templ.c │ │ ├── lv_templ.h │ │ ├── lv_txt.c │ │ ├── lv_txt.h │ │ ├── lv_ufs.c │ │ └── lv_ufs.h │ ├── lv_objx │ │ ├── lv_arc.c │ │ ├── lv_arc.h │ │ ├── lv_bar.c │ │ ├── lv_bar.h │ │ ├── lv_btn.c │ │ ├── lv_btn.h │ │ ├── lv_btnm.c │ │ ├── lv_btnm.h │ │ ├── lv_calendar.c │ │ ├── lv_calendar.h │ │ ├── lv_cb.c │ │ ├── lv_cb.h │ │ ├── lv_chart.c │ │ ├── lv_chart.h │ │ ├── lv_cont.c │ │ ├── lv_cont.h │ │ ├── lv_ddlist.c │ │ ├── lv_ddlist.h │ │ ├── lv_gauge.c │ │ ├── lv_gauge.h │ │ ├── lv_img.c │ │ ├── lv_img.h │ │ ├── lv_imgbtn.c │ │ ├── lv_imgbtn.h │ │ ├── lv_kb.c │ │ ├── lv_kb.h │ │ ├── lv_label.c │ │ ├── lv_label.h │ │ ├── lv_led.c │ │ ├── lv_led.h │ │ ├── lv_line.c │ │ ├── lv_line.h │ │ ├── lv_list.c │ │ ├── lv_list.h │ │ ├── lv_lmeter.c │ │ ├── lv_lmeter.h │ │ ├── lv_mbox.c │ │ ├── lv_mbox.h │ │ ├── lv_objx.mk │ │ ├── lv_objx_templ.c │ │ ├── lv_objx_templ.h │ │ ├── lv_page.c │ │ ├── lv_page.h │ │ ├── lv_preload.c │ │ ├── lv_preload.h │ │ ├── lv_roller.c │ │ ├── lv_roller.h │ │ ├── lv_slider.c │ │ ├── lv_slider.h │ │ ├── lv_sw.c │ │ ├── lv_sw.h │ │ ├── lv_ta.c │ │ ├── lv_ta.h │ │ ├── lv_tabview.c │ │ ├── lv_tabview.h │ │ ├── lv_win.c │ │ └── lv_win.h │ ├── lv_themes │ │ ├── lv_theme.c │ │ ├── lv_theme.h │ │ ├── lv_theme_alien.c │ │ ├── lv_theme_alien.h │ │ ├── lv_theme_default.c │ │ ├── lv_theme_default.h │ │ ├── lv_theme_material.c │ │ ├── lv_theme_material.h │ │ ├── lv_theme_mono.c │ │ ├── lv_theme_mono.h │ │ ├── lv_theme_nemo.c │ │ ├── lv_theme_nemo.h │ │ ├── lv_theme_night.c │ │ ├── lv_theme_night.h │ │ ├── lv_theme_templ.c │ │ ├── lv_theme_templ.h │ │ ├── lv_theme_zen.c │ │ ├── lv_theme_zen.h │ │ └── lv_themes.mk │ └── lvgl.h ├── main.c └── ns2009 │ ├── mean.c │ ├── mean.h │ ├── median.c │ ├── median.h │ ├── ns2009.c │ ├── ns2009.h │ ├── tscal.c │ ├── tscal.h │ ├── tsfilter.c │ └── tsfilter.h ├── mic_play ├── README.md ├── main.c └── mic_play.bin ├── mnist ├── board_config.h ├── burn_model.sh ├── flash-list.json ├── font.h ├── incbin.h ├── lcd.c ├── lcd.h ├── m.kmodel ├── main.c ├── mnist.bin ├── nt35310.c ├── nt35310.h ├── ov2640.c ├── ov2640.h ├── pack_model.sh ├── w25qxx.c └── w25qxx.h ├── sd_card ├── board_config.h ├── ccsbcs.c ├── diskio.c ├── diskio.h ├── ff.c ├── ff.h ├── ffconf.h ├── integer.h ├── main.c ├── sd_card.bin ├── sdcard.c ├── sdcard.h ├── wav_decode.c └── wav_decode.h └── wav_test ├── main.c ├── wav.h ├── wav_decode.c ├── wav_decode.h └── wav_test.bin /.gitignore: -------------------------------------------------------------------------------- 1 | .vscode 2 | build/ 3 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "src/lvgl/lvgl"] 2 | path = src/lvgl/lvgl 3 | url = https://github.com/littlevgl/lvgl.git 4 | -------------------------------------------------------------------------------- /.vscode/ipch/386eab4720923aef/mmap_address.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sipeed/LicheeDan_K210_examples/0b121730109d465ef04590b5cb2d5a905943fcf5/.vscode/ipch/386eab4720923aef/mmap_address.bin -------------------------------------------------------------------------------- /CMakeLists.txt: -------------------------------------------------------------------------------- 1 | ### This file is used for build example projects. 2 | 3 | # set this will supress some warnings 4 | set(BUILDING_SDK "yes" CACHE INTERNAL "") 5 | 6 | # basic config 7 | if (NOT PROJ) 8 | get_filename_component(PROJ ${CMAKE_CURRENT_BINARY_DIR} DIRECTORY) 9 | get_filename_component(PROJ ${PROJ} NAME) 10 | string(REPLACE " " "_" PROJ ${PROJ}) 11 | message(STATUS "PROJ not set, use ${PROJ} as PROJ. Also, you can set it manually. e.g. -DPROJ=hello_world") 12 | else() 13 | message("PROJ = ${PROJ}") 14 | endif () 15 | cmake_minimum_required(VERSION 3.0) 16 | include(./cmake/common.cmake) 17 | project(${PROJ} C CXX ASM) 18 | 19 | # config self use headers 20 | include(./cmake/macros.internal.cmake) 21 | header_directories(${SDK_ROOT}/lib) 22 | header_directories(src/${PROJ}) 23 | header_directories(kendryte-standalone-demo/${PROJ}) 24 | # build library first 25 | add_subdirectory(lib) 26 | 27 | # compile project 28 | add_source_files(src/${PROJ}/*.c src/${PROJ}/*.s src/${PROJ}/*.S src/${PROJ}/*.cpp) 29 | add_source_files(kendryte-standalone-demo/${PROJ}/*.c kendryte-standalone-demo/${PROJ}/*.s kendryte-standalone-demo/${PROJ}/*.S kendryte-standalone-demo/${PROJ}/*.cpp) 30 | include(./cmake/executable.cmake) 31 | 32 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | LicheeDan_K210_examples 2 | ====== 3 | Use the Kendryte K210 standalone SDK commitid d13b38098a3598b0018c38590387e43953efd140 4 | and should use gcc-8.2. This can be download at https://kendryte.com/downloads/] 5 | 6 | Kendryte official standalone sdk demo 7 | ====== 8 | You can find the official standalone sdk demo at https://github.com/kendryte/kendryte-standalone-demo.git 9 | It has not been tested on Sipeed board. so you must test it by yourself. 10 | 11 | Demo instruction 12 | ====== 13 | 14 | The following demos have been tested: 15 | 16 | ##### hello_world -- uart output hello_world 17 | ##### lcd -- lcd display 18 | ##### dvp_ov -- dvp output to lcd 19 | ##### gpiohs_led -- press key boot change led blue 20 | ##### ai_dmeo_sim -- k210 ai demo sim 21 | ##### lvgl -- lvgl demo on maix go 22 | ##### mic_play -- mic record, speak play 23 | ##### wav_test -- test wav decode, speak play 24 | ##### kpu_conv -- kpu demo 25 | ##### dace_detect_kmodel_flash -- load kmodel from flash 26 | 27 | Kendryte K210 standalone SDK 28 | ====== 29 | 30 | This SDK is for Kendryte K210 without OS support. 31 | If you have any questions, please be free to contact us. 32 | 33 | # Usage 34 | 35 | If you want to start a new project, for instance, `hello_world`, you only need to: 36 | 37 | `mkdir` your project in `src/`, `cd src && mkdir hello_world`, then put your codes in it, and build it. 38 | 39 | ```shell 40 | mkdir build && cd build 41 | cmake .. -DPROJ= -DTOOLCHAIN=/opt/riscv-toolchain/bin && make 42 | ``` 43 | 44 | You will get 2 key files, `hello_world` and `hello_world.bin`. 45 | 46 | 1. If you are using JLink to run or debug your program, use `hello_world` 47 | 2. If you want to flash it in UOG, using `hello_world.bin`, then using flash-tool(s) burn .bin to your flash. 48 | 49 | This is very important, don't make a mistake in files. 50 | -------------------------------------------------------------------------------- /brun.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | K210_BIN_PATH=`pwd`/build 4 | 5 | ##here you shoule change for your path 6 | BRUN_SCRIPT_PATH=/home/xel/K210/pyScript 7 | 8 | bin_file=$K210_BIN_PATH"/"$1".bin" 9 | 10 | echo $bin_file 11 | 12 | cd $BRUN_SCRIPT_PATH 13 | 14 | if [ ! -n "$2" ] ;then 15 | python3 isp.py -b 115200 $bin_file -d /dev/ttyUSB0 16 | else 17 | python3 isp.py -b 115200 $bin_file -d $2 18 | fi 19 | 20 | -------------------------------------------------------------------------------- /brun_auto.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if [ ! -n "$1" ] ;then 4 | echo "you have to select a Bin File!" 5 | exit 6 | fi 7 | 8 | K210_BIN_PATH=`pwd`/build 9 | 10 | ##here you shoule change for your path 11 | BRUN_SCRIPT_PATH=/home/xel/K210/pyScript 12 | 13 | bin_file=$K210_BIN_PATH"/"$1".bin" 14 | 15 | echo $bin_file 16 | 17 | cd $BRUN_SCRIPT_PATH 18 | 19 | if [ ! -n "$2" ] ;then 20 | python3 kflash.py -b 1000000 $bin_file -d /dev/ttyUSB0 21 | else 22 | python3 kflash.py -b 1000000 $bin_file -d $2 23 | fi 24 | 25 | -------------------------------------------------------------------------------- /cmake/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | ### This file is used for build library standalone. 2 | 3 | # set this will supress some warnings 4 | set(BUILDING_SDK "yes" CACHE INTERNAL "") 5 | 6 | # basic config 7 | cmake_minimum_required(VERSION 3.0) 8 | include(./common.cmake) 9 | project(kendryte) 10 | 11 | # config self use headers 12 | include(./macros.internal.cmake) 13 | header_directories(${SDK_ROOT}/lib) 14 | 15 | # include lib make file 16 | include(../lib/CMakeLists.txt) 17 | 18 | # find headers files to INSTALL 19 | file(GLOB_RECURSE LIB_HEADERS 20 | "../lib/*.h" 21 | "../lib/*.hpp" 22 | ) 23 | set_target_properties(kendryte PROPERTIES PUBLIC_HEADER "${LIB_HEADERS}") 24 | 25 | # copy .a file and headers 26 | install(TARGETS kendryte 27 | EXPORT kendryte 28 | ARCHIVE 29 | DESTINATION ${CMAKE_BINARY_DIR}/archive 30 | PUBLIC_HEADER DESTINATION ${CMAKE_BINARY_DIR}/archive/include 31 | ) 32 | 33 | # copy utils files 34 | install(DIRECTORY 35 | ../lds 36 | ../utils 37 | ../cmake 38 | DESTINATION ${CMAKE_BINARY_DIR}/archive 39 | PATTERN "*internal*" EXCLUDE 40 | PATTERN "CMakeLists.txt" EXCLUDE 41 | ) 42 | 43 | # show information 44 | include(./dump-config.cmake) 45 | -------------------------------------------------------------------------------- /cmake/README.md: -------------------------------------------------------------------------------- 1 | prepend `common.cmake` before 2 | 3 | append `executable.cmake` after 4 | -------------------------------------------------------------------------------- /cmake/common.cmake: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.0) 2 | 3 | include(${CMAKE_CURRENT_LIST_DIR}/macros.cmake) 4 | 5 | global_set(CMAKE_C_COMPILER_WORKS 1) 6 | global_set(CMAKE_CXX_COMPILER_WORKS 1) 7 | 8 | global_set(CMAKE_SYSTEM_NAME "Generic") 9 | if (NOT CMAKE_BUILD_TYPE) 10 | global_set(CMAKE_BUILD_TYPE Debug) 11 | else () 12 | if ((NOT CMAKE_BUILD_TYPE STREQUAL "Debug") AND (NOT CMAKE_BUILD_TYPE STREQUAL "Release")) 13 | message(FATAL_ERROR "CMAKE_BUILD_TYPE must either be Debug or Release instead of ${CMAKE_BUILD_TYPE}") 14 | endif () 15 | endif () 16 | 17 | # - Debug & Release 18 | IF (CMAKE_BUILD_TYPE STREQUAL Debug) 19 | add_definitions(-DDEBUG=1) 20 | ENDIF () 21 | 22 | # definitions in macros 23 | add_definitions(-DCONFIG_LOG_LEVEL=LOG_VERBOSE -DCONFIG_LOG_ENABLE -DCONFIG_LOG_COLORS -DLOG_KERNEL -D__riscv64 -DLV_CONF_INCLUDE_SIMPLE) 24 | 25 | if (NOT SDK_ROOT) 26 | get_filename_component(_SDK_ROOT ${CMAKE_CURRENT_LIST_DIR} DIRECTORY) 27 | global_set(SDK_ROOT ${_SDK_ROOT}) 28 | endif () 29 | 30 | include(${CMAKE_CURRENT_LIST_DIR}/toolchain.cmake) 31 | 32 | include(${CMAKE_CURRENT_LIST_DIR}/compile-flags.cmake) 33 | 34 | include(${CMAKE_CURRENT_LIST_DIR}/fix-9985.cmake) 35 | -------------------------------------------------------------------------------- /cmake/compile-flags.cmake: -------------------------------------------------------------------------------- 1 | add_compile_flags(LD 2 | -nostartfiles 3 | -static 4 | -Wl,--gc-sections 5 | -Wl,-static 6 | -Wl,--start-group 7 | -Wl,--whole-archive 8 | -Wl,--no-whole-archive 9 | -Wl,--end-group 10 | -Wl,-EL 11 | -Wl,--no-relax 12 | -T ${SDK_ROOT}/lds/kendryte.ld 13 | ) 14 | 15 | # C Flags Settings 16 | add_compile_flags(BOTH 17 | -mcmodel=medany 18 | -mabi=lp64f 19 | -march=rv64imafc 20 | -fno-common 21 | -ffunction-sections 22 | -fdata-sections 23 | -fstrict-volatile-bitfields 24 | -fno-zero-initialized-in-bss 25 | -Os 26 | -ggdb 27 | -ffloat-store 28 | ) 29 | 30 | add_compile_flags(C -std=gnu11 -Wno-pointer-to-int-cast) 31 | add_compile_flags(CXX -std=gnu++17) 32 | 33 | if (BUILDING_SDK) 34 | add_compile_flags(BOTH 35 | -Wall 36 | -Werror=all 37 | -Wno-error=unused-function 38 | -Wno-error=unused-but-set-variable 39 | -Wno-error=unused-variable 40 | -Wno-error=deprecated-declarations 41 | -Wextra 42 | -Werror=frame-larger-than=65536 43 | -Wno-unused-parameter 44 | -Wno-sign-compare 45 | -Wno-error=missing-braces 46 | -Wno-error=return-type 47 | -Wno-error=pointer-sign 48 | -Wno-missing-braces 49 | -Wno-strict-aliasing 50 | -Wno-implicit-fallthrough 51 | -Wno-missing-field-initializers 52 | -Wno-int-to-pointer-cast 53 | -Wno-error=comment 54 | -Wno-error=logical-not-parentheses 55 | -Wno-error=duplicate-decl-specifier 56 | -Wno-error=parentheses 57 | ) 58 | 59 | add_compile_flags(C -Wno-old-style-declaration) 60 | else () 61 | add_compile_flags(BOTH -L${SDK_ROOT}/include/) 62 | endif () 63 | 64 | -------------------------------------------------------------------------------- /cmake/dump-config.cmake: -------------------------------------------------------------------------------- 1 | message("") 2 | message("Project: ${PROJECT_NAME}") 3 | message(" LIST_FILE=${CMAKE_PARENT_LIST_FILE}") 4 | message(" TOOLCHAIN=${TOOLCHAIN}") 5 | message(" KENDRYTE_IDE=${KENDRYTE_IDE}") 6 | message(" BUILDING_SDK=${BUILDING_SDK}") 7 | message("") 8 | message(" CMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}") 9 | message(" CMAKE_C_COMPILER=${CMAKE_C_COMPILER}") 10 | message(" CMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}") 11 | message(" CMAKE_LINKER=${CMAKE_LINKER}") 12 | message(" CMAKE_OBJCOPY=${CMAKE_OBJCOPY}") 13 | message(" CMAKE_OBJDUMP=${CMAKE_OBJDUMP}") 14 | message(" CMAKE_MAKE_PROGRAM=${CMAKE_MAKE_PROGRAM}") 15 | message("") 16 | message(" CMAKE_C_FLAGS=${CMAKE_C_FLAGS}") 17 | message(" CMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS}") 18 | message(" LDFLAGS=${LDFLAGS}") 19 | message(" CMAKE_BINARY_DIR=${CMAKE_BINARY_DIR}") 20 | message("Makefile created.") 21 | message("") 22 | message("") 23 | -------------------------------------------------------------------------------- /cmake/executable.cmake: -------------------------------------------------------------------------------- 1 | if (NOT BUILDING_SDK) 2 | add_library(kendryte STATIC IMPORTED) 3 | set_property(TARGET kendryte PROPERTY IMPORTED_LOCATION ${SDK_ROOT}/libkendryte.a) 4 | include_directories(${SDK_ROOT}/include/) 5 | endif () 6 | 7 | removeDuplicateSubstring(${CMAKE_C_FLAGS} CMAKE_C_FLAGS) 8 | removeDuplicateSubstring(${CMAKE_CXX_FLAGS} CMAKE_CXX_FLAGS) 9 | 10 | message("SOURCE_FILES=${SOURCE_FILES}") 11 | add_executable(${PROJECT_NAME} ${SOURCE_FILES}) 12 | 13 | 14 | set_target_properties(${PROJECT_NAME} PROPERTIES LINKER_LANGUAGE C) 15 | 16 | target_link_libraries(${PROJECT_NAME} 17 | -Wl,--start-group 18 | gcc m c 19 | -Wl,--whole-archive 20 | kendryte 21 | -Wl,--no-whole-archive 22 | -Wl,--end-group 23 | ) 24 | 25 | IF(SUFFIX) 26 | SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES SUFFIX ${SUFFIX}) 27 | ENDIF() 28 | 29 | # Build target 30 | add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD 31 | COMMAND ${CMAKE_OBJCOPY} --output-format=binary ${CMAKE_BINARY_DIR}/${PROJECT_NAME}${SUFFIX} ${CMAKE_BINARY_DIR}/${PROJECT_NAME}.bin 32 | DEPENDS ${PROJECT_NAME} 33 | COMMENT "Generating .bin file ...") 34 | 35 | # show information 36 | include(${CMAKE_CURRENT_LIST_DIR}/dump-config.cmake) 37 | -------------------------------------------------------------------------------- /cmake/fix-9985.cmake: -------------------------------------------------------------------------------- 1 | ### http://www.cmake.org/Bug/view.php?id=9985 2 | string(REPLACE "-rdynamic" "" CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "${CMAKE_SHARED_LIBRARY_LINK_C_FLAGS}") 3 | string(REPLACE "-rdynamic" "" CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS "${CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS}") 4 | -------------------------------------------------------------------------------- /cmake/macros.internal.cmake: -------------------------------------------------------------------------------- 1 | # Add lib headers 2 | macro(header_directories parent) 3 | file(GLOB_RECURSE newList ${parent}/*.h) 4 | set(dir_list "") 5 | foreach (file_path ${newList}) 6 | get_filename_component(dir_path ${file_path} DIRECTORY) 7 | set(dir_list ${dir_list} ${dir_path}) 8 | endforeach () 9 | list(REMOVE_DUPLICATES dir_list) 10 | 11 | include_directories(${dir_list}) 12 | endmacro() -------------------------------------------------------------------------------- /gdb.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | ##here you shoule change for your path 4 | gdb=/home/xel/kendryte-toolchain-8.2/bin/riscv64-unknown-elf-gdb 5 | 6 | $gdb -ex "set remotetimeout 240" -ex "target extended-remote localhost:3333" -ex "monitor reset halt" -ex "load" $1 7 | -------------------------------------------------------------------------------- /lib/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | #project(maix_drivers) 2 | 3 | # create driver library 4 | 5 | FILE(GLOB_RECURSE LIB_SRC 6 | "${CMAKE_CURRENT_LIST_DIR}/*.h" 7 | "${CMAKE_CURRENT_LIST_DIR}/*.hpp" 8 | "${CMAKE_CURRENT_LIST_DIR}/*.cpp" 9 | "${CMAKE_CURRENT_LIST_DIR}/*.c" 10 | "${CMAKE_CURRENT_LIST_DIR}/*.s" 11 | "${CMAKE_CURRENT_LIST_DIR}/*.S" 12 | ) 13 | 14 | FILE(GLOB_RECURSE ASSEMBLY_FILES 15 | "${CMAKE_CURRENT_LIST_DIR}/*.s" 16 | "${CMAKE_CURRENT_LIST_DIR}/*.S" 17 | ) 18 | 19 | include_directories(${CMAKE_CURRENT_LIST_DIR}/drivers/include ${CMAKE_CURRENT_LIST_DIR}/bsp/include) 20 | 21 | SET_PROPERTY(SOURCE ${ASSEMBLY_FILES} PROPERTY LANGUAGE C) 22 | SET_SOURCE_FILES_PROPERTIES(${ASSEMBLY_FILES} PROPERTIES COMPILE_FLAGS "-x assembler-with-cpp -D __riscv64") 23 | 24 | ADD_LIBRARY(kendryte 25 | ${LIB_SRC} 26 | ) 27 | SET_TARGET_PROPERTIES(kendryte PROPERTIES LINKER_LANGUAGE C) 28 | -------------------------------------------------------------------------------- /lib/bsp/entry.c: -------------------------------------------------------------------------------- 1 | /* Copyright 2018 Canaan Inc. 2 | * 3 | * Licensed under the Apache License, Version 2.0 (the "License"); 4 | * you may not use this file except in compliance with the License. 5 | * You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software 10 | * distributed under the License is distributed on an "AS IS" BASIS, 11 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | * See the License for the specific language governing permissions and 13 | * limitations under the License. 14 | */ 15 | 16 | #include "entry.h" 17 | 18 | /** 19 | * @brief Dummy function for __libc_init_array called 20 | */ 21 | void __attribute__((weak)) _init(void) 22 | { 23 | /** 24 | * These don't have to do anything since we use init_array/fini_array. 25 | */ 26 | } 27 | 28 | /** 29 | * @brief Dummy function for __libc_fini_array called 30 | */ 31 | void __attribute__((weak)) _fini(void) 32 | { 33 | /** 34 | * These don't have to do anything since we use init_array/fini_array. 35 | */ 36 | } 37 | 38 | -------------------------------------------------------------------------------- /lib/bsp/include/bsp.h: -------------------------------------------------------------------------------- 1 | #ifndef _KENDRYTE_BSP_H 2 | #define _KENDRYTE_BSP_H 3 | #include "atomic.h" 4 | #include "entry.h" 5 | #include "sleep.h" 6 | #include "encoding.h" 7 | #endif -------------------------------------------------------------------------------- /lib/bsp/include/interrupt.h: -------------------------------------------------------------------------------- 1 | /* Copyright 2018 Canaan Inc. 2 | * 3 | * Licensed under the Apache License, Version 2.0 (the "License"); 4 | * you may not use this file except in compliance with the License. 5 | * You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software 10 | * distributed under the License is distributed on an "AS IS" BASIS, 11 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | * See the License for the specific language governing permissions and 13 | * limitations under the License. 14 | */ 15 | 16 | #ifndef _BSP_INTERRUPT_H 17 | #define _BSP_INTERRUPT_H 18 | 19 | #ifdef __cplusplus 20 | extern "C" { 21 | #endif 22 | /* clang-format off */ 23 | /* Machine interrupt mask for 64 bit system, 0x8000 0000 0000 0000 */ 24 | #define CAUSE_MACHINE_IRQ_MASK (0x1ULL << 63) 25 | 26 | /* Machine interrupt reason mask for 64 bit system, 0x7FFF FFFF FFFF FFFF */ 27 | #define CAUSE_MACHINE_IRQ_REASON_MASK (CAUSE_MACHINE_IRQ_MASK - 1) 28 | 29 | /* Hypervisor interrupt mask for 64 bit system, 0x8000 0000 0000 0000 */ 30 | #define CAUSE_HYPERVISOR_IRQ_MASK (0x1ULL << 63) 31 | 32 | /* Hypervisor interrupt reason mask for 64 bit system, 0x7FFF FFFF FFFF FFFF */ 33 | #define CAUSE_HYPERVISOR_IRQ_REASON_MASK (CAUSE_HYPERVISOR_IRQ_MASK - 1) 34 | 35 | /* Supervisor interrupt mask for 64 bit system, 0x8000 0000 0000 0000 */ 36 | #define CAUSE_SUPERVISOR_IRQ_MASK (0x1ULL << 63) 37 | 38 | /* Supervisor interrupt reason mask for 64 bit system, 0x7FFF FFFF FFFF FFFF */ 39 | #define CAUSE_SUPERVISOR_IRQ_REASON_MASK (CAUSE_SUPERVISOR_IRQ_MASK - 1) 40 | /* clang-format on */ 41 | 42 | #ifdef __cplusplus 43 | } 44 | #endif 45 | 46 | #endif /* _BSP_INTERRUPT_H */ 47 | 48 | -------------------------------------------------------------------------------- /lib/bsp/include/sleep.h: -------------------------------------------------------------------------------- 1 | /* Copyright 2018 Canaan Inc. 2 | * 3 | * Licensed under the Apache License, Version 2.0 (the "License"); 4 | * you may not use this file except in compliance with the License. 5 | * You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software 10 | * distributed under the License is distributed on an "AS IS" BASIS, 11 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | * See the License for the specific language governing permissions and 13 | * limitations under the License. 14 | */ 15 | 16 | #ifndef _BSP_SLEEP_H 17 | #define _BSP_SLEEP_H 18 | 19 | #include "encoding.h" 20 | #include "clint.h" 21 | #include "syscalls.h" 22 | 23 | #ifdef __cplusplus 24 | extern "C" { 25 | #endif 26 | 27 | int usleep(uint64_t usec); 28 | int msleep(uint64_t msec); 29 | unsigned int sleep(unsigned int seconds); 30 | 31 | #ifdef __cplusplus 32 | } 33 | #endif 34 | 35 | #endif /* _BSP_SLEEP_H */ 36 | 37 | -------------------------------------------------------------------------------- /lib/bsp/include/syscalls.h: -------------------------------------------------------------------------------- 1 | /* Copyright 2018 Canaan Inc. 2 | * 3 | * Licensed under the Apache License, Version 2.0 (the "License"); 4 | * you may not use this file except in compliance with the License. 5 | * You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software 10 | * distributed under the License is distributed on an "AS IS" BASIS, 11 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | * See the License for the specific language governing permissions and 13 | * limitations under the License. 14 | */ 15 | 16 | #ifndef _BSP_SYSCALLS_H 17 | #define _BSP_SYSCALLS_H 18 | 19 | #include 20 | #include 21 | #include 22 | #include 23 | #include 24 | 25 | #ifdef __cplusplus 26 | extern "C" { 27 | #endif 28 | 29 | void __attribute__((noreturn)) sys_exit(int code); 30 | 31 | void setStats(int enable); 32 | 33 | #undef putchar 34 | int putchar(int ch); 35 | void printstr(const char *s); 36 | 37 | void printhex(uint64_t x); 38 | 39 | size_t get_free_heap_size(void); 40 | 41 | #ifdef __cplusplus 42 | } 43 | #endif 44 | 45 | #endif /* _BSP_SYSCALLS_H */ 46 | 47 | -------------------------------------------------------------------------------- /lib/bsp/sleep.c: -------------------------------------------------------------------------------- 1 | /* Copyright 2018 Canaan Inc. 2 | * 3 | * Licensed under the Apache License, Version 2.0 (the "License"); 4 | * you may not use this file except in compliance with the License. 5 | * You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software 10 | * distributed under the License is distributed on an "AS IS" BASIS, 11 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | * See the License for the specific language governing permissions and 13 | * limitations under the License. 14 | */ 15 | #include "sleep.h" 16 | #include "sysctl.h" 17 | 18 | int usleep(uint64_t usec) 19 | { 20 | uint64_t cycle = read_cycle(); 21 | uint64_t nop_all = usec * sysctl_clock_get_freq(SYSCTL_CLOCK_CPU) / 1000000UL; 22 | while (1) 23 | { 24 | if(read_cycle() - cycle >= nop_all) 25 | break; 26 | } 27 | return 0; 28 | } 29 | 30 | int msleep(uint64_t msec) 31 | { 32 | return (unsigned int)usleep(msec * 1000); 33 | } 34 | 35 | unsigned int sleep(unsigned int seconds) 36 | { 37 | return (unsigned int)msleep(seconds * 1000); 38 | } 39 | 40 | -------------------------------------------------------------------------------- /lib/drivers/include/gpio_common.h: -------------------------------------------------------------------------------- 1 | /* Copyright 2018 Canaan Inc. 2 | * 3 | * Licensed under the Apache License, Version 2.0 (the "License"); 4 | * you may not use this file except in compliance with the License. 5 | * You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software 10 | * distributed under the License is distributed on an "AS IS" BASIS, 11 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | * See the License for the specific language governing permissions and 13 | * limitations under the License. 14 | */ 15 | #ifndef _GPIO_COMMON_H 16 | #define _GPIO_COMMON_H 17 | 18 | #ifdef __cplusplus 19 | extern "C" { 20 | #endif 21 | 22 | typedef enum _gpio_drive_mode 23 | { 24 | GPIO_DM_INPUT, 25 | GPIO_DM_INPUT_PULL_DOWN, 26 | GPIO_DM_INPUT_PULL_UP, 27 | GPIO_DM_OUTPUT, 28 | } gpio_drive_mode_t; 29 | 30 | typedef enum _gpio_pin_edge 31 | { 32 | GPIO_PE_NONE, 33 | GPIO_PE_FALLING, 34 | GPIO_PE_RISING, 35 | GPIO_PE_BOTH, 36 | GPIO_PE_LOW, 37 | GPIO_PE_HIGH = 8, 38 | } gpio_pin_edge_t; 39 | 40 | typedef enum _gpio_pin_value 41 | { 42 | GPIO_PV_LOW, 43 | GPIO_PV_HIGH 44 | } gpio_pin_value_t; 45 | 46 | #ifdef __cplusplus 47 | } 48 | #endif 49 | 50 | #endif /* _GPIO_COMMON_H */ 51 | 52 | -------------------------------------------------------------------------------- /lib/drivers/sysclock.c: -------------------------------------------------------------------------------- 1 | /* Copyright 2018 Canaan Inc. 2 | * 3 | * Licensed under the Apache License, Version 2.0 (the "License"); 4 | * you may not use this file except in compliance with the License. 5 | * You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software 10 | * distributed under the License is distributed on an "AS IS" BASIS, 11 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | * See the License for the specific language governing permissions and 13 | * limitations under the License. 14 | */ 15 | #include "stdio.h" 16 | #include "sysctl.h" 17 | #include "uarths.h" 18 | 19 | -------------------------------------------------------------------------------- /lib/drivers/utils.c: -------------------------------------------------------------------------------- 1 | /* Copyright 2018 Canaan Inc. 2 | * 3 | * Licensed under the Apache License, Version 2.0 (the "License"); 4 | * you may not use this file except in compliance with the License. 5 | * You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software 10 | * distributed under the License is distributed on an "AS IS" BASIS, 11 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | * See the License for the specific language governing permissions and 13 | * limitations under the License. 14 | */ 15 | #include 16 | #include "encoding.h" 17 | #include "utils.h" 18 | 19 | void set_bit(volatile uint32_t *bits, uint32_t mask, uint32_t value) 20 | { 21 | uint32_t org = (*bits) & ~mask; 22 | *bits = org | (value & mask); 23 | } 24 | 25 | void set_bit_offset(volatile uint32_t *bits, uint32_t mask, size_t offset, uint32_t value) 26 | { 27 | set_bit(bits, mask << offset, value << offset); 28 | } 29 | 30 | void set_gpio_bit(volatile uint32_t *bits, size_t offset, uint32_t value) 31 | { 32 | set_bit_offset(bits, 1, offset, value); 33 | } 34 | 35 | uint32_t get_bit(volatile uint32_t *bits, uint32_t mask, size_t offset) 36 | { 37 | return ((*bits) & (mask << offset)) >> offset; 38 | } 39 | 40 | uint32_t get_gpio_bit(volatile uint32_t *bits, size_t offset) 41 | { 42 | return get_bit(bits, 1, offset); 43 | } 44 | 45 | -------------------------------------------------------------------------------- /lib/freertos/include/core_sync.h: -------------------------------------------------------------------------------- 1 | /* Copyright 2018 Canaan Inc. 2 | * 3 | * Licensed under the Apache License, Version 2.0 (the "License"); 4 | * you may not use this file except in compliance with the License. 5 | * You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software 10 | * distributed under the License is distributed on an "AS IS" BASIS, 11 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | * See the License for the specific language governing permissions and 13 | * limitations under the License. 14 | */ 15 | // 16 | // Core Synchronization 17 | 18 | #ifndef CORE_SYNC_H 19 | #define CORE_SYNC_H 20 | 21 | #include "FreeRTOS.h" 22 | 23 | #ifdef __cplusplus 24 | extern "C" 25 | { 26 | #endif 27 | 28 | typedef enum 29 | { 30 | CORE_SYNC_NONE, 31 | CORE_SYNC_ADD_TCB 32 | } core_sync_event_t; 33 | 34 | void core_sync_request_context_switch(uint64_t core_id); 35 | void core_sync_complete_context_switch(uint64_t core_id); 36 | void core_sync_complete(uint64_t core_id); 37 | int core_sync_is_in_progress(uint64_t core_id); 38 | 39 | #ifdef __cplusplus 40 | } 41 | #endif 42 | 43 | #endif /* CORE_SYNC_H */ 44 | -------------------------------------------------------------------------------- /lib/freertos/include/stdint.readme: -------------------------------------------------------------------------------- 1 | 2 | #ifndef FREERTOS_STDINT 3 | #define FREERTOS_STDINT 4 | 5 | /******************************************************************************* 6 | * THIS IS NOT A FULL stdint.h IMPLEMENTATION - It only contains the definitions 7 | * necessary to build the FreeRTOS code. It is provided to allow FreeRTOS to be 8 | * built using compilers that do not provide their own stdint.h definition. 9 | * 10 | * To use this file: 11 | * 12 | * 1) Copy this file into the directory that contains your FreeRTOSConfig.h 13 | * header file, as that directory will already be in the compilers include 14 | * path. 15 | * 16 | * 2) Rename the copied file stdint.h. 17 | * 18 | */ 19 | 20 | typedef signed char int8_t; 21 | typedef unsigned char uint8_t; 22 | typedef short int16_t; 23 | typedef unsigned short uint16_t; 24 | typedef long int32_t; 25 | typedef unsigned long uint32_t; 26 | 27 | #endif /* FREERTOS_STDINT */ 28 | -------------------------------------------------------------------------------- /lib/freertos/locks.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include "FreeRTOS.h" 4 | #include "semphr.h" 5 | #include "portmacro.h" 6 | #include "task.h" 7 | 8 | typedef long _lock_t; 9 | 10 | void _lock_init(_lock_t *lock) 11 | { 12 | } 13 | 14 | void _lock_init_recursive(_lock_t *lock) 15 | { 16 | } 17 | 18 | void _lock_close(_lock_t *lock) 19 | { 20 | } 21 | 22 | void _lock_close_recursive(_lock_t *lock) __attribute__((alias("_lock_close"))); 23 | 24 | void _lock_acquire(_lock_t *lock) 25 | { 26 | } 27 | 28 | void _lock_acquire_recursive(_lock_t *lock) 29 | { 30 | } 31 | 32 | int _lock_try_acquire(_lock_t *lock) 33 | { 34 | return 1; 35 | } 36 | 37 | int _lock_try_acquire_recursive(_lock_t *lock) 38 | { 39 | return 1; 40 | } 41 | 42 | void _lock_release(_lock_t *lock) 43 | { 44 | } 45 | 46 | void _lock_release_recursive(_lock_t *lock) 47 | { 48 | } 49 | -------------------------------------------------------------------------------- /lib/freertos/os_entry.c: -------------------------------------------------------------------------------- 1 | /* Copyright 2018 Canaan Inc. 2 | * 3 | * Licensed under the Apache License, Version 2.0 (the "License"); 4 | * you may not use this file except in compliance with the License. 5 | * You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software 10 | * distributed under the License is distributed on an "AS IS" BASIS, 11 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | * See the License for the specific language governing permissions and 13 | * limitations under the License. 14 | */ 15 | #include "FreeRTOS.h" 16 | #include "core_sync.h" 17 | #include "task.h" 18 | #include 19 | #include 20 | #include 21 | #include 22 | #include 23 | 24 | static StaticTask_t s_idle_task; 25 | static StackType_t s_idle_task_stack[configMINIMAL_STACK_SIZE]; 26 | 27 | void vApplicationIdleHook(void) 28 | { 29 | } 30 | 31 | void vApplicationGetIdleTaskMemory(StaticTask_t **ppxIdleTaskTCBBuffer, StackType_t **ppxIdleTaskStackBuffer, uint32_t *pulIdleTaskStackSize) 32 | { 33 | /* Pass out a pointer to the StaticTask_t structure in which the Idle task's 34 | state will be stored. */ 35 | *ppxIdleTaskTCBBuffer = &s_idle_task; 36 | 37 | /* Pass out the array that will be used as the Idle task's stack. */ 38 | *ppxIdleTaskStackBuffer = s_idle_task_stack; 39 | 40 | /* Pass out the size of the array pointed to by *ppxIdleTaskStackBuffer. 41 | Note that, as the array is necessarily of type StackType_t, 42 | configMINIMAL_STACK_SIZE is specified in words, not bytes. */ 43 | *pulIdleTaskStackSize = configMINIMAL_STACK_SIZE; 44 | } 45 | 46 | void vApplicationStackOverflowHook(TaskHandle_t xTask, char *pcTaskName) 47 | { 48 | configASSERT(!"Stackoverflow !"); 49 | } 50 | -------------------------------------------------------------------------------- /lib/freertos/pthread.c: -------------------------------------------------------------------------------- 1 | int pthread_setcancelstate(int __state, int *__oldstate) 2 | { 3 | return 0; 4 | } -------------------------------------------------------------------------------- /lib/freertos/readme.txt: -------------------------------------------------------------------------------- 1 | Each real time kernel port consists of three files that contain the core kernel 2 | components and are common to every port, and one or more files that are 3 | specific to a particular microcontroller and or compiler. 4 | 5 | + The FreeRTOS/Source directory contains the three files that are common to 6 | every port - list.c, queue.c and tasks.c. The kernel is contained within these 7 | three files. croutine.c implements the optional co-routine functionality - which 8 | is normally only used on very memory limited systems. 9 | 10 | + The FreeRTOS/Source/Portable directory contains the files that are specific to 11 | a particular microcontroller and or compiler. 12 | 13 | + The FreeRTOS/Source/include directory contains the real time kernel header 14 | files. 15 | 16 | See the readme file in the FreeRTOS/Source/Portable directory for more 17 | information. -------------------------------------------------------------------------------- /make.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | cd ./build 4 | 5 | ##here you shoule change for your path 6 | cross_compile=/home/xel/kendryte-toolchain-8.2 7 | 8 | cmake .. -DPROJ=$1 -DTOOLCHAIN=$cross_compile"/bin" && make 9 | -------------------------------------------------------------------------------- /src/.gitignore: -------------------------------------------------------------------------------- 1 | .release/ -------------------------------------------------------------------------------- /src/ai_demo_sim/ai_demo_sim.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sipeed/LicheeDan_K210_examples/0b121730109d465ef04590b5cb2d5a905943fcf5/src/ai_demo_sim/ai_demo_sim.bin -------------------------------------------------------------------------------- /src/ai_demo_sim/board_config.h: -------------------------------------------------------------------------------- 1 | #ifndef _BOARD_CONFIG_ 2 | #define _BOARD_CONFIG_ 3 | 4 | #define OV5640 0 5 | #define OV2640 1 6 | 7 | #define BOARD_KD233 0 8 | #define BOARD_LICHEEDAN 1 9 | #define BOARD_K61 0 10 | 11 | #if (OV5640 && OV2640) || (!OV5640 && !OV2640) 12 | #error ov sensor only choose one 13 | #endif 14 | 15 | #if (BOARD_LICHEEDAN && BOARD_KD233) || (BOARD_LICHEEDAN && BOARD_K61) || (BOARD_K61 && BOARD_KD233) || (!BOARD_LICHEEDAN && !BOARD_KD233 && !BOARD_K61) 16 | #error board only choose one 17 | #endif 18 | 19 | #endif 20 | -------------------------------------------------------------------------------- /src/ai_demo_sim/lcd.h: -------------------------------------------------------------------------------- 1 | #ifndef _LCD_H_ 2 | #define _LCD_H_ 3 | 4 | #include 5 | 6 | /* clang-format off */ 7 | #define LCD_X_MAX (240) 8 | #define LCD_Y_MAX (320) 9 | 10 | #define BLACK 0x0000 11 | #define NAVY 0x000F 12 | #define DARKGREEN 0x03E0 13 | #define DARKCYAN 0x03EF 14 | #define MAROON 0x7800 15 | #define PURPLE 0x780F 16 | #define OLIVE 0x7BE0 17 | #define LIGHTGREY 0xC618 18 | #define DARKGREY 0x7BEF 19 | #define BLUE 0x001F 20 | #define GREEN 0x07E0 21 | #define CYAN 0x07FF 22 | #define RED 0xF800 23 | #define MAGENTA 0xF81F 24 | #define YELLOW 0xFFE0 25 | #define WHITE 0xFFFF 26 | #define ORANGE 0xFD20 27 | #define GREENYELLOW 0xAFE5 28 | #define PINK 0xF81F 29 | #define USER_COLOR 0xAA55 30 | /* clang-format on */ 31 | 32 | typedef enum _lcd_dir 33 | { 34 | DIR_XY_RLUD = 0x00, 35 | DIR_YX_RLUD = 0x20, 36 | DIR_XY_LRUD = 0x40, 37 | DIR_YX_LRUD = 0x60, 38 | DIR_XY_RLDU = 0x80, 39 | DIR_YX_RLDU = 0xA0, 40 | DIR_XY_LRDU = 0xC0, 41 | DIR_YX_LRDU = 0xE0, 42 | DIR_XY_MASK = 0x20, 43 | DIR_MASK = 0xE0, 44 | } lcd_dir_t; 45 | 46 | typedef struct _lcd_ctl 47 | { 48 | uint8_t mode; 49 | uint8_t dir; 50 | uint16_t width; 51 | uint16_t height; 52 | } lcd_ctl_t; 53 | 54 | void lcd_polling_enable(void); 55 | void lcd_interrupt_enable(void); 56 | void lcd_init(void); 57 | void lcd_clear(uint16_t color); 58 | void lcd_set_direction(lcd_dir_t dir); 59 | void lcd_set_area(uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2); 60 | void lcd_draw_point(uint16_t x, uint16_t y, uint16_t color); 61 | void lcd_draw_string(uint16_t x, uint16_t y, char *str, uint16_t color); 62 | void lcd_draw_picture(uint16_t x1, uint16_t y1, uint16_t width, uint16_t height, uint32_t *ptr); 63 | void lcd_draw_rectangle(uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2, uint16_t width, uint16_t color); 64 | void lcd_ram_draw_string(char *str, uint32_t *ptr, uint16_t font_color, uint16_t bg_color); 65 | 66 | #endif 67 | 68 | -------------------------------------------------------------------------------- /src/ai_demo_sim/ov2640.h: -------------------------------------------------------------------------------- 1 | /* Copyright 2018 Canaan Inc. 2 | * 3 | * Licensed under the Apache License, Version 2.0 (the "License"); 4 | * you may not use this file except in compliance with the License. 5 | * You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software 10 | * distributed under the License is distributed on an "AS IS" BASIS, 11 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | * See the License for the specific language governing permissions and 13 | * limitations under the License. 14 | */ 15 | #ifndef _OV2640_H 16 | #define _OV2640_H 17 | 18 | #include 19 | 20 | #define OV2640_ADDR 0x60 21 | 22 | int ov2640_init(void); 23 | int ov2640_read_id(uint16_t *manuf_id, uint16_t *device_id); 24 | 25 | #endif /* _OV2640_H */ 26 | 27 | -------------------------------------------------------------------------------- /src/ai_demo_sim/ov5640.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include "ov5640.h" 4 | #include "ov5640cfg.h" 5 | #include "dvp.h" 6 | 7 | static void hal_delay(uint32_t delay) 8 | { 9 | usleep(delay * 1000); 10 | } 11 | 12 | static void ov5640_wr_reg(uint16_t reg,uint8_t data) 13 | { 14 | dvp_sccb_send_data(OV5640_ADDR, reg, data); 15 | } 16 | 17 | static uint8_t ov5640_rd_reg(uint16_t reg) 18 | { 19 | return dvp_sccb_receive_data(OV5640_ADDR, reg); 20 | } 21 | 22 | uint8_t ov5640_init(void) 23 | { 24 | uint16_t i = 0; 25 | uint16_t reg = 0; 26 | 27 | reg = ov5640_rd_reg(OV5640_CHIPIDH); 28 | reg <<= 8; 29 | reg |= ov5640_rd_reg(OV5640_CHIPIDL); 30 | printf("ID: %X \r\n", reg); 31 | if(reg != OV5640_ID) 32 | { 33 | printf("ID: %d \r\n", reg); 34 | return 1; 35 | } 36 | 37 | ov5640_wr_reg(0x3103,0X11); /*system clock from pad, bit[1]*/ 38 | ov5640_wr_reg(0X3008,0X82); 39 | hal_delay(10); 40 | 41 | for(i = 0; i 5 | 6 | #define OV5640_ID 0X5640 7 | #define OV5640_ADDR 0X78 8 | #define OV5640_CHIPIDH 0X300A 9 | #define OV5640_CHIPIDL 0X300B 10 | 11 | #define XSIZE 320 12 | #define YSIZE 240 13 | #define LCD_GRAM_ADDRESS 0x60020000 14 | 15 | #define QQVGA_160_120 0 16 | #define QCIF_176_144 1 17 | #define QVGA_320_240 2 18 | #define WQVGA_400_240 3 19 | #define CIF_352_288 4 20 | 21 | #define jpeg_buf_size (30*1024) 22 | 23 | uint8_t ov5640_init(void); 24 | void ov5640_flash_lamp(uint8_t sw); 25 | 26 | #endif 27 | 28 | -------------------------------------------------------------------------------- /src/ai_demo_sim/region_layer.h: -------------------------------------------------------------------------------- 1 | #ifndef _REGION_LAYER 2 | #define _REGION_LAYER 3 | 4 | #include 5 | 6 | // #define CLASS_NUMBER 1 7 | #define CLASS_NUMBER 20 8 | // #define DEBUG_FLOAT 9 | 10 | #ifdef DEBUG_FLOAT 11 | #define INPUT_TYPE float 12 | #else 13 | #define INPUT_TYPE uint8_t 14 | #endif 15 | 16 | typedef void (*callback_draw_box)(uint32_t x1, uint32_t y1, uint32_t x2, uint32_t y2, uint32_t class, float prob); 17 | void region_layer_cal(INPUT_TYPE *u8in); 18 | void region_layer_draw_boxes(callback_draw_box callback); 19 | 20 | #endif // _REGION_LAYER 21 | -------------------------------------------------------------------------------- /src/auto.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | for dir in `ls .` 4 | do 5 | if [ -d $dir ] 6 | then 7 | echo $dir 8 | rm -f $dir/$dir.bin 9 | 10 | if [ ! -d $dir/build/ ] 11 | then 12 | mkdir $dir/build 13 | fi 14 | cd $dir/build/ && cmake ../../../ && make && cp $dir.bin ../ && cd - 15 | if [ ! -f $dir/$dir.bin ] 16 | then 17 | echo ERROR: Unable to build $dir 18 | exit 19 | fi 20 | fi 21 | done 22 | set +e 23 | -------------------------------------------------------------------------------- /src/dvp_ov/README.md: -------------------------------------------------------------------------------- 1 | DVP 2 | ===== 3 | Display the real-time image from ov5640. 4 | ===== -------------------------------------------------------------------------------- /src/dvp_ov/board_config.h: -------------------------------------------------------------------------------- 1 | #ifndef _BOARD_CONFIG_ 2 | #define _BOARD_CONFIG_ 3 | 4 | #define OV5640 0 5 | #define OV2640 1 6 | 7 | #define BOARD_KD233 0 8 | #define BOARD_LICHEEDAN 1 9 | #define BOARD_K61 0 10 | 11 | #if (OV5640 && OV2640) || (!OV5640 && !OV2640) 12 | #error ov sensor only choose one 13 | #endif 14 | 15 | #if (BOARD_LICHEEDAN && BOARD_KD233) || (BOARD_LICHEEDAN && BOARD_K61) || (BOARD_K61 && BOARD_KD233) || (!BOARD_LICHEEDAN && !BOARD_KD233 && !BOARD_K61) 16 | #error board only choose one 17 | #endif 18 | 19 | #endif 20 | -------------------------------------------------------------------------------- /src/dvp_ov/dvp_ov.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sipeed/LicheeDan_K210_examples/0b121730109d465ef04590b5cb2d5a905943fcf5/src/dvp_ov/dvp_ov.bin -------------------------------------------------------------------------------- /src/dvp_ov/ov2640.h: -------------------------------------------------------------------------------- 1 | /* Copyright 2018 Canaan Inc. 2 | * 3 | * Licensed under the Apache License, Version 2.0 (the "License"); 4 | * you may not use this file except in compliance with the License. 5 | * You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software 10 | * distributed under the License is distributed on an "AS IS" BASIS, 11 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | * See the License for the specific language governing permissions and 13 | * limitations under the License. 14 | */ 15 | #ifndef _OV2640_H 16 | #define _OV2640_H 17 | 18 | #include 19 | 20 | #define OV2640_ADDR 0x60 21 | 22 | int ov2640_init(void); 23 | int ov2640_read_id(uint16_t *manuf_id, uint16_t *device_id); 24 | 25 | #endif /* _OV2640_H */ 26 | 27 | -------------------------------------------------------------------------------- /src/dvp_ov/ov5640.h: -------------------------------------------------------------------------------- 1 | /* Copyright 2018 Canaan Inc. 2 | * 3 | * Licensed under the Apache License, Version 2.0 (the "License"); 4 | * you may not use this file except in compliance with the License. 5 | * You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software 10 | * distributed under the License is distributed on an "AS IS" BASIS, 11 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | * See the License for the specific language governing permissions and 13 | * limitations under the License. 14 | */ 15 | #ifndef _OV5640_H 16 | #define _OV5640_H 17 | 18 | #include 19 | 20 | #define OV5640_ID 0X5640 21 | #define OV5640_ADDR 0X78 22 | #define OV5640_CHIPIDH 0X300A 23 | #define OV5640_CHIPIDL 0X300B 24 | 25 | #define XSIZE 320 26 | #define YSIZE 240 27 | #define LCD_GRAM_ADDRESS 0x60020000 28 | 29 | #define QQVGA_160_120 0 30 | #define QCIF_176_144 1 31 | #define QVGA_320_240 2 32 | #define WQVGA_400_240 3 33 | #define CIF_352_288 4 34 | 35 | #define jpeg_buf_size (30*1024) 36 | 37 | uint8_t ov5640_init(void); 38 | void ov5640_flash_lamp(uint8_t sw); 39 | 40 | #endif 41 | 42 | -------------------------------------------------------------------------------- /src/face_detect/board_config.h: -------------------------------------------------------------------------------- 1 | #ifndef _BOARD_CONFIG_ 2 | #define _BOARD_CONFIG_ 3 | 4 | #define OV5640 0 5 | #define OV2640 1 6 | 7 | #define BOARD_KD233 0 8 | #define BOARD_LICHEEDAN 1 9 | #define BOARD_K61 0 10 | 11 | #if (OV5640 && OV2640) || (!OV5640 && !OV2640) 12 | #error ov sensor only choose one 13 | #endif 14 | 15 | #if (BOARD_LICHEEDAN && BOARD_KD233) || (BOARD_LICHEEDAN && BOARD_K61) || (BOARD_K61 && BOARD_KD233) || (!BOARD_LICHEEDAN && !BOARD_KD233 && !BOARD_K61) 16 | #error board only choose one 17 | #endif 18 | 19 | #endif 20 | -------------------------------------------------------------------------------- /src/face_detect/face_detect.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sipeed/LicheeDan_K210_examples/0b121730109d465ef04590b5cb2d5a905943fcf5/src/face_detect/face_detect.bin -------------------------------------------------------------------------------- /src/face_detect/gen_array.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | Created on Sat Mar 17 10:38:47 2018 4 | 5 | @author: zhangtao 6 | """ 7 | 8 | import numpy as np 9 | 10 | scale, bias = 0.12349300010531557, -13.528213 11 | 12 | 13 | softmax_array = np.array((range(-255, 1))) 14 | softmax_array = softmax_array * scale 15 | softmax_array = np.exp(softmax_array) 16 | 17 | sigmoid_array = np.array((range(0, 256))) 18 | sigmoid_array = sigmoid_array * scale + bias 19 | sigmoid_array = 1 / (1 + np.exp(-sigmoid_array)) 20 | 21 | write_buff = 'float scale = {};\nfloat bais = {};\n'.format(scale, bias) 22 | write_buff += 'static const float activate_array_acc[] = {\n' 23 | for index in range(len(sigmoid_array)): 24 | if index % 4 == 0: 25 | write_buff += '\t' 26 | write_buff += '{:.16e}'.format(sigmoid_array[index]) + ',' 27 | if index % 4 == 3: 28 | write_buff += '\n' 29 | else: 30 | write_buff += ' ' 31 | write_buff += '};\n\n' 32 | write_buff += 'static const float softmax_acc[] = {\n' 33 | for index in range(len(softmax_array)): 34 | if index % 4 == 0: 35 | write_buff += '\t' 36 | write_buff += '{:.16e}'.format(softmax_array[index]) + ',' 37 | if index % 4 == 3: 38 | write_buff += '\n' 39 | else: 40 | write_buff += ' ' 41 | write_buff += '};' 42 | 43 | with open(r'region_layer_array.include', 'w') as file: 44 | file.write(write_buff) 45 | 46 | -------------------------------------------------------------------------------- /src/face_detect/ov2640.h: -------------------------------------------------------------------------------- 1 | /* Copyright 2018 Canaan Inc. 2 | * 3 | * Licensed under the Apache License, Version 2.0 (the "License"); 4 | * you may not use this file except in compliance with the License. 5 | * You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software 10 | * distributed under the License is distributed on an "AS IS" BASIS, 11 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | * See the License for the specific language governing permissions and 13 | * limitations under the License. 14 | */ 15 | #ifndef _OV2640_H 16 | #define _OV2640_H 17 | 18 | #include 19 | 20 | #define OV2640_ADDR 0x60 21 | 22 | int ov2640_init(void); 23 | int ov2640_read_id(uint16_t *manuf_id, uint16_t *device_id); 24 | 25 | #endif /* _OV2640_H */ 26 | 27 | -------------------------------------------------------------------------------- /src/face_detect/ov5640.h: -------------------------------------------------------------------------------- 1 | /* Copyright 2018 Canaan Inc. 2 | * 3 | * Licensed under the Apache License, Version 2.0 (the "License"); 4 | * you may not use this file except in compliance with the License. 5 | * You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software 10 | * distributed under the License is distributed on an "AS IS" BASIS, 11 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | * See the License for the specific language governing permissions and 13 | * limitations under the License. 14 | */ 15 | #ifndef _OV5640_H 16 | #define _OV5640_H 17 | 18 | #include 19 | 20 | #define OV5640_ID 0X5640 21 | #define OV5640_ADDR 0X78 22 | #define OV5640_CHIPIDH 0X300A 23 | #define OV5640_CHIPIDL 0X300B 24 | 25 | #define XSIZE 320 26 | #define YSIZE 240 27 | #define LCD_GRAM_ADDRESS 0x60020000 28 | 29 | #define QQVGA_160_120 0 30 | #define QCIF_176_144 1 31 | #define QVGA_320_240 2 32 | #define WQVGA_400_240 3 33 | #define CIF_352_288 4 34 | 35 | #define jpeg_buf_size (30*1024) 36 | 37 | uint8_t ov5640_init(void); 38 | void ov5640_flash_lamp(uint8_t sw); 39 | 40 | #endif 41 | 42 | -------------------------------------------------------------------------------- /src/face_detect/region_layer.h: -------------------------------------------------------------------------------- 1 | #ifndef _REGION_LAYER 2 | #define _REGION_LAYER 3 | 4 | #include 5 | #include "kpu.h" 6 | 7 | #ifdef DEBUG_FLOAT 8 | #define INPUT_TYPE float 9 | #else 10 | #define INPUT_TYPE uint8_t 11 | #endif 12 | 13 | typedef void (*callback_draw_box)(uint32_t x1, uint32_t y1, uint32_t x2, uint32_t y2, uint32_t class, float prob); 14 | void region_layer_cal(INPUT_TYPE *u8in); 15 | void region_layer_draw_boxes(callback_draw_box callback); 16 | int region_layer_init(kpu_task_t *task,uint32_t display_width, uint32_t display_hight, float layer_thresh, float layer_nms, uint32_t anchor_num, float *anchor_ptr); 17 | void set_coords_n(uint32_t v_coords, uint32_t v_anchor); 18 | 19 | #endif // _REGION_LAYER 20 | -------------------------------------------------------------------------------- /src/face_detect_kmodel_flash/README.md: -------------------------------------------------------------------------------- 1 | Kmodel example 2 | ===== 3 | Burn kfpkg/face_detect_kmodel_flash.kfpkg,the kmodel is burned at 0xA00000. 4 | 5 | SDK v0.5.3 or later. 6 | -------------------------------------------------------------------------------- /src/face_detect_kmodel_flash/board_config.h: -------------------------------------------------------------------------------- 1 | #ifndef _BOARD_CONFIG_ 2 | #define _BOARD_CONFIG_ 3 | 4 | /* clang-format off */ 5 | #define OV5640 0 6 | #define OV2640 1 7 | 8 | #define BOARD_KD233 0 9 | #define BOARD_LICHEEDAN 1 10 | #define BOARD_K61 0 11 | 12 | #if (OV5640 && OV2640) || (!OV5640 && !OV2640) 13 | #error ov sensor only choose one 14 | #endif 15 | 16 | #if (BOARD_LICHEEDAN && BOARD_KD233) || (BOARD_LICHEEDAN && BOARD_K61) || (BOARD_K61 && BOARD_KD233) || (!BOARD_LICHEEDAN && !BOARD_KD233 && !BOARD_K61) 17 | #error board only choose one 18 | #endif 19 | /* clang-format on */ 20 | #endif 21 | -------------------------------------------------------------------------------- /src/face_detect_kmodel_flash/face_detect_kmodel_flash.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sipeed/LicheeDan_K210_examples/0b121730109d465ef04590b5cb2d5a905943fcf5/src/face_detect_kmodel_flash/face_detect_kmodel_flash.bin -------------------------------------------------------------------------------- /src/face_detect_kmodel_flash/gencode_output.h: -------------------------------------------------------------------------------- 1 | kpu_task_t* kpu_task_gencode_output_init(kpu_task_t* task); 2 | -------------------------------------------------------------------------------- /src/face_detect_kmodel_flash/kfpkg/aug.kmodel: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sipeed/LicheeDan_K210_examples/0b121730109d465ef04590b5cb2d5a905943fcf5/src/face_detect_kmodel_flash/kfpkg/aug.kmodel -------------------------------------------------------------------------------- /src/face_detect_kmodel_flash/kfpkg/face_detect_kmodel_flash.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sipeed/LicheeDan_K210_examples/0b121730109d465ef04590b5cb2d5a905943fcf5/src/face_detect_kmodel_flash/kfpkg/face_detect_kmodel_flash.bin -------------------------------------------------------------------------------- /src/face_detect_kmodel_flash/kfpkg/face_detect_kmodel_flash.kfpkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sipeed/LicheeDan_K210_examples/0b121730109d465ef04590b5cb2d5a905943fcf5/src/face_detect_kmodel_flash/kfpkg/face_detect_kmodel_flash.kfpkg -------------------------------------------------------------------------------- /src/face_detect_kmodel_flash/kfpkg/flash-list.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0.1.0", 3 | "files": [ 4 | { 5 | "address": 0, 6 | "bin": "face_detect_kmodel_flash.bin", 7 | "sha256Prefix": true 8 | }, 9 | { 10 | "address": 0x00E00000, 11 | "bin": "aug.kmodel", 12 | "sha256Prefix": false 13 | } 14 | ] 15 | } -------------------------------------------------------------------------------- /src/face_detect_kmodel_flash/ov2640.h: -------------------------------------------------------------------------------- 1 | /* Copyright 2018 Canaan Inc. 2 | * 3 | * Licensed under the Apache License, Version 2.0 (the "License"); 4 | * you may not use this file except in compliance with the License. 5 | * You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software 10 | * distributed under the License is distributed on an "AS IS" BASIS, 11 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | * See the License for the specific language governing permissions and 13 | * limitations under the License. 14 | */ 15 | #ifndef _OV2640_H 16 | #define _OV2640_H 17 | 18 | #include 19 | 20 | #define OV2640_ADDR 0x60 21 | 22 | int ov2640_init(void); 23 | int ov2640_read_id(uint16_t *manuf_id, uint16_t *device_id); 24 | 25 | #endif /* _OV2640_H */ 26 | 27 | -------------------------------------------------------------------------------- /src/face_detect_kmodel_flash/ov5640.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include "ov5640.h" 4 | #include "ov5640cfg.h" 5 | #include "dvp.h" 6 | 7 | static void hal_delay(uint32_t delay) 8 | { 9 | usleep(delay * 1000); 10 | } 11 | 12 | static void ov5640_wr_reg(uint16_t reg,uint8_t data) 13 | { 14 | dvp_sccb_send_data(OV5640_ADDR, reg, data); 15 | } 16 | 17 | static uint8_t ov5640_rd_reg(uint16_t reg) 18 | { 19 | return dvp_sccb_receive_data(OV5640_ADDR, reg); 20 | } 21 | 22 | uint8_t ov5640_init(void) 23 | { 24 | uint16_t i = 0; 25 | uint16_t reg = 0; 26 | 27 | reg = ov5640_rd_reg(OV5640_CHIPIDH); 28 | reg <<= 8; 29 | reg |= ov5640_rd_reg(OV5640_CHIPIDL); 30 | printf("ID: %X \r\n", reg); 31 | if(reg != OV5640_ID) 32 | { 33 | printf("ID: %d \r\n", reg); 34 | return 1; 35 | } 36 | 37 | ov5640_wr_reg(0x3103,0X11); /*system clock from pad, bit[1]*/ 38 | ov5640_wr_reg(0X3008,0X82); 39 | hal_delay(10); 40 | 41 | for(i = 0; i 5 | 6 | #define OV5640_ID 0X5640 7 | #define OV5640_ADDR 0X78 8 | #define OV5640_CHIPIDH 0X300A 9 | #define OV5640_CHIPIDL 0X300B 10 | 11 | #define XSIZE 320 12 | #define YSIZE 240 13 | #define LCD_GRAM_ADDRESS 0x60020000 14 | 15 | #define QQVGA_160_120 0 16 | #define QCIF_176_144 1 17 | #define QVGA_320_240 2 18 | #define WQVGA_400_240 3 19 | #define CIF_352_288 4 20 | 21 | #define jpeg_buf_size (30*1024) 22 | 23 | uint8_t ov5640_init(void); 24 | void ov5640_flash_lamp(uint8_t sw); 25 | 26 | #endif 27 | 28 | -------------------------------------------------------------------------------- /src/face_detect_kmodel_flash/region_layer.h: -------------------------------------------------------------------------------- 1 | #ifndef _REGION_LAYER 2 | #define _REGION_LAYER 3 | 4 | #include 5 | #include "kpu.h" 6 | 7 | typedef struct 8 | { 9 | uint32_t obj_number; 10 | struct 11 | { 12 | uint32_t x1; 13 | uint32_t y1; 14 | uint32_t x2; 15 | uint32_t y2; 16 | uint32_t class_id; 17 | float prob; 18 | } obj[10]; 19 | } obj_info_t; 20 | 21 | typedef struct 22 | { 23 | float threshold; 24 | float nms_value; 25 | uint32_t coords; 26 | uint32_t anchor_number; 27 | float *anchor; 28 | uint32_t image_width; 29 | uint32_t image_height; 30 | uint32_t classes; 31 | uint32_t net_width; 32 | uint32_t net_height; 33 | uint32_t layer_width; 34 | uint32_t layer_height; 35 | uint32_t boxes_number; 36 | uint32_t output_number; 37 | float scale; 38 | float bias; 39 | void *boxes; 40 | uint8_t *input; 41 | float *output; 42 | float *probs_buf; 43 | float **probs; 44 | float *activate; 45 | float *softmax; 46 | } region_layer_t; 47 | 48 | typedef void (*callback_draw_box)(uint32_t x1, uint32_t y1, uint32_t x2, uint32_t y2, uint32_t class, float prob); 49 | 50 | int region_layer_init(region_layer_t *rl, kpu_task_t *task); 51 | void region_layer_deinit(region_layer_t *rl); 52 | void region_layer_run(region_layer_t *rl, obj_info_t *obj_info); 53 | void region_layer_draw_boxes(region_layer_t *rl, callback_draw_box callback); 54 | 55 | #endif // _REGION_LAYER 56 | -------------------------------------------------------------------------------- /src/gpiohs_led/README.md: -------------------------------------------------------------------------------- 1 | GPIOHS 2 | ===== 3 | LED_G is blinking when pressing BOOT. -------------------------------------------------------------------------------- /src/gpiohs_led/gpiohs_led.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sipeed/LicheeDan_K210_examples/0b121730109d465ef04590b5cb2d5a905943fcf5/src/gpiohs_led/gpiohs_led.bin -------------------------------------------------------------------------------- /src/gpiohs_led/main.c: -------------------------------------------------------------------------------- 1 | /* Copyright 2018 Canaan Inc. 2 | * 3 | * Licensed under the Apache License, Version 2.0 (the "License"); 4 | * you may not use this file except in compliance with the License. 5 | * You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software 10 | * distributed under the License is distributed on an "AS IS" BASIS, 11 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | * See the License for the specific language governing permissions and 13 | * limitations under the License. 14 | */ 15 | 16 | #include 17 | #include 18 | #include "fpioa.h" 19 | #include "gpiohs.h" 20 | #include "sysctl.h" 21 | 22 | int irq_flag = 1; 23 | 24 | #define PIN_LED 12 25 | #define PIN_KEY 16 26 | 27 | #define GPIO_LED 3 28 | #define GPIO_KEY 2 29 | 30 | void irq_gpiohs2(void *gp) 31 | { 32 | irq_flag = gpiohs_get_pin(GPIO_KEY); 33 | 34 | printf("IRQ The PIN is %d\n", irq_flag); 35 | 36 | if (irq_flag) 37 | gpiohs_set_pin(GPIO_LED, GPIO_PV_LOW); 38 | else 39 | gpiohs_set_pin(GPIO_LED, GPIO_PV_HIGH); 40 | } 41 | 42 | int main(void) 43 | { 44 | plic_init(); 45 | sysctl_enable_irq(); 46 | 47 | fpioa_set_function(PIN_LED, FUNC_GPIOHS3); 48 | gpiohs_set_drive_mode(GPIO_LED, GPIO_DM_OUTPUT); 49 | gpio_pin_value_t value = GPIO_PV_HIGH; 50 | gpiohs_set_pin(GPIO_LED, value); 51 | 52 | fpioa_set_function(PIN_KEY, FUNC_GPIOHS2); 53 | gpiohs_set_drive_mode(GPIO_KEY, GPIO_DM_INPUT); 54 | gpiohs_set_pin_edge(GPIO_KEY, GPIO_PE_BOTH); 55 | gpiohs_set_irq(GPIO_KEY, 1, irq_gpiohs2); 56 | 57 | while (1) 58 | { 59 | sleep(1); 60 | if (irq_flag) 61 | gpiohs_set_pin(GPIO_LED, value = !value); 62 | int val = gpiohs_get_pin(GPIO_KEY); 63 | printf("The PIN is %d\n", val); 64 | } 65 | return 0; 66 | } 67 | -------------------------------------------------------------------------------- /src/hello_world/hello_world.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sipeed/LicheeDan_K210_examples/0b121730109d465ef04590b5cb2d5a905943fcf5/src/hello_world/hello_world.bin -------------------------------------------------------------------------------- /src/hello_world/main.c: -------------------------------------------------------------------------------- 1 | /* Copyright 2018 Canaan Inc. 2 | * 3 | * Licensed under the Apache License, Version 2.0 (the "License"); 4 | * you may not use this file except in compliance with the License. 5 | * You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software 10 | * distributed under the License is distributed on an "AS IS" BASIS, 11 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | * See the License for the specific language governing permissions and 13 | * limitations under the License. 14 | */ 15 | #include 16 | #include "bsp.h" 17 | 18 | int core1_function(void *ctx) 19 | { 20 | uint64_t core = current_coreid(); 21 | printf("Core %ld Hello world\n", core); 22 | while (1) 23 | ; 24 | } 25 | 26 | int main() 27 | { 28 | uint64_t core = current_coreid(); 29 | printf("Core %ld Hello world\n", core); 30 | register_core1(core1_function, NULL); 31 | while (1) 32 | ; 33 | } 34 | -------------------------------------------------------------------------------- /src/jpeg_decode/jpeg/picojpeg_util.h: -------------------------------------------------------------------------------- 1 | #ifndef __PICOJPEG_UTIL_H__ 2 | #define __PICOJPEG_UTIL_H__ 3 | 4 | #include 5 | 6 | typedef struct 7 | { 8 | uint16_t width; 9 | uint16_t height; 10 | uint8_t comps; 11 | uint8_t scan_type; 12 | uint8_t *img_data; 13 | } jpeg_image_t; 14 | 15 | void jpeg_display(uint16_t startx, uint16_t starty, jpeg_image_t *jpeg); 16 | jpeg_image_t *pico_jpeg_decode(uint8_t *buf, uint32_t buf_len); 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /src/jpeg_decode/jpeg_decode.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sipeed/LicheeDan_K210_examples/0b121730109d465ef04590b5cb2d5a905943fcf5/src/jpeg_decode/jpeg_decode.bin -------------------------------------------------------------------------------- /src/kpu_conv/board_config.h: -------------------------------------------------------------------------------- 1 | #ifndef _BOARD_CONFIG_ 2 | #define _BOARD_CONFIG_ 3 | 4 | #define OV5640 0 5 | #define OV2640 1 6 | 7 | #define BOARD_KD233 0 8 | #define BOARD_LICHEEDAN 1 9 | #define BOARD_K61 0 10 | 11 | #if (OV5640 && OV2640) || (!OV5640 && !OV2640) 12 | #error ov sensor only choose one 13 | #endif 14 | 15 | #if (BOARD_LICHEEDAN && BOARD_KD233) || (BOARD_LICHEEDAN && BOARD_K61) || (BOARD_K61 && BOARD_KD233) || (!BOARD_LICHEEDAN && !BOARD_KD233 && !BOARD_K61) 16 | #error board only choose one 17 | #endif 18 | 19 | #endif 20 | -------------------------------------------------------------------------------- /src/kpu_conv/kpu_conv.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sipeed/LicheeDan_K210_examples/0b121730109d465ef04590b5cb2d5a905943fcf5/src/kpu_conv/kpu_conv.bin -------------------------------------------------------------------------------- /src/kpu_conv/layer.h: -------------------------------------------------------------------------------- 1 | /* Copyright 2019 Sipeed Inc. 2 | * 3 | * Licensed under the Apache License, Version 2.0 (the "License"); 4 | * you may not use this file except in compliance with the License. 5 | * You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software 10 | * distributed under the License is distributed on an "AS IS" BASIS, 11 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | * See the License for the specific language governing permissions and 13 | * limitations under the License. 14 | */ 15 | 16 | #ifndef _LAYER_H 17 | #define _LAYER_H 18 | 19 | void layer_conv_init(kpu_task_t *task, uint16_t w, uint16_t h, uint8_t ch_in, uint8_t ch_out, float *conv_data); 20 | void layer_conv_run(kpu_task_t *task, uint8_t *img_src, uint8_t *img_dst, plic_irq_callback_t callback); 21 | 22 | #endif 23 | -------------------------------------------------------------------------------- /src/kpu_conv/ov2640.h: -------------------------------------------------------------------------------- 1 | /* Copyright 2018 Canaan Inc. 2 | * 3 | * Licensed under the Apache License, Version 2.0 (the "License"); 4 | * you may not use this file except in compliance with the License. 5 | * You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software 10 | * distributed under the License is distributed on an "AS IS" BASIS, 11 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | * See the License for the specific language governing permissions and 13 | * limitations under the License. 14 | */ 15 | #ifndef _OV2640_H 16 | #define _OV2640_H 17 | 18 | #include 19 | 20 | #define OV2640_ADDR 0x60 21 | 22 | int ov2640_init(void); 23 | int ov2640_read_id(uint16_t *manuf_id, uint16_t *device_id); 24 | 25 | #endif /* _OV2640_H */ 26 | 27 | -------------------------------------------------------------------------------- /src/kpu_conv/readme.txt: -------------------------------------------------------------------------------- 1 | kernel_conv.bin 2 | made by Sipeed 3 | Demonstrate how 3x3 convolution kernel influence image 4 | suit for MAIX Bit/Dock/Go. 5 | 6 | Usage: 7 | Poweron, press Boot Key to switch convolution kernel. 8 | Kernel value will show on top left corner. 9 | We preset 4 kernels: 10 | 0: original output 11 | 1: edge detecting 12 | 2: sharpen 13 | 3: relievo 14 | 15 | If you want test your own kernel, you can input via serial(baudrate 115200). 16 | input 0~3 to select preset kernel. 17 | input 9 numbers divide by space to enable your kernel. it support float number. 18 | press enter to end your command. 19 | 20 | 本固件由Sipeed出品,演示3x3卷积核如何作用于图像,适合MAIX系列开发板。 21 | 使用方法: 22 | 上电,按boot键切换预置的4种卷积核,卷积核参数会显示在左上角。 23 | 0. 原始输出 24 | 1. 边缘检测 25 | 2. 锐化 26 | 3. 浮雕 27 | 28 | 如果你想测试自己的卷积核,可以通过串口输入(波特率115200) 29 | 输入0~3选择预置的卷积核。 30 | 输入以空格分割的9个数字来使能你的卷积核,支持浮点数。 31 | 按回车来结束你的命令。 32 | -------------------------------------------------------------------------------- /src/lcd/README.md: -------------------------------------------------------------------------------- 1 | SPI LCD 2 | ===== 3 | Display "Canaan" and "Kendryte K210" -------------------------------------------------------------------------------- /src/lcd/board_config.h: -------------------------------------------------------------------------------- 1 | #ifndef _BOARD_CONFIG_ 2 | #define _BOARD_CONFIG_ 3 | 4 | #define OV5640 0 5 | #define OV2640 1 6 | 7 | #define BOARD_KD233 0 8 | #define BOARD_LICHEEDAN 1 9 | #define BOARD_K61 0 10 | 11 | #if (OV5640 && OV2640) || (!OV5640 && !OV2640) 12 | #error ov sensor only choose one 13 | #endif 14 | 15 | #if (BOARD_LICHEEDAN && BOARD_KD233) || (BOARD_LICHEEDAN && BOARD_K61) || (BOARD_K61 && BOARD_KD233) || (!BOARD_LICHEEDAN && !BOARD_KD233 && !BOARD_K61) 16 | #error board only choose one 17 | #endif 18 | 19 | #endif 20 | -------------------------------------------------------------------------------- /src/lcd/lcd.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sipeed/LicheeDan_K210_examples/0b121730109d465ef04590b5cb2d5a905943fcf5/src/lcd/lcd.bin -------------------------------------------------------------------------------- /src/lvgl/board_config.h: -------------------------------------------------------------------------------- 1 | #ifndef _BOARD_CONFIG_ 2 | #define _BOARD_CONFIG_ 3 | 4 | #define OV5640 0 5 | #define OV2640 1 6 | 7 | #define BOARD_KD233 0 8 | #define BOARD_LICHEEDAN 1 9 | #define BOARD_K61 0 10 | 11 | #if (OV5640 && OV2640) || (!OV5640 && !OV2640) 12 | #error ov sensor only choose one 13 | #endif 14 | 15 | #if (BOARD_LICHEEDAN && BOARD_KD233) || (BOARD_LICHEEDAN && BOARD_K61) || (BOARD_K61 && BOARD_KD233) || (!BOARD_LICHEEDAN && !BOARD_KD233 && !BOARD_K61) 16 | #error board only choose one 17 | #endif 18 | 19 | #endif 20 | -------------------------------------------------------------------------------- /src/lvgl/ds/InderNS2009EN.PDF: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sipeed/LicheeDan_K210_examples/0b121730109d465ef04590b5cb2d5a905943fcf5/src/lvgl/ds/InderNS2009EN.PDF -------------------------------------------------------------------------------- /src/lvgl/lvgl.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sipeed/LicheeDan_K210_examples/0b121730109d465ef04590b5cb2d5a905943fcf5/src/lvgl/lvgl.bin -------------------------------------------------------------------------------- /src/lvgl/lvgl/.gitignore: -------------------------------------------------------------------------------- 1 | **/*.o -------------------------------------------------------------------------------- /src/lvgl/lvgl/.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "lv_examples"] 2 | path = lv_examples 3 | url = https://github.com/littlevgl/lv_examples.git 4 | -------------------------------------------------------------------------------- /src/lvgl/lvgl/docs/astyle_c: -------------------------------------------------------------------------------- 1 | --style=kr --convert-tabs --indent=spaces=4 --indent-switches --pad-oper --unpad-paren --align-pointer=middle --suffix=.bak --lineend=linux --min-conditional-indent= 2 | -------------------------------------------------------------------------------- /src/lvgl/lvgl/docs/astyle_h: -------------------------------------------------------------------------------- 1 | --convert-tabs --indent=spaces=4 2 | -------------------------------------------------------------------------------- /src/lvgl/lvgl/licence.txt: -------------------------------------------------------------------------------- 1 | MIT licence 2 | Copyright (c) 2016 Gábor Kiss-Vámosi 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 5 | 6 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 7 | 8 | THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 9 | -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_core/lv_core.mk: -------------------------------------------------------------------------------- 1 | CSRCS += lv_group.c 2 | CSRCS += lv_indev.c 3 | CSRCS += lv_obj.c 4 | CSRCS += lv_refr.c 5 | CSRCS += lv_style.c 6 | CSRCS += lv_vdb.c 7 | 8 | DEPPATH += --dep-path lvgl/lv_core 9 | VPATH += :lvgl/lv_core 10 | 11 | CFLAGS += "-I$(LVGL_DIR)/lvgl/lv_core" 12 | -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_draw/lv_draw.mk: -------------------------------------------------------------------------------- 1 | CSRCS += lv_draw_vbasic.c 2 | CSRCS += lv_draw_rbasic.c 3 | CSRCS += lv_draw.c 4 | CSRCS += lv_draw_rect.c 5 | CSRCS += lv_draw_label.c 6 | CSRCS += lv_draw_line.c 7 | CSRCS += lv_draw_img.c 8 | CSRCS += lv_draw_arc.c 9 | CSRCS += lv_draw_triangle.c 10 | 11 | DEPPATH += --dep-path lvgl/lv_draw 12 | VPATH += :lvgl/lv_draw 13 | 14 | CFLAGS += "-I$(LVGL_DIR)/lvgl/lv_draw" 15 | -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_draw/lv_draw_arc.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_draw_arc.h 3 | * 4 | */ 5 | 6 | #ifndef LV_DRAW_ARC_H 7 | #define LV_DRAW_ARC_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #include "lv_draw.h" 17 | 18 | /********************* 19 | * DEFINES 20 | *********************/ 21 | 22 | /********************** 23 | * TYPEDEFS 24 | **********************/ 25 | 26 | /********************** 27 | * GLOBAL PROTOTYPES 28 | **********************/ 29 | 30 | /** 31 | * Draw an arc. (Can draw pie too with great thickness.) 32 | * @param center_x the x coordinate of the center of the arc 33 | * @param center_y the y coordinate of the center of the arc 34 | * @param radius the radius of the arc 35 | * @param mask the arc will be drawn only in this mask 36 | * @param start_angle the start angle of the arc (0 deg on the bottom, 90 deg on the right) 37 | * @param end_angle the end angle of the arc 38 | * @param style style of the arc (`body.thickness`, `body.main_color`, `body.opa` is used) 39 | * @param opa_scale scale down all opacities by the factor 40 | */ 41 | void lv_draw_arc(lv_coord_t center_x, lv_coord_t center_y, uint16_t radius, const lv_area_t * mask, 42 | uint16_t start_angle, uint16_t end_angle, const lv_style_t * style, lv_opa_t opa_scale); 43 | 44 | /********************** 45 | * MACROS 46 | **********************/ 47 | 48 | 49 | #ifdef __cplusplus 50 | } /* extern "C" */ 51 | #endif 52 | 53 | #endif /*LV_DRAW_ARC*/ 54 | -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_draw/lv_draw_label.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_draw_label.h 3 | * 4 | */ 5 | 6 | #ifndef LV_DRAW_LABEL_H 7 | #define LV_DRAW_LABEL_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #include "lv_draw.h" 17 | 18 | /********************* 19 | * DEFINES 20 | *********************/ 21 | 22 | /********************** 23 | * TYPEDEFS 24 | **********************/ 25 | 26 | /********************** 27 | * GLOBAL PROTOTYPES 28 | **********************/ 29 | 30 | /** 31 | * Write a text 32 | * @param coords coordinates of the label 33 | * @param mask the label will be drawn only in this area 34 | * @param style pointer to a style 35 | * @param opa_scale scale down all opacities by the factor 36 | * @param txt 0 terminated text to write 37 | * @param flag settings for the text from 'txt_flag_t' enum 38 | * @param offset text offset in x and y direction (NULL if unused) 39 | * 40 | */ 41 | void lv_draw_label(const lv_area_t * coords,const lv_area_t * mask, const lv_style_t * style, lv_opa_t opa_scale, 42 | const char * txt, lv_txt_flag_t flag, lv_point_t * offset); 43 | 44 | /********************** 45 | * MACROS 46 | **********************/ 47 | 48 | 49 | #ifdef __cplusplus 50 | } /* extern "C" */ 51 | #endif 52 | 53 | #endif /*LV_DRAW_LABEL_H*/ 54 | -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_draw/lv_draw_line.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_draw_line.h 3 | * 4 | */ 5 | 6 | #ifndef LV_DRAW_LINE_H 7 | #define LV_DRAW_LINE_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | 17 | /********************* 18 | * DEFINES 19 | *********************/ 20 | 21 | /********************** 22 | * TYPEDEFS 23 | **********************/ 24 | 25 | /********************** 26 | * GLOBAL PROTOTYPES 27 | **********************/ 28 | 29 | /** 30 | * Draw a line 31 | * @param point1 first point of the line 32 | * @param point2 second point of the line 33 | * @param mask the line will be drawn only on this area 34 | * @param style pointer to a line's style 35 | * @param opa_scale scale down all opacities by the factor 36 | */ 37 | void lv_draw_line(const lv_point_t * point1, const lv_point_t * point2, const lv_area_t * mask, 38 | const lv_style_t * style, lv_opa_t opa_scale); 39 | 40 | /********************** 41 | * MACROS 42 | **********************/ 43 | 44 | 45 | #ifdef __cplusplus 46 | } /* extern "C" */ 47 | #endif 48 | 49 | #endif /*LV_DRAW_LINE_H*/ 50 | -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_draw/lv_draw_rect.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_draw_rect.h 3 | * 4 | */ 5 | 6 | #ifndef LV_DRAW_RECT_H 7 | #define LV_DRAW_RECT_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #include "lv_draw.h" 17 | 18 | /********************* 19 | * DEFINES 20 | *********************/ 21 | 22 | /********************** 23 | * TYPEDEFS 24 | **********************/ 25 | 26 | /********************** 27 | * GLOBAL PROTOTYPES 28 | **********************/ 29 | 30 | /** 31 | * Draw a rectangle 32 | * @param coords the coordinates of the rectangle 33 | * @param mask the rectangle will be drawn only in this mask 34 | * @param style pointer to a style 35 | * @param opa_scale scale down all opacities by the factor 36 | */ 37 | void lv_draw_rect(const lv_area_t * coords, const lv_area_t * mask, const lv_style_t * style, lv_opa_t opa_scale); 38 | 39 | /********************** 40 | * MACROS 41 | **********************/ 42 | 43 | 44 | #ifdef __cplusplus 45 | } /* extern "C" */ 46 | #endif 47 | 48 | #endif /*LV_DRAW_RECT_H*/ 49 | -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_draw/lv_draw_triangle.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_draw_triangle.h 3 | * 4 | */ 5 | 6 | #ifndef LV_DRAW_TRIANGLE_H 7 | #define LV_DRAW_TRIANGLE_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #include "lv_draw.h" 17 | 18 | /********************* 19 | * DEFINES 20 | *********************/ 21 | 22 | /********************** 23 | * TYPEDEFS 24 | **********************/ 25 | 26 | /********************** 27 | * GLOBAL PROTOTYPES 28 | **********************/ 29 | /*Experimental use for 3D modeling*/ 30 | #define USE_LV_TRIANGLE 1 31 | 32 | #if USE_LV_TRIANGLE != 0 33 | /** 34 | * 35 | * @param points pointer to an array with 3 points 36 | * @param mask the triangle will be drawn only in this mask 37 | * @param color color of the triangle 38 | */ 39 | void lv_draw_triangle(const lv_point_t * points, const lv_area_t * mask, lv_color_t color); 40 | #endif 41 | 42 | /********************** 43 | * MACROS 44 | **********************/ 45 | 46 | 47 | #ifdef __cplusplus 48 | } /* extern "C" */ 49 | #endif 50 | 51 | #endif /*LV_DRAW_TRIANGLE_H*/ 52 | -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_ex_conf.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_ex_conf.h 3 | * 4 | */ 5 | /* 6 | * COPY THIS FILE AS lv_ex_conf.h 7 | */ 8 | 9 | #ifndef LV_EX_CONF_H 10 | #define LV_EX_CONF_H 11 | 12 | /******************* 13 | * GENERAL SETTING 14 | *******************/ 15 | #define LV_EX_PRINTF 0 /*Enable printf-ing data*/ 16 | #define LV_EX_KEYBOARD 0 /*Add PC keyboard support to some examples (`lv_drivers` repository is required)*/ 17 | #define LV_EX_MOUSEWHEEL 0 /*Add 'encoder' (mouse wheel) support to some examples (`lv_drivers` repository is required)*/ 18 | 19 | /******************* 20 | * TEST USAGE 21 | *******************/ 22 | #define USE_LV_TESTS 0 23 | 24 | /******************* 25 | * TUTORIAL USAGE 26 | *******************/ 27 | #define USE_LV_TUTORIALS 0 28 | 29 | /********************* 30 | * APPLICATION USAGE 31 | *********************/ 32 | 33 | /* Test the graphical performance of your MCU 34 | * with different settings*/ 35 | #define USE_LV_BENCHMARK 0 36 | 37 | /*A demo application with Keyboard, Text area, List and Chart 38 | * placed on Tab view */ 39 | #define USE_LV_DEMO 1 40 | #if USE_LV_DEMO 41 | #define LV_DEMO_WALLPAPER 1 /*Create a wallpaper too*/ 42 | #define LV_DEMO_SLIDE_SHOW 0 /*Automatically switch between tabs*/ 43 | #endif 44 | 45 | /*MCU and memory usage monitoring*/ 46 | #define USE_LV_SYSMON 0 47 | 48 | /*A terminal to display received characters*/ 49 | #define USE_LV_TERMINAL 0 50 | 51 | /*Touch pad calibration with 4 points*/ 52 | #define USE_LV_TPCAL 0 53 | 54 | #endif /*LV_EX_CONF_H*/ 55 | -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/.gitignore: -------------------------------------------------------------------------------- 1 | **/*.o -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/docs/astyle_c: -------------------------------------------------------------------------------- 1 | --style=kr --convert-tabs --indent=spaces=4 --indent-switches --pad-oper --unpad-paren --align-pointer=middle --suffix=.bak --lineend=linux --min-conditional-indent= 2 | -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/docs/astyle_h: -------------------------------------------------------------------------------- 1 | --convert-tabs --indent=spaces=4 2 | -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/lv_apps/benchmark/benchmark.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file benchmark.h 3 | * 4 | */ 5 | 6 | #ifndef BENCHMARK_H 7 | #define BENCHMARK_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | 17 | #ifdef LV_CONF_INCLUDE_SIMPLE 18 | #include "lvgl.h" 19 | #include "lv_ex_conf.h" 20 | #else 21 | #include "../../../lvgl/lvgl.h" 22 | #include "../../../lv_ex_conf.h" 23 | #endif 24 | 25 | #if USE_LV_BENCHMARK 26 | 27 | 28 | /********************* 29 | * DEFINES 30 | *********************/ 31 | 32 | /********************** 33 | * TYPEDEFS 34 | **********************/ 35 | 36 | /********************** 37 | * GLOBAL PROTOTYPES 38 | **********************/ 39 | 40 | /** 41 | * Open a graphics benchmark 42 | */ 43 | void benchmark_create(void); 44 | 45 | void benchmark_start(void); 46 | 47 | bool benchmark_is_ready(void); 48 | 49 | uint32_t benchmark_get_refr_time(void); 50 | 51 | /********************** 52 | * MACROS 53 | **********************/ 54 | 55 | #endif /*USE_LV_BENCHMARK*/ 56 | 57 | #ifdef __cplusplus 58 | } /* extern "C" */ 59 | #endif 60 | 61 | #endif /* BENCHMARK_H */ 62 | -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/lv_apps/benchmark/benchmark.mk: -------------------------------------------------------------------------------- 1 | CSRCS += benchmark.c 2 | CSRCS += benchmark_bg.c 3 | 4 | DEPPATH += --dep-path $(LVGL_DIR)/lv_examples/lv_apps/benchmark 5 | VPATH += :$(LVGL_DIR)/lv_examples/lv_apps/benchmark 6 | 7 | CFLAGS += "-I$(LVGL_DIR)/lv_examples/lv_apps/benchmark" 8 | -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/lv_apps/benchmark/benchmark_bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sipeed/LicheeDan_K210_examples/0b121730109d465ef04590b5cb2d5a905943fcf5/src/lvgl/lvgl/lv_examples/lv_apps/benchmark/benchmark_bg.png -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/lv_apps/demo/bubble_pattern.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sipeed/LicheeDan_K210_examples/0b121730109d465ef04590b5cb2d5a905943fcf5/src/lvgl/lvgl/lv_examples/lv_apps/demo/bubble_pattern.png -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/lv_apps/demo/demo.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file demo.h 3 | * 4 | */ 5 | 6 | #ifndef DEMO_H 7 | #define DEMO_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | 17 | #ifdef LV_CONF_INCLUDE_SIMPLE 18 | #include "lvgl.h" 19 | #include "lv_ex_conf.h" 20 | #else 21 | #include "../../../lvgl/lvgl.h" 22 | #include "../../../lv_ex_conf.h" 23 | #endif 24 | 25 | #if USE_LV_DEMO 26 | 27 | /********************* 28 | * DEFINES 29 | *********************/ 30 | 31 | /********************** 32 | * TYPEDEFS 33 | **********************/ 34 | 35 | /********************** 36 | * GLOBAL PROTOTYPES 37 | **********************/ 38 | 39 | /** 40 | * Create a demo application 41 | */ 42 | void demo_create(void); 43 | 44 | /********************** 45 | * MACROS 46 | **********************/ 47 | 48 | #endif /*USE_LV_DEMO*/ 49 | 50 | #ifdef __cplusplus 51 | } /* extern "C" */ 52 | #endif 53 | 54 | #endif /*DEMO_H*/ 55 | -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/lv_apps/demo/demo.mk: -------------------------------------------------------------------------------- 1 | CSRCS += demo.c 2 | CSRCS += img_bubble_pattern.c 3 | 4 | DEPPATH += --dep-path $(LVGL_DIR)/lv_examples/lv_apps/demo 5 | VPATH += :$(LVGL_DIR)/lv_examples/lv_apps/demo 6 | 7 | CFLAGS += "-I$(LVGL_DIR)/lv_examples/lv_apps/demo" 8 | -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/lv_apps/sysmon/sysmon.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file symon.h 3 | * 4 | */ 5 | 6 | #ifndef SYSMON_H 7 | #define SYSMON_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #ifdef LV_CONF_INCLUDE_SIMPLE 17 | #include "lvgl.h" 18 | #include "lv_ex_conf.h" 19 | #else 20 | #include "../../../lvgl/lvgl.h" 21 | #include "../../../lv_ex_conf.h" 22 | #endif 23 | #if USE_LV_DEMO 24 | 25 | /********************* 26 | * DEFINES 27 | *********************/ 28 | 29 | /********************** 30 | * TYPEDEFS 31 | **********************/ 32 | 33 | /********************** 34 | * GLOBAL PROTOTYPES 35 | **********************/ 36 | 37 | /** 38 | * Initialize the system monitor 39 | */ 40 | void sysmon_create(void); 41 | 42 | /********************** 43 | * MACROS 44 | **********************/ 45 | 46 | #endif /*USE_LV_SYSMON*/ 47 | 48 | #ifdef __cplusplus 49 | } /* extern "C" */ 50 | #endif 51 | 52 | #endif /* SYSMON_H */ 53 | -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/lv_apps/sysmon/sysmon.mk: -------------------------------------------------------------------------------- 1 | CSRCS += sysmon.c 2 | 3 | DEPPATH += --dep-path $(LVGL_DIR)/lv_examples/lv_apps/sysmon 4 | VPATH += :$(LVGL_DIR)/lv_examples/lv_apps/sysmon 5 | 6 | CFLAGS += "-I$(LVGL_DIR)/lv_examples/lv_apps/sysmon" 7 | -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/lv_apps/terminal/terminal.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file terminal.h 3 | * 4 | */ 5 | 6 | #ifndef TERMINAL_H 7 | #define TERMINAL_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #ifdef LV_CONF_INCLUDE_SIMPLE 17 | #include "lvgl.h" 18 | #include "lv_ex_conf.h" 19 | #else 20 | #include "../../../lvgl/lvgl.h" 21 | #include "../../../lv_ex_conf.h" 22 | #endif 23 | 24 | #if USE_LV_DEMO 25 | 26 | /********************* 27 | * DEFINES 28 | *********************/ 29 | 30 | /********************** 31 | * TYPEDEFS 32 | **********************/ 33 | 34 | /********************** 35 | * GLOBAL PROTOTYPES 36 | **********************/ 37 | 38 | /** 39 | * Open a terminal 40 | * @return pointer to the terminal window 41 | */ 42 | lv_obj_t * terminal_create(void); 43 | 44 | /** 45 | * Add data to the terminal 46 | * @param txt_in character sting to add to the terminal 47 | */ 48 | void terminal_add(const char * txt_in); 49 | 50 | /********************** 51 | * MACROS 52 | **********************/ 53 | 54 | #endif /*USE_LV_TERMINAL*/ 55 | 56 | #ifdef __cplusplus 57 | } /* extern "C" */ 58 | #endif 59 | 60 | #endif /* LV_TERMINAL_H */ 61 | -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/lv_apps/terminal/terminal.mk: -------------------------------------------------------------------------------- 1 | CSRCS += terminal.c 2 | 3 | DEPPATH += --dep-path $(LVGL_DIR)/lv_examples/lv_apps/terminal 4 | VPATH += :$(LVGL_DIR)/lv_examples/lv_apps/terminal 5 | 6 | CFLAGS += "-I$(LVGL_DIR)/lv_examples/lv_apps/terminal" 7 | -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/lv_apps/tpcal/tpcal.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file tpcal.h 3 | * 4 | */ 5 | 6 | #ifndef TPCAL_H 7 | #define TPCAL_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #ifdef LV_CONF_INCLUDE_SIMPLE 17 | #include "lvgl.h" 18 | #include "lv_ex_conf.h" 19 | #else 20 | #include "../../../lvgl/lvgl.h" 21 | #include "../../../lv_ex_conf.h" 22 | #endif 23 | 24 | 25 | #if USE_LV_DEMO 26 | 27 | /********************* 28 | * DEFINES 29 | *********************/ 30 | 31 | /********************** 32 | * TYPEDEFS 33 | **********************/ 34 | 35 | /********************** 36 | * GLOBAL PROTOTYPES 37 | **********************/ 38 | 39 | /** 40 | * Create a touch pad calibration screen 41 | */ 42 | void tpcal_create(void); 43 | 44 | /********************** 45 | * MACROS 46 | **********************/ 47 | 48 | #endif /*USE_LV_TPCAL*/ 49 | 50 | #ifdef __cplusplus 51 | } /* extern "C" */ 52 | #endif 53 | 54 | #endif /*TP_CAL_H*/ 55 | -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/lv_apps/tpcal/tpcal.mk: -------------------------------------------------------------------------------- 1 | CSRCS += tpcal.c 2 | 3 | DEPPATH += --dep-path $(LVGL_DIR)/lv_examples/lv_apps/tpcal 4 | VPATH += :$(LVGL_DIR)/lv_examples/lv_apps/tpcal 5 | 6 | CFLAGS += "-I$(LVGL_DIR)/lv_examples/lv_apps/tpcal" 7 | -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/lv_ex_conf_templ.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_ex_conf.h 3 | * 4 | */ 5 | /* 6 | * COPY THIS FILE AS lv_ex_conf.h 7 | */ 8 | 9 | #if 0 /*Set it to "1" to enable the content*/ 10 | 11 | #ifndef LV_EX_CONF_H 12 | #define LV_EX_CONF_H 13 | 14 | /******************* 15 | * GENERAL SETTING 16 | *******************/ 17 | #define LV_EX_PRINTF 0 /*Enable printf-ing data*/ 18 | #define LV_EX_KEYBOARD 0 /*Add PC keyboard support to some examples (`lv_drivers` repository is required)*/ 19 | #define LV_EX_MOUSEWHEEL 0 /*Add 'encoder' (mouse wheel) support to some examples (`lv_drivers` repository is required)*/ 20 | 21 | /******************* 22 | * TEST USAGE 23 | *******************/ 24 | #define USE_LV_TESTS 0 25 | 26 | /******************* 27 | * TUTORIAL USAGE 28 | *******************/ 29 | #define USE_LV_TUTORIALS 0 30 | 31 | 32 | /********************* 33 | * APPLICATION USAGE 34 | *********************/ 35 | 36 | /* Test the graphical performance of your MCU 37 | * with different settings*/ 38 | #define USE_LV_BENCHMARK 0 39 | 40 | /*A demo application with Keyboard, Text area, List and Chart 41 | * placed on Tab view */ 42 | #define USE_LV_DEMO 0 43 | #if USE_LV_DEMO 44 | #define LV_DEMO_WALLPAPER 1 /*Create a wallpaper too*/ 45 | #define LV_DEMO_SLIDE_SHOW 0 /*Automatically switch between tabs*/ 46 | #endif 47 | 48 | /*MCU and memory usage monitoring*/ 49 | #define USE_LV_SYSMON 0 50 | 51 | /*A terminal to display received characters*/ 52 | #define USE_LV_TERMINAL 0 53 | 54 | /*Touch pad calibration with 4 points*/ 55 | #define USE_LV_TPCAL 0 56 | 57 | #endif /*LV_EX_CONF_H*/ 58 | 59 | #endif /*End of "Content enable"*/ 60 | 61 | -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/lv_examples.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_examples.h 3 | * 4 | */ 5 | 6 | #ifndef LV_EXAMPLES_H 7 | #define LV_EXAMPLES_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #include "../lvgl/lvgl.h" 17 | 18 | /********************* 19 | * DEFINES 20 | *********************/ 21 | /*Test lvgl version*/ 22 | #define LV_EXAMPLES_LVGL_REQ_MAJOR 5 23 | #define LV_EXAMPLES_LVGL_REQ_MINOR 0 24 | #define LV_EXAMPLES_LVGL_REQ_PATCH 0 25 | 26 | #if LV_EXAMPLES_LVGL_REQ_MAJOR != LVGL_VERSION_MAJOR 27 | #error "lv_examples: Wrong lvgl major version" 28 | #endif 29 | 30 | #if LV_EXAMPLES_LVGL_REQ_MINOR > LVGL_VERSION_MINOR 31 | #error "lv_examples: Wrong lvgl minor version" 32 | #endif 33 | 34 | #if LV_EXAMPLES_LVGL_REQ_PATCH > LVGL_VERSION_PATCH 35 | #error "lv_examples: Wrong lvgl bug fix version" 36 | #endif 37 | 38 | /********************** 39 | * TYPEDEFS 40 | **********************/ 41 | 42 | /********************** 43 | * GLOBAL PROTOTYPES 44 | **********************/ 45 | 46 | /********************** 47 | * MACROS 48 | **********************/ 49 | 50 | 51 | #ifdef __cplusplus 52 | } /* extern "C" */ 53 | #endif 54 | 55 | #endif /*LV_EXAMPLES_H*/ 56 | -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/lv_tests/lv_test_group/lv_test_group.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_test_group.h 3 | * 4 | */ 5 | 6 | #ifndef LV_TEST_GROUP_H 7 | #define LV_TEST_GROUP_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #ifdef LV_CONF_INCLUDE_SIMPLE 17 | #include "lvgl.h" 18 | #include "lv_ex_conf.h" 19 | #else 20 | #include "../../../lvgl/lvgl.h" 21 | #include "../../../lv_ex_conf.h" 22 | #endif 23 | 24 | #if USE_LV_GROUP && USE_LV_TESTS 25 | 26 | /********************* 27 | * DEFINES 28 | *********************/ 29 | 30 | /********************** 31 | * TYPEDEFS 32 | **********************/ 33 | 34 | /********************** 35 | * GLOBAL PROTOTYPES 36 | **********************/ 37 | 38 | /** 39 | * Create base groups to test their functionalities 40 | */ 41 | void lv_test_group_1(void); 42 | 43 | /********************** 44 | * MACROS 45 | **********************/ 46 | 47 | #endif /* USE_LV_GROUP && USE_LV_TESTS */ 48 | 49 | #ifdef __cplusplus 50 | } /* extern "C" */ 51 | #endif 52 | 53 | #endif /*LV_TEST_BAR_H*/ 54 | -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/lv_tests/lv_test_group/lv_test_group.mk: -------------------------------------------------------------------------------- 1 | CSRCS += lv_test_group.c 2 | 3 | DEPPATH += --dep-path $(LVGL_DIR)/lv_examples/lv_tests/lv_test_group 4 | VPATH += :$(LVGL_DIR)/lv_examples/lv_tests/lv_test_group 5 | 6 | CFLAGS += "-I$(LVGL_DIR)/lv_examples/lv_tests/lv_test_group" 7 | -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/lv_tests/lv_test_group/lv_test_group_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sipeed/LicheeDan_K210_examples/0b121730109d465ef04590b5cb2d5a905943fcf5/src/lvgl/lvgl/lv_examples/lv_tests/lv_test_group/lv_test_group_1.png -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/lv_tests/lv_test_misc/lv_test_task.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_test_task.h 3 | * 4 | */ 5 | 6 | #ifndef LV_TEST_TASK_H 7 | #define LV_TEST_TASK_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #ifdef LV_CONF_INCLUDE_SIMPLE 17 | #include "lvgl.h" 18 | #include "lv_ex_conf.h" 19 | #else 20 | #include "../../../lvgl/lvgl.h" 21 | #include "../../../lv_ex_conf.h" 22 | #endif 23 | 24 | #if USE_LV_TESTS 25 | 26 | /********************* 27 | * DEFINES 28 | *********************/ 29 | 30 | /********************** 31 | * TYPEDEFS 32 | **********************/ 33 | 34 | /********************** 35 | * GLOBAL PROTOTYPES 36 | **********************/ 37 | 38 | /** 39 | * Test the scheduling with various periods and priorities. 40 | */ 41 | void lv_test_task_1(void); 42 | 43 | /** 44 | * Create a lot of short task and see their order. They should be executed according to their priority 45 | */ 46 | void lv_test_task_2(void); 47 | 48 | /** 49 | * Change the priority later 50 | */ 51 | void lv_test_task_3(void); 52 | 53 | /********************** 54 | * MACROS 55 | **********************/ 56 | 57 | #endif 58 | 59 | #ifdef __cplusplus 60 | } /* extern "C" */ 61 | #endif 62 | 63 | #endif /*LV_TEST_TASK_H*/ 64 | -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/lv_tests/lv_test_obj/lv_test_obj.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_test_object.h 3 | * 4 | */ 5 | 6 | #ifndef LV_TEST_OBJECT_H 7 | #define LV_TEST_OBJECT_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #ifdef LV_CONF_INCLUDE_SIMPLE 17 | #include "lvgl.h" 18 | #include "lv_ex_conf.h" 19 | #else 20 | #include "../../../lvgl/lvgl.h" 21 | #include "../../../lv_ex_conf.h" 22 | #endif 23 | 24 | #if USE_LV_TESTS 25 | 26 | /********************* 27 | * DEFINES 28 | *********************/ 29 | 30 | /********************** 31 | * TYPEDEFS 32 | **********************/ 33 | 34 | /********************** 35 | * GLOBAL PROTOTYPES 36 | **********************/ 37 | 38 | /** 39 | * Create base objects to test their functionalities 40 | */ 41 | void lv_test_object_1(void); 42 | 43 | /********************** 44 | * MACROS 45 | **********************/ 46 | 47 | #endif /* USE_LV_TESTS */ 48 | 49 | #ifdef __cplusplus 50 | } /* extern "C" */ 51 | #endif 52 | 53 | #endif /*LV_TEST_BAR_H*/ 54 | -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/lv_tests/lv_test_obj/lv_test_obj.mk: -------------------------------------------------------------------------------- 1 | CSRCS += lv_test_obj.c 2 | 3 | DEPPATH += --dep-path $(LVGL_DIR)/lv_examples/lv_tests/lv_test_obj 4 | VPATH += :$(LVGL_DIR)/lv_examples/lv_tests/lv_test_obj 5 | 6 | CFLAGS += "-I$(LVGL_DIR)/lv_examples/lv_tests/lv_test_obj" 7 | -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/lv_tests/lv_test_obj/lv_test_object_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sipeed/LicheeDan_K210_examples/0b121730109d465ef04590b5cb2d5a905943fcf5/src/lvgl/lvgl/lv_examples/lv_tests/lv_test_obj/lv_test_object_1.png -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/lv_tests/lv_test_objx/lv_test_arc/lv_test_arc.c: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_test_arc.c 3 | * 4 | */ 5 | 6 | /********************* 7 | * INCLUDES 8 | *********************/ 9 | #include "lv_test_arc.h" 10 | #if USE_LV_ARC && USE_LV_TESTS 11 | 12 | /********************* 13 | * DEFINES 14 | *********************/ 15 | 16 | /********************** 17 | * TYPEDEFS 18 | **********************/ 19 | 20 | /********************** 21 | * STATIC PROTOTYPES 22 | **********************/ 23 | 24 | /********************** 25 | * STATIC VARIABLES 26 | **********************/ 27 | 28 | /********************** 29 | * MACROS 30 | **********************/ 31 | 32 | /********************** 33 | * GLOBAL FUNCTIONS 34 | **********************/ 35 | 36 | /** 37 | * Create arcs to test their functionalities 38 | */ 39 | void lv_test_arc_1(void) 40 | { 41 | /* Create a default object*/ 42 | lv_obj_t * arc1 = lv_arc_create(lv_scr_act(), NULL); 43 | lv_obj_set_pos(arc1, 10, 10); 44 | 45 | /* Modify size, position and angles*/ 46 | lv_obj_t * arc2 = lv_arc_create(lv_scr_act(), NULL); 47 | lv_obj_set_size(arc2, 100, 100); 48 | lv_obj_align(arc2, arc1, LV_ALIGN_OUT_BOTTOM_LEFT, 0, 20); 49 | lv_arc_set_angles(arc2, 0, 250); 50 | 51 | /* Copy 'arc2' and set a new style for it */ 52 | static lv_style_t style1; 53 | lv_style_copy(&style1, &lv_style_plain); 54 | style1.line.color = LV_COLOR_RED; 55 | style1.line.width = 8; 56 | lv_obj_t * arc3 = lv_arc_create(lv_scr_act(), arc2); 57 | lv_obj_set_style(arc3, &style1); 58 | lv_obj_align(arc3, arc2, LV_ALIGN_OUT_RIGHT_TOP, 20, 0); 59 | 60 | } 61 | 62 | 63 | /********************** 64 | * STATIC FUNCTIONS 65 | **********************/ 66 | 67 | #endif /*USE_LV_ARC && USE_LV_TESTS*/ 68 | -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/lv_tests/lv_test_objx/lv_test_arc/lv_test_arc.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_test_arc.h 3 | * 4 | */ 5 | 6 | #ifndef LV_TEST_ARC_H 7 | #define LV_TEST_ARC_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #ifdef LV_CONF_INCLUDE_SIMPLE 17 | #include "lvgl.h" 18 | #include "lv_ex_conf.h" 19 | #else 20 | #include "../../../../lvgl/lvgl.h" 21 | #include "../../../../lv_ex_conf.h" 22 | #endif 23 | 24 | #if USE_LV_ARC && USE_LV_TESTS 25 | 26 | /********************* 27 | * DEFINES 28 | *********************/ 29 | 30 | /********************** 31 | * TYPEDEFS 32 | **********************/ 33 | 34 | /********************** 35 | * GLOBAL PROTOTYPES 36 | **********************/ 37 | 38 | /** 39 | * Create arcs to test their functionalities 40 | */ 41 | void lv_test_arc_1(void); 42 | 43 | /********************** 44 | * MACROS 45 | **********************/ 46 | 47 | #endif /*USE_LV_ARC && USE_LV_TESTS*/ 48 | 49 | #ifdef __cplusplus 50 | } /* extern "C" */ 51 | #endif 52 | 53 | #endif /*LV_TEST_BAR_H*/ 54 | -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/lv_tests/lv_test_objx/lv_test_arc/lv_test_arc.mk: -------------------------------------------------------------------------------- 1 | CSRCS += lv_test_arc.c 2 | 3 | DEPPATH += --dep-path $(LVGL_DIR)/lv_examples/lv_tests/lv_test_objx/lv_test_arc 4 | VPATH += :$(LVGL_DIR)/lv_examples/lv_tests/lv_test_objx/lv_test_arc 5 | 6 | CFLAGS += "-I$(LVGL_DIR)/lv_examples/lv_tests/lv_test_objx/lv_test_arc" 7 | -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/lv_tests/lv_test_objx/lv_test_arc/lv_test_arc_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sipeed/LicheeDan_K210_examples/0b121730109d465ef04590b5cb2d5a905943fcf5/src/lvgl/lvgl/lv_examples/lv_tests/lv_test_objx/lv_test_arc/lv_test_arc_1.png -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/lv_tests/lv_test_objx/lv_test_bar/lv_test_bar.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_test_bar.h 3 | * 4 | */ 5 | 6 | #ifndef LV_TEST_BAR_H 7 | #define LV_TEST_BAR_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #ifdef LV_CONF_INCLUDE_SIMPLE 17 | #include "lvgl.h" 18 | #include "lv_ex_conf.h" 19 | #else 20 | #include "../../../../lvgl/lvgl.h" 21 | #include "../../../../lv_ex_conf.h" 22 | #endif 23 | 24 | #if USE_LV_BAR && USE_LV_TESTS 25 | 26 | /********************* 27 | * DEFINES 28 | *********************/ 29 | 30 | /********************** 31 | * TYPEDEFS 32 | **********************/ 33 | 34 | /********************** 35 | * GLOBAL PROTOTYPES 36 | **********************/ 37 | 38 | /** 39 | * Create bars to test their functionalities 40 | */ 41 | void lv_test_bar_1(void); 42 | 43 | /********************** 44 | * MACROS 45 | **********************/ 46 | 47 | #endif /*USE_LV_BAR && USE_LV_TESTS*/ 48 | 49 | #ifdef __cplusplus 50 | } /* extern "C" */ 51 | #endif 52 | 53 | #endif /*LV_TEST_BAR_H*/ 54 | -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/lv_tests/lv_test_objx/lv_test_bar/lv_test_bar.mk: -------------------------------------------------------------------------------- 1 | CSRCS += lv_test_bar.c 2 | 3 | DEPPATH += --dep-path $(LVGL_DIR)/lv_examples/lv_tests/lv_test_objx/lv_test_bar 4 | VPATH += :$(LVGL_DIR)/lv_examples/lv_tests/lv_test_objx/lv_test_bar 5 | 6 | CFLAGS += "-I$(LVGL_DIR)/lv_examples/lv_tests/lv_test_objx/lv_test_bar" 7 | -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/lv_tests/lv_test_objx/lv_test_bar/lv_test_bar_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sipeed/LicheeDan_K210_examples/0b121730109d465ef04590b5cb2d5a905943fcf5/src/lvgl/lvgl/lv_examples/lv_tests/lv_test_objx/lv_test_bar/lv_test_bar_1.png -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/lv_tests/lv_test_objx/lv_test_btn/lv_test_btn.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_test_btn.h 3 | * 4 | */ 5 | 6 | #ifndef LV_TEST_BTN_H 7 | #define LV_TEST_BTN_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #ifdef LV_CONF_INCLUDE_SIMPLE 17 | #include "lvgl.h" 18 | #include "lv_ex_conf.h" 19 | #else 20 | #include "../../../../lvgl/lvgl.h" 21 | #include "../../../../lv_ex_conf.h" 22 | #endif 23 | 24 | #if USE_LV_BTN && USE_LV_TESTS 25 | 26 | /********************* 27 | * DEFINES 28 | *********************/ 29 | 30 | /********************** 31 | * TYPEDEFS 32 | **********************/ 33 | 34 | /********************** 35 | * GLOBAL PROTOTYPES 36 | **********************/ 37 | 38 | /** 39 | * Create buttons to test their functionalities 40 | */ 41 | void lv_test_btn_1(void); 42 | 43 | /********************** 44 | * MACROS 45 | **********************/ 46 | 47 | #endif /*USE_LV_BTN*/ 48 | 49 | #ifdef __cplusplus 50 | } /* extern "C" */ 51 | #endif 52 | 53 | #endif /*USE_LV_BTN && USE_LV_TESTS*/ 54 | -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/lv_tests/lv_test_objx/lv_test_btn/lv_test_btn.mk: -------------------------------------------------------------------------------- 1 | CSRCS += lv_test_btn.c 2 | 3 | DEPPATH += --dep-path $(LVGL_DIR)/lv_examples/lv_tests/lv_test_objx/lv_test_btn 4 | VPATH += :$(LVGL_DIR)/lv_examples/lv_tests/lv_test_objx/lv_test_btn 5 | 6 | CFLAGS += "-I$(LVGL_DIR)/lv_examples/lv_tests/lv_test_objx/lv_test_btn" 7 | -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/lv_tests/lv_test_objx/lv_test_btn/lv_test_btn_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sipeed/LicheeDan_K210_examples/0b121730109d465ef04590b5cb2d5a905943fcf5/src/lvgl/lvgl/lv_examples/lv_tests/lv_test_objx/lv_test_btn/lv_test_btn_1.png -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/lv_tests/lv_test_objx/lv_test_btnm/lv_test_btnm.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_test_btnm.h 3 | * 4 | */ 5 | 6 | #ifndef LV_TEST_BTNM_H 7 | #define LV_TEST_BTNM_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #ifdef LV_CONF_INCLUDE_SIMPLE 17 | #include "lvgl.h" 18 | #include "lv_ex_conf.h" 19 | #else 20 | #include "../../../../lvgl/lvgl.h" 21 | #include "../../../../lv_ex_conf.h" 22 | #endif 23 | 24 | #if USE_LV_BTNM && USE_LV_TESTS 25 | 26 | /********************* 27 | * DEFINES 28 | *********************/ 29 | 30 | /********************** 31 | * TYPEDEFS 32 | **********************/ 33 | 34 | /********************** 35 | * GLOBAL PROTOTYPES 36 | **********************/ 37 | 38 | /** 39 | * Create button matrixes to test their functionalities 40 | */ 41 | void lv_test_btnm_1(void); 42 | 43 | /********************** 44 | * MACROS 45 | **********************/ 46 | 47 | #endif /*USE_LV_BTNM*/ 48 | 49 | #ifdef __cplusplus 50 | } /* extern "C" */ 51 | #endif 52 | 53 | #endif /* USE_LV_BTNM && USE_LV_TESTS*/ 54 | -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/lv_tests/lv_test_objx/lv_test_btnm/lv_test_btnm.mk: -------------------------------------------------------------------------------- 1 | CSRCS += lv_test_btnm.c 2 | 3 | DEPPATH += --dep-path $(LVGL_DIR)/lv_examples/lv_tests/lv_test_objx/lv_test_btnm 4 | VPATH += :$(LVGL_DIR)/lv_examples/lv_tests/lv_test_objx/lv_test_btnm 5 | 6 | CFLAGS += "-I$(LVGL_DIR)/lv_examples/lv_tests/lv_test_objx/lv_test_btnm" 7 | -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/lv_tests/lv_test_objx/lv_test_btnm/lv_test_btnm_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sipeed/LicheeDan_K210_examples/0b121730109d465ef04590b5cb2d5a905943fcf5/src/lvgl/lvgl/lv_examples/lv_tests/lv_test_objx/lv_test_btnm/lv_test_btnm_1.png -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/lv_tests/lv_test_objx/lv_test_cb/lv_test_cb.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_test_cb.h 3 | * 4 | */ 5 | 6 | #ifndef LV_TEST_CB_H 7 | #define LV_TEST_CB_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #ifdef LV_CONF_INCLUDE_SIMPLE 17 | #include "lvgl.h" 18 | #include "lv_ex_conf.h" 19 | #else 20 | #include "../../../../lvgl/lvgl.h" 21 | #include "../../../../lv_ex_conf.h" 22 | #endif 23 | 24 | #if USE_LV_CB && USE_LV_TESTS 25 | 26 | /********************* 27 | * DEFINES 28 | *********************/ 29 | 30 | /********************** 31 | * TYPEDEFS 32 | **********************/ 33 | 34 | /********************** 35 | * GLOBAL PROTOTYPES 36 | **********************/ 37 | 38 | /** 39 | * Create check boxes to test their functionalities 40 | */ 41 | void lv_test_cb_1(void); 42 | 43 | /********************** 44 | * MACROS 45 | **********************/ 46 | 47 | #endif /*USE_LV_CB && USE_LV_TESTS*/ 48 | 49 | #ifdef __cplusplus 50 | } /* extern "C" */ 51 | #endif 52 | 53 | #endif /*LV_TEST_CB_H*/ 54 | -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/lv_tests/lv_test_objx/lv_test_cb/lv_test_cb.mk: -------------------------------------------------------------------------------- 1 | CSRCS += lv_test_cb.c 2 | 3 | DEPPATH += --dep-path $(LVGL_DIR)/lv_examples/lv_tests/lv_test_objx/lv_test_cb 4 | VPATH += :$(LVGL_DIR)/lv_examples/lv_tests/lv_test_objx/lv_test_cb 5 | 6 | CFLAGS += "-I$(LVGL_DIR)/lv_examples/lv_tests/lv_test_objx/lv_test_cb" 7 | -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/lv_tests/lv_test_objx/lv_test_cb/lv_test_cb_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sipeed/LicheeDan_K210_examples/0b121730109d465ef04590b5cb2d5a905943fcf5/src/lvgl/lvgl/lv_examples/lv_tests/lv_test_objx/lv_test_cb/lv_test_cb_1.png -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/lv_tests/lv_test_objx/lv_test_chart/lv_test_chart.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_test_chart.h 3 | * 4 | */ 5 | 6 | #ifndef LV_TEST_CHART_H 7 | #define LV_TEST_CHART_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #ifdef LV_CONF_INCLUDE_SIMPLE 17 | #include "lvgl.h" 18 | #include "lv_ex_conf.h" 19 | #else 20 | #include "../../../../lvgl/lvgl.h" 21 | #include "../../../../lv_ex_conf.h" 22 | #endif 23 | 24 | #if USE_LV_BTN && USE_LV_TESTS 25 | 26 | /********************* 27 | * DEFINES 28 | *********************/ 29 | 30 | /********************** 31 | * TYPEDEFS 32 | **********************/ 33 | 34 | /********************** 35 | * GLOBAL PROTOTYPES 36 | **********************/ 37 | 38 | /** 39 | * Create charts to test their functionalities 40 | */ 41 | void lv_test_chart_1(void); 42 | 43 | /********************** 44 | * MACROS 45 | **********************/ 46 | 47 | #endif /*USE_LV_BTN && USE_LV_TESTS*/ 48 | 49 | #ifdef __cplusplus 50 | } /* extern "C" */ 51 | #endif 52 | 53 | #endif /*LV_TEST_CHART_H*/ 54 | -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/lv_tests/lv_test_objx/lv_test_chart/lv_test_chart.mk: -------------------------------------------------------------------------------- 1 | CSRCS += lv_test_chart.c 2 | 3 | DEPPATH += --dep-path $(LVGL_DIR)/lv_examples/lv_tests/lv_test_objx/lv_test_chart 4 | VPATH += :$(LVGL_DIR)/lv_examples/lv_tests/lv_test_objx/lv_test_chart 5 | 6 | CFLAGS += "-I$(LVGL_DIR)/lv_examples/lv_tests/lv_test_objx/lv_test_chart" 7 | -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/lv_tests/lv_test_objx/lv_test_chart/lv_test_chart_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sipeed/LicheeDan_K210_examples/0b121730109d465ef04590b5cb2d5a905943fcf5/src/lvgl/lvgl/lv_examples/lv_tests/lv_test_objx/lv_test_chart/lv_test_chart_1.png -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/lv_tests/lv_test_objx/lv_test_cont/lv_test_cont.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_test_cont.h 3 | * 4 | */ 5 | 6 | #ifndef LV_TEST_CONT_H 7 | #define LV_TEST_CONT_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #ifdef LV_CONF_INCLUDE_SIMPLE 17 | #include "lvgl.h" 18 | #include "lv_ex_conf.h" 19 | #else 20 | #include "../../../../lvgl/lvgl.h" 21 | #include "../../../../lv_ex_conf.h" 22 | #endif 23 | 24 | #if USE_LV_CONT && USE_LV_TESTS 25 | 26 | /********************* 27 | * DEFINES 28 | *********************/ 29 | 30 | /********************** 31 | * TYPEDEFS 32 | **********************/ 33 | 34 | /********************** 35 | * GLOBAL PROTOTYPES 36 | **********************/ 37 | 38 | /** 39 | * Create containers to test their basic functionalities 40 | */ 41 | void lv_test_cont_1(void); 42 | 43 | /** 44 | * Test nested style inheritance on padding update 45 | */ 46 | void lv_test_cont_2(void); 47 | 48 | /********************** 49 | * MACROS 50 | **********************/ 51 | 52 | #endif /*USE_LV_CONT && USE_LV_TESTS*/ 53 | 54 | #ifdef __cplusplus 55 | } /* extern "C" */ 56 | #endif 57 | 58 | #endif /*LV_TEST_CONT_H*/ 59 | -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/lv_tests/lv_test_objx/lv_test_cont/lv_test_cont.mk: -------------------------------------------------------------------------------- 1 | CSRCS += lv_test_cont.c 2 | 3 | DEPPATH += --dep-path $(LVGL_DIR)/lv_examples/lv_tests/lv_test_objx/lv_test_cont 4 | VPATH += :$(LVGL_DIR)/lv_examples/lv_tests/lv_test_objx/lv_test_cont 5 | 6 | CFLAGS += "-I$(LVGL_DIR)/lv_examples/lv_tests/lv_test_objx/lv_test_cont" 7 | -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/lv_tests/lv_test_objx/lv_test_cont/lv_test_cont_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sipeed/LicheeDan_K210_examples/0b121730109d465ef04590b5cb2d5a905943fcf5/src/lvgl/lvgl/lv_examples/lv_tests/lv_test_objx/lv_test_cont/lv_test_cont_1.png -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/lv_tests/lv_test_objx/lv_test_cont/lv_test_cont_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sipeed/LicheeDan_K210_examples/0b121730109d465ef04590b5cb2d5a905943fcf5/src/lvgl/lvgl/lv_examples/lv_tests/lv_test_objx/lv_test_cont/lv_test_cont_2.png -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/lv_tests/lv_test_objx/lv_test_ddlist/lv_test_ddlist.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_test_ddlist.h 3 | * 4 | */ 5 | 6 | #ifndef LV_TEST_DDLIST_H 7 | #define LV_TEST_DDLIST_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #ifdef LV_CONF_INCLUDE_SIMPLE 17 | #include "lvgl.h" 18 | #include "lv_ex_conf.h" 19 | #else 20 | #include "../../../../lvgl/lvgl.h" 21 | #include "../../../../lv_ex_conf.h" 22 | #endif 23 | 24 | #if USE_LV_DDLIST && USE_LV_TESTS 25 | 26 | /********************* 27 | * DEFINES 28 | *********************/ 29 | 30 | /********************** 31 | * TYPEDEFS 32 | **********************/ 33 | 34 | /********************** 35 | * GLOBAL PROTOTYPES 36 | **********************/ 37 | 38 | /** 39 | * Create drop down lists to test their functionalities 40 | */ 41 | void lv_test_ddlist_1(void); 42 | 43 | /********************** 44 | * MACROS 45 | **********************/ 46 | 47 | #endif /*USE_LV_DDLIST*/ 48 | 49 | #ifdef __cplusplus 50 | } /* extern "C" */ 51 | #endif 52 | 53 | #endif /*USE_LV_DDLIST && USE_LV_TESTS*/ 54 | -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/lv_tests/lv_test_objx/lv_test_ddlist/lv_test_ddlist.mk: -------------------------------------------------------------------------------- 1 | CSRCS += lv_test_ddlist.c 2 | 3 | DEPPATH += --dep-path $(LVGL_DIR)/lv_examples/lv_tests/lv_test_objx/lv_test_ddlist 4 | VPATH += :$(LVGL_DIR)/lv_examples/lv_tests/lv_test_objx/lv_test_ddlist 5 | 6 | CFLAGS += "-I$(LVGL_DIR)/lv_examples/lv_tests/lv_test_objx/lv_test_ddlist" 7 | -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/lv_tests/lv_test_objx/lv_test_ddlist/lv_test_ddlist_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sipeed/LicheeDan_K210_examples/0b121730109d465ef04590b5cb2d5a905943fcf5/src/lvgl/lvgl/lv_examples/lv_tests/lv_test_objx/lv_test_ddlist/lv_test_ddlist_1.png -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/lv_tests/lv_test_objx/lv_test_gauge/lv_test_gauge.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_test_gauge.h 3 | * 4 | */ 5 | 6 | #ifndef LV_TEST_GAUGE_H 7 | #define LV_TEST_GAUGE_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #ifdef LV_CONF_INCLUDE_SIMPLE 17 | #include "lvgl.h" 18 | #include "lv_ex_conf.h" 19 | #else 20 | #include "../../../../lvgl/lvgl.h" 21 | #include "../../../../lv_ex_conf.h" 22 | #endif 23 | 24 | #if USE_LV_GAUGE && USE_LV_TESTS 25 | 26 | /********************* 27 | * DEFINES 28 | *********************/ 29 | 30 | /********************** 31 | * TYPEDEFS 32 | **********************/ 33 | 34 | /********************** 35 | * GLOBAL PROTOTYPES 36 | **********************/ 37 | 38 | /** 39 | * Create gauges to test their functionalities 40 | */ 41 | void lv_test_gauge_1(void); 42 | /********************** 43 | * MACROS 44 | **********************/ 45 | 46 | #endif /*USE_LV_GAUGE*/ 47 | 48 | #ifdef __cplusplus 49 | } /* extern "C" */ 50 | #endif 51 | 52 | #endif /*USE_LV_GAUGE && USE_LV_TESTS*/ 53 | -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/lv_tests/lv_test_objx/lv_test_gauge/lv_test_gauge.mk: -------------------------------------------------------------------------------- 1 | CSRCS += lv_test_gauge.c 2 | 3 | DEPPATH += --dep-path $(LVGL_DIR)/lv_examples/lv_tests/lv_test_objx/lv_test_gauge 4 | VPATH += :$(LVGL_DIR)/lv_examples/lv_tests/lv_test_objx/lv_test_gauge 5 | 6 | CFLAGS += "-I$(LVGL_DIR)/lv_examples/lv_tests/lv_test_objx/lv_test_gauge" 7 | -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/lv_tests/lv_test_objx/lv_test_gauge/lv_test_gauge_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sipeed/LicheeDan_K210_examples/0b121730109d465ef04590b5cb2d5a905943fcf5/src/lvgl/lvgl/lv_examples/lv_tests/lv_test_objx/lv_test_gauge/lv_test_gauge_1.png -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/lv_tests/lv_test_objx/lv_test_img/flower_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sipeed/LicheeDan_K210_examples/0b121730109d465ef04590b5cb2d5a905943fcf5/src/lvgl/lvgl/lv_examples/lv_tests/lv_test_objx/lv_test_img/flower_icon.png -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/lv_tests/lv_test_objx/lv_test_img/lv_test_img.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_test_img.h 3 | * 4 | */ 5 | 6 | #ifndef LV_TEST_IMG_H 7 | #define LV_TEST_IMG_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #ifdef LV_CONF_INCLUDE_SIMPLE 17 | #include "lvgl.h" 18 | #include "lv_ex_conf.h" 19 | #else 20 | #include "../../../../lvgl/lvgl.h" 21 | #include "../../../../lv_ex_conf.h" 22 | #endif 23 | 24 | #if USE_LV_IMG && USE_LV_TESTS 25 | 26 | /********************* 27 | * DEFINES 28 | *********************/ 29 | 30 | /********************** 31 | * TYPEDEFS 32 | **********************/ 33 | 34 | /********************** 35 | * GLOBAL PROTOTYPES 36 | **********************/ 37 | 38 | /** 39 | * Create images to test their functionalities 40 | */ 41 | void lv_test_img_1(void); 42 | 43 | /********************** 44 | * MACROS 45 | **********************/ 46 | 47 | #endif /*USE_LV_IMG*/ 48 | 49 | #ifdef __cplusplus 50 | } /* extern "C" */ 51 | #endif 52 | 53 | #endif /*USE_LV_IMG && USE_LV_TESTS*/ 54 | -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/lv_tests/lv_test_objx/lv_test_img/lv_test_img.mk: -------------------------------------------------------------------------------- 1 | CSRCS += lv_test_img.c 2 | CSRCS += img_flower_icon.c 3 | 4 | DEPPATH += --dep-path $(LVGL_DIR)/lv_examples/lv_tests/lv_test_objx/lv_test_img 5 | VPATH += :$(LVGL_DIR)/lv_examples/lv_tests/lv_test_objx/lv_test_img 6 | 7 | CFLAGS += "-I$(LVGL_DIR)/lv_examples/lv_tests/lv_test_objx/lv_test_img" 8 | -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/lv_tests/lv_test_objx/lv_test_img/lv_test_img_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sipeed/LicheeDan_K210_examples/0b121730109d465ef04590b5cb2d5a905943fcf5/src/lvgl/lvgl/lv_examples/lv_tests/lv_test_objx/lv_test_img/lv_test_img_1.png -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/lv_tests/lv_test_objx/lv_test_imgbtn/lv_test_imgbtn.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_test_imgbtn.h 3 | * 4 | */ 5 | 6 | #ifndef LV_TEST_IMGBTN_H 7 | #define LV_TEST_IMGBTN_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #ifdef LV_CONF_INCLUDE_SIMPLE 17 | #include "lvgl.h" 18 | #include "lv_ex_conf.h" 19 | #else 20 | #include "../../../../lvgl/lvgl.h" 21 | #include "../../../../lv_ex_conf.h" 22 | #endif 23 | 24 | #if USE_LV_IMGBTN && USE_LV_TESTS 25 | 26 | /********************* 27 | * DEFINES 28 | *********************/ 29 | 30 | /********************** 31 | * TYPEDEFS 32 | **********************/ 33 | 34 | /********************** 35 | * GLOBAL PROTOTYPES 36 | **********************/ 37 | 38 | /** 39 | * Create imgbtns to test their functionalities 40 | */ 41 | void lv_test_imgbtn_1(void); 42 | 43 | /********************** 44 | * MACROS 45 | **********************/ 46 | 47 | #endif /*USE_LV_IMGBTN && USE_LV_TESTS*/ 48 | 49 | #ifdef __cplusplus 50 | } /* extern "C" */ 51 | #endif 52 | 53 | #endif /*LV_TEST_BAR_H*/ 54 | -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/lv_tests/lv_test_objx/lv_test_imgbtn/lv_test_imgbtn.mk: -------------------------------------------------------------------------------- 1 | CSRCS += lv_test_imgbtn.c \ 2 | imgbtn_img_1.c \ 3 | imgbtn_img_2.c \ 4 | imgbtn_img_3.c \ 5 | imgbtn_img_4.c 6 | 7 | DEPPATH += --dep-path $(LVGL_DIR)/lv_examples/lv_tests/lv_test_objx/lv_test_imgbtn 8 | VPATH += :$(LVGL_DIR)/lv_examples/lv_tests/lv_test_objx/lv_test_imgbtn 9 | 10 | CFLAGS += "-I$(LVGL_DIR)/lv_examples/lv_tests/lv_test_objx/lv_test_imgbtn" 11 | -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/lv_tests/lv_test_objx/lv_test_imgbtn/lv_test_imgbtn_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sipeed/LicheeDan_K210_examples/0b121730109d465ef04590b5cb2d5a905943fcf5/src/lvgl/lvgl/lv_examples/lv_tests/lv_test_objx/lv_test_imgbtn/lv_test_imgbtn_1.png -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/lv_tests/lv_test_objx/lv_test_kb/lv_test_kb.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_test_kb.h 3 | * 4 | */ 5 | 6 | #ifndef LV_TEST_KB_H 7 | #define LV_TEST_KB_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #ifdef LV_CONF_INCLUDE_SIMPLE 17 | #include "lvgl.h" 18 | #include "lv_ex_conf.h" 19 | #else 20 | #include "../../../../lvgl/lvgl.h" 21 | #include "../../../../lv_ex_conf.h" 22 | #endif 23 | 24 | #if USE_LV_KB && USE_LV_TESTS 25 | 26 | /********************* 27 | * DEFINES 28 | *********************/ 29 | 30 | /********************** 31 | * TYPEDEFS 32 | **********************/ 33 | 34 | /********************** 35 | * GLOBAL PROTOTYPES 36 | **********************/ 37 | 38 | /** 39 | * Create a default object and test the basic functions 40 | */ 41 | void lv_test_kb_1(void); 42 | 43 | /** 44 | * Create a styles keyboard 45 | */ 46 | void lv_test_kb_2(void); 47 | 48 | /********************** 49 | * MACROS 50 | **********************/ 51 | 52 | #endif /*USE_LV_KB*/ 53 | 54 | #ifdef __cplusplus 55 | } /* extern "C" */ 56 | #endif 57 | 58 | #endif /*USE_LV_KB && USE_LV_TESTS*/ 59 | -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/lv_tests/lv_test_objx/lv_test_kb/lv_test_kb.mk: -------------------------------------------------------------------------------- 1 | CSRCS += lv_test_kb.c 2 | 3 | DEPPATH += --dep-path $(LVGL_DIR)/lv_examples/lv_tests/lv_test_objx/lv_test_kb 4 | VPATH += :$(LVGL_DIR)/lv_examples/lv_tests/lv_test_objx/lv_test_kb 5 | 6 | CFLAGS += "-I$(LVGL_DIR)/lv_examples/lv_tests/lv_test_objx/lv_test_kb" 7 | -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/lv_tests/lv_test_objx/lv_test_kb/lv_test_kb_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sipeed/LicheeDan_K210_examples/0b121730109d465ef04590b5cb2d5a905943fcf5/src/lvgl/lvgl/lv_examples/lv_tests/lv_test_objx/lv_test_kb/lv_test_kb_1.png -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/lv_tests/lv_test_objx/lv_test_kb/lv_test_kb_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sipeed/LicheeDan_K210_examples/0b121730109d465ef04590b5cb2d5a905943fcf5/src/lvgl/lvgl/lv_examples/lv_tests/lv_test_objx/lv_test_kb/lv_test_kb_2.png -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/lv_tests/lv_test_objx/lv_test_label/lv_test_label.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_test_label.h 3 | * 4 | */ 5 | 6 | #ifndef LV_TEST_LABEL_H 7 | #define LV_TEST_LABEL_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #ifdef LV_CONF_INCLUDE_SIMPLE 17 | #include "lvgl.h" 18 | #include "lv_ex_conf.h" 19 | #else 20 | #include "../../../../lvgl/lvgl.h" 21 | #include "../../../../lv_ex_conf.h" 22 | #endif 23 | 24 | #if USE_LV_LABEL && USE_LV_TESTS 25 | 26 | /********************* 27 | * DEFINES 28 | *********************/ 29 | 30 | /********************** 31 | * TYPEDEFS 32 | **********************/ 33 | 34 | /********************** 35 | * GLOBAL PROTOTYPES 36 | **********************/ 37 | /** 38 | * Create labels with dynamic, static and array texts 39 | */ 40 | void lv_test_label_1(void); 41 | 42 | /** 43 | * Test label long modes 44 | */ 45 | void lv_test_label_2(void); 46 | 47 | /** 48 | * Test text insert and cut 49 | */ 50 | void lv_test_label_3(void); 51 | 52 | /********************** 53 | * MACROS 54 | **********************/ 55 | 56 | #endif /*USE_LV_LABEL*/ 57 | 58 | #ifdef __cplusplus 59 | } /* extern "C" */ 60 | #endif 61 | 62 | #endif /*USE_LV_LABEL && USE_LV_TESTS*/ 63 | -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/lv_tests/lv_test_objx/lv_test_label/lv_test_label.mk: -------------------------------------------------------------------------------- 1 | CSRCS += lv_test_label.c 2 | 3 | DEPPATH += --dep-path $(LVGL_DIR)/lv_examples/lv_tests/lv_test_objx/lv_test_label 4 | VPATH += :$(LVGL_DIR)/lv_examples/lv_tests/lv_test_objx/lv_test_label 5 | 6 | CFLAGS += "-I$(LVGL_DIR)/lv_examples/lv_tests/lv_test_objx/lv_test_label" 7 | -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/lv_tests/lv_test_objx/lv_test_label/lv_test_label_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sipeed/LicheeDan_K210_examples/0b121730109d465ef04590b5cb2d5a905943fcf5/src/lvgl/lvgl/lv_examples/lv_tests/lv_test_objx/lv_test_label/lv_test_label_1.png -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/lv_tests/lv_test_objx/lv_test_label/lv_test_label_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sipeed/LicheeDan_K210_examples/0b121730109d465ef04590b5cb2d5a905943fcf5/src/lvgl/lvgl/lv_examples/lv_tests/lv_test_objx/lv_test_label/lv_test_label_2.png -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/lv_tests/lv_test_objx/lv_test_label/lv_test_label_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sipeed/LicheeDan_K210_examples/0b121730109d465ef04590b5cb2d5a905943fcf5/src/lvgl/lvgl/lv_examples/lv_tests/lv_test_objx/lv_test_label/lv_test_label_3.png -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/lv_tests/lv_test_objx/lv_test_label/lv_test_label_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sipeed/LicheeDan_K210_examples/0b121730109d465ef04590b5cb2d5a905943fcf5/src/lvgl/lvgl/lv_examples/lv_tests/lv_test_objx/lv_test_label/lv_test_label_4.png -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/lv_tests/lv_test_objx/lv_test_led/lv_test_led.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_test_led.h 3 | * 4 | */ 5 | 6 | #ifndef LV_TEST_LED_H 7 | #define LV_TEST_LED_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #ifdef LV_CONF_INCLUDE_SIMPLE 17 | #include "lvgl.h" 18 | #include "lv_ex_conf.h" 19 | #else 20 | #include "../../../../lvgl/lvgl.h" 21 | #include "../../../../lv_ex_conf.h" 22 | #endif 23 | 24 | #if USE_LV_LED && USE_LV_TESTS 25 | 26 | /********************* 27 | * DEFINES 28 | *********************/ 29 | 30 | /********************** 31 | * TYPEDEFS 32 | **********************/ 33 | 34 | /********************** 35 | * GLOBAL PROTOTYPES 36 | **********************/ 37 | 38 | /** 39 | * Create LEDs to test their functionalities 40 | */ 41 | void lv_test_led_1(void); 42 | /********************** 43 | * MACROS 44 | **********************/ 45 | 46 | #endif /*USE_LV_LED && USE_LV_TESTS*/ 47 | 48 | #ifdef __cplusplus 49 | } /* extern "C" */ 50 | #endif 51 | 52 | #endif /*LV_TEST_LED_H*/ 53 | -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/lv_tests/lv_test_objx/lv_test_led/lv_test_led.mk: -------------------------------------------------------------------------------- 1 | CSRCS += lv_test_led.c 2 | 3 | DEPPATH += --dep-path $(LVGL_DIR)/lv_examples/lv_tests/lv_test_objx/lv_test_led 4 | VPATH += :$(LVGL_DIR)/lv_examples/lv_tests/lv_test_objx/lv_test_led 5 | 6 | CFLAGS += "-I$(LVGL_DIR)/lv_examples/lv_tests/lv_test_objx/lv_test_led" 7 | -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/lv_tests/lv_test_objx/lv_test_led/lv_test_led_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sipeed/LicheeDan_K210_examples/0b121730109d465ef04590b5cb2d5a905943fcf5/src/lvgl/lvgl/lv_examples/lv_tests/lv_test_objx/lv_test_led/lv_test_led_1.png -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/lv_tests/lv_test_objx/lv_test_line/lv_test_line.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_test_line.h 3 | * 4 | */ 5 | 6 | #ifndef LV_TEST_LINE_H 7 | #define LV_TEST_LINE_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #ifdef LV_CONF_INCLUDE_SIMPLE 17 | #include "lvgl.h" 18 | #include "lv_ex_conf.h" 19 | #else 20 | #include "../../../../lvgl/lvgl.h" 21 | #include "../../../../lv_ex_conf.h" 22 | #endif 23 | 24 | #if USE_LV_LINE && USE_LV_TESTS 25 | 26 | /********************* 27 | * DEFINES 28 | *********************/ 29 | 30 | /********************** 31 | * TYPEDEFS 32 | **********************/ 33 | 34 | /********************** 35 | * GLOBAL PROTOTYPES 36 | **********************/ 37 | 38 | /** 39 | * Create lines to test their functionalities 40 | */ 41 | void lv_test_line_1(void); 42 | 43 | /********************** 44 | * MACROS 45 | **********************/ 46 | 47 | #endif /*USE_LV_LINE && USE_LV_TESTS*/ 48 | 49 | #ifdef __cplusplus 50 | } /* extern "C" */ 51 | #endif 52 | 53 | #endif /*LV_TEST_LINE_H*/ 54 | -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/lv_tests/lv_test_objx/lv_test_line/lv_test_line.mk: -------------------------------------------------------------------------------- 1 | CSRCS += lv_test_line.c 2 | 3 | DEPPATH += --dep-path $(LVGL_DIR)/lv_examples/lv_tests/lv_test_objx/lv_test_line 4 | VPATH += :$(LVGL_DIR)/lv_examples/lv_tests/lv_test_objx/lv_test_line 5 | 6 | CFLAGS += "-I$(LVGL_DIR)/lv_examples/lv_tests/lv_test_objx/lv_test_line" 7 | -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/lv_tests/lv_test_objx/lv_test_line/lv_test_line_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sipeed/LicheeDan_K210_examples/0b121730109d465ef04590b5cb2d5a905943fcf5/src/lvgl/lvgl/lv_examples/lv_tests/lv_test_objx/lv_test_line/lv_test_line_1.png -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/lv_tests/lv_test_objx/lv_test_list/lv_test_list.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_test_list.h 3 | * 4 | */ 5 | 6 | #ifndef LV_TEST_LIST_H 7 | #define LV_TEST_LIST_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #ifdef LV_CONF_INCLUDE_SIMPLE 17 | #include "lvgl.h" 18 | #include "lv_ex_conf.h" 19 | #else 20 | #include "../../../../lvgl/lvgl.h" 21 | #include "../../../../lv_ex_conf.h" 22 | #endif 23 | 24 | #if USE_LV_LIST && USE_LV_TESTS 25 | 26 | /********************* 27 | * DEFINES 28 | *********************/ 29 | 30 | /********************** 31 | * TYPEDEFS 32 | **********************/ 33 | 34 | /********************** 35 | * GLOBAL PROTOTYPES 36 | **********************/ 37 | 38 | /** 39 | * Create lists to test their functionalities 40 | */ 41 | void lv_test_list_1(void); 42 | 43 | /********************** 44 | * MACROS 45 | **********************/ 46 | 47 | #endif /*USE_LV_LIST && USE_LV_TESTS*/ 48 | 49 | #ifdef __cplusplus 50 | } /* extern "C" */ 51 | #endif 52 | 53 | #endif /*LV_TEST_LIST_H*/ 54 | -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/lv_tests/lv_test_objx/lv_test_list/lv_test_list.mk: -------------------------------------------------------------------------------- 1 | CSRCS += lv_test_list.c 2 | 3 | DEPPATH += --dep-path $(LVGL_DIR)/lv_examples/lv_tests/lv_test_objx/lv_test_list 4 | VPATH += :$(LVGL_DIR)/lv_examples/lv_tests/lv_test_objx/lv_test_list 5 | 6 | CFLAGS += "-I$(LVGL_DIR)/lv_examples/lv_tests/lv_test_objx/lv_test_list" 7 | -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/lv_tests/lv_test_objx/lv_test_list/lv_test_list_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sipeed/LicheeDan_K210_examples/0b121730109d465ef04590b5cb2d5a905943fcf5/src/lvgl/lvgl/lv_examples/lv_tests/lv_test_objx/lv_test_list/lv_test_list_1.png -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/lv_tests/lv_test_objx/lv_test_lmeter/lv_test_lmeter.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_test_lmeter.h 3 | * 4 | */ 5 | 6 | #ifndef LV_TEST_LMETER_H 7 | #define LV_TEST_LMETER_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #ifdef LV_CONF_INCLUDE_SIMPLE 17 | #include "lvgl.h" 18 | #include "lv_ex_conf.h" 19 | #else 20 | #include "../../../../lvgl/lvgl.h" 21 | #include "../../../../lv_ex_conf.h" 22 | #endif 23 | 24 | #if USE_LV_LMETER && USE_LV_TESTS 25 | 26 | /********************* 27 | * DEFINES 28 | *********************/ 29 | 30 | /********************** 31 | * TYPEDEFS 32 | **********************/ 33 | 34 | /********************** 35 | * GLOBAL PROTOTYPES 36 | **********************/ 37 | /** 38 | * Create line meters to test their functionalities 39 | */ 40 | void lv_test_lmeter_1(void); 41 | 42 | /********************** 43 | * MACROS 44 | **********************/ 45 | 46 | #endif /*USE_LV_LMETER && USE_LV_TESTS*/ 47 | 48 | #ifdef __cplusplus 49 | } /* extern "C" */ 50 | #endif 51 | 52 | #endif /*LV_TEST_LMETER_H*/ 53 | -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/lv_tests/lv_test_objx/lv_test_lmeter/lv_test_lmeter.mk: -------------------------------------------------------------------------------- 1 | CSRCS += lv_test_lmeter.c 2 | 3 | DEPPATH += --dep-path $(LVGL_DIR)/lv_examples/lv_tests/lv_test_objx/lv_test_lmeter 4 | VPATH += :$(LVGL_DIR)/lv_examples/lv_tests/lv_test_objx/lv_test_lmeter 5 | 6 | CFLAGS += "-I$(LVGL_DIR)/lv_examples/lv_tests/lv_test_objx/lv_test_lmeter" 7 | -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/lv_tests/lv_test_objx/lv_test_lmeter/lv_test_lmeter_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sipeed/LicheeDan_K210_examples/0b121730109d465ef04590b5cb2d5a905943fcf5/src/lvgl/lvgl/lv_examples/lv_tests/lv_test_objx/lv_test_lmeter/lv_test_lmeter_1.png -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/lv_tests/lv_test_objx/lv_test_mbox/lv_test_mbox.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_test_mbox.h 3 | * 4 | */ 5 | 6 | #ifndef LV_TEST_MBOX_H 7 | #define LV_TEST_MBOX_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #ifdef LV_CONF_INCLUDE_SIMPLE 17 | #include "lvgl.h" 18 | #include "lv_ex_conf.h" 19 | #else 20 | #include "../../../../lvgl/lvgl.h" 21 | #include "../../../../lv_ex_conf.h" 22 | #endif 23 | 24 | #if USE_LV_MBOX && USE_LV_TESTS 25 | 26 | /********************* 27 | * DEFINES 28 | *********************/ 29 | 30 | /********************** 31 | * TYPEDEFS 32 | **********************/ 33 | 34 | /********************** 35 | * GLOBAL PROTOTYPES 36 | **********************/ 37 | 38 | /** 39 | * Create message boxes to test their functionalities 40 | */ 41 | void lv_test_mbox_1(void); 42 | 43 | /********************** 44 | * MACROS 45 | **********************/ 46 | 47 | #endif /*USE_LV_MBOX && USE_LV_TESTS*/ 48 | 49 | #ifdef __cplusplus 50 | } /* extern "C" */ 51 | #endif 52 | 53 | #endif /*LV_TEST_MBOX_H*/ 54 | -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/lv_tests/lv_test_objx/lv_test_mbox/lv_test_mbox.mk: -------------------------------------------------------------------------------- 1 | CSRCS += lv_test_mbox.c 2 | 3 | DEPPATH += --dep-path $(LVGL_DIR)/lv_examples/lv_tests/lv_test_objx/lv_test_mbox 4 | VPATH += :$(LVGL_DIR)/lv_examples/lv_tests/lv_test_objx/lv_test_mbox 5 | 6 | CFLAGS += "-I$(LVGL_DIR)/lv_examples/lv_tests/lv_test_objx/lv_test_mbox" 7 | -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/lv_tests/lv_test_objx/lv_test_mbox/lv_test_mbox_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sipeed/LicheeDan_K210_examples/0b121730109d465ef04590b5cb2d5a905943fcf5/src/lvgl/lvgl/lv_examples/lv_tests/lv_test_objx/lv_test_mbox/lv_test_mbox_1.png -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/lv_tests/lv_test_objx/lv_test_page/lv_test_page.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_test_page.h 3 | * 4 | */ 5 | 6 | #ifndef LV_TEST_PAGE_H 7 | #define LV_TEST_PAGE_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #ifdef LV_CONF_INCLUDE_SIMPLE 17 | #include "lvgl.h" 18 | #include "lv_ex_conf.h" 19 | #else 20 | #include "../../../../lvgl/lvgl.h" 21 | #include "../../../../lv_ex_conf.h" 22 | #endif 23 | 24 | #if USE_LV_PAGE && USE_LV_TESTS 25 | 26 | /********************* 27 | * DEFINES 28 | *********************/ 29 | 30 | /********************** 31 | * TYPEDEFS 32 | **********************/ 33 | 34 | /********************** 35 | * GLOBAL PROTOTYPES 36 | **********************/ 37 | 38 | /** 39 | * Create pages to test their basic functionalities 40 | */ 41 | void lv_test_page_1(void); 42 | 43 | /** 44 | * Test styling, scrollbar modes, layout and action 45 | */ 46 | void lv_test_page_2(void); 47 | 48 | /********************** 49 | * MACROS 50 | **********************/ 51 | 52 | #endif /*USE_LV_PAGE && USE_LV_TESTS*/ 53 | 54 | #ifdef __cplusplus 55 | } /* extern "C" */ 56 | #endif 57 | 58 | #endif /*LV_TEST_PAGE_H*/ 59 | -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/lv_tests/lv_test_objx/lv_test_page/lv_test_page.mk: -------------------------------------------------------------------------------- 1 | CSRCS += lv_test_page.c 2 | 3 | DEPPATH += --dep-path $(LVGL_DIR)/lv_examples/lv_tests/lv_test_objx/lv_test_page 4 | VPATH += :$(LVGL_DIR)/lv_examples/lv_tests/lv_test_objx/lv_test_page 5 | 6 | CFLAGS += "-I$(LVGL_DIR)/lv_examples/lv_tests/lv_test_objx/lv_test_page" 7 | -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/lv_tests/lv_test_objx/lv_test_page/lv_test_page_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sipeed/LicheeDan_K210_examples/0b121730109d465ef04590b5cb2d5a905943fcf5/src/lvgl/lvgl/lv_examples/lv_tests/lv_test_objx/lv_test_page/lv_test_page_1.png -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/lv_tests/lv_test_objx/lv_test_page/lv_test_page_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sipeed/LicheeDan_K210_examples/0b121730109d465ef04590b5cb2d5a905943fcf5/src/lvgl/lvgl/lv_examples/lv_tests/lv_test_objx/lv_test_page/lv_test_page_2.png -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/lv_tests/lv_test_objx/lv_test_preload/lv_test_preload.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_test_preload.h 3 | * 4 | */ 5 | 6 | #ifndef LV_TEST_PRELOAD_H 7 | #define LV_TEST_PRELOAD_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #ifdef LV_CONF_INCLUDE_SIMPLE 17 | #include "lvgl.h" 18 | #include "lv_ex_conf.h" 19 | #else 20 | #include "../../../../lvgl/lvgl.h" 21 | #include "../../../../lv_ex_conf.h" 22 | #endif 23 | 24 | #if USE_LV_PRELOAD && USE_LV_TESTS 25 | 26 | /********************* 27 | * DEFINES 28 | *********************/ 29 | 30 | /********************** 31 | * TYPEDEFS 32 | **********************/ 33 | 34 | /********************** 35 | * GLOBAL PROTOTYPES 36 | **********************/ 37 | 38 | /** 39 | * Create preloads to test their functionalities 40 | */ 41 | void lv_test_preload_1(void); 42 | 43 | /********************** 44 | * MACROS 45 | **********************/ 46 | 47 | #endif /*USE_LV_PRELOAD && USE_LV_TESTS*/ 48 | 49 | #ifdef __cplusplus 50 | } /* extern "C" */ 51 | #endif 52 | 53 | #endif /*LV_TEST_BAR_H*/ 54 | -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/lv_tests/lv_test_objx/lv_test_preload/lv_test_preload.mk: -------------------------------------------------------------------------------- 1 | CSRCS += lv_test_preload.c 2 | 3 | DEPPATH += --dep-path $(LVGL_DIR)/lv_examples/lv_tests/lv_test_objx/lv_test_preload 4 | VPATH += :$(LVGL_DIR)/lv_examples/lv_tests/lv_test_objx/lv_test_preload 5 | 6 | CFLAGS += "-I$(LVGL_DIR)/lv_examples/lv_tests/lv_test_objx/lv_test_preload" 7 | -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/lv_tests/lv_test_objx/lv_test_preload/lv_test_preload_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sipeed/LicheeDan_K210_examples/0b121730109d465ef04590b5cb2d5a905943fcf5/src/lvgl/lvgl/lv_examples/lv_tests/lv_test_objx/lv_test_preload/lv_test_preload_1.png -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/lv_tests/lv_test_objx/lv_test_roller/lv_test_roller.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_test_roller.h 3 | * 4 | */ 5 | 6 | #ifndef LV_TEST_ROLLER_H 7 | #define LV_TEST_ROLLER_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #ifdef LV_CONF_INCLUDE_SIMPLE 17 | #include "lvgl.h" 18 | #include "lv_ex_conf.h" 19 | #else 20 | #include "../../../../lvgl/lvgl.h" 21 | #include "../../../../lv_ex_conf.h" 22 | #endif 23 | 24 | #if USE_LV_ROLLER && USE_LV_TESTS 25 | 26 | /********************* 27 | * DEFINES 28 | *********************/ 29 | 30 | /********************** 31 | * TYPEDEFS 32 | **********************/ 33 | 34 | /********************** 35 | * GLOBAL PROTOTYPES 36 | **********************/ 37 | 38 | /** 39 | * Create rollers to test their functionalities 40 | */ 41 | void lv_test_roller_1(void); 42 | 43 | /********************** 44 | * MACROS 45 | **********************/ 46 | 47 | #endif /*USE_LV_ROLLER && USE_LV_TESTS*/ 48 | 49 | #ifdef __cplusplus 50 | } /* extern "C" */ 51 | #endif 52 | 53 | #endif /*LV_TEST_ROLLER_H*/ 54 | -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/lv_tests/lv_test_objx/lv_test_roller/lv_test_roller.mk: -------------------------------------------------------------------------------- 1 | CSRCS += lv_test_roller.c 2 | 3 | DEPPATH += --dep-path $(LVGL_DIR)/lv_examples/lv_tests/lv_test_objx/lv_test_roller 4 | VPATH += :$(LVGL_DIR)/lv_examples/lv_tests/lv_test_objx/lv_test_roller 5 | 6 | CFLAGS += "-I$(LVGL_DIR)/lv_examples/lv_tests/lv_test_objx/lv_test_roller" 7 | -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/lv_tests/lv_test_objx/lv_test_roller/lv_test_roller_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sipeed/LicheeDan_K210_examples/0b121730109d465ef04590b5cb2d5a905943fcf5/src/lvgl/lvgl/lv_examples/lv_tests/lv_test_objx/lv_test_roller/lv_test_roller_1.png -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/lv_tests/lv_test_objx/lv_test_slider/lv_test_slider.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_test_slider.h 3 | * 4 | */ 5 | 6 | #ifndef LV_TEST_SLIDER_H 7 | #define LV_TEST_SLIDER_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #ifdef LV_CONF_INCLUDE_SIMPLE 17 | #include "lvgl.h" 18 | #include "lv_ex_conf.h" 19 | #else 20 | #include "../../../../lvgl/lvgl.h" 21 | #include "../../../../lv_ex_conf.h" 22 | #endif 23 | 24 | #if USE_LV_SLIDER && USE_LV_TESTS 25 | 26 | /********************* 27 | * DEFINES 28 | *********************/ 29 | 30 | /********************** 31 | * TYPEDEFS 32 | **********************/ 33 | 34 | /********************** 35 | * GLOBAL PROTOTYPES 36 | **********************/ 37 | 38 | /** 39 | * Create sliders to test their functionalities 40 | */ 41 | void lv_test_slider_1(void); 42 | 43 | /********************** 44 | * MACROS 45 | **********************/ 46 | 47 | #endif /*USE_LV_SLIDER*/ 48 | 49 | #ifdef __cplusplus 50 | } /* extern "C" */ 51 | #endif 52 | 53 | #endif /*USE_LV_SLIDER && USE_LV_TESTS*/ 54 | -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/lv_tests/lv_test_objx/lv_test_slider/lv_test_slider.mk: -------------------------------------------------------------------------------- 1 | CSRCS += lv_test_slider.c 2 | 3 | DEPPATH += --dep-path $(LVGL_DIR)/lv_examples/lv_tests/lv_test_objx/lv_slider_bar 4 | VPATH += :$(LVGL_DIR)/lv_examples/lv_tests/lv_test_objx/lv_test_slider 5 | 6 | CFLAGS += "-I$(LVGL_DIR)/lv_examples/lv_tests/lv_test_objx/lv_test_slider" 7 | -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/lv_tests/lv_test_objx/lv_test_slider/lv_test_slider_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sipeed/LicheeDan_K210_examples/0b121730109d465ef04590b5cb2d5a905943fcf5/src/lvgl/lvgl/lv_examples/lv_tests/lv_test_objx/lv_test_slider/lv_test_slider_1.png -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/lv_tests/lv_test_objx/lv_test_sw/lv_test_sw.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_test_sw.h 3 | * 4 | */ 5 | 6 | #ifndef LV_TEST_SW_H 7 | #define LV_TEST_SW_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #ifdef LV_CONF_INCLUDE_SIMPLE 17 | #include "lvgl.h" 18 | #include "lv_ex_conf.h" 19 | #else 20 | #include "../../../../lvgl/lvgl.h" 21 | #include "../../../../lv_ex_conf.h" 22 | #endif 23 | 24 | #if USE_LV_SW && USE_LV_TESTS 25 | 26 | /********************* 27 | * DEFINES 28 | *********************/ 29 | 30 | /********************** 31 | * TYPEDEFS 32 | **********************/ 33 | 34 | /********************** 35 | * GLOBAL PROTOTYPES 36 | **********************/ 37 | 38 | /** 39 | * Create switches to test their functionalities 40 | */ 41 | void lv_test_sw_1(void); 42 | 43 | /********************** 44 | * MACROS 45 | **********************/ 46 | 47 | #endif /*USE_LV_SW && USE_LV_TESTS*/ 48 | 49 | #ifdef __cplusplus 50 | } /* extern "C" */ 51 | #endif 52 | 53 | #endif /*LV_TEST_SW_H*/ 54 | -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/lv_tests/lv_test_objx/lv_test_sw/lv_test_sw.mk: -------------------------------------------------------------------------------- 1 | CSRCS += lv_test_sw.c 2 | 3 | DEPPATH += --dep-path $(LVGL_DIR)/lv_examples/lv_tests/lv_test_objx/lv_test_sw 4 | VPATH += :$(LVGL_DIR)/lv_examples/lv_tests/lv_test_objx/lv_test_sw 5 | 6 | CFLAGS += "-I$(LVGL_DIR)/lv_examples/lv_tests/lv_test_objx/lv_test_sw" 7 | -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/lv_tests/lv_test_objx/lv_test_sw/lv_test_sw_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sipeed/LicheeDan_K210_examples/0b121730109d465ef04590b5cb2d5a905943fcf5/src/lvgl/lvgl/lv_examples/lv_tests/lv_test_objx/lv_test_sw/lv_test_sw_1.png -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/lv_tests/lv_test_objx/lv_test_ta/lv_test_ta.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_test_ta.h 3 | * 4 | */ 5 | 6 | #ifndef LV_TEST_TA_H 7 | #define LV_TEST_TA_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #ifdef LV_CONF_INCLUDE_SIMPLE 17 | #include "lvgl.h" 18 | #include "lv_ex_conf.h" 19 | #else 20 | #include "../../../../lvgl/lvgl.h" 21 | #include "../../../../lv_ex_conf.h" 22 | #endif 23 | 24 | #if USE_LV_TA && USE_LV_TESTS 25 | 26 | /********************* 27 | * DEFINES 28 | *********************/ 29 | 30 | /********************** 31 | * TYPEDEFS 32 | **********************/ 33 | 34 | /********************** 35 | * GLOBAL PROTOTYPES 36 | **********************/ 37 | 38 | /** 39 | * Create text areas to test their basic functionalities 40 | */ 41 | void lv_test_ta_1(void); 42 | 43 | /** 44 | * Test cursor modes 45 | */ 46 | void lv_test_ta_2(void); 47 | 48 | /********************** 49 | * MACROS 50 | **********************/ 51 | 52 | #endif /*USE_LV_TA && USE_LV_TESTS*/ 53 | 54 | #ifdef __cplusplus 55 | } /* extern "C" */ 56 | #endif 57 | 58 | #endif /*LV_TEST_TA_H*/ 59 | -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/lv_tests/lv_test_objx/lv_test_ta/lv_test_ta.mk: -------------------------------------------------------------------------------- 1 | CSRCS += lv_test_ta.c 2 | 3 | DEPPATH += --dep-path $(LVGL_DIR)/lv_examples/lv_tests/lv_test_objx/lv_test_ta 4 | VPATH += :$(LVGL_DIR)/lv_examples/lv_tests/lv_test_objx/lv_test_ta 5 | 6 | CFLAGS += "-I$(LVGL_DIR)/lv_examples/lv_tests/lv_test_objx/lv_test_ta" 7 | -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/lv_tests/lv_test_objx/lv_test_ta/lv_test_ta_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sipeed/LicheeDan_K210_examples/0b121730109d465ef04590b5cb2d5a905943fcf5/src/lvgl/lvgl/lv_examples/lv_tests/lv_test_objx/lv_test_ta/lv_test_ta_1.png -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/lv_tests/lv_test_objx/lv_test_ta/lv_test_ta_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sipeed/LicheeDan_K210_examples/0b121730109d465ef04590b5cb2d5a905943fcf5/src/lvgl/lvgl/lv_examples/lv_tests/lv_test_objx/lv_test_ta/lv_test_ta_2.png -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/lv_tests/lv_test_objx/lv_test_table/lv_test_table.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_test_table.h 3 | * 4 | */ 5 | 6 | #ifndef LV_TEST_TABLE_H 7 | #define LV_TEST_TABLE_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #ifdef LV_CONF_INCLUDE_SIMPLE 17 | #include "lvgl.h" 18 | #include "lv_ex_conf.h" 19 | #else 20 | #include "../../../../lvgl/lvgl.h" 21 | #include "../../../../lv_ex_conf.h" 22 | #endif 23 | 24 | #if USE_LV_TABLE && USE_LV_TESTS 25 | 26 | /********************* 27 | * DEFINES 28 | *********************/ 29 | 30 | /********************** 31 | * TYPEDEFS 32 | **********************/ 33 | 34 | /********************** 35 | * GLOBAL PROTOTYPES 36 | **********************/ 37 | 38 | /** 39 | * Create tables to test their functionalities 40 | */ 41 | void lv_test_table_1(void); 42 | 43 | /** 44 | * Create tables to test their functionalities 45 | */ 46 | void lv_test_table_2(void); 47 | 48 | /********************** 49 | * MACROS 50 | **********************/ 51 | 52 | #endif /*USE_LV_TABLE && USE_LV_TESTS*/ 53 | 54 | #ifdef __cplusplus 55 | } /* extern "C" */ 56 | #endif 57 | 58 | #endif /*LV_TEST_TABLE_H*/ 59 | -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/lv_tests/lv_test_objx/lv_test_table/lv_test_table.mk: -------------------------------------------------------------------------------- 1 | CSRCS += lv_test_table.c 2 | 3 | DEPPATH += --dep-path $(LVGL_DIR)/lv_examples/lv_tests/lv_test_objx/lv_test_table 4 | VPATH += :$(LVGL_DIR)/lv_examples/lv_tests/lv_test_objx/lv_test_table 5 | 6 | CFLAGS += "-I$(LVGL_DIR)/lv_examples/lv_tests/lv_test_objx/lv_test_table" 7 | -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/lv_tests/lv_test_objx/lv_test_table/lv_test_table_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sipeed/LicheeDan_K210_examples/0b121730109d465ef04590b5cb2d5a905943fcf5/src/lvgl/lvgl/lv_examples/lv_tests/lv_test_objx/lv_test_table/lv_test_table_1.png -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/lv_tests/lv_test_objx/lv_test_table/lv_test_table_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sipeed/LicheeDan_K210_examples/0b121730109d465ef04590b5cb2d5a905943fcf5/src/lvgl/lvgl/lv_examples/lv_tests/lv_test_objx/lv_test_table/lv_test_table_2.png -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/lv_tests/lv_test_objx/lv_test_tabview/lv_test_tabview.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_test_tabview.h 3 | * 4 | */ 5 | 6 | #ifndef LV_TEST_TABVIEW_H 7 | #define LV_TEST_TABVIEW_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #ifdef LV_CONF_INCLUDE_SIMPLE 17 | #include "lvgl.h" 18 | #include "lv_ex_conf.h" 19 | #else 20 | #include "../../../../lvgl/lvgl.h" 21 | #include "../../../../lv_ex_conf.h" 22 | #endif 23 | 24 | #if USE_LV_TABVIEW && USE_LV_TESTS 25 | 26 | /********************* 27 | * DEFINES 28 | *********************/ 29 | 30 | /********************** 31 | * TYPEDEFS 32 | **********************/ 33 | 34 | /********************** 35 | * GLOBAL PROTOTYPES 36 | **********************/ 37 | 38 | /** 39 | * Create tab views to test their functionalities 40 | */ 41 | void lv_test_tabview_1(void); 42 | 43 | /********************** 44 | * MACROS 45 | **********************/ 46 | 47 | #endif /*USE_LV_TABVIEW && USE_LV_TESTS*/ 48 | 49 | #ifdef __cplusplus 50 | } /* extern "C" */ 51 | #endif 52 | 53 | #endif /*LV_TEST_TABVIEW_H*/ 54 | -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/lv_tests/lv_test_objx/lv_test_tabview/lv_test_tabview.mk: -------------------------------------------------------------------------------- 1 | CSRCS += lv_test_tabview.c 2 | 3 | DEPPATH += --dep-path $(LVGL_DIR)/lv_examples/lv_tests/lv_test_objx/lv_test_tabview 4 | VPATH += :$(LVGL_DIR)/lv_examples/lv_tests/lv_test_objx/lv_test_tabview 5 | 6 | CFLAGS += "-I$(LVGL_DIR)/lv_examples/lv_tests/lv_test_objx/lv_test_tabview" 7 | -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/lv_tests/lv_test_objx/lv_test_tabview/lv_test_tabview_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sipeed/LicheeDan_K210_examples/0b121730109d465ef04590b5cb2d5a905943fcf5/src/lvgl/lvgl/lv_examples/lv_tests/lv_test_objx/lv_test_tabview/lv_test_tabview_1.png -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/lv_tests/lv_test_objx/lv_test_tileview/lv_test_tileview.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_test_tileview.h 3 | * 4 | */ 5 | 6 | #ifndef LV_TEST_TILEVIEW_H 7 | #define LV_TEST_TILEVIEW_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #ifdef LV_CONF_INCLUDE_SIMPLE 17 | #include "lvgl.h" 18 | #include "lv_ex_conf.h" 19 | #else 20 | #include "../../../../lvgl/lvgl.h" 21 | #include "../../../../lv_ex_conf.h" 22 | #endif 23 | 24 | #if USE_LV_TILEVIEW && USE_LV_TESTS 25 | 26 | /********************* 27 | * DEFINES 28 | *********************/ 29 | 30 | /********************** 31 | * TYPEDEFS 32 | **********************/ 33 | 34 | /********************** 35 | * GLOBAL PROTOTYPES 36 | **********************/ 37 | 38 | /** 39 | * Create a tileview to test their functionalities 40 | */ 41 | void lv_test_tileview_1(void); 42 | 43 | /********************** 44 | * MACROS 45 | **********************/ 46 | 47 | #endif /*USE_LV_TILEVIEW && USE_LV_TESTS*/ 48 | 49 | #ifdef __cplusplus 50 | } /* extern "C" */ 51 | #endif 52 | 53 | #endif /*LV_TEST_TILEVIEW_H*/ 54 | -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/lv_tests/lv_test_objx/lv_test_tileview/lv_test_tileview.mk: -------------------------------------------------------------------------------- 1 | CSRCS += lv_test_tileview.c 2 | 3 | DEPPATH += --dep-path $(LVGL_DIR)/lv_examples/lv_tests/lv_test_objx/lv_test_tileview 4 | VPATH += :$(LVGL_DIR)/lv_examples/lv_tests/lv_test_objx/lv_test_tileview 5 | 6 | CFLAGS += "-I$(LVGL_DIR)/lv_examples/lv_tests/lv_test_objx/lv_test_tileview" 7 | -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/lv_tests/lv_test_objx/lv_test_tileview/lv_test_tileview_1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sipeed/LicheeDan_K210_examples/0b121730109d465ef04590b5cb2d5a905943fcf5/src/lvgl/lvgl/lv_examples/lv_tests/lv_test_objx/lv_test_tileview/lv_test_tileview_1.gif -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/lv_tests/lv_test_objx/lv_test_win/lv_test_win.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_test_win.h 3 | * 4 | */ 5 | 6 | #ifndef LV_TEST_WIN_H 7 | #define LV_TEST_WIN_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #ifdef LV_CONF_INCLUDE_SIMPLE 17 | #include "lvgl.h" 18 | #include "lv_ex_conf.h" 19 | #else 20 | #include "../../../../lvgl/lvgl.h" 21 | #include "../../../../lv_ex_conf.h" 22 | #endif 23 | 24 | #if USE_LV_WIN && USE_LV_TESTS 25 | 26 | /********************* 27 | * DEFINES 28 | *********************/ 29 | 30 | /********************** 31 | * TYPEDEFS 32 | **********************/ 33 | 34 | /********************** 35 | * GLOBAL PROTOTYPES 36 | **********************/ 37 | 38 | /** 39 | * Create windows to test their functionalities 40 | */ 41 | void lv_test_win_1(void); 42 | 43 | /********************** 44 | * MACROS 45 | **********************/ 46 | 47 | #endif /*USE_LV_WIN && USE_LV_TESTS*/ 48 | 49 | #ifdef __cplusplus 50 | } /* extern "C" */ 51 | #endif 52 | 53 | #endif /*LV_TEST_WIN_H*/ 54 | -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/lv_tests/lv_test_objx/lv_test_win/lv_test_win.mk: -------------------------------------------------------------------------------- 1 | CSRCS += lv_test_win.c 2 | 3 | DEPPATH += --dep-path $(LVGL_DIR)/lv_examples/lv_tests/lv_test_objx/lv_test_win 4 | VPATH += :$(LVGL_DIR)/lv_examples/lv_tests/lv_test_objx/lv_test_win 5 | 6 | CFLAGS += "-I$(LVGL_DIR)/lv_examples/lv_tests/lv_test_objx/lv_test_win" 7 | -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/lv_tests/lv_test_objx/lv_test_win/lv_test_win_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sipeed/LicheeDan_K210_examples/0b121730109d465ef04590b5cb2d5a905943fcf5/src/lvgl/lvgl/lv_examples/lv_tests/lv_test_objx/lv_test_win/lv_test_win_1.png -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/lv_tests/lv_test_stress/lv_test_stress.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_test_object.h 3 | * 4 | */ 5 | 6 | #ifndef LV_TEST_OBJECT_H 7 | #define LV_TEST_OBJECT_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #ifdef LV_CONF_INCLUDE_SIMPLE 17 | #include "lvgl.h" 18 | #include "lv_ex_conf.h" 19 | #else 20 | #include "../../../lvgl/lvgl.h" 21 | #include "../../../lv_ex_conf.h" 22 | #endif 23 | 24 | #if USE_LV_TESTS 25 | 26 | /********************* 27 | * DEFINES 28 | *********************/ 29 | 30 | /********************** 31 | * TYPEDEFS 32 | **********************/ 33 | 34 | /********************** 35 | * GLOBAL PROTOTYPES 36 | **********************/ 37 | 38 | /** 39 | * Create and delete a lot of objects and animations. 40 | */ 41 | void lv_test_stress_1(void); 42 | 43 | /********************** 44 | * MACROS 45 | **********************/ 46 | 47 | #endif /*USE_LV_TESTS*/ 48 | 49 | #ifdef __cplusplus 50 | } /* extern "C" */ 51 | #endif 52 | 53 | #endif /*LV_TEST_BAR_H*/ 54 | -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/lv_tests/lv_test_stress/lv_test_stress.mk: -------------------------------------------------------------------------------- 1 | CSRCS += lv_test_stress.c 2 | 3 | DEPPATH += --dep-path $(LVGL_DIR)/lv_examples/lv_tests/lv_test_stress 4 | VPATH += :$(LVGL_DIR)/lv_examples/lv_tests/lv_test_stress 5 | 6 | CFLAGS += "-I$(LVGL_DIR)/lv_examples/lv_tests/lv_test_stress" 7 | -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/lv_tests/lv_test_stress/lv_test_stress.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sipeed/LicheeDan_K210_examples/0b121730109d465ef04590b5cb2d5a905943fcf5/src/lvgl/lvgl/lv_examples/lv_tests/lv_test_stress/lv_test_stress.png -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/lv_tests/lv_test_theme/lv_test_theme.mk: -------------------------------------------------------------------------------- 1 | CSRCS += lv_test_theme_1.c 2 | CSRCS += lv_test_theme_2.c 3 | 4 | DEPPATH += --dep-path $(LVGL_DIR)/lv_examples/lv_tests/lv_test_theme 5 | VPATH += :$(LVGL_DIR)/lv_examples/lv_tests/lv_test_theme 6 | 7 | CFLAGS += "-I$(LVGL_DIR)/lv_examples/lv_tests/lv_test_theme" 8 | -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/lv_tests/lv_test_theme/lv_test_theme_1.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_test_theme.h 3 | * 4 | */ 5 | 6 | #ifndef LV_TEST_THEME_H 7 | #define LV_TEST_THEME_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #ifdef LV_CONF_INCLUDE_SIMPLE 17 | #include "lvgl.h" 18 | #include "lv_ex_conf.h" 19 | #else 20 | #include "../../../lvgl/lvgl.h" 21 | #include "../../../lv_ex_conf.h" 22 | #endif 23 | 24 | #if USE_LV_TESTS 25 | 26 | 27 | /********************* 28 | * DEFINES 29 | *********************/ 30 | 31 | /********************** 32 | * TYPEDEFS 33 | **********************/ 34 | 35 | /********************** 36 | * GLOBAL PROTOTYPES 37 | **********************/ 38 | 39 | /** 40 | * Create a test screen with a lot objects and apply the given theme on them 41 | * @param th pointer to a theme 42 | */ 43 | void lv_test_theme_1(lv_theme_t *th); 44 | 45 | /********************** 46 | * MACROS 47 | **********************/ 48 | 49 | #endif /*USE_LV_TESTS*/ 50 | 51 | #ifdef __cplusplus 52 | } /* extern "C" */ 53 | #endif 54 | 55 | #endif /*LV_TEST_THEME_H*/ 56 | -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/lv_tests/lv_test_theme/lv_test_theme_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sipeed/LicheeDan_K210_examples/0b121730109d465ef04590b5cb2d5a905943fcf5/src/lvgl/lvgl/lv_examples/lv_tests/lv_test_theme/lv_test_theme_1.png -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/lv_tests/lv_test_theme/lv_test_theme_2.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_test_theme_2.h 3 | * 4 | */ 5 | 6 | #ifndef LV_TEST_THEME_2_H 7 | #define LV_TEST_THEME_2_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #ifdef LV_CONF_INCLUDE_SIMPLE 17 | #include "lvgl.h" 18 | #include "lv_ex_conf.h" 19 | #else 20 | #include "../../../lvgl/lvgl.h" 21 | #include "../../../lv_ex_conf.h" 22 | #endif 23 | 24 | #if USE_LV_TESTS 25 | 26 | /********************* 27 | * DEFINES 28 | *********************/ 29 | 30 | /********************** 31 | * TYPEDEFS 32 | **********************/ 33 | 34 | /********************** 35 | * GLOBAL PROTOTYPES 36 | **********************/ 37 | 38 | /** 39 | * Test run time theme change 40 | */ 41 | void lv_test_theme_2(void); 42 | 43 | /********************** 44 | * MACROS 45 | **********************/ 46 | 47 | #endif /*USE_LV_TESTS*/ 48 | 49 | #ifdef __cplusplus 50 | } /* extern "C" */ 51 | #endif 52 | 53 | #endif /*LV_TEST_THEME_2_H*/ 54 | -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/lv_tests/lv_test_theme/lv_test_theme_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sipeed/LicheeDan_K210_examples/0b121730109d465ef04590b5cb2d5a905943fcf5/src/lvgl/lvgl/lv_examples/lv_tests/lv_test_theme/lv_test_theme_2.png -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/lv_tutorial/0_porting/lv_tutorial_porting.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_ex_porting.h 3 | * 4 | */ 5 | 6 | #ifndef LV_TUTORIAL_PORTING_H 7 | #define LV_TUTORIAL_PORTING_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #ifdef LV_CONF_INCLUDE_SIMPLE 17 | #include "lvgl.h" 18 | #include "lv_ex_conf.h" 19 | #else 20 | #include "../../../lvgl/lvgl.h" 21 | #include "../../../lv_ex_conf.h" 22 | #endif 23 | 24 | #if USE_LV_TUTORIALS 25 | 26 | /********************* 27 | * DEFINES 28 | *********************/ 29 | 30 | /********************** 31 | * TYPEDEFS 32 | **********************/ 33 | 34 | /********************** 35 | * GLOBAL PROTOTYPES 36 | **********************/ 37 | void lv_tutorial_porting(void); 38 | 39 | /********************** 40 | * MACROS 41 | **********************/ 42 | 43 | #endif /*USE_LV_TUTORIALS*/ 44 | 45 | #ifdef __cplusplus 46 | } /* extern "C" */ 47 | #endif 48 | 49 | #endif /*LV_TUTORIAL_PORTING_H*/ 50 | -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/lv_tutorial/0_porting/lv_tutorial_porting.mk: -------------------------------------------------------------------------------- 1 | CSRCS += lv_tutorial_porting.c 2 | 3 | DEPPATH += --dep-path $(LVGL_DIR)/lv_examples/lv_tutorial/0_porting 4 | VPATH += :$(LVGL_DIR)/lv_examples/lv_tutorial/0_porting 5 | 6 | CFLAGS += "-I$(LVGL_DIR)/lv_examples/lv_tutorial/0_porting" 7 | -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/lv_tutorial/10_keyboard/lv_tutorial_keyboard.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_tutorial_keyboard.h 3 | * 4 | */ 5 | 6 | #ifndef LV_TUTORIAL_KEYBOARD_H 7 | #define LV_TUTORIAL_KEYBOARD_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #ifdef LV_CONF_INCLUDE_SIMPLE 17 | #include "lvgl.h" 18 | #include "lv_ex_conf.h" 19 | #else 20 | #include "../../../lvgl/lvgl.h" 21 | #include "../../../lv_ex_conf.h" 22 | #endif 23 | 24 | #if USE_LV_TUTORIALS && USE_LV_GROUP 25 | 26 | /********************* 27 | * DEFINES 28 | *********************/ 29 | 30 | /********************** 31 | * TYPEDEFS 32 | **********************/ 33 | 34 | /********************** 35 | * GLOBAL PROTOTYPES 36 | **********************/ 37 | /** 38 | * Create a simple GUI to demonstrate encoder control capability 39 | * kp_indev optinonally pass a keypad input device to control the object (NULL if unused) 40 | */ 41 | void lv_tutorial_keyboard(lv_indev_t * kp_indev); 42 | 43 | /********************** 44 | * MACROS 45 | **********************/ 46 | 47 | #endif /*USE_LV_TUTORIALS*/ 48 | 49 | #ifdef __cplusplus 50 | } /* extern "C" */ 51 | #endif 52 | 53 | #endif /*LV_TUTORIAL_KEYBOARD_H*/ 54 | -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/lv_tutorial/10_keyboard/lv_tutorial_keyboard.mk: -------------------------------------------------------------------------------- 1 | CSRCS += lv_tutorial_keyboard.c 2 | 3 | DEPPATH += --dep-path $(LVGL_DIR)/lv_examples/lv_tutorial/10_keyboard 4 | VPATH += :$(LVGL_DIR)/lv_examples/lv_tutorial/10_keyboard 5 | 6 | CFLAGS += "-I$(LVGL_DIR)/lv_examples/lv_tutorial/10_keyboard" 7 | -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/lv_tutorial/1_hello_world/lv_tutorial_hello_world.c: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_tutorial_hello_world 3 | * 4 | */ 5 | 6 | /* 7 | *------------------------------------------------------------------------------- 8 | * Create your first object: a "Hello world" label 9 | * ------------------------------------------------------------------------------ 10 | * 11 | * If you have ported the LittlevGL you are ready to create content on your display. 12 | * 13 | * Now you will create a "Hello world!" label and align it to the middle. 14 | */ 15 | 16 | /********************* 17 | * INCLUDES 18 | *********************/ 19 | #include "lv_tutorial_hello_world.h" 20 | #if USE_LV_TUTORIALS 21 | 22 | /********************* 23 | * DEFINES 24 | *********************/ 25 | 26 | /********************** 27 | * TYPEDEFS 28 | **********************/ 29 | 30 | /********************** 31 | * STATIC PROTOTYPES 32 | **********************/ 33 | 34 | /********************** 35 | * STATIC VARIABLES 36 | **********************/ 37 | 38 | /********************** 39 | * MACROS 40 | **********************/ 41 | 42 | /********************** 43 | * GLOBAL FUNCTIONS 44 | **********************/ 45 | 46 | /** 47 | * Create a simple 'Hello world!' label 48 | */ 49 | void lv_tutorial_hello_world(void) 50 | { 51 | /*Create a Label on the currently active screen*/ 52 | lv_obj_t * label1 = lv_label_create(lv_scr_act(), NULL); 53 | 54 | /*Modify the Label's text*/ 55 | lv_label_set_text(label1, "Hello world!"); 56 | 57 | /* Align the Label to the center 58 | * NULL means align on parent (which is the screen now) 59 | * 0, 0 at the end means an x, y offset after alignment*/ 60 | lv_obj_align(label1, NULL, LV_ALIGN_CENTER, 0, 0); 61 | } 62 | 63 | /********************** 64 | * STATIC FUNCTIONS 65 | **********************/ 66 | 67 | #endif /*USE_LV_TUTORIALS*/ 68 | -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/lv_tutorial/1_hello_world/lv_tutorial_hello_world.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_tutorial_hello_world 3 | * 4 | */ 5 | 6 | #ifndef LV_TUTORIAL_HELLO_WORLD_H 7 | #define LV_TUTORIAL_HELLO_WORLD_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #ifdef LV_CONF_INCLUDE_SIMPLE 17 | #include "lvgl.h" 18 | #include "lv_ex_conf.h" 19 | #else 20 | #include "../../../lvgl/lvgl.h" 21 | #include "../../../lv_ex_conf.h" 22 | #endif 23 | 24 | #if USE_LV_TUTORIALS 25 | 26 | /********************* 27 | * DEFINES 28 | *********************/ 29 | 30 | /********************** 31 | * TYPEDEFS 32 | **********************/ 33 | 34 | /********************** 35 | * GLOBAL PROTOTYPES 36 | **********************/ 37 | void lv_tutorial_hello_world(void); 38 | 39 | /********************** 40 | * MACROS 41 | **********************/ 42 | 43 | #endif /*USE_LV_TUTORIALS*/ 44 | 45 | #ifdef __cplusplus 46 | } /* extern "C" */ 47 | #endif 48 | 49 | #endif /*LV_TUTORIAL_HELLO_WORLD_H*/ 50 | -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/lv_tutorial/1_hello_world/lv_tutorial_hello_world.mk: -------------------------------------------------------------------------------- 1 | CSRCS += lv_tutorial_hello_world.c 2 | 3 | DEPPATH += --dep-path $(LVGL_DIR)/lv_examples/lv_tutorial/1_hello_world 4 | VPATH += :$(LVGL_DIR)/lv_examples/lv_tutorial/1_hello_world 5 | 6 | CFLAGS += "-I$(LVGL_DIR)/lv_examples/lv_tutorial/1_hello_world" 7 | -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/lv_tutorial/2_objects/lv_tutorial_objects.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_tutorial_objects.h 3 | * 4 | */ 5 | 6 | #ifndef LV_TUTORIAL_OBJECTS_H 7 | #define EX_OBJECTS_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #ifdef LV_CONF_INCLUDE_SIMPLE 17 | #include "lvgl.h" 18 | #include "lv_ex_conf.h" 19 | #else 20 | #include "../../../lvgl/lvgl.h" 21 | #include "../../../lv_ex_conf.h" 22 | #endif 23 | 24 | #if USE_LV_TUTORIALS 25 | 26 | /********************* 27 | * DEFINES 28 | *********************/ 29 | 30 | /********************** 31 | * TYPEDEFS 32 | **********************/ 33 | 34 | /********************** 35 | * GLOBAL PROTOTYPES 36 | **********************/ 37 | void lv_tutorial_objects(void); 38 | 39 | /********************** 40 | * MACROS 41 | **********************/ 42 | 43 | #endif /*USE_LV_TUTORIALS*/ 44 | 45 | #ifdef __cplusplus 46 | } /* extern "C" */ 47 | #endif 48 | 49 | #endif /*LV_TUTORIAL_OBJECTS_H*/ 50 | -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/lv_tutorial/2_objects/lv_tutorial_objects.mk: -------------------------------------------------------------------------------- 1 | CSRCS += lv_tutorial_objects.c 2 | 3 | DEPPATH += --dep-path $(LVGL_DIR)/lv_examples/lv_tutorial/2_objects 4 | VPATH += :$(LVGL_DIR)/lv_examples/lv_tutorial/2_objects 5 | 6 | CFLAGS += "-I$(LVGL_DIR)/lv_examples/lv_tutorial/2_objects" 7 | -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/lv_tutorial/3_styles/lv_tutorial_styles.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_tutorial_styles.h 3 | * 4 | */ 5 | 6 | #ifndef LV_TUTORIAL_STYLES_H 7 | #define LV_TUTORIAL_STYLES_H 8 | 9 | #ifdef __cplusplus 10 | lv_tutorialtern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #ifdef LV_CONF_INCLUDE_SIMPLE 17 | #include "lvgl.h" 18 | #include "lv_ex_conf.h" 19 | #else 20 | #include "../../../lvgl/lvgl.h" 21 | #include "../../../lv_ex_conf.h" 22 | #endif 23 | 24 | #if USE_LV_TUTORIALS 25 | 26 | /********************* 27 | * DEFINES 28 | *********************/ 29 | 30 | /********************** 31 | * TYPEDEFS 32 | **********************/ 33 | 34 | /********************** 35 | * GLOBAL PROTOTYPES 36 | **********************/ 37 | void lv_tutorial_styles(void); 38 | 39 | /********************** 40 | * MACROS 41 | **********************/ 42 | 43 | #endif /*USE_LV_TUTORIALS*/ 44 | 45 | #ifdef __cplusplus 46 | } /* lv_tutorialtern "C" */ 47 | #endif 48 | 49 | #endif /*LV_TUTORIAL_STYLES_H*/ 50 | -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/lv_tutorial/3_styles/lv_tutorial_styles.mk: -------------------------------------------------------------------------------- 1 | CSRCS += lv_tutorial_styles.c 2 | 3 | DEPPATH += --dep-path $(LVGL_DIR)/lv_examples/lv_tutorial/3_styles 4 | VPATH += :$(LVGL_DIR)/lv_examples/lv_tutorial/3_styles 5 | 6 | CFLAGS += "-I$(LVGL_DIR)/lv_examples/lv_tutorial/3_styles" 7 | -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/lv_tutorial/4_themes/lv_tutorial_themes.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_tutorial_themes.h 3 | * 4 | */ 5 | 6 | #ifndef LV_TUTORIAL_THEMES_H 7 | #define LV_TUTORIAL_THEMES_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #ifdef LV_CONF_INCLUDE_SIMPLE 17 | #include "lvgl.h" 18 | #include "lv_ex_conf.h" 19 | #else 20 | #include "../../../lvgl/lvgl.h" 21 | #include "../../../lv_ex_conf.h" 22 | #endif 23 | 24 | #if USE_LV_TUTORIALS 25 | 26 | /********************* 27 | * DEFINES 28 | *********************/ 29 | 30 | /********************** 31 | * TYPEDEFS 32 | **********************/ 33 | 34 | /********************** 35 | * GLOBAL PROTOTYPES 36 | **********************/ 37 | void lv_tutorial_themes(void); 38 | 39 | /********************** 40 | * MACROS 41 | **********************/ 42 | 43 | #endif /*USE_LV_TUTORIALS*/ 44 | 45 | #ifdef __cplusplus 46 | } /* extern "C" */ 47 | #endif 48 | 49 | #endif /*LV_TUTORIAL_THEMES_H*/ 50 | -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/lv_tutorial/4_themes/lv_tutorial_themes.mk: -------------------------------------------------------------------------------- 1 | CSRCS += lv_tutorial_themes.c 2 | 3 | DEPPATH += --dep-path $(LVGL_DIR)/lv_examples/lv_tutorial/4_themes 4 | VPATH += :$(LVGL_DIR)/lv_examples/lv_tutorial/4_themes 5 | 6 | CFLAGS += "-I$(LVGL_DIR)/lv_examples/lv_tutorial/4_themes" 7 | -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/lv_tutorial/5_antialiasing/apple.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sipeed/LicheeDan_K210_examples/0b121730109d465ef04590b5cb2d5a905943fcf5/src/lvgl/lvgl/lv_examples/lv_tutorial/5_antialiasing/apple.png -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/lv_tutorial/5_antialiasing/apple_chroma.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sipeed/LicheeDan_K210_examples/0b121730109d465ef04590b5cb2d5a905943fcf5/src/lvgl/lvgl/lv_examples/lv_tutorial/5_antialiasing/apple_chroma.png -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/lv_tutorial/5_antialiasing/lv_tutorial_antialiasing.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_tutorial_antialiasing.h 3 | * 4 | */ 5 | 6 | #ifndef LV_TUTORIAL_ANTIALIASING_H 7 | #define LV_TUTORIAL_ANTIALIASING_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #ifdef LV_CONF_INCLUDE_SIMPLE 17 | #include "lvgl.h" 18 | #include "lv_ex_conf.h" 19 | #else 20 | #include "../../../lvgl/lvgl.h" 21 | #include "../../../lv_ex_conf.h" 22 | #endif 23 | 24 | #if USE_LV_TUTORIALS 25 | 26 | /********************* 27 | * DEFINES 28 | *********************/ 29 | 30 | /********************** 31 | * TYPEDEFS 32 | **********************/ 33 | 34 | /********************** 35 | * GLOBAL PROTOTYPES 36 | **********************/ 37 | 38 | /** 39 | * Create object to see how they change from the anti aliasing 40 | * Modify LV_ANTIALIAS and LV_FONT_ANTIALIAS to see what is changing 41 | */ 42 | void lv_tutorial_antialiasing(void); 43 | 44 | /********************** 45 | * MACROS 46 | **********************/ 47 | 48 | #endif /*USE_LV_TUTORIALS*/ 49 | 50 | #ifdef __cplusplus 51 | } /* extern "C" */ 52 | #endif 53 | 54 | #endif /*LV_TUTORIAL_ANTIALIASING_H*/ 55 | -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/lv_tutorial/5_antialiasing/lv_tutorial_antialiasing.mk: -------------------------------------------------------------------------------- 1 | CSRCS += lv_tutorial_antialiasing.c 2 | CSRCS += apple_icon_alpha.c 3 | CSRCS += apple_icon_chroma.c 4 | 5 | DEPPATH += --dep-path $(LVGL_DIR)/lv_examples/lv_tutorial/5_antialiasing 6 | VPATH += :$(LVGL_DIR)/lv_examples/lv_tutorial/5_antialiasing 7 | 8 | CFLAGS += "-I$(LVGL_DIR)/lv_examples/lv_tutorial/5_antialiasing" 9 | -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/lv_tutorial/6_images/blue_flower.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sipeed/LicheeDan_K210_examples/0b121730109d465ef04590b5cb2d5a905943fcf5/src/lvgl/lvgl/lv_examples/lv_tutorial/6_images/blue_flower.jpg -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/lv_tutorial/6_images/blue_flower_16.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sipeed/LicheeDan_K210_examples/0b121730109d465ef04590b5cb2d5a905943fcf5/src/lvgl/lvgl/lv_examples/lv_tutorial/6_images/blue_flower_16.bin -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/lv_tutorial/6_images/blue_flower_16_swap.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sipeed/LicheeDan_K210_examples/0b121730109d465ef04590b5cb2d5a905943fcf5/src/lvgl/lvgl/lv_examples/lv_tutorial/6_images/blue_flower_16_swap.bin -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/lv_tutorial/6_images/blue_flower_32.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sipeed/LicheeDan_K210_examples/0b121730109d465ef04590b5cb2d5a905943fcf5/src/lvgl/lvgl/lv_examples/lv_tutorial/6_images/blue_flower_32.bin -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/lv_tutorial/6_images/blue_flower_8.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sipeed/LicheeDan_K210_examples/0b121730109d465ef04590b5cb2d5a905943fcf5/src/lvgl/lvgl/lv_examples/lv_tutorial/6_images/blue_flower_8.bin -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/lv_tutorial/6_images/lv_tutorial_images.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_tutorial_images.h 3 | * 4 | */ 5 | 6 | #ifndef LV_TUTORIAL_IMAGES_H 7 | #define LV_TUTORIAL_IMAGES_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #ifdef LV_CONF_INCLUDE_SIMPLE 17 | #include "lvgl.h" 18 | #include "lv_ex_conf.h" 19 | #else 20 | #include "../../../lvgl/lvgl.h" 21 | #include "../../../lv_ex_conf.h" 22 | #endif 23 | 24 | #if USE_LV_TUTORIALS 25 | 26 | /********************* 27 | * DEFINES 28 | *********************/ 29 | 30 | /********************** 31 | * TYPEDEFS 32 | **********************/ 33 | 34 | /********************** 35 | * GLOBAL PROTOTYPES 36 | **********************/ 37 | 38 | 39 | /** 40 | * Create images from variable and file 41 | */ 42 | void lv_tutorial_image(void); 43 | 44 | /********************** 45 | * MACROS 46 | **********************/ 47 | 48 | #endif /*USE_LV_TUTORIALS*/ 49 | 50 | #ifdef __cplusplus 51 | } /* extern "C" */ 52 | #endif 53 | 54 | #endif /*LV_TUTORIAL_ANTIALIASING_H*/ 55 | -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/lv_tutorial/6_images/lv_tutorial_images.mk: -------------------------------------------------------------------------------- 1 | CSRCS += lv_tutorial_images.c 2 | CSRCS += red_flower.c 3 | 4 | DEPPATH += --dep-path $(LVGL_DIR)/lv_examples/lv_tutorial/6_images 5 | VPATH += :$(LVGL_DIR)/lv_examples/lv_tutorial/6_images 6 | 7 | CFLAGS += "-I$(LVGL_DIR)/lv_examples/lv_tutorial/6_images" 8 | -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/lv_tutorial/6_images/red_flower.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sipeed/LicheeDan_K210_examples/0b121730109d465ef04590b5cb2d5a905943fcf5/src/lvgl/lvgl/lv_examples/lv_tutorial/6_images/red_flower.png -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/lv_tutorial/7_fonts/lv_tutorial_fonts.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_tutorial_fonts.h 3 | * 4 | */ 5 | 6 | #ifndef LV_TUTORIAL_FONTS_H 7 | #define LV_TUTORIAL_FONTS_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #ifdef LV_CONF_INCLUDE_SIMPLE 17 | #include "lvgl.h" 18 | #include "lv_ex_conf.h" 19 | #else 20 | #include "../../../lvgl/lvgl.h" 21 | #include "../../../lv_ex_conf.h" 22 | #endif 23 | 24 | #if USE_LV_TUTORIALS 25 | 26 | /********************* 27 | * DEFINES 28 | *********************/ 29 | 30 | /********************** 31 | * TYPEDEFS 32 | **********************/ 33 | 34 | /********************** 35 | * GLOBAL PROTOTYPES 36 | **********************/ 37 | 38 | void lv_tutorial_fonts(void); 39 | 40 | /********************** 41 | * MACROS 42 | **********************/ 43 | 44 | #endif /*USE_LV_TUTORIALS*/ 45 | 46 | #ifdef __cplusplus 47 | } /* extern "C" */ 48 | #endif 49 | 50 | #endif /*LV_TUTORIAL_FONTS_H*/ 51 | -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/lv_tutorial/7_fonts/lv_tutorial_fonts.mk: -------------------------------------------------------------------------------- 1 | CSRCS += lv_tutorial_fonts.c 2 | CSRCS += arial_ascii_20.c 3 | CSRCS += arial_cyrillic_20.c 4 | CSRCS += arial_math_20.c 5 | 6 | DEPPATH += --dep-path $(LVGL_DIR)/lv_examples/lv_tutorial/7_fonts 7 | VPATH += :$(LVGL_DIR)/lv_examples/lv_tutorial/7_fonts 8 | 9 | CFLAGS += "-I$(LVGL_DIR)/lv_examples/lv_tutorial/7_fonts" 10 | -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/lv_tutorial/8_animations/lv_tutorial_animations.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_tutorial_animation.h 3 | * 4 | */ 5 | 6 | #ifndef LV_TUTORIAL_ANIMATION_H 7 | #define LV_TUTORIAL_ANIMATION_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #ifdef LV_CONF_INCLUDE_SIMPLE 17 | #include "lvgl.h" 18 | #include "lv_ex_conf.h" 19 | #else 20 | #include "../../../lvgl/lvgl.h" 21 | #include "../../../lv_ex_conf.h" 22 | #endif 23 | 24 | #if USE_LV_TUTORIALS && USE_LV_ANIMATION 25 | 26 | 27 | /********************* 28 | * DEFINES 29 | *********************/ 30 | 31 | /********************** 32 | * TYPEDEFS 33 | **********************/ 34 | 35 | /********************** 36 | * GLOBAL PROTOTYPES 37 | **********************/ 38 | 39 | /** 40 | * Crate some objects an animate them 41 | */ 42 | void lv_tutorial_animations(void); 43 | 44 | /********************** 45 | * MACROS 46 | **********************/ 47 | 48 | #endif /*USE_LV_TUTORIALS*/ 49 | 50 | #ifdef __cplusplus 51 | } /* extern "C" */ 52 | #endif 53 | 54 | #endif /*LV_TUTORIAL_ANTMATION_H*/ 55 | -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/lv_tutorial/8_animations/lv_tutorial_animations.mk: -------------------------------------------------------------------------------- 1 | CSRCS += lv_tutorial_animations.c 2 | 3 | DEPPATH += --dep-path $(LVGL_DIR)/lv_examples/lv_tutorial/8_animations 4 | VPATH += :$(LVGL_DIR)/lv_examples/lv_tutorial/8_animations 5 | 6 | CFLAGS += "-I$(LVGL_DIR)/lv_examples/lv_tutorial/8_animations" 7 | -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/lv_tutorial/9_responsive/lv_tutorial_responsive.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_tutorial_responsive.h 3 | * 4 | */ 5 | 6 | #ifndef LV_TUTORIAL_RESPONSIVE_H 7 | #define LV_TUTORIAL_RESPONSIVE_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #ifdef LV_CONF_INCLUDE_SIMPLE 17 | #include "lvgl.h" 18 | #include "lv_ex_conf.h" 19 | #else 20 | #include "../../../lvgl/lvgl.h" 21 | #include "../../../lv_ex_conf.h" 22 | #endif 23 | 24 | #if USE_LV_TUTORIALS 25 | 26 | /********************* 27 | * DEFINES 28 | *********************/ 29 | 30 | /********************** 31 | * TYPEDEFS 32 | **********************/ 33 | 34 | /********************** 35 | * GLOBAL PROTOTYPES 36 | **********************/ 37 | 38 | void lv_tutorial_responsive(void); 39 | 40 | /********************** 41 | * MACROS 42 | **********************/ 43 | 44 | #endif /*USE_LV_TUTORIALS*/ 45 | 46 | #ifdef __cplusplus 47 | } /* extern "C" */ 48 | #endif 49 | 50 | #endif /*LV_TUTORIAL_ANTMATION_H*/ 51 | -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_examples/lv_tutorial/9_responsive/lv_tutorial_responsive.mk: -------------------------------------------------------------------------------- 1 | CSRCS += lv_tutorial_responsive.c 2 | 3 | DEPPATH += --dep-path $(LVGL_DIR)/lv_examples/lv_tutorial/9_responsive 4 | VPATH += :$(LVGL_DIR)/lv_examples/lv_tutorial/9_responsive 5 | 6 | CFLAGS += "-I$(LVGL_DIR)/lv_examples/lv_tutorial/9_responsive" 7 | -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_fonts/lv_fonts.mk: -------------------------------------------------------------------------------- 1 | CSRCS += lv_font_builtin.c 2 | CSRCS += lv_font_dejavu_10.c 3 | CSRCS += lv_font_dejavu_20.c 4 | CSRCS += lv_font_dejavu_30.c 5 | CSRCS += lv_font_dejavu_40.c 6 | CSRCS += lv_font_dejavu_10_cyrillic.c 7 | CSRCS += lv_font_dejavu_20_cyrillic.c 8 | CSRCS += lv_font_dejavu_30_cyrillic.c 9 | CSRCS += lv_font_dejavu_40_cyrillic.c 10 | CSRCS += lv_font_dejavu_10_latin_sup.c 11 | CSRCS += lv_font_dejavu_20_latin_sup.c 12 | CSRCS += lv_font_dejavu_30_latin_sup.c 13 | CSRCS += lv_font_dejavu_40_latin_sup.c 14 | CSRCS += lv_font_symbol_10.c 15 | CSRCS += lv_font_symbol_20.c 16 | CSRCS += lv_font_symbol_30.c 17 | CSRCS += lv_font_symbol_40.c 18 | CSRCS += lv_font_monospace_8.c 19 | 20 | DEPPATH += --dep-path lvgl/lv_fonts 21 | VPATH += :lvgl/lv_fonts 22 | 23 | CFLAGS += "-I$(LVGL_DIR)/lvgl/lv_fonts" 24 | -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_hal/lv_hal.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file hal.h 3 | * 4 | */ 5 | 6 | #ifndef HAL_H 7 | #define HAL_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #include "lv_hal_disp.h" 17 | #include "lv_hal_indev.h" 18 | #include "lv_hal_tick.h" 19 | 20 | /********************* 21 | * DEFINES 22 | *********************/ 23 | 24 | /********************** 25 | * TYPEDEFS 26 | **********************/ 27 | 28 | /********************** 29 | * GLOBAL PROTOTYPES 30 | **********************/ 31 | 32 | /********************** 33 | * MACROS 34 | **********************/ 35 | 36 | #ifdef __cplusplus 37 | } /* extern "C" */ 38 | #endif 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_hal/lv_hal.mk: -------------------------------------------------------------------------------- 1 | CSRCS += lv_hal_disp.c 2 | CSRCS += lv_hal_indev.c 3 | CSRCS += lv_hal_tick.c 4 | 5 | DEPPATH += --dep-path lvgl/lv_hal 6 | VPATH += :lvgl/lv_hal 7 | 8 | CFLAGS += "-I$(LVGL_DIR)/lvgl/lv_hal" 9 | -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_hal/lv_hal_tick.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_hal_tick.h 3 | * Provide access to the system tick with 1 millisecond resolution 4 | */ 5 | 6 | #ifndef LV_HAL_TICK_H 7 | #define LV_HAL_TICK_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #ifdef LV_CONF_INCLUDE_SIMPLE 17 | #include "lv_conf.h" 18 | #else 19 | #include "../../lv_conf.h" 20 | #endif 21 | #include 22 | #include 23 | 24 | /********************* 25 | * DEFINES 26 | *********************/ 27 | #ifndef LV_ATTRIBUTE_TICK_INC 28 | #define LV_ATTRIBUTE_TICK_INC 29 | #endif 30 | 31 | /********************** 32 | * TYPEDEFS 33 | **********************/ 34 | 35 | /********************** 36 | * GLOBAL PROTOTYPES 37 | **********************/ 38 | 39 | /** 40 | * You have to call this function periodically 41 | * @param tick_period the call period of this function in milliseconds 42 | */ 43 | LV_ATTRIBUTE_TICK_INC void lv_tick_inc(uint32_t tick_period); 44 | 45 | /** 46 | * Get the elapsed milliseconds since start up 47 | * @return the elapsed milliseconds 48 | */ 49 | uint32_t lv_tick_get(void); 50 | 51 | /** 52 | * Get the elapsed milliseconds since a previous time stamp 53 | * @param prev_tick a previous time stamp (return value of systick_get() ) 54 | * @return the elapsed milliseconds since 'prev_tick' 55 | */ 56 | uint32_t lv_tick_elaps(uint32_t prev_tick); 57 | 58 | /********************** 59 | * MACROS 60 | **********************/ 61 | 62 | #ifdef __cplusplus 63 | } /* extern "C" */ 64 | #endif 65 | 66 | #endif /*LV_HAL_TICK_H*/ 67 | -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_misc/lv_misc.mk: -------------------------------------------------------------------------------- 1 | CSRCS += lv_font.c 2 | CSRCS += lv_circ.c 3 | CSRCS += lv_area.c 4 | CSRCS += lv_task.c 5 | CSRCS += lv_fs.c 6 | CSRCS += lv_anim.c 7 | CSRCS += lv_mem.c 8 | CSRCS += lv_ll.c 9 | CSRCS += lv_color.c 10 | CSRCS += lv_txt.c 11 | CSRCS += lv_ufs.c 12 | CSRCS += lv_math.c 13 | CSRCS += lv_log.c 14 | 15 | DEPPATH += --dep-path lvgl/lv_misc 16 | VPATH += :lvgl/lv_misc 17 | 18 | CFLAGS += "-I$(LVGL_DIR)/lvgl/lv_misc" 19 | -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_misc/lv_templ.c: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_templ.c 3 | * 4 | */ 5 | 6 | /********************* 7 | * INCLUDES 8 | *********************/ 9 | 10 | /********************* 11 | * DEFINES 12 | *********************/ 13 | 14 | /********************** 15 | * TYPEDEFS 16 | **********************/ 17 | 18 | /********************** 19 | * STATIC PROTOTYPES 20 | **********************/ 21 | 22 | /********************** 23 | * STATIC VARIABLES 24 | **********************/ 25 | 26 | /********************** 27 | * MACROS 28 | **********************/ 29 | 30 | /********************** 31 | * GLOBAL FUNCTIONS 32 | **********************/ 33 | 34 | /********************** 35 | * STATIC FUNCTIONS 36 | **********************/ 37 | -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_misc/lv_templ.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_templ.h 3 | * 4 | */ 5 | 6 | #ifndef LV_TEMPL_H 7 | #define LV_TEMPL_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | 17 | /********************* 18 | * DEFINES 19 | *********************/ 20 | 21 | /********************** 22 | * TYPEDEFS 23 | **********************/ 24 | 25 | /********************** 26 | * GLOBAL PROTOTYPES 27 | **********************/ 28 | 29 | /********************** 30 | * MACROS 31 | **********************/ 32 | 33 | 34 | #ifdef __cplusplus 35 | } /* extern "C" */ 36 | #endif 37 | 38 | #endif /*LV_TEMPL_H*/ 39 | -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_objx/lv_objx.mk: -------------------------------------------------------------------------------- 1 | CSRCS += lv_arc.c 2 | CSRCS += lv_bar.c 3 | CSRCS += lv_cb.c 4 | CSRCS += lv_ddlist.c 5 | CSRCS += lv_kb.c 6 | CSRCS += lv_line.c 7 | CSRCS += lv_mbox.c 8 | CSRCS += lv_preload.c 9 | CSRCS += lv_roller.c 10 | CSRCS += lv_tabview.c 11 | CSRCS += lv_btn.c 12 | CSRCS += lv_calendar.c 13 | CSRCS += lv_chart.c 14 | CSRCS += lv_gauge.c 15 | CSRCS += lv_label.c 16 | CSRCS += lv_list.c 17 | CSRCS += lv_slider.c 18 | CSRCS += lv_ta.c 19 | CSRCS += lv_btnm.c 20 | CSRCS += lv_cont.c 21 | CSRCS += lv_img.c 22 | CSRCS += lv_led.c 23 | CSRCS += lv_lmeter.c 24 | CSRCS += lv_page.c 25 | CSRCS += lv_sw.c 26 | CSRCS += lv_win.c 27 | 28 | DEPPATH += --dep-path lvgl/lv_objx 29 | VPATH += :lvgl/lv_objx 30 | 31 | CFLAGS += "-I$(LVGL_DIR)/lvgl/lv_objx" 32 | -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_themes/lv_theme_alien.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_theme_alien.h 3 | * 4 | */ 5 | 6 | #ifndef LV_THEME_ALIEN_H 7 | #define LV_THEME_ALIEN_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #ifdef LV_CONF_INCLUDE_SIMPLE 17 | #include "lv_conf.h" 18 | #else 19 | #include "../../lv_conf.h" 20 | #endif 21 | 22 | #if USE_LV_THEME_ALIEN 23 | 24 | /********************* 25 | * DEFINES 26 | *********************/ 27 | 28 | /********************** 29 | * TYPEDEFS 30 | **********************/ 31 | 32 | /********************** 33 | * GLOBAL PROTOTYPES 34 | **********************/ 35 | 36 | /** 37 | * Initialize the alien theme 38 | * @param hue [0..360] hue value from HSV color space to define the theme's base color 39 | * @param font pointer to a font (NULL to use the default) 40 | * @return pointer to the initialized theme 41 | */ 42 | lv_theme_t * lv_theme_alien_init(uint16_t hue, lv_font_t *font); 43 | /** 44 | * Get a pointer to the theme 45 | * @return pointer to the theme 46 | */ 47 | lv_theme_t * lv_theme_get_alien(void); 48 | 49 | /********************** 50 | * MACROS 51 | **********************/ 52 | 53 | #endif 54 | 55 | #ifdef __cplusplus 56 | } /* extern "C" */ 57 | #endif 58 | 59 | #endif /*LV_THEME_ALIEN_H*/ 60 | -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_themes/lv_theme_default.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_theme_default.h 3 | * 4 | */ 5 | 6 | #ifndef LV_THEME_DEFAULT_H 7 | #define LV_THEME_DEFAULT_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #ifdef LV_CONF_INCLUDE_SIMPLE 17 | #include "lv_conf.h" 18 | #else 19 | #include "../../lv_conf.h" 20 | #endif 21 | 22 | #if USE_LV_THEME_DEFAULT 23 | 24 | /********************* 25 | * DEFINES 26 | *********************/ 27 | 28 | /********************** 29 | * TYPEDEFS 30 | **********************/ 31 | 32 | /********************** 33 | * GLOBAL PROTOTYPES 34 | **********************/ 35 | 36 | /** 37 | * Initialize the default theme 38 | * @param hue [0..360] hue value from HSV color space to define the theme's base color 39 | * @param font pointer to a font (NULL to use the default) 40 | * @return pointer to the initialized theme 41 | */ 42 | lv_theme_t * lv_theme_default_init(uint16_t hue, lv_font_t *font); 43 | 44 | /** 45 | * Get a pointer to the theme 46 | * @return pointer to the theme 47 | */ 48 | lv_theme_t * lv_theme_get_default(void); 49 | 50 | /********************** 51 | * MACROS 52 | **********************/ 53 | 54 | #endif 55 | 56 | #ifdef __cplusplus 57 | } /* extern "C" */ 58 | #endif 59 | 60 | #endif /*LV_THEME_TEMPL_H*/ 61 | -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_themes/lv_theme_material.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_theme_material.h 3 | * 4 | */ 5 | 6 | #ifndef LV_THEME_MATERIAL_H 7 | #define LV_THEME_MATERIAL_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #ifdef LV_CONF_INCLUDE_SIMPLE 17 | #include "lv_conf.h" 18 | #else 19 | #include "../../lv_conf.h" 20 | #endif 21 | 22 | #if USE_LV_THEME_MATERIAL 23 | 24 | /********************* 25 | * DEFINES 26 | *********************/ 27 | 28 | /********************** 29 | * TYPEDEFS 30 | **********************/ 31 | 32 | /********************** 33 | * GLOBAL PROTOTYPES 34 | **********************/ 35 | 36 | /** 37 | * Initialize the material theme 38 | * @param hue [0..360] hue value from HSV color space to define the theme's base color 39 | * @param font pointer to a font (NULL to use the default) 40 | * @return pointer to the initialized theme 41 | */ 42 | lv_theme_t * lv_theme_material_init(uint16_t hue, lv_font_t *font); 43 | 44 | /** 45 | * Get a pointer to the theme 46 | * @return pointer to the theme 47 | */ 48 | lv_theme_t * lv_theme_get_material(void); 49 | 50 | /********************** 51 | * MACROS 52 | **********************/ 53 | 54 | #endif 55 | 56 | #ifdef __cplusplus 57 | } /* extern "C" */ 58 | #endif 59 | 60 | #endif /*LV_THEME_MATERIAL_H*/ 61 | -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_themes/lv_theme_mono.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_theme_mono.h 3 | * 4 | */ 5 | 6 | #ifndef LV_THEME_MONO_H 7 | #define LV_THEME_MONO_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #ifdef LV_CONF_INCLUDE_SIMPLE 17 | #include "lv_conf.h" 18 | #else 19 | #include "../../lv_conf.h" 20 | #endif 21 | 22 | #if USE_LV_THEME_MONO 23 | 24 | /********************* 25 | * DEFINES 26 | *********************/ 27 | 28 | /********************** 29 | * TYPEDEFS 30 | **********************/ 31 | 32 | /********************** 33 | * GLOBAL PROTOTYPES 34 | **********************/ 35 | 36 | /** 37 | * Initialize the mono theme 38 | * @param hue [0..360] hue value from HSV color space to define the theme's base color 39 | * @param font pointer to a font (NULL to use the default) 40 | * @return pointer to the initialized theme 41 | */ 42 | lv_theme_t * lv_theme_mono_init(uint16_t hue, lv_font_t *font); 43 | 44 | /** 45 | * Get a pointer to the theme 46 | * @return pointer to the theme 47 | */ 48 | lv_theme_t * lv_theme_get_mono(void); 49 | 50 | /********************** 51 | * MACROS 52 | **********************/ 53 | 54 | #endif 55 | 56 | #ifdef __cplusplus 57 | } /* extern "C" */ 58 | #endif 59 | 60 | #endif /*LV_THEME_MONO_H*/ 61 | -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_themes/lv_theme_nemo.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_theme_nemo.h 3 | * 4 | */ 5 | 6 | #ifndef LV_THEME_NEMO_H 7 | #define LV_THEME_NEMO_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #ifdef LV_CONF_INCLUDE_SIMPLE 17 | #include "lv_conf.h" 18 | #else 19 | #include "../../lv_conf.h" 20 | #endif 21 | 22 | #if USE_LV_THEME_NEMO 23 | 24 | /********************* 25 | * DEFINES 26 | *********************/ 27 | 28 | /********************** 29 | * TYPEDEFS 30 | **********************/ 31 | 32 | /********************** 33 | * GLOBAL PROTOTYPES 34 | **********************/ 35 | 36 | /** 37 | * Initialize the material theme 38 | * @param hue [0..360] hue value from HSV color space to define the theme's base color 39 | * @param font pointer to a font (NULL to use the default) 40 | * @return pointer to the initialized theme 41 | */ 42 | lv_theme_t * lv_theme_nemo_init(uint16_t hue, lv_font_t *font); 43 | 44 | /** 45 | * Get a pointer to the theme 46 | * @return pointer to the theme 47 | */ 48 | lv_theme_t * lv_theme_get_nemo(void); 49 | 50 | /********************** 51 | * MACROS 52 | **********************/ 53 | 54 | #endif 55 | 56 | #ifdef __cplusplus 57 | } /* extern "C" */ 58 | #endif 59 | 60 | #endif /*LV_THEME_NEMO_H*/ 61 | -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_themes/lv_theme_night.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_theme_night.h 3 | * 4 | */ 5 | 6 | #ifndef LV_THEME_NIGHT_H 7 | #define LV_THEME_NIGHT_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #ifdef LV_CONF_INCLUDE_SIMPLE 17 | #include "lv_conf.h" 18 | #else 19 | #include "../../lv_conf.h" 20 | #endif 21 | 22 | #if USE_LV_THEME_NIGHT 23 | 24 | /********************* 25 | * DEFINES 26 | *********************/ 27 | 28 | /********************** 29 | * TYPEDEFS 30 | **********************/ 31 | 32 | /********************** 33 | * GLOBAL PROTOTYPES 34 | **********************/ 35 | 36 | /** 37 | * Initialize the night theme 38 | * @param hue [0..360] hue value from HSV color space to define the theme's base color 39 | * @param font pointer to a font (NULL to use the default) 40 | * @return pointer to the initialized theme 41 | */ 42 | lv_theme_t * lv_theme_night_init(uint16_t hue, lv_font_t *font); 43 | 44 | /** 45 | * Get a pointer to the theme 46 | * @return pointer to the theme 47 | */ 48 | lv_theme_t * lv_theme_get_night(void); 49 | 50 | /********************** 51 | * MACROS 52 | **********************/ 53 | 54 | #endif 55 | 56 | #ifdef __cplusplus 57 | } /* extern "C" */ 58 | #endif 59 | 60 | #endif /*LV_THEME_NIGHT_H*/ 61 | -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_themes/lv_theme_templ.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_theme_templ.h 3 | * 4 | */ 5 | 6 | #ifndef LV_THEME_TEMPL_H 7 | #define LV_THEME_TEMPL_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #ifdef LV_CONF_INCLUDE_SIMPLE 17 | #include "lv_conf.h" 18 | #else 19 | #include "../../lv_conf.h" 20 | #endif 21 | 22 | #if USE_LV_THEME_TEMPL 23 | 24 | /********************* 25 | * DEFINES 26 | *********************/ 27 | 28 | /********************** 29 | * TYPEDEFS 30 | **********************/ 31 | 32 | /********************** 33 | * GLOBAL PROTOTYPES 34 | **********************/ 35 | 36 | /** 37 | * Initialize the templ theme 38 | * @param hue [0..360] hue value from HSV color space to define the theme's base color 39 | * @param font pointer to a font (NULL to use the default) 40 | * @return pointer to the initialized theme 41 | */ 42 | lv_theme_t * lv_theme_templ_init(uint16_t hue, lv_font_t *font); 43 | 44 | /** 45 | * Get a pointer to the theme 46 | * @return pointer to the theme 47 | */ 48 | lv_theme_t * lv_theme_get_templ(void); 49 | 50 | /********************** 51 | * MACROS 52 | **********************/ 53 | 54 | #endif 55 | 56 | #ifdef __cplusplus 57 | } /* extern "C" */ 58 | #endif 59 | 60 | #endif /*LV_THEME_TEMPL_H*/ 61 | -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_themes/lv_theme_zen.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_theme_zen.h 3 | * 4 | */ 5 | 6 | #ifndef LV_THEME_ZEN_H 7 | #define LV_THEME_ZEN_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #ifdef LV_CONF_INCLUDE_SIMPLE 17 | #include "lv_conf.h" 18 | #else 19 | #include "../../lv_conf.h" 20 | #endif 21 | 22 | #if USE_LV_THEME_ZEN 23 | 24 | /********************* 25 | * DEFINES 26 | *********************/ 27 | 28 | /********************** 29 | * TYPEDEFS 30 | **********************/ 31 | 32 | /********************** 33 | * GLOBAL PROTOTYPES 34 | **********************/ 35 | 36 | /** 37 | * Initialize the zen theme 38 | * @param hue [0..360] hue value from HSV color space to define the theme's base color 39 | * @param font pointer to a font (NULL to use the default) 40 | * @return pointer to the initialized theme 41 | */ 42 | lv_theme_t * lv_theme_zen_init(uint16_t hue, lv_font_t *font); 43 | 44 | /** 45 | * Get a pointer to the theme 46 | * @return pointer to the theme 47 | */ 48 | lv_theme_t * lv_theme_get_zen(void); 49 | 50 | /********************** 51 | * MACROS 52 | **********************/ 53 | 54 | #endif 55 | 56 | #ifdef __cplusplus 57 | } /* extern "C" */ 58 | #endif 59 | 60 | #endif /*LV_THEME_ZEN_H*/ 61 | -------------------------------------------------------------------------------- /src/lvgl/lvgl/lv_themes/lv_themes.mk: -------------------------------------------------------------------------------- 1 | CSRCS += lv_theme_alien.c 2 | CSRCS += lv_theme.c 3 | CSRCS += lv_theme_default.c 4 | CSRCS += lv_theme_night.c 5 | CSRCS += lv_theme_templ.c 6 | CSRCS += lv_theme_zen.c 7 | CSRCS += lv_theme_material.c 8 | CSRCS += lv_theme_nemo.c 9 | CSRCS += lv_theme_mono.c 10 | 11 | DEPPATH += --dep-path lvgl/lv_themes 12 | VPATH += :lvgl/lv_themes 13 | 14 | CFLAGS += "-I$(LVGL_DIR)/lvgl/lv_themes" 15 | -------------------------------------------------------------------------------- /src/lvgl/ns2009/mean.c: -------------------------------------------------------------------------------- 1 | /* 2 | * libc/filter/mean.c 3 | */ 4 | 5 | #include 6 | #include 7 | #include 8 | #include 9 | 10 | struct mean_filter_t *mean_alloc(int length) 11 | { 12 | struct mean_filter_t *filter; 13 | int i; 14 | 15 | if (length <= 0) 16 | return NULL; 17 | 18 | filter = malloc(sizeof(struct mean_filter_t)); 19 | if (!filter) 20 | return NULL; 21 | 22 | filter->buffer = malloc(sizeof(int) * length); 23 | if (!filter->buffer) 24 | { 25 | free(filter); 26 | return NULL; 27 | } 28 | for (i = 0; i < length; i++) 29 | filter->buffer[i] = 0; 30 | filter->length = length; 31 | filter->index = 0; 32 | filter->count = 0; 33 | filter->sum = 0; 34 | 35 | return filter; 36 | } 37 | 38 | void mean_free(struct mean_filter_t *filter) 39 | { 40 | if (filter) 41 | { 42 | if (filter->buffer) 43 | free(filter->buffer); 44 | free(filter); 45 | } 46 | } 47 | 48 | int mean_update(struct mean_filter_t *filter, int value) 49 | { 50 | filter->sum -= filter->buffer[filter->index]; 51 | filter->sum += value; 52 | filter->buffer[filter->index] = value; 53 | filter->index = (filter->index + 1) % filter->length; 54 | 55 | if (filter->count < filter->length) 56 | filter->count++; 57 | return filter->sum / filter->count; 58 | } 59 | 60 | void mean_clear(struct mean_filter_t *filter) 61 | { 62 | int i; 63 | 64 | if (filter) 65 | { 66 | for (i = 0; i < filter->length; i++) 67 | filter->buffer[i] = 0; 68 | filter->index = 0; 69 | filter->count = 0; 70 | filter->sum = 0; 71 | } 72 | } -------------------------------------------------------------------------------- /src/lvgl/ns2009/mean.h: -------------------------------------------------------------------------------- 1 | #ifndef __MEAN_H__ 2 | #define __MEAN_H__ 3 | 4 | #ifdef __cplusplus 5 | extern "C" 6 | { 7 | #endif 8 | 9 | struct mean_filter_t 10 | { 11 | int *buffer; 12 | int length; 13 | int index; 14 | int count; 15 | int sum; 16 | }; 17 | 18 | struct mean_filter_t *mean_alloc(int length); 19 | void mean_free(struct mean_filter_t *filter); 20 | int mean_update(struct mean_filter_t *filter, int value); 21 | void mean_clear(struct mean_filter_t *filter); 22 | 23 | #ifdef __cplusplus 24 | } 25 | #endif 26 | 27 | #endif /* __MEAN_H__ */ -------------------------------------------------------------------------------- /src/lvgl/ns2009/median.h: -------------------------------------------------------------------------------- 1 | #ifndef __MEDIAN_H__ 2 | #define __MEDIAN_H__ 3 | 4 | #ifdef __cplusplus 5 | extern "C" 6 | { 7 | #endif 8 | 9 | #define INT_MIN (-1 - 0x7fffffff) 10 | #define INT_MAX 0x7fffffff 11 | 12 | struct median_filter_t 13 | { 14 | int *buffer; 15 | int *index; 16 | int length; 17 | int position; 18 | int count; 19 | }; 20 | 21 | struct median_filter_t *median_alloc(int length); 22 | void median_free(struct median_filter_t *filter); 23 | int median_update(struct median_filter_t *filter, int value); 24 | void median_clear(struct median_filter_t *filter); 25 | 26 | #ifdef __cplusplus 27 | } 28 | #endif 29 | 30 | #endif /* __MEDIAN_H__ */ -------------------------------------------------------------------------------- /src/lvgl/ns2009/ns2009.h: -------------------------------------------------------------------------------- 1 | #ifndef __NS2009_H 2 | #define __NS2009_H 3 | 4 | #include 5 | 6 | /* clang-format off */ 7 | #define NS2009_SLV_ADDR 0x48 8 | #define NS2009_IOCTL_SET_CALBRATION 0x1 9 | /* clang-format on */ 10 | 11 | enum 12 | { 13 | NS2009_LOW_POWER_READ_X = 0xc0, 14 | NS2009_LOW_POWER_READ_Y = 0xd0, 15 | NS2009_LOW_POWER_READ_Z1 = 0xe0, 16 | NS2009_LOW_POWER_READ_Z2 = 0xf0, 17 | }; 18 | 19 | enum event_type 20 | { 21 | TOUCH_NONE = 0, 22 | TOUCH_BEGIN, 23 | TOUCH_MOVE, 24 | TOUCH_END 25 | }; 26 | 27 | struct ts_ns2009_event_t 28 | { 29 | enum event_type type; 30 | int x, y; 31 | }; 32 | 33 | struct ts_ns2009_pdata_t 34 | { 35 | struct tsfilter_t *filter; 36 | struct ts_ns2009_event_t *event; 37 | int x, y; 38 | int press; 39 | }; 40 | 41 | int ts_ns2009_poll(struct ts_ns2009_pdata_t *ts_ns2009_pdata); 42 | int ts_ns2009_set_calibration(struct ts_ns2009_pdata_t *ts_ns2009_pdata, int cmd, void *arg); 43 | struct ts_ns2009_pdata_t *ts_ns2009_probe(void); 44 | void ts_ns2009_remove(struct ts_ns2009_pdata_t *ts_ns2009_pdata); 45 | 46 | #endif -------------------------------------------------------------------------------- /src/lvgl/ns2009/tscal.h: -------------------------------------------------------------------------------- 1 | #ifndef __TSCAL_H 2 | #define __TSCAL_H 3 | 4 | #include 5 | 6 | struct tscal_t 7 | { 8 | int x[5], xfb[5]; 9 | int y[5], yfb[5]; 10 | int a[7]; 11 | }; 12 | 13 | int do_tscal(struct ts_ns2009_pdata_t *ts_ns2009_pdata); 14 | 15 | #endif -------------------------------------------------------------------------------- /src/lvgl/ns2009/tsfilter.h: -------------------------------------------------------------------------------- 1 | #ifndef __TSFILTER_H__ 2 | #define __TSFILTER_H__ 3 | 4 | #ifdef __cplusplus 5 | extern "C" 6 | { 7 | #endif 8 | 9 | #include 10 | #include 11 | 12 | struct tsfilter_t 13 | { 14 | struct median_filter_t *mx, *my; 15 | struct mean_filter_t *nx, *ny; 16 | int cal[7]; 17 | }; 18 | 19 | struct tsfilter_t *tsfilter_alloc(int ml, int nl); 20 | void tsfilter_free(struct tsfilter_t *filter); 21 | void tsfilter_setcal(struct tsfilter_t *filter, int *cal); 22 | void tsfilter_update(struct tsfilter_t *filter, int *x, int *y); 23 | void tsfilter_clear(struct tsfilter_t *filter); 24 | 25 | #ifdef __cplusplus 26 | } 27 | #endif 28 | 29 | #endif /* __TSFILTER_H__ */ -------------------------------------------------------------------------------- /src/mic_play/README.md: -------------------------------------------------------------------------------- 1 | I2S 2 | ===== 3 | Receive voice then play. -------------------------------------------------------------------------------- /src/mic_play/mic_play.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sipeed/LicheeDan_K210_examples/0b121730109d465ef04590b5cb2d5a905943fcf5/src/mic_play/mic_play.bin -------------------------------------------------------------------------------- /src/mnist/board_config.h: -------------------------------------------------------------------------------- 1 | #ifndef _BOARD_CONFIG_ 2 | #define _BOARD_CONFIG_ 3 | 4 | #define OV5640 0 5 | #define OV2640 1 6 | 7 | #define BOARD_KD233 0 8 | #define BOARD_LICHEEDAN 1 9 | #define BOARD_K61 0 10 | 11 | #if (OV5640 && OV2640) || (!OV5640 && !OV2640) 12 | #error ov sensor only choose one 13 | #endif 14 | 15 | #if (BOARD_LICHEEDAN && BOARD_KD233) || (BOARD_LICHEEDAN && BOARD_K61) || (BOARD_K61 && BOARD_KD233) || (!BOARD_LICHEEDAN && !BOARD_KD233 && !BOARD_K61) 16 | #error board only choose one 17 | #endif 18 | 19 | #endif 20 | -------------------------------------------------------------------------------- /src/mnist/burn_model.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | python3 kflash.py -p /dev/ttyUSB1 -b 2000000 model.kfpkg 3 | -------------------------------------------------------------------------------- /src/mnist/flash-list.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0.1.0", 3 | "files": [ 4 | { 5 | "address": 0x00600000, 6 | "bin": "m.kmodel", 7 | "sha256Prefix": false 8 | } 9 | ] 10 | } 11 | -------------------------------------------------------------------------------- /src/mnist/m.kmodel: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sipeed/LicheeDan_K210_examples/0b121730109d465ef04590b5cb2d5a905943fcf5/src/mnist/m.kmodel -------------------------------------------------------------------------------- /src/mnist/mnist.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sipeed/LicheeDan_K210_examples/0b121730109d465ef04590b5cb2d5a905943fcf5/src/mnist/mnist.bin -------------------------------------------------------------------------------- /src/mnist/ov2640.h: -------------------------------------------------------------------------------- 1 | /* Copyright 2018 Canaan Inc. 2 | * 3 | * Licensed under the Apache License, Version 2.0 (the "License"); 4 | * you may not use this file except in compliance with the License. 5 | * You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software 10 | * distributed under the License is distributed on an "AS IS" BASIS, 11 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | * See the License for the specific language governing permissions and 13 | * limitations under the License. 14 | */ 15 | #ifndef _OV2640_H 16 | #define _OV2640_H 17 | 18 | #include 19 | 20 | #define OV2640_ADDR 0x60 21 | 22 | int ov2640_init(void); 23 | int ov2640_read_id(uint16_t *manuf_id, uint16_t *device_id); 24 | 25 | #endif /* _OV2640_H */ 26 | 27 | -------------------------------------------------------------------------------- /src/mnist/pack_model.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | zip -r model.kfpkg m.kmodel flash-list.json 3 | -------------------------------------------------------------------------------- /src/sd_card/board_config.h: -------------------------------------------------------------------------------- 1 | #ifndef _BOARD_CONFIG_ 2 | #define _BOARD_CONFIG_ 3 | 4 | #define OV5640 0 5 | #define OV2640 1 6 | 7 | #define BOARD_KD233 0 8 | #define BOARD_LICHEEDAN 1 9 | #define BOARD_K61 0 10 | 11 | #if (OV5640 && OV2640) || (!OV5640 && !OV2640) 12 | #error ov sensor only choose one 13 | #endif 14 | 15 | #if (BOARD_LICHEEDAN && BOARD_KD233) || (BOARD_LICHEEDAN && BOARD_K61) || (BOARD_K61 && BOARD_KD233) || (!BOARD_LICHEEDAN && !BOARD_KD233 && !BOARD_K61) 16 | #error board only choose one 17 | #endif 18 | 19 | #endif 20 | -------------------------------------------------------------------------------- /src/sd_card/integer.h: -------------------------------------------------------------------------------- 1 | /*-------------------------------------------*/ 2 | /* Integer type definitions for FatFs module */ 3 | /*-------------------------------------------*/ 4 | 5 | #ifndef _FF_INTEGER 6 | #define _FF_INTEGER 7 | 8 | #ifdef _WIN32 /* FatFs development platform */ 9 | 10 | #include 11 | #include 12 | typedef unsigned __int64 QWORD; 13 | 14 | 15 | #else /* Embedded platform */ 16 | 17 | /* These types MUST be 16-bit or 32-bit */ 18 | typedef int INT; 19 | typedef unsigned int UINT; 20 | 21 | /* This type MUST be 8-bit */ 22 | typedef unsigned char BYTE; 23 | 24 | /* These types MUST be 16-bit */ 25 | typedef short SHORT; 26 | typedef unsigned short WORD; 27 | typedef unsigned short WCHAR; 28 | 29 | /* These types MUST be 32-bit */ 30 | typedef long LONG; 31 | typedef unsigned long DWORD; 32 | 33 | /* This type MUST be 64-bit (Remove this for C89 compatibility) */ 34 | typedef unsigned long long QWORD; 35 | 36 | #endif 37 | 38 | #endif 39 | -------------------------------------------------------------------------------- /src/sd_card/sd_card.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sipeed/LicheeDan_K210_examples/0b121730109d465ef04590b5cb2d5a905943fcf5/src/sd_card/sd_card.bin -------------------------------------------------------------------------------- /src/wav_test/wav_test.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sipeed/LicheeDan_K210_examples/0b121730109d465ef04590b5cb2d5a905943fcf5/src/wav_test/wav_test.bin --------------------------------------------------------------------------------