├── .gitee ├── ISSUE_TEMPLATE │ ├── 1-bug-report.yml │ ├── 2-question.yml │ ├── 3-othertype.yml │ └── config.yml └── pull_request_template.md ├── .github ├── ISSUE_TEMPLATE │ ├── 1-bug-report.yml │ ├── 2-question.yml │ ├── 3-othertype.yml │ └── config.yml ├── pull_request_template.md └── workflows │ ├── check_build.yml │ ├── check_style.yml │ └── sync_to_gitee.yml ├── .gitignore ├── 1.Software ├── .vscode │ ├── c_cpp_properties.json │ ├── settings.json │ └── tasks.json ├── Makefile ├── bootloader │ ├── arm32.h │ ├── exception.c │ ├── io.h │ ├── memcmp.S │ ├── memcpy.S │ ├── memset.S │ ├── sizes.h │ ├── start_gcc.S │ ├── sys-clock.c │ ├── sys-copyself.c │ ├── sys-dram.c │ ├── sys-mmu.c │ └── sys-spi-flash.c ├── dsp │ ├── include │ │ └── arm_math.h │ └── source │ │ ├── BasicMathFunctions │ │ ├── inc │ │ │ ├── arm_abs.h │ │ │ ├── arm_add.h │ │ │ ├── arm_and.h │ │ │ ├── arm_clip.h │ │ │ ├── arm_dot_prod.h │ │ │ ├── arm_mult.h │ │ │ ├── arm_negate.h │ │ │ ├── arm_not.h │ │ │ ├── arm_offset.h │ │ │ ├── arm_or.h │ │ │ ├── arm_scale.h │ │ │ ├── arm_shift.h │ │ │ ├── arm_sub.h │ │ │ ├── arm_xor.h │ │ │ └── basicmathfunctions.h │ │ └── src │ │ │ ├── arm_abs.c │ │ │ ├── arm_add.c │ │ │ ├── arm_and.c │ │ │ ├── arm_clip.c │ │ │ ├── arm_dot_prod.c │ │ │ ├── arm_mult.c │ │ │ ├── arm_negate.c │ │ │ ├── arm_not.c │ │ │ ├── arm_offset.c │ │ │ ├── arm_or.c │ │ │ ├── arm_scale.c │ │ │ ├── arm_shift.c │ │ │ ├── arm_sub.c │ │ │ └── arm_xor.c │ │ ├── CommonTables │ │ ├── inc │ │ │ └── commontables.h │ │ └── src │ │ │ └── arm_common_tables.c │ │ ├── ComplexMathFunctions │ │ ├── inc │ │ │ ├── arm_cmplx_mag.h │ │ │ └── complexmathfunctions.h │ │ └── src │ │ │ └── arm_cmplx_mag.c │ │ ├── FastMathFunctions │ │ ├── inc │ │ │ ├── arm_sqrt.h │ │ │ └── fastmathfunctions.h │ │ └── src │ │ │ └── arm_sqrt.c │ │ ├── StatisticsFunctions │ │ ├── inc │ │ │ ├── arm_max.h │ │ │ ├── arm_mean.h │ │ │ ├── arm_min.h │ │ │ ├── arm_power.h │ │ │ ├── arm_rms.h │ │ │ └── statisticsfunctions.h │ │ └── src │ │ │ ├── arm_max.c │ │ │ ├── arm_mean.c │ │ │ ├── arm_min.c │ │ │ ├── arm_power.c │ │ │ └── arm_rms.c │ │ ├── SupportFunctions │ │ ├── inc │ │ │ ├── arm_copy.h │ │ │ ├── arm_fill.h │ │ │ └── supportfunctions.h │ │ └── src │ │ │ ├── arm_copy.c │ │ │ └── arm_fill.c │ │ └── TransformFunctions │ │ ├── inc │ │ ├── arm_cfft_radix4.h │ │ ├── arm_cfft_radix4_init.h │ │ └── transformfunctions.h │ │ └── src │ │ ├── arm_bitreversal.c │ │ ├── arm_cfft_radix4.c │ │ └── arm_cfft_radix4_init.c ├── f1c200s_library.code-workspace ├── f1cx00s_lib │ ├── inc │ │ ├── f1cx00s.h │ │ ├── f1cx00s_audio.h │ │ ├── f1cx00s_ccu.h │ │ ├── f1cx00s_conf.h │ │ ├── f1cx00s_exti.h │ │ ├── f1cx00s_gpio.h │ │ ├── f1cx00s_i2c.h │ │ ├── f1cx00s_lcd.h │ │ ├── f1cx00s_pwm.h │ │ ├── f1cx00s_sdio.h │ │ ├── f1cx00s_spi.h │ │ ├── f1cx00s_uart.h │ │ └── f1cx00s_wdog.h │ └── src │ │ ├── f1cx00s_audio.c │ │ ├── f1cx00s_ccu.c │ │ ├── f1cx00s_exti.c │ │ ├── f1cx00s_gpio.c │ │ ├── f1cx00s_i2c.c │ │ ├── f1cx00s_lcd.c │ │ ├── f1cx00s_pwm.c │ │ ├── f1cx00s_sdio.c │ │ ├── f1cx00s_spi.c │ │ ├── f1cx00s_uart.c │ │ └── f1cx00s_wdog.c ├── hardware │ ├── inc │ │ ├── gpio.h │ │ ├── gt911.h │ │ ├── lcd.h │ │ ├── sd3031.h │ │ ├── sdcard.h │ │ ├── uart.h │ │ ├── usb_phy.h │ │ ├── usbd_msc_config.h │ │ ├── usbh_msc_config.h │ │ ├── w25nxx.h │ │ ├── w25qxx.h │ │ └── wdog.h │ └── src │ │ ├── gpio.c │ │ ├── gt911.c │ │ ├── lcd.c │ │ ├── sd3031.c │ │ ├── sdcard.c │ │ ├── uart.c │ │ ├── usb_phy.c │ │ ├── usbd_msc_config.c │ │ ├── usbh_msc_config.c │ │ ├── w25nxx.c │ │ ├── w25qxx.c │ │ └── wdog.c ├── myresource │ ├── inc │ │ ├── myresource.h │ │ ├── pagedemoselect.h │ │ ├── pagegpiotest.h │ │ ├── pagei2ctest.h │ │ ├── pagepwmtest.h │ │ ├── pagesdiotest.h │ │ ├── pagespitest.h │ │ ├── pageuarttest.h │ │ └── pageusbtest.h │ └── src │ │ └── page │ │ ├── pagedemoselect.c │ │ ├── pagegpiotest.c │ │ ├── pagei2ctest.c │ │ ├── pagepwmtest.c │ │ ├── pagesdiotest.c │ │ ├── pagespitest.c │ │ ├── pageuarttest.c │ │ └── pageusbtest.c ├── system │ ├── inc │ │ ├── delay.h │ │ ├── sys.h │ │ └── task.h │ └── src │ │ └── task.c ├── third_party │ ├── cherryusb │ │ ├── class │ │ │ ├── audio │ │ │ │ ├── usb_audio.h │ │ │ │ ├── usbd_audio.c │ │ │ │ ├── usbd_audio.h │ │ │ │ ├── usbh_audio.c │ │ │ │ └── usbh_audio.h │ │ │ ├── cdc │ │ │ │ ├── usb_cdc.h │ │ │ │ ├── usbd_cdc.c │ │ │ │ ├── usbd_cdc.h │ │ │ │ ├── usbd_cdc_ecm.c │ │ │ │ ├── usbd_cdc_ecm.h │ │ │ │ ├── usbh_cdc_acm.c │ │ │ │ ├── usbh_cdc_acm.h │ │ │ │ ├── usbh_cdc_ecm.c │ │ │ │ ├── usbh_cdc_ecm.h │ │ │ │ ├── usbh_cdc_ncm.c │ │ │ │ └── usbh_cdc_ncm.h │ │ │ ├── dfu │ │ │ │ ├── usb_dfu.h │ │ │ │ ├── usbd_dfu.c │ │ │ │ └── usbd_dfu.h │ │ │ ├── hid │ │ │ │ ├── usb_hid.h │ │ │ │ ├── usbd_hid.c │ │ │ │ ├── usbd_hid.h │ │ │ │ ├── usbh_hid.c │ │ │ │ └── usbh_hid.h │ │ │ ├── hub │ │ │ │ ├── usb_hub.h │ │ │ │ ├── usbh_hub.c │ │ │ │ └── usbh_hub.h │ │ │ ├── midi │ │ │ │ └── usb_midi.h │ │ │ ├── msc │ │ │ │ ├── usb_msc.h │ │ │ │ ├── usb_scsi.h │ │ │ │ ├── usbd_msc.c │ │ │ │ ├── usbd_msc.h │ │ │ │ ├── usbh_msc.c │ │ │ │ └── usbh_msc.h │ │ │ ├── template │ │ │ │ ├── usb_xxx.h │ │ │ │ ├── usbd_xxx.c │ │ │ │ ├── usbd_xxx.h │ │ │ │ ├── usbh_xxx.c │ │ │ │ └── usbh_xxx.h │ │ │ ├── vendor │ │ │ │ ├── net │ │ │ │ │ ├── usbh_asix.c │ │ │ │ │ ├── usbh_asix.h │ │ │ │ │ ├── usbh_rtl8152.c │ │ │ │ │ └── usbh_rtl8152.h │ │ │ │ └── serial │ │ │ │ │ ├── usbh_ch34x.c │ │ │ │ │ ├── usbh_ch34x.h │ │ │ │ │ ├── usbh_cp210x.c │ │ │ │ │ ├── usbh_cp210x.h │ │ │ │ │ ├── usbh_ftdi.c │ │ │ │ │ └── usbh_ftdi.h │ │ │ ├── video │ │ │ │ ├── usb_video.h │ │ │ │ ├── usbd_video.c │ │ │ │ ├── usbd_video.h │ │ │ │ ├── usbh_video.c │ │ │ │ └── usbh_video.h │ │ │ └── wireless │ │ │ │ ├── ndis.h │ │ │ │ ├── rndis_protocol.h │ │ │ │ ├── usbd_rndis.c │ │ │ │ ├── usbd_rndis.h │ │ │ │ ├── usbh_bluetooth.c │ │ │ │ ├── usbh_bluetooth.h │ │ │ │ ├── usbh_rndis.c │ │ │ │ └── usbh_rndis.h │ │ ├── common │ │ │ ├── usb_dc.h │ │ │ ├── usb_def.h │ │ │ ├── usb_errno.h │ │ │ ├── usb_hc.h │ │ │ ├── usb_list.h │ │ │ ├── usb_log.h │ │ │ ├── usb_osal.h │ │ │ └── usb_util.h │ │ ├── core │ │ │ ├── usbd_core.c │ │ │ ├── usbd_core.h │ │ │ ├── usbh_core.c │ │ │ └── usbh_core.h │ │ ├── osal │ │ │ └── usb_osal_rtthread.c │ │ ├── port │ │ │ ├── usb_dc_musb.c │ │ │ ├── usb_hc_musb.c │ │ │ └── usb_musb_reg.h │ │ └── usb_config.h │ ├── fatfs │ │ ├── diskio.c │ │ ├── diskio.h │ │ ├── ff.c │ │ ├── ff.h │ │ ├── ffconf.h │ │ └── ffunicode.c │ ├── lvgl │ │ ├── lv_conf.h │ │ └── lvgl │ │ │ ├── demos │ │ │ ├── benchmark │ │ │ │ ├── assets │ │ │ │ │ ├── img_benchmark_cogwheel_alpha256.c │ │ │ │ │ ├── img_benchmark_cogwheel_argb.c │ │ │ │ │ ├── img_benchmark_cogwheel_indexed16.c │ │ │ │ │ ├── img_benchmark_cogwheel_rgb.c │ │ │ │ │ ├── lv_font_benchmark_montserrat_12_compr_az.c.c │ │ │ │ │ ├── lv_font_benchmark_montserrat_16_compr_az.c.c │ │ │ │ │ └── lv_font_benchmark_montserrat_28_compr_az.c.c │ │ │ │ ├── lv_demo_benchmark.c │ │ │ │ └── lv_demo_benchmark.h │ │ │ ├── keypad_encoder │ │ │ │ ├── lv_demo_keypad_encoder.c │ │ │ │ └── lv_demo_keypad_encoder.h │ │ │ ├── lv_demos.c │ │ │ ├── lv_demos.h │ │ │ ├── music │ │ │ │ ├── assets │ │ │ │ │ ├── img_lv_demo_music_btn_corner_large.c │ │ │ │ │ ├── img_lv_demo_music_btn_list_pause.c │ │ │ │ │ ├── img_lv_demo_music_btn_list_pause_large.c │ │ │ │ │ ├── img_lv_demo_music_btn_list_play.c │ │ │ │ │ ├── img_lv_demo_music_btn_list_play_large.c │ │ │ │ │ ├── img_lv_demo_music_btn_loop.c │ │ │ │ │ ├── img_lv_demo_music_btn_loop_large.c │ │ │ │ │ ├── img_lv_demo_music_btn_next.c │ │ │ │ │ ├── img_lv_demo_music_btn_next_large.c │ │ │ │ │ ├── img_lv_demo_music_btn_pause.c │ │ │ │ │ ├── img_lv_demo_music_btn_pause_large.c │ │ │ │ │ ├── img_lv_demo_music_btn_play.c │ │ │ │ │ ├── img_lv_demo_music_btn_play_large.c │ │ │ │ │ ├── img_lv_demo_music_btn_prev.c │ │ │ │ │ ├── img_lv_demo_music_btn_prev_large.c │ │ │ │ │ ├── img_lv_demo_music_btn_rnd.c │ │ │ │ │ ├── img_lv_demo_music_btn_rnd_large.c │ │ │ │ │ ├── img_lv_demo_music_corner_left.c │ │ │ │ │ ├── img_lv_demo_music_corner_left_large.c │ │ │ │ │ ├── img_lv_demo_music_corner_right.c │ │ │ │ │ ├── img_lv_demo_music_corner_right_large.c │ │ │ │ │ ├── img_lv_demo_music_cover_1.c │ │ │ │ │ ├── img_lv_demo_music_cover_1_large.c │ │ │ │ │ ├── img_lv_demo_music_cover_2.c │ │ │ │ │ ├── img_lv_demo_music_cover_2_large.c │ │ │ │ │ ├── img_lv_demo_music_cover_3.c │ │ │ │ │ ├── img_lv_demo_music_cover_3_large.c │ │ │ │ │ ├── img_lv_demo_music_icon_1.c │ │ │ │ │ ├── img_lv_demo_music_icon_1_large.c │ │ │ │ │ ├── img_lv_demo_music_icon_2.c │ │ │ │ │ ├── img_lv_demo_music_icon_2_large.c │ │ │ │ │ ├── img_lv_demo_music_icon_3.c │ │ │ │ │ ├── img_lv_demo_music_icon_3_large.c │ │ │ │ │ ├── img_lv_demo_music_icon_4.c │ │ │ │ │ ├── img_lv_demo_music_icon_4_large.c │ │ │ │ │ ├── img_lv_demo_music_list_border.c │ │ │ │ │ ├── img_lv_demo_music_list_border_large.c │ │ │ │ │ ├── img_lv_demo_music_logo.c │ │ │ │ │ ├── img_lv_demo_music_slider_knob.c │ │ │ │ │ ├── img_lv_demo_music_slider_knob_large.c │ │ │ │ │ ├── img_lv_demo_music_wave_bottom.c │ │ │ │ │ ├── img_lv_demo_music_wave_bottom_large.c │ │ │ │ │ ├── img_lv_demo_music_wave_top.c │ │ │ │ │ ├── img_lv_demo_music_wave_top_large.c │ │ │ │ │ ├── spectrum_1.h │ │ │ │ │ ├── spectrum_2.h │ │ │ │ │ └── spectrum_3.h │ │ │ │ ├── lv_demo_music.c │ │ │ │ ├── lv_demo_music.h │ │ │ │ ├── lv_demo_music_list.c │ │ │ │ ├── lv_demo_music_list.h │ │ │ │ ├── lv_demo_music_main.c │ │ │ │ └── lv_demo_music_main.h │ │ │ ├── stress │ │ │ │ ├── lv_demo_stress.c │ │ │ │ └── lv_demo_stress.h │ │ │ ├── transform │ │ │ │ ├── assets │ │ │ │ │ └── img_transform_avatar_15.c │ │ │ │ ├── lv_demo_transform.c │ │ │ │ └── lv_demo_transform.h │ │ │ └── widgets │ │ │ │ ├── assets │ │ │ │ ├── img_clothes.c │ │ │ │ ├── img_demo_widgets_avatar.c │ │ │ │ ├── img_demo_widgets_needle.c │ │ │ │ └── img_lvgl_logo.c │ │ │ │ ├── lv_demo_widgets.c │ │ │ │ └── lv_demo_widgets.h │ │ │ ├── lvgl.h │ │ │ ├── porting │ │ │ ├── lv_port_disp.c │ │ │ ├── lv_port_disp.h │ │ │ ├── lv_port_fs.c │ │ │ ├── lv_port_fs.h │ │ │ ├── lv_port_indev.c │ │ │ └── lv_port_indev.h │ │ │ └── src │ │ │ ├── core │ │ │ ├── lv_global.h │ │ │ ├── lv_group.c │ │ │ ├── lv_group.h │ │ │ ├── lv_obj.c │ │ │ ├── lv_obj.h │ │ │ ├── lv_obj_class.c │ │ │ ├── lv_obj_class.h │ │ │ ├── lv_obj_draw.c │ │ │ ├── lv_obj_draw.h │ │ │ ├── lv_obj_event.c │ │ │ ├── lv_obj_event.h │ │ │ ├── lv_obj_id_builtin.c │ │ │ ├── lv_obj_pos.c │ │ │ ├── lv_obj_pos.h │ │ │ ├── lv_obj_property.c │ │ │ ├── lv_obj_property.h │ │ │ ├── lv_obj_scroll.c │ │ │ ├── lv_obj_scroll.h │ │ │ ├── lv_obj_style.c │ │ │ ├── lv_obj_style.h │ │ │ ├── lv_obj_style_gen.c │ │ │ ├── lv_obj_style_gen.h │ │ │ ├── lv_obj_tree.c │ │ │ ├── lv_obj_tree.h │ │ │ ├── lv_refr.c │ │ │ └── lv_refr.h │ │ │ ├── display │ │ │ ├── lv_display.c │ │ │ ├── lv_display.h │ │ │ └── lv_display_private.h │ │ │ ├── draw │ │ │ ├── lv_draw.c │ │ │ ├── lv_draw.h │ │ │ ├── lv_draw_arc.c │ │ │ ├── lv_draw_arc.h │ │ │ ├── lv_draw_buf.c │ │ │ ├── lv_draw_buf.h │ │ │ ├── lv_draw_image.c │ │ │ ├── lv_draw_image.h │ │ │ ├── lv_draw_label.c │ │ │ ├── lv_draw_label.h │ │ │ ├── lv_draw_line.c │ │ │ ├── lv_draw_line.h │ │ │ ├── lv_draw_mask.c │ │ │ ├── lv_draw_mask.h │ │ │ ├── lv_draw_rect.c │ │ │ ├── lv_draw_rect.h │ │ │ ├── lv_draw_triangle.c │ │ │ ├── lv_draw_triangle.h │ │ │ ├── lv_draw_vector.c │ │ │ ├── lv_draw_vector.h │ │ │ ├── lv_image_decoder.c │ │ │ ├── lv_image_decoder.h │ │ │ ├── lv_image_dsc.h │ │ │ ├── nxp │ │ │ │ ├── pxp │ │ │ │ │ ├── lv_draw_buf_pxp.c │ │ │ │ │ ├── lv_draw_pxp.c │ │ │ │ │ ├── lv_draw_pxp.h │ │ │ │ │ ├── lv_draw_pxp_fill.c │ │ │ │ │ ├── lv_draw_pxp_img.c │ │ │ │ │ ├── lv_draw_pxp_layer.c │ │ │ │ │ ├── lv_pxp_cfg.c │ │ │ │ │ ├── lv_pxp_cfg.h │ │ │ │ │ ├── lv_pxp_osa.c │ │ │ │ │ ├── lv_pxp_osa.h │ │ │ │ │ ├── lv_pxp_utils.c │ │ │ │ │ └── lv_pxp_utils.h │ │ │ │ └── vglite │ │ │ │ │ ├── lv_draw_buf_vglite.c │ │ │ │ │ ├── lv_draw_vglite.c │ │ │ │ │ ├── lv_draw_vglite.h │ │ │ │ │ ├── lv_draw_vglite_arc.c │ │ │ │ │ ├── lv_draw_vglite_border.c │ │ │ │ │ ├── lv_draw_vglite_fill.c │ │ │ │ │ ├── lv_draw_vglite_img.c │ │ │ │ │ ├── lv_draw_vglite_label.c │ │ │ │ │ ├── lv_draw_vglite_layer.c │ │ │ │ │ ├── lv_draw_vglite_line.c │ │ │ │ │ ├── lv_draw_vglite_triangle.c │ │ │ │ │ ├── lv_vglite_buf.c │ │ │ │ │ ├── lv_vglite_buf.h │ │ │ │ │ ├── lv_vglite_matrix.c │ │ │ │ │ ├── lv_vglite_matrix.h │ │ │ │ │ ├── lv_vglite_path.c │ │ │ │ │ ├── lv_vglite_path.h │ │ │ │ │ ├── lv_vglite_utils.c │ │ │ │ │ └── lv_vglite_utils.h │ │ │ ├── renesas │ │ │ │ └── dave2d │ │ │ │ │ ├── lv_draw_dave2d.c │ │ │ │ │ ├── lv_draw_dave2d.h │ │ │ │ │ ├── lv_draw_dave2d_arc.c │ │ │ │ │ ├── lv_draw_dave2d_border.c │ │ │ │ │ ├── lv_draw_dave2d_fill.c │ │ │ │ │ ├── lv_draw_dave2d_image.c │ │ │ │ │ ├── lv_draw_dave2d_label.c │ │ │ │ │ ├── lv_draw_dave2d_line.c │ │ │ │ │ ├── lv_draw_dave2d_mask_rectangle.c │ │ │ │ │ ├── lv_draw_dave2d_triangle.c │ │ │ │ │ ├── lv_draw_dave2d_utils.c │ │ │ │ │ └── lv_draw_dave2d_utils.h │ │ │ ├── sdl │ │ │ │ ├── lv_draw_sdl.c │ │ │ │ └── lv_draw_sdl.h │ │ │ ├── sw │ │ │ │ ├── arm2d │ │ │ │ │ ├── lv_draw_sw_arm2d.h │ │ │ │ │ └── lv_draw_sw_helium.h │ │ │ │ ├── blend │ │ │ │ │ ├── arm2d │ │ │ │ │ │ └── lv_blend_arm2d.h │ │ │ │ │ ├── helium │ │ │ │ │ │ ├── lv_blend_helium.S │ │ │ │ │ │ └── lv_blend_helium.h │ │ │ │ │ ├── lv_draw_sw_blend.c │ │ │ │ │ ├── lv_draw_sw_blend.h │ │ │ │ │ ├── lv_draw_sw_blend_to_argb8888.c │ │ │ │ │ ├── lv_draw_sw_blend_to_argb8888.h │ │ │ │ │ ├── lv_draw_sw_blend_to_rgb565.c │ │ │ │ │ ├── lv_draw_sw_blend_to_rgb565.h │ │ │ │ │ ├── lv_draw_sw_blend_to_rgb888.c │ │ │ │ │ ├── lv_draw_sw_blend_to_rgb888.h │ │ │ │ │ └── neon │ │ │ │ │ │ ├── lv_blend_neon.S │ │ │ │ │ │ └── lv_blend_neon.h │ │ │ │ ├── lv_draw_sw.c │ │ │ │ ├── lv_draw_sw.h │ │ │ │ ├── lv_draw_sw_arc.c │ │ │ │ ├── lv_draw_sw_border.c │ │ │ │ ├── lv_draw_sw_box_shadow.c │ │ │ │ ├── lv_draw_sw_fill.c │ │ │ │ ├── lv_draw_sw_gradient.c │ │ │ │ ├── lv_draw_sw_gradient.h │ │ │ │ ├── lv_draw_sw_img.c │ │ │ │ ├── lv_draw_sw_letter.c │ │ │ │ ├── lv_draw_sw_line.c │ │ │ │ ├── lv_draw_sw_mask.c │ │ │ │ ├── lv_draw_sw_mask.h │ │ │ │ ├── lv_draw_sw_mask_rect.c │ │ │ │ ├── lv_draw_sw_transform.c │ │ │ │ ├── lv_draw_sw_triangle.c │ │ │ │ └── lv_draw_sw_vector.c │ │ │ └── vg_lite │ │ │ │ ├── lv_draw_buf_vg_lite.c │ │ │ │ ├── lv_draw_vg_lite.c │ │ │ │ ├── lv_draw_vg_lite.h │ │ │ │ ├── lv_draw_vg_lite_arc.c │ │ │ │ ├── lv_draw_vg_lite_border.c │ │ │ │ ├── lv_draw_vg_lite_box_shadow.c │ │ │ │ ├── lv_draw_vg_lite_fill.c │ │ │ │ ├── lv_draw_vg_lite_img.c │ │ │ │ ├── lv_draw_vg_lite_label.c │ │ │ │ ├── lv_draw_vg_lite_layer.c │ │ │ │ ├── lv_draw_vg_lite_line.c │ │ │ │ ├── lv_draw_vg_lite_mask_rect.c │ │ │ │ ├── lv_draw_vg_lite_triangle.c │ │ │ │ ├── lv_draw_vg_lite_type.h │ │ │ │ ├── lv_draw_vg_lite_vector.c │ │ │ │ ├── lv_vg_lite_decoder.c │ │ │ │ ├── lv_vg_lite_decoder.h │ │ │ │ ├── lv_vg_lite_grad.c │ │ │ │ ├── lv_vg_lite_grad.h │ │ │ │ ├── lv_vg_lite_math.c │ │ │ │ ├── lv_vg_lite_math.h │ │ │ │ ├── lv_vg_lite_path.c │ │ │ │ ├── lv_vg_lite_path.h │ │ │ │ ├── lv_vg_lite_pending.c │ │ │ │ ├── lv_vg_lite_pending.h │ │ │ │ ├── lv_vg_lite_utils.c │ │ │ │ └── lv_vg_lite_utils.h │ │ │ ├── drivers │ │ │ ├── README.md │ │ │ ├── display │ │ │ │ ├── drm │ │ │ │ │ ├── lv_linux_drm.c │ │ │ │ │ └── lv_linux_drm.h │ │ │ │ ├── fb │ │ │ │ │ ├── lv_linux_fbdev.c │ │ │ │ │ └── lv_linux_fbdev.h │ │ │ │ ├── ili9341 │ │ │ │ │ ├── lv_ili9341.c │ │ │ │ │ └── lv_ili9341.h │ │ │ │ ├── lcd │ │ │ │ │ ├── lv_lcd_generic_mipi.c │ │ │ │ │ └── lv_lcd_generic_mipi.h │ │ │ │ ├── st7735 │ │ │ │ │ ├── lv_st7735.c │ │ │ │ │ └── lv_st7735.h │ │ │ │ ├── st7789 │ │ │ │ │ ├── lv_st7789.c │ │ │ │ │ └── lv_st7789.h │ │ │ │ ├── st7796 │ │ │ │ │ ├── lv_st7796.c │ │ │ │ │ └── lv_st7796.h │ │ │ │ └── tft_espi │ │ │ │ │ ├── lv_tft_espi.cpp │ │ │ │ │ └── lv_tft_espi.h │ │ │ ├── evdev │ │ │ │ ├── lv_evdev.c │ │ │ │ └── lv_evdev.h │ │ │ ├── libinput │ │ │ │ ├── lv_libinput.c │ │ │ │ ├── lv_libinput.h │ │ │ │ ├── lv_xkb.c │ │ │ │ └── lv_xkb.h │ │ │ ├── lv_drivers.h │ │ │ ├── nuttx │ │ │ │ ├── lv_nuttx_cache.c │ │ │ │ ├── lv_nuttx_cache.h │ │ │ │ ├── lv_nuttx_entry.c │ │ │ │ ├── lv_nuttx_entry.h │ │ │ │ ├── lv_nuttx_fbdev.c │ │ │ │ ├── lv_nuttx_fbdev.h │ │ │ │ ├── lv_nuttx_image_cache.c │ │ │ │ ├── lv_nuttx_image_cache.h │ │ │ │ ├── lv_nuttx_lcd.c │ │ │ │ ├── lv_nuttx_lcd.h │ │ │ │ ├── lv_nuttx_libuv.c │ │ │ │ ├── lv_nuttx_libuv.h │ │ │ │ ├── lv_nuttx_profiler.c │ │ │ │ ├── lv_nuttx_profiler.h │ │ │ │ ├── lv_nuttx_touchscreen.c │ │ │ │ └── lv_nuttx_touchscreen.h │ │ │ ├── sdl │ │ │ │ ├── lv_sdl_keyboard.c │ │ │ │ ├── lv_sdl_keyboard.h │ │ │ │ ├── lv_sdl_mouse.c │ │ │ │ ├── lv_sdl_mouse.h │ │ │ │ ├── lv_sdl_mousewheel.c │ │ │ │ ├── lv_sdl_mousewheel.h │ │ │ │ ├── lv_sdl_window.c │ │ │ │ └── lv_sdl_window.h │ │ │ ├── windows │ │ │ │ ├── lv_windows_context.c │ │ │ │ ├── lv_windows_context.h │ │ │ │ ├── lv_windows_display.c │ │ │ │ ├── lv_windows_display.h │ │ │ │ ├── lv_windows_input.c │ │ │ │ └── lv_windows_input.h │ │ │ └── x11 │ │ │ │ ├── lv_x11.h │ │ │ │ ├── lv_x11_display.c │ │ │ │ └── lv_x11_input.c │ │ │ ├── font │ │ │ ├── lv_binfont_loader.c │ │ │ ├── lv_binfont_loader.h │ │ │ ├── lv_font.c │ │ │ ├── lv_font.h │ │ │ ├── lv_font_dejavu_16_persian_hebrew.c │ │ │ ├── lv_font_fmt_txt.c │ │ │ ├── lv_font_fmt_txt.h │ │ │ ├── lv_font_montserrat_10.c │ │ │ ├── lv_font_montserrat_12.c │ │ │ ├── lv_font_montserrat_14.c │ │ │ ├── lv_font_montserrat_16.c │ │ │ ├── lv_font_montserrat_18.c │ │ │ ├── lv_font_montserrat_20.c │ │ │ ├── lv_font_montserrat_22.c │ │ │ ├── lv_font_montserrat_24.c │ │ │ ├── lv_font_montserrat_26.c │ │ │ ├── lv_font_montserrat_28.c │ │ │ ├── lv_font_montserrat_28_compressed.c │ │ │ ├── lv_font_montserrat_30.c │ │ │ ├── lv_font_montserrat_32.c │ │ │ ├── lv_font_montserrat_34.c │ │ │ ├── lv_font_montserrat_36.c │ │ │ ├── lv_font_montserrat_38.c │ │ │ ├── lv_font_montserrat_40.c │ │ │ ├── lv_font_montserrat_42.c │ │ │ ├── lv_font_montserrat_44.c │ │ │ ├── lv_font_montserrat_46.c │ │ │ ├── lv_font_montserrat_48.c │ │ │ ├── lv_font_montserrat_8.c │ │ │ ├── lv_font_simsun_16_cjk.c │ │ │ ├── lv_font_unscii_16.c │ │ │ ├── lv_font_unscii_8.c │ │ │ └── lv_symbol_def.h │ │ │ ├── indev │ │ │ ├── lv_indev.c │ │ │ ├── lv_indev.h │ │ │ ├── lv_indev_private.h │ │ │ ├── lv_indev_scroll.c │ │ │ └── lv_indev_scroll.h │ │ │ ├── layouts │ │ │ ├── flex │ │ │ │ ├── lv_flex.c │ │ │ │ └── lv_flex.h │ │ │ ├── grid │ │ │ │ ├── lv_grid.c │ │ │ │ └── lv_grid.h │ │ │ ├── lv_layout.c │ │ │ └── lv_layout.h │ │ │ ├── libs │ │ │ ├── barcode │ │ │ │ ├── code128.c │ │ │ │ ├── code128.h │ │ │ │ ├── lv_barcode.c │ │ │ │ └── lv_barcode.h │ │ │ ├── bin_decoder │ │ │ │ ├── lv_bin_decoder.c │ │ │ │ └── lv_bin_decoder.h │ │ │ ├── bmp │ │ │ │ ├── lv_bmp.c │ │ │ │ └── lv_bmp.h │ │ │ ├── ffmpeg │ │ │ │ ├── lv_ffmpeg.c │ │ │ │ └── lv_ffmpeg.h │ │ │ ├── freetype │ │ │ │ ├── arial.ttf │ │ │ │ ├── ftmodule.h │ │ │ │ ├── ftoption.h │ │ │ │ ├── lv_freetype.c │ │ │ │ ├── lv_freetype.h │ │ │ │ ├── lv_freetype_glyph.c │ │ │ │ ├── lv_freetype_image.c │ │ │ │ ├── lv_freetype_outline.c │ │ │ │ ├── lv_freetype_private.h │ │ │ │ └── lv_ftsystem.c │ │ │ ├── fsdrv │ │ │ │ ├── lv_fs_cbfs.c │ │ │ │ ├── lv_fs_fatfs.c │ │ │ │ ├── lv_fs_littlefs.c │ │ │ │ ├── lv_fs_memfs.c │ │ │ │ ├── lv_fs_posix.c │ │ │ │ ├── lv_fs_stdio.c │ │ │ │ ├── lv_fs_win32.c │ │ │ │ └── lv_fsdrv.h │ │ │ ├── gif │ │ │ │ ├── gifdec.c │ │ │ │ ├── gifdec.h │ │ │ │ ├── gifdec_mve.h │ │ │ │ ├── lv_gif.c │ │ │ │ └── lv_gif.h │ │ │ ├── libjpeg_turbo │ │ │ │ ├── lv_libjpeg_turbo.c │ │ │ │ └── lv_libjpeg_turbo.h │ │ │ ├── libpng │ │ │ │ ├── lv_libpng.c │ │ │ │ └── lv_libpng.h │ │ │ ├── lodepng │ │ │ │ ├── lodepng.c │ │ │ │ ├── lodepng.h │ │ │ │ ├── lv_lodepng.c │ │ │ │ └── lv_lodepng.h │ │ │ ├── lz4 │ │ │ │ ├── LICENSE │ │ │ │ ├── lz4.c │ │ │ │ └── lz4.h │ │ │ ├── qrcode │ │ │ │ ├── lv_qrcode.c │ │ │ │ ├── lv_qrcode.h │ │ │ │ ├── qrcodegen.c │ │ │ │ └── qrcodegen.h │ │ │ ├── rle │ │ │ │ ├── lv_rle.c │ │ │ │ └── lv_rle.h │ │ │ ├── rlottie │ │ │ │ ├── lv_rlottie.c │ │ │ │ └── lv_rlottie.h │ │ │ ├── thorvg │ │ │ │ ├── add_lvgl_if.sh │ │ │ │ ├── config.h │ │ │ │ ├── thorvg.h │ │ │ │ ├── thorvg_capi.h │ │ │ │ ├── tvgAnimation.cpp │ │ │ │ ├── tvgArray.h │ │ │ │ ├── tvgBezier.cpp │ │ │ │ ├── tvgBezier.h │ │ │ │ ├── tvgCanvas.cpp │ │ │ │ ├── tvgCanvas.h │ │ │ │ ├── tvgCapi.cpp │ │ │ │ ├── tvgCommon.h │ │ │ │ ├── tvgCompressor.cpp │ │ │ │ ├── tvgCompressor.h │ │ │ │ ├── tvgFill.cpp │ │ │ │ ├── tvgFill.h │ │ │ │ ├── tvgFrameModule.h │ │ │ │ ├── tvgInitializer.cpp │ │ │ │ ├── tvgIteratorAccessor.h │ │ │ │ ├── tvgLoadModule.h │ │ │ │ ├── tvgLoader.cpp │ │ │ │ ├── tvgLoader.h │ │ │ │ ├── tvgMath.cpp │ │ │ │ ├── tvgMath.h │ │ │ │ ├── tvgPaint.cpp │ │ │ │ ├── tvgPaint.h │ │ │ │ ├── tvgPicture.cpp │ │ │ │ ├── tvgPicture.h │ │ │ │ ├── tvgRawLoader.cpp │ │ │ │ ├── tvgRawLoader.h │ │ │ │ ├── tvgRender.cpp │ │ │ │ ├── tvgRender.h │ │ │ │ ├── tvgSaveModule.h │ │ │ │ ├── tvgSaver.cpp │ │ │ │ ├── tvgScene.cpp │ │ │ │ ├── tvgScene.h │ │ │ │ ├── tvgShape.cpp │ │ │ │ ├── tvgShape.h │ │ │ │ ├── tvgStr.cpp │ │ │ │ ├── tvgStr.h │ │ │ │ ├── tvgSvgCssStyle.cpp │ │ │ │ ├── tvgSvgCssStyle.h │ │ │ │ ├── tvgSvgLoader.cpp │ │ │ │ ├── tvgSvgLoader.h │ │ │ │ ├── tvgSvgLoaderCommon.h │ │ │ │ ├── tvgSvgPath.cpp │ │ │ │ ├── tvgSvgPath.h │ │ │ │ ├── tvgSvgSceneBuilder.cpp │ │ │ │ ├── tvgSvgSceneBuilder.h │ │ │ │ ├── tvgSvgUtil.cpp │ │ │ │ ├── tvgSvgUtil.h │ │ │ │ ├── tvgSwCanvas.cpp │ │ │ │ ├── tvgSwCommon.h │ │ │ │ ├── tvgSwFill.cpp │ │ │ │ ├── tvgSwImage.cpp │ │ │ │ ├── tvgSwMath.cpp │ │ │ │ ├── tvgSwMemPool.cpp │ │ │ │ ├── tvgSwRaster.cpp │ │ │ │ ├── tvgSwRasterAvx.h │ │ │ │ ├── tvgSwRasterC.h │ │ │ │ ├── tvgSwRasterNeon.h │ │ │ │ ├── tvgSwRasterTexmap.h │ │ │ │ ├── tvgSwRenderer.cpp │ │ │ │ ├── tvgSwRenderer.h │ │ │ │ ├── tvgSwRle.cpp │ │ │ │ ├── tvgSwShape.cpp │ │ │ │ ├── tvgSwStroke.cpp │ │ │ │ ├── tvgTaskScheduler.cpp │ │ │ │ ├── tvgTaskScheduler.h │ │ │ │ ├── tvgXmlParser.cpp │ │ │ │ └── tvgXmlParser.h │ │ │ ├── tiny_ttf │ │ │ │ ├── lv_tiny_ttf.c │ │ │ │ ├── lv_tiny_ttf.h │ │ │ │ ├── stb_rect_pack.h │ │ │ │ └── stb_truetype_htcw.h │ │ │ └── tjpgd │ │ │ │ ├── lv_tjpgd.c │ │ │ │ ├── lv_tjpgd.h │ │ │ │ ├── tjpgd.c │ │ │ │ ├── tjpgd.h │ │ │ │ └── tjpgdcnf.h │ │ │ ├── lv_api_map_v8.h │ │ │ ├── lv_api_map_v9_0.h │ │ │ ├── lv_conf_internal.h │ │ │ ├── lv_conf_kconfig.h │ │ │ ├── lv_init.c │ │ │ ├── lv_init.h │ │ │ ├── lvgl.h │ │ │ ├── lvgl_private.h │ │ │ ├── misc │ │ │ ├── cache │ │ │ │ ├── _lv_cache_lru_rb.c │ │ │ │ ├── _lv_cache_lru_rb.h │ │ │ │ ├── lv_cache.c │ │ │ │ ├── lv_cache.h │ │ │ │ ├── lv_cache_entry.c │ │ │ │ ├── lv_cache_entry.h │ │ │ │ ├── lv_cache_entry_private.h │ │ │ │ ├── lv_cache_private.h │ │ │ │ ├── lv_image_cache.c │ │ │ │ └── lv_image_cache.h │ │ │ ├── lv_anim.c │ │ │ ├── lv_anim.h │ │ │ ├── lv_anim_timeline.c │ │ │ ├── lv_anim_timeline.h │ │ │ ├── lv_area.c │ │ │ ├── lv_area.h │ │ │ ├── lv_array.c │ │ │ ├── lv_array.h │ │ │ ├── lv_assert.h │ │ │ ├── lv_async.c │ │ │ ├── lv_async.h │ │ │ ├── lv_bidi.c │ │ │ ├── lv_bidi.h │ │ │ ├── lv_color.c │ │ │ ├── lv_color.h │ │ │ ├── lv_color_op.c │ │ │ ├── lv_color_op.h │ │ │ ├── lv_event.c │ │ │ ├── lv_event.h │ │ │ ├── lv_fs.c │ │ │ ├── lv_fs.h │ │ │ ├── lv_ll.c │ │ │ ├── lv_ll.h │ │ │ ├── lv_log.c │ │ │ ├── lv_log.h │ │ │ ├── lv_lru.c │ │ │ ├── lv_lru.h │ │ │ ├── lv_math.c │ │ │ ├── lv_math.h │ │ │ ├── lv_palette.c │ │ │ ├── lv_palette.h │ │ │ ├── lv_profiler.h │ │ │ ├── lv_profiler_builtin.c │ │ │ ├── lv_profiler_builtin.h │ │ │ ├── lv_rb.c │ │ │ ├── lv_rb.h │ │ │ ├── lv_style.c │ │ │ ├── lv_style.h │ │ │ ├── lv_style_gen.c │ │ │ ├── lv_style_gen.h │ │ │ ├── lv_templ.c │ │ │ ├── lv_templ.h │ │ │ ├── lv_text.c │ │ │ ├── lv_text.h │ │ │ ├── lv_text_ap.c │ │ │ ├── lv_text_ap.h │ │ │ ├── lv_timer.c │ │ │ ├── lv_timer.h │ │ │ ├── lv_types.h │ │ │ ├── lv_utils.c │ │ │ └── lv_utils.h │ │ │ ├── osal │ │ │ ├── lv_cmsis_rtos2.c │ │ │ ├── lv_cmsis_rtos2.h │ │ │ ├── lv_freertos.c │ │ │ ├── lv_freertos.h │ │ │ ├── lv_os.h │ │ │ ├── lv_os_none.c │ │ │ ├── lv_os_none.h │ │ │ ├── lv_pthread.c │ │ │ ├── lv_pthread.h │ │ │ ├── lv_rtthread.c │ │ │ ├── lv_rtthread.h │ │ │ ├── lv_windows.c │ │ │ └── lv_windows.h │ │ │ ├── others │ │ │ ├── file_explorer │ │ │ │ ├── lv_file_explorer.c │ │ │ │ └── lv_file_explorer.h │ │ │ ├── fragment │ │ │ │ ├── README.md │ │ │ │ ├── lv_fragment.c │ │ │ │ ├── lv_fragment.h │ │ │ │ └── lv_fragment_manager.c │ │ │ ├── gridnav │ │ │ │ ├── lv_gridnav.c │ │ │ │ └── lv_gridnav.h │ │ │ ├── ime │ │ │ │ ├── lv_ime_pinyin.c │ │ │ │ └── lv_ime_pinyin.h │ │ │ ├── imgfont │ │ │ │ ├── lv_imgfont.c │ │ │ │ └── lv_imgfont.h │ │ │ ├── monkey │ │ │ │ ├── lv_monkey.c │ │ │ │ └── lv_monkey.h │ │ │ ├── observer │ │ │ │ ├── lv_observer.c │ │ │ │ └── lv_observer.h │ │ │ ├── snapshot │ │ │ │ ├── lv_snapshot.c │ │ │ │ └── lv_snapshot.h │ │ │ ├── sysmon │ │ │ │ ├── lv_sysmon.c │ │ │ │ └── lv_sysmon.h │ │ │ └── vg_lite_tvg │ │ │ │ ├── vg_lite.h │ │ │ │ ├── vg_lite_matrix.c │ │ │ │ └── vg_lite_tvg.cpp │ │ │ ├── stdlib │ │ │ ├── builtin │ │ │ │ ├── lv_mem_core_builtin.c │ │ │ │ ├── lv_sprintf_builtin.c │ │ │ │ ├── lv_string_builtin.c │ │ │ │ ├── lv_tlsf.c │ │ │ │ └── lv_tlsf.h │ │ │ ├── clib │ │ │ │ ├── lv_mem_core_clib.c │ │ │ │ ├── lv_sprintf_clib.c │ │ │ │ └── lv_string_clib.c │ │ │ ├── lv_mem.c │ │ │ ├── lv_mem.h │ │ │ ├── lv_sprintf.h │ │ │ ├── lv_string.h │ │ │ ├── micropython │ │ │ │ └── lv_mem_core_micropython.c │ │ │ └── rtthread │ │ │ │ ├── lv_mem_core_rtthread.c │ │ │ │ ├── lv_sprintf_rtthread.c │ │ │ │ └── lv_string_rtthread.c │ │ │ ├── themes │ │ │ ├── default │ │ │ │ ├── lv_theme_default.c │ │ │ │ └── lv_theme_default.h │ │ │ ├── lv_theme.c │ │ │ ├── lv_theme.h │ │ │ ├── mono │ │ │ │ ├── lv_theme_mono.c │ │ │ │ └── lv_theme_mono.h │ │ │ └── simple │ │ │ │ ├── lv_theme_simple.c │ │ │ │ └── lv_theme_simple.h │ │ │ ├── tick │ │ │ ├── lv_tick.c │ │ │ └── lv_tick.h │ │ │ └── widgets │ │ │ ├── animimage │ │ │ ├── lv_animimage.c │ │ │ └── lv_animimage.h │ │ │ ├── arc │ │ │ ├── lv_arc.c │ │ │ └── lv_arc.h │ │ │ ├── bar │ │ │ ├── lv_bar.c │ │ │ └── lv_bar.h │ │ │ ├── button │ │ │ ├── lv_button.c │ │ │ └── lv_button.h │ │ │ ├── buttonmatrix │ │ │ ├── lv_buttonmatrix.c │ │ │ └── lv_buttonmatrix.h │ │ │ ├── calendar │ │ │ ├── lv_calendar.c │ │ │ ├── lv_calendar.h │ │ │ ├── lv_calendar_header_arrow.c │ │ │ ├── lv_calendar_header_arrow.h │ │ │ ├── lv_calendar_header_dropdown.c │ │ │ └── lv_calendar_header_dropdown.h │ │ │ ├── canvas │ │ │ ├── lv_canvas.c │ │ │ └── lv_canvas.h │ │ │ ├── chart │ │ │ ├── lv_chart.c │ │ │ └── lv_chart.h │ │ │ ├── checkbox │ │ │ ├── lv_checkbox.c │ │ │ └── lv_checkbox.h │ │ │ ├── dropdown │ │ │ ├── lv_dropdown.c │ │ │ └── lv_dropdown.h │ │ │ ├── image │ │ │ ├── lv_image.c │ │ │ └── lv_image.h │ │ │ ├── imagebutton │ │ │ ├── lv_imagebutton.c │ │ │ └── lv_imagebutton.h │ │ │ ├── keyboard │ │ │ ├── lv_keyboard.c │ │ │ └── lv_keyboard.h │ │ │ ├── label │ │ │ ├── lv_label.c │ │ │ └── lv_label.h │ │ │ ├── led │ │ │ ├── lv_led.c │ │ │ └── lv_led.h │ │ │ ├── line │ │ │ ├── lv_line.c │ │ │ └── lv_line.h │ │ │ ├── list │ │ │ ├── lv_list.c │ │ │ └── lv_list.h │ │ │ ├── menu │ │ │ ├── lv_menu.c │ │ │ └── lv_menu.h │ │ │ ├── msgbox │ │ │ ├── lv_msgbox.c │ │ │ └── lv_msgbox.h │ │ │ ├── objx_templ │ │ │ ├── lv_objx_templ.c │ │ │ └── lv_objx_templ.h │ │ │ ├── roller │ │ │ ├── lv_roller.c │ │ │ └── lv_roller.h │ │ │ ├── scale │ │ │ ├── lv_scale.c │ │ │ └── lv_scale.h │ │ │ ├── slider │ │ │ ├── lv_slider.c │ │ │ └── lv_slider.h │ │ │ ├── span │ │ │ ├── lv_span.c │ │ │ └── lv_span.h │ │ │ ├── spinbox │ │ │ ├── lv_spinbox.c │ │ │ └── lv_spinbox.h │ │ │ ├── spinner │ │ │ ├── lv_spinner.c │ │ │ └── lv_spinner.h │ │ │ ├── switch │ │ │ ├── lv_switch.c │ │ │ └── lv_switch.h │ │ │ ├── table │ │ │ ├── lv_table.c │ │ │ └── lv_table.h │ │ │ ├── tabview │ │ │ ├── lv_tabview.c │ │ │ └── lv_tabview.h │ │ │ ├── textarea │ │ │ ├── lv_textarea.c │ │ │ └── lv_textarea.h │ │ │ ├── tileview │ │ │ ├── lv_tileview.c │ │ │ └── lv_tileview.h │ │ │ └── win │ │ │ ├── lv_win.c │ │ │ └── lv_win.h │ └── rt-thread │ │ ├── bsp │ │ └── board.c │ │ ├── components │ │ └── libc │ │ │ └── compilers │ │ │ ├── common │ │ │ ├── cctype.c │ │ │ ├── cstdio.c │ │ │ ├── cstdlib.c │ │ │ ├── cstring.c │ │ │ ├── ctime.c │ │ │ ├── cwchar.c │ │ │ ├── extension │ │ │ │ ├── fcntl │ │ │ │ │ ├── msvc │ │ │ │ │ │ └── fcntl.h │ │ │ │ │ └── octal │ │ │ │ │ │ └── fcntl.h │ │ │ │ └── sys │ │ │ │ │ ├── errno.h │ │ │ │ │ ├── stat.h │ │ │ │ │ └── types.h │ │ │ └── include │ │ │ │ ├── compiler_private.h │ │ │ │ ├── dirent.h │ │ │ │ ├── posix │ │ │ │ ├── ctype.h │ │ │ │ ├── stdio.h │ │ │ │ ├── stdlib.h │ │ │ │ ├── string.h │ │ │ │ └── wchar.h │ │ │ │ ├── sys │ │ │ │ ├── ioctl.h │ │ │ │ ├── select.h │ │ │ │ ├── signal.h │ │ │ │ ├── statfs.h │ │ │ │ ├── time.h │ │ │ │ ├── unistd.h │ │ │ │ ├── utsname.h │ │ │ │ └── vfs.h │ │ │ │ └── unistd.h │ │ │ └── newlib │ │ │ ├── fcntl.h │ │ │ ├── machine │ │ │ └── time.h │ │ │ └── syscalls.c │ │ ├── include │ │ ├── rtatomic.h │ │ ├── rtconfig.h │ │ ├── rtdbg.h │ │ ├── rtdef.h │ │ ├── rthw.h │ │ ├── rtm.h │ │ ├── rtservice.h │ │ └── rtthread.h │ │ ├── libcpu │ │ └── f1c100s │ │ │ ├── context_gcc.S │ │ │ ├── cpu.c │ │ │ ├── cpuport.c │ │ │ ├── cpuport.h │ │ │ ├── interrupt.c │ │ │ ├── interrupt.h │ │ │ ├── mmu.c │ │ │ ├── mmu.h │ │ │ ├── rt_low_level_init.c │ │ │ ├── stack.c │ │ │ └── trap.c │ │ └── src │ │ ├── clock.c │ │ ├── components.c │ │ ├── cpu.c │ │ ├── idle.c │ │ ├── ipc.c │ │ ├── irq.c │ │ ├── kservice.c │ │ ├── mem.c │ │ ├── memheap.c │ │ ├── mempool.c │ │ ├── object.c │ │ ├── scheduler_up.c │ │ ├── signal.c │ │ ├── slab.c │ │ ├── thread.c │ │ └── timer.c ├── tools │ ├── code-format.cfg │ ├── code-format.py │ ├── libusb-1.0.dll │ ├── libwinpthread-1.dll │ ├── mksunxi │ ├── mksunxi.exe │ ├── sunxi-fel │ ├── sunxi-fel.exe │ ├── xfel │ └── xfel.exe └── user │ ├── common.h │ ├── link.lds │ └── main.c ├── 2.Hardware ├── f1c200s测试板V1.1.eprj └── 元器件材料清单.pdf ├── LICENSE ├── README.md └── Version /.gitee/ISSUE_TEMPLATE/1-bug-report.yml: -------------------------------------------------------------------------------- 1 | name: 1.bug反馈 2 | description: 请详细描述您使用过程中遇到的问题。 3 | body: 4 | - type: checkboxes 5 | attributes: 6 | label: 软件版本 7 | options: 8 | - label: 软件已更新到最新版本 9 | required: true 10 | - type: textarea 11 | attributes: 12 | label: 您使用的场景? 13 | validations: 14 | required: true 15 | - type: textarea 16 | attributes: 17 | label: 您做了什么操作? 18 | validations: 19 | required: true 20 | - type: textarea 21 | attributes: 22 | label: 您遇到了什么问题? 23 | - type: textarea 24 | attributes: 25 | label: 您期望的结果是怎样的? 26 | validations: 27 | required: true 28 | - type: markdown 29 | attributes: 30 | value: | 31 | 感谢你提交 bug,我们会尽快处理。 32 | -------------------------------------------------------------------------------- /.gitee/ISSUE_TEMPLATE/2-question.yml: -------------------------------------------------------------------------------- 1 | name: 2.问题交流 2 | description: 讨论中没有回答的使用问题。 3 | body: 4 | - type: textarea 5 | attributes: 6 | label: 预期行为 7 | validations: 8 | required: true 9 | - type: textarea 10 | attributes: 11 | label: 实际行为 12 | validations: 13 | required: true 14 | - type: textarea 15 | attributes: 16 | label: 原因分析 17 | - type: textarea 18 | attributes: 19 | label: 问题重现步骤 20 | validations: 21 | required: true 22 | -------------------------------------------------------------------------------- /.gitee/ISSUE_TEMPLATE/3-othertype.yml: -------------------------------------------------------------------------------- 1 | name: 3.其他类型 2 | description: 其他类型 3 | body: 4 | - type: textarea 5 | attributes: 6 | label: 内容 7 | validations: 8 | required: true 9 | -------------------------------------------------------------------------------- /.gitee/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | blank_issues_enabled: false -------------------------------------------------------------------------------- /.gitee/pull_request_template.md: -------------------------------------------------------------------------------- 1 | **填写PR内容:** 2 | 3 | **在提出此拉取请求时,我确认了以下几点:** 4 | 5 | - [ ] 我已从`tools`文件夹中运行`code-format.py`,确保代码格式正确. 运行此脚本,需要安装[astyle](http://astyle.sourceforge.net/install.html). 6 | - [ ] 我已检查没有与此请求重复的拉取请求。 7 | - [ ] 我已经考虑过,并确认这份呈件对其他人很有价值。 8 | - [ ] 我接受此提交可能不会被使用,并根据维护人员的意愿关闭拉取请求。 9 | - [ ] 如果有条件,可以去github提交PR,[仓库地址](https://github.com/lhdjply/f1c200s_library) 10 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/1-bug-report.yml: -------------------------------------------------------------------------------- 1 | name: 1.bug反馈 2 | description: 请详细描述您使用过程中遇到的问题。 3 | body: 4 | - type: checkboxes 5 | attributes: 6 | label: 软件版本 7 | options: 8 | - label: 软件已更新到最新版本 9 | required: true 10 | - type: textarea 11 | attributes: 12 | label: 您使用的场景? 13 | validations: 14 | required: true 15 | - type: textarea 16 | attributes: 17 | label: 您做了什么操作? 18 | validations: 19 | required: true 20 | - type: textarea 21 | attributes: 22 | label: 您遇到了什么问题? 23 | - type: textarea 24 | attributes: 25 | label: 您期望的结果是怎样的? 26 | validations: 27 | required: true 28 | - type: markdown 29 | attributes: 30 | value: | 31 | 感谢你提交 bug,我们会尽快处理。 32 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/2-question.yml: -------------------------------------------------------------------------------- 1 | name: 2.问题交流 2 | description: 讨论中没有回答的使用问题。 3 | body: 4 | - type: textarea 5 | attributes: 6 | label: 预期行为 7 | validations: 8 | required: true 9 | - type: textarea 10 | attributes: 11 | label: 实际行为 12 | validations: 13 | required: true 14 | - type: textarea 15 | attributes: 16 | label: 原因分析 17 | - type: textarea 18 | attributes: 19 | label: 问题重现步骤 20 | validations: 21 | required: true 22 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/3-othertype.yml: -------------------------------------------------------------------------------- 1 | name: 3.其他类型 2 | description: 其他类型 3 | body: 4 | - type: textarea 5 | attributes: 6 | label: 内容 7 | validations: 8 | required: true 9 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | blank_issues_enabled: false -------------------------------------------------------------------------------- /.github/pull_request_template.md: -------------------------------------------------------------------------------- 1 | **填写PR内容:** 2 | 3 | **在提出此拉取请求时,我确认了以下几点:** 4 | 5 | - [ ] 我已从`tools`文件夹中运行`code-format.py`,确保代码格式正确. 运行此脚本,需要安装[astyle](http://astyle.sourceforge.net/install.html). 6 | - [ ] 我已检查没有与此请求重复的拉取请求。 7 | - [ ] 我已经考虑过,并确认这份呈件对其他人很有价值。 8 | - [ ] 我接受此提交可能不会被使用,并根据维护人员的意愿关闭拉取请求。 9 | -------------------------------------------------------------------------------- /.github/workflows/check_build.yml: -------------------------------------------------------------------------------- 1 | name: Verify code building 2 | 3 | on: 4 | push: 5 | pull_request: 6 | 7 | jobs: 8 | verify-building: 9 | if: ${{ github.event_name != 'pull_request' || github.repository != github.event.pull_request.head.repo.full_name }} 10 | runs-on: ubuntu-latest 11 | steps: 12 | - name: Checkout 13 | uses: actions/checkout@v4 14 | with: 15 | persist-credentials: false 16 | fetch-depth: 0 17 | - name: Install arm-none-eabi-gcc 18 | run: | 19 | sudo apt-get update 20 | sudo apt-get install gcc-arm-none-eabi 21 | 22 | - name: Start build 23 | run: | 24 | sudo chmod -R 777 1.Software/tools 25 | cd 1.Software 26 | make -j16 27 | -------------------------------------------------------------------------------- /.github/workflows/check_style.yml: -------------------------------------------------------------------------------- 1 | name: Verify code formatting 2 | on: 3 | push: 4 | pull_request: 5 | 6 | jobs: 7 | verify-formatting: 8 | if: ${{ github.event_name != 'pull_request' || github.repository != github.event.pull_request.head.repo.full_name }} 9 | runs-on: ubuntu-latest 10 | steps: 11 | - name: Checkout 12 | uses: actions/checkout@v4 13 | with: 14 | persist-credentials: false 15 | fetch-depth: 0 16 | - name: Checkout astyle 17 | uses: actions/checkout@v4 18 | with: 19 | repository: szepeviktor/astyle 20 | path: astyle 21 | ref: v3.4.12 22 | - name: Install astyle 23 | run: | 24 | cd astyle/build/gcc/ 25 | make 26 | sudo make install 27 | astyle --version 28 | - name: Format code 29 | run: python code-format.py 30 | working-directory: 1.Software/tools 31 | - name: Check that repository is clean 32 | shell: bash 33 | run: | 34 | set -o pipefail 35 | if ! (git diff --exit-code --color=always | tee /tmp/lvgl_diff.patch); then 36 | echo "Please apply the preceding diff to your code or run 1.Software/tools/code-format.py" 37 | exit 1 38 | fi 39 | -------------------------------------------------------------------------------- /.github/workflows/sync_to_gitee.yml: -------------------------------------------------------------------------------- 1 | name: Sync to gitee 2 | on: 3 | push: 4 | 5 | jobs: 6 | build: 7 | runs-on: ubuntu-latest 8 | steps: 9 | - name: Sync to Gitee 10 | uses: wearerequired/git-mirror-action@master 11 | env: 12 | SSH_PRIVATE_KEY: ${{ secrets.GITEE_RSA_PRIVATE_KEY }} 13 | with: 14 | source-repo: git@github.com:lhdjply/f1c200s_library.git 15 | destination-repo: git@gitee.com:lhdjply/f1c200s_library.git 16 | 17 | # - name: Build Gitee Pages 18 | # uses: yanglbme/gitee-pages-action@main 19 | # with: 20 | # # 注意替换为你的 Gitee 用户名 21 | # gitee-username: yanglbme 22 | # # 注意在 Settings->Secrets 配置 GITEE_PASSWORD 23 | # gitee-password: ${{ secrets.GITEE_PASSWORD }} 24 | # # 注意替换为你的 Gitee 仓库,仓库名严格区分大小写,请准确填写,否则会出错 25 | # gitee-repo: doocs/leetcode 26 | # # 要部署的分支,默认是 master,若是其他分支,则需要指定(指定的分支必须存在) 27 | # branch: main -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | output/ 2 | build/ 3 | simulator/ 4 | CMakeLists.txt 5 | -------------------------------------------------------------------------------- /1.Software/.vscode/c_cpp_properties.json: -------------------------------------------------------------------------------- 1 | { 2 | "configurations": [ 3 | { 4 | "name": "Win32", 5 | "includePath": [ 6 | "${workspaceFolder}/**", 7 | "${workspaceFolder}/bootloader", 8 | "${workspaceFolder}/f1cx00s_lib/inc", 9 | "${workspaceFolder}/hardware/inc", 10 | "${workspaceFolder}/myResource/inc", 11 | "${workspaceFolder}/system/inc", 12 | "${workspaceFolder}/third_party/fatfs", 13 | "${workspaceFolder}/third_party/lvgl", 14 | "${workspaceFolder}/third_party/lvgl/lvgl/demos", 15 | "${workspaceFolder}/third_party/lvgl/lvgl/porting", 16 | "${workspaceFolder}/third_party/rt-thread/include", 17 | "${workspaceFolder}/third_party/rt-thread/bsp", 18 | "${workspaceFolder}/third_party/rt-thread/components/libc/compilers/common/include", 19 | "${workspaceFolder}/third_party/rt-thread/libcpu/f1c100s", 20 | "${workspaceFolder}/user" 21 | ], 22 | "defines": [ 23 | "_DEBUG", 24 | "UNICODE", 25 | "_UNICODE" 26 | ], 27 | "cStandard": "c17", 28 | "cppStandard": "gnu++14", 29 | "intelliSenseMode": "windows-gcc-x64", 30 | "configurationProvider": "ms-vscode.makefile-tools" 31 | } 32 | ], 33 | "version": 4 34 | } 35 | -------------------------------------------------------------------------------- /1.Software/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "editor.fontSize": 18, 3 | "editor.tabSize": 2, 4 | "C_Cpp.errorSquiggles": "disabled", 5 | "VsCodeTaskButtons.tasks": [ 6 | { 7 | "label": "编译", 8 | "task": "编译", 9 | "tooltip": "编译" 10 | }, 11 | { 12 | "label": "重新编译", 13 | "task": "重新编译", 14 | "tooltip": "重新编译" 15 | }, 16 | { 17 | "label": "清理", 18 | "task": "清理", 19 | "tooltip": "清理" 20 | }, 21 | { 22 | "label": "下载到SPI NOR FLASH", 23 | "task": "下载到SPI NOR FLASH", 24 | "tooltip": "下载到SPI NOR FLASH" 25 | }, 26 | { 27 | "label": "下载到SPI NAND FLASH", 28 | "task": "下载到SPI NAND FLASH", 29 | "tooltip": "下载到SPI NAND FLASH" 30 | }, 31 | ], 32 | "VsCodeTaskButtons.showCounter": false 33 | } 34 | -------------------------------------------------------------------------------- /1.Software/.vscode/tasks.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "2.0.0", 3 | "tasks": [ 4 | { 5 | "label": "编译", 6 | "type": "shell", 7 | "command": "make -j4", 8 | "group": "build" 9 | }, 10 | { 11 | "label": "重新编译", 12 | "type": "shell", 13 | "command": "make clean ; make -j4", 14 | "group": "build" 15 | }, 16 | { 17 | "label": "清理", 18 | "type": "shell", 19 | "command": "make clean", 20 | "group": "build" 21 | }, 22 | { 23 | "label": "下载到SPI NOR FLASH", 24 | "type": "shell", 25 | "command": "make write-to-spinor", 26 | "group": "build" 27 | }, 28 | { 29 | "label": "下载到SPI NAND FLASH", 30 | "type": "shell", 31 | "command": "make write-to-spinand", 32 | "group": "build" 33 | }, 34 | ] 35 | } 36 | -------------------------------------------------------------------------------- /1.Software/bootloader/exception.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | //#include 4 | 5 | struct arm_regs_t 6 | { 7 | uint32_t r[13]; 8 | uint32_t sp; 9 | uint32_t lr; 10 | uint32_t pc; 11 | uint32_t cpsr; 12 | }; 13 | 14 | static void show_regs(struct arm_regs_t * regs) 15 | { 16 | while(1); 17 | } 18 | 19 | void arm32_do_undefined_instruction(struct arm_regs_t * regs) 20 | { 21 | 22 | } 23 | 24 | void arm32_do_software_interrupt(struct arm_regs_t * regs) 25 | { 26 | show_regs(regs); 27 | regs->pc += 4; 28 | } 29 | 30 | void arm32_do_prefetch_abort(struct arm_regs_t * regs) 31 | { 32 | show_regs(regs); 33 | regs->pc += 4; 34 | } 35 | 36 | void arm32_do_data_abort(struct arm_regs_t * regs) 37 | { 38 | show_regs(regs); 39 | regs->pc += 4; 40 | } 41 | extern void interrupt_handle_exception(void * regs); 42 | void arm32_do_irq(struct arm_regs_t * regs) 43 | { 44 | //interrupt_handle_exception(regs); 45 | } 46 | 47 | void arm32_do_fiq(struct arm_regs_t * regs) 48 | { 49 | //interrupt_handle_exception(regs); 50 | } 51 | -------------------------------------------------------------------------------- /1.Software/bootloader/io.h: -------------------------------------------------------------------------------- 1 | #ifndef __IO_H__ 2 | #define __IO_H__ 3 | 4 | #include "stdint.h" 5 | 6 | #ifdef __cplusplus 7 | extern "C" { 8 | #endif 9 | 10 | //#include 11 | 12 | static inline uint8_t read8(uint32_t addr) 13 | { 14 | return(*((volatile uint8_t *)(addr))); 15 | } 16 | 17 | static inline uint16_t read16(uint32_t addr) 18 | { 19 | return(*((volatile uint16_t *)(addr))); 20 | } 21 | 22 | static inline uint32_t read32(uint32_t addr) 23 | { 24 | return(*((volatile uint32_t *)(addr))); 25 | } 26 | 27 | static inline uint64_t read64(uint32_t addr) 28 | { 29 | return(*((volatile uint64_t *)(addr))); 30 | } 31 | 32 | static inline void write8(uint32_t addr, uint8_t value) 33 | { 34 | *((volatile uint8_t *)(addr)) = value; 35 | } 36 | 37 | static inline void write16(uint32_t addr, uint16_t value) 38 | { 39 | *((volatile uint16_t *)(addr)) = value; 40 | } 41 | 42 | static inline void write32(uint32_t addr, uint32_t value) 43 | { 44 | *((volatile uint32_t *)(addr)) = value; 45 | } 46 | 47 | static inline void write64(uint32_t addr, uint64_t value) 48 | { 49 | *((volatile uint64_t *)(addr)) = value; 50 | } 51 | 52 | uint32_t phys_to_virt(uint32_t phys); 53 | uint32_t virt_to_phys(uint32_t virt); 54 | 55 | #ifdef __cplusplus 56 | } 57 | #endif 58 | 59 | #endif /* __IO_H__ */ 60 | -------------------------------------------------------------------------------- /1.Software/bootloader/memcmp.S: -------------------------------------------------------------------------------- 1 | /* 2 | * memcmp.S 3 | */ 4 | .text 5 | 6 | .global memcmp 7 | .type memcmp, %function 8 | .align 4 9 | 10 | memcmp: 11 | /* if(len == 0) return 0 */ 12 | cmp r2, #0 13 | moveq r0, #0 14 | moveq pc, lr 15 | 16 | /* subtract one to have the index of the last character to check */ 17 | sub r2, r2, #1 18 | 19 | /* ip == last src address to compare */ 20 | add ip, r0, r2 21 | 22 | 1: ldrb r2, [r0], #1 23 | ldrb r3, [r1], #1 24 | cmp ip, r0 25 | cmpcs r2, r3 26 | beq 1b 27 | sub r0, r2, r3 28 | 29 | mov pc, lr 30 | -------------------------------------------------------------------------------- /1.Software/bootloader/sizes.h: -------------------------------------------------------------------------------- 1 | #ifndef __SIZES_H__ 2 | #define __SIZES_H__ 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | #define SZ_16 (0x00000010) 9 | #define SZ_256 (0x00000100) 10 | #define SZ_512 (0x00000200) 11 | 12 | #define SZ_1K (0x00000400) 13 | #define SZ_4K (0x00001000) 14 | #define SZ_8K (0x00002000) 15 | #define SZ_16K (0x00004000) 16 | #define SZ_32K (0x00008000) 17 | #define SZ_64K (0x00010000) 18 | #define SZ_128K (0x00020000) 19 | #define SZ_256K (0x00040000) 20 | #define SZ_512K (0x00080000) 21 | 22 | #define SZ_1M (0x00100000) 23 | #define SZ_2M (0x00200000) 24 | #define SZ_4M (0x00400000) 25 | #define SZ_8M (0x00800000) 26 | #define SZ_16M (0x01000000) 27 | #define SZ_32M (0x02000000) 28 | #define SZ_64M (0x04000000) 29 | #define SZ_128M (0x08000000) 30 | #define SZ_256M (0x10000000) 31 | #define SZ_512M (0x20000000) 32 | 33 | #define SZ_1G (0x40000000) 34 | #define SZ_2G (0x80000000) 35 | 36 | #define ARRAY_SIZE(array) ( sizeof(array) / sizeof((array)[0]) ) 37 | 38 | #ifdef __cplusplus 39 | } 40 | #endif 41 | 42 | #endif /* __SIZES_H__ */ 43 | -------------------------------------------------------------------------------- /1.Software/bootloader/sys-mmu.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | 6 | static void map_l1_section(uint32_t * ttb, uint32_t virt, uint32_t phys, uint32_t size, int type) 7 | { 8 | uint32_t i; 9 | 10 | virt >>= 20; 11 | phys >>= 20; 12 | size >>= 20; 13 | type &= 0x3; 14 | 15 | for(i = size; i > 0; i--, virt++, phys++) 16 | ttb[virt] = (phys << 20) | (0x3 << 10) | (0x0 << 5) | (type << 2) | (0x2 << 0); 17 | } 18 | 19 | void sys_mmu_init(void) 20 | { 21 | uint32_t * ttb = (uint32_t *)(0x80000000 + SZ_1M * 63); 22 | 23 | map_l1_section(ttb, 0x00000000, 0x00000000, SZ_2G, 0); 24 | map_l1_section(ttb, 0x80000000, 0x80000000, SZ_2G, 0); 25 | map_l1_section(ttb, 0x80000000, 0x80000000, SZ_1M * 64, 3); 26 | 27 | arm32_ttb_set((uint32_t)(ttb)); 28 | arm32_tlb_invalidate(); 29 | arm32_domain_set(0x3); 30 | arm32_mmu_enable(); 31 | arm32_icache_enable(); 32 | arm32_dcache_enable(); 33 | } 34 | -------------------------------------------------------------------------------- /1.Software/dsp/source/BasicMathFunctions/inc/arm_abs.h: -------------------------------------------------------------------------------- 1 | #ifndef _ARM_ABS_H 2 | #define _ARM_ABS_H 3 | 4 | #include "arm_math.h" 5 | 6 | void arm_abs_q7(const q7_t * pSrc, q7_t * pDst, uint32_t blockSize); 7 | void arm_abs_q15(const q15_t * pSrc, q15_t * pDst, uint32_t blockSize); 8 | void arm_abs_q31(const q31_t * pSrc, q31_t * pDst, uint32_t blockSize); 9 | void arm_abs_f32(const float32_t * pSrc, float32_t * pDst, uint32_t blockSize); 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /1.Software/dsp/source/BasicMathFunctions/inc/arm_add.h: -------------------------------------------------------------------------------- 1 | #ifndef _ARM_ADD_H 2 | #define _ARM_ADD_H 3 | 4 | #include "arm_math.h" 5 | 6 | void arm_add_q7( 7 | const q7_t * pSrcA, 8 | const q7_t * pSrcB, 9 | q7_t * pDst, 10 | uint32_t blockSize); 11 | void arm_add_q15( 12 | const q15_t * pSrcA, 13 | const q15_t * pSrcB, 14 | q15_t * pDst, 15 | uint32_t blockSize); 16 | void arm_add_q31( 17 | const q31_t * pSrcA, 18 | const q31_t * pSrcB, 19 | q31_t * pDst, 20 | uint32_t blockSize); 21 | void arm_add_f32( 22 | const float32_t * pSrcA, 23 | const float32_t * pSrcB, 24 | float32_t * pDst, 25 | uint32_t blockSize); 26 | 27 | #endif 28 | -------------------------------------------------------------------------------- /1.Software/dsp/source/BasicMathFunctions/inc/arm_and.h: -------------------------------------------------------------------------------- 1 | #ifndef _ARM_AND_H 2 | #define _ARM_AND_H 3 | 4 | #include "arm_math.h" 5 | 6 | void arm_and_u8( 7 | const uint8_t * pSrcA, 8 | const uint8_t * pSrcB, 9 | uint8_t * pDst, 10 | uint32_t blockSize); 11 | void arm_and_u16( 12 | const uint16_t * pSrcA, 13 | const uint16_t * pSrcB, 14 | uint16_t * pDst, 15 | uint32_t blockSize); 16 | void arm_and_u32( 17 | const uint32_t * pSrcA, 18 | const uint32_t * pSrcB, 19 | uint32_t * pDst, 20 | uint32_t blockSize); 21 | 22 | #endif 23 | -------------------------------------------------------------------------------- /1.Software/dsp/source/BasicMathFunctions/inc/arm_clip.h: -------------------------------------------------------------------------------- 1 | #ifndef _ARM_CLIP_H 2 | #define _ARM_CLIP_H 3 | 4 | #include "arm_math.h" 5 | 6 | void arm_clip_q7(const q7_t * pSrc, 7 | q7_t * pDst, 8 | q7_t low, 9 | q7_t high, 10 | uint32_t numSamples); 11 | void arm_clip_q15(const q15_t * pSrc, 12 | q15_t * pDst, 13 | q15_t low, 14 | q15_t high, 15 | uint32_t numSamples); 16 | void arm_clip_q31(const q31_t * pSrc, 17 | q31_t * pDst, 18 | q31_t low, 19 | q31_t high, 20 | uint32_t numSamples); 21 | void arm_clip_f32(const float32_t * pSrc, 22 | float32_t * pDst, 23 | float32_t low, 24 | float32_t high, 25 | uint32_t numSamples); 26 | 27 | #endif 28 | -------------------------------------------------------------------------------- /1.Software/dsp/source/BasicMathFunctions/inc/arm_dot_prod.h: -------------------------------------------------------------------------------- 1 | #ifndef _ARM_DOT_PROD_H 2 | #define _ARM_DOT_PROD_H 3 | 4 | #include "arm_math.h" 5 | 6 | void arm_dot_prod_q7( 7 | const q7_t * pSrcA, 8 | const q7_t * pSrcB, 9 | uint32_t blockSize, 10 | q31_t * result); 11 | void arm_dot_prod_q15( 12 | const q15_t * pSrcA, 13 | const q15_t * pSrcB, 14 | uint32_t blockSize, 15 | q63_t * result); 16 | void arm_dot_prod_q31( 17 | const q31_t * pSrcA, 18 | const q31_t * pSrcB, 19 | uint32_t blockSize, 20 | q63_t * result); 21 | void arm_dot_prod_f32( 22 | const float32_t * pSrcA, 23 | const float32_t * pSrcB, 24 | uint32_t blockSize, 25 | float32_t * result); 26 | 27 | #endif 28 | -------------------------------------------------------------------------------- /1.Software/dsp/source/BasicMathFunctions/inc/arm_mult.h: -------------------------------------------------------------------------------- 1 | #ifndef _ARM_MULT_H 2 | #define _ARM_MULT_H 3 | 4 | #include "arm_math.h" 5 | 6 | void arm_mult_q7( 7 | const q7_t * pSrcA, 8 | const q7_t * pSrcB, 9 | q7_t * pDst, 10 | uint32_t blockSize); 11 | void arm_mult_q15( 12 | const q15_t * pSrcA, 13 | const q15_t * pSrcB, 14 | q15_t * pDst, 15 | uint32_t blockSize); 16 | void arm_mult_q31( 17 | const q31_t * pSrcA, 18 | const q31_t * pSrcB, 19 | q31_t * pDst, 20 | uint32_t blockSize); 21 | void arm_mult_f32( 22 | const float32_t * pSrcA, 23 | const float32_t * pSrcB, 24 | float32_t * pDst, 25 | uint32_t blockSize); 26 | 27 | #endif 28 | -------------------------------------------------------------------------------- /1.Software/dsp/source/BasicMathFunctions/inc/arm_negate.h: -------------------------------------------------------------------------------- 1 | #ifndef _ARM_NEGATE_H 2 | #define _ARM_NEGATE_H 3 | 4 | #include "arm_math.h" 5 | 6 | void arm_negate_q7(const q7_t * pSrc, q7_t * pDst, uint32_t blockSize); 7 | void arm_negate_q15(const q15_t * pSrc, q15_t * pDst, uint32_t blockSize); 8 | void arm_negate_q31(const q31_t * pSrc, q31_t * pDst, uint32_t blockSize); 9 | void arm_negate_f32(const float32_t * pSrc, float32_t * pDst, uint32_t blockSize); 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /1.Software/dsp/source/BasicMathFunctions/inc/arm_not.h: -------------------------------------------------------------------------------- 1 | #ifndef _ARM_NOT_H 2 | #define _ARM_NOT_H 3 | 4 | #include "arm_math.h" 5 | 6 | void arm_not_u8( 7 | const uint8_t * pSrc, 8 | uint8_t * pDst, 9 | uint32_t blockSize); 10 | void arm_not_u16( 11 | const uint16_t * pSrc, 12 | uint16_t * pDst, 13 | uint32_t blockSize); 14 | void arm_not_u32( 15 | const uint32_t * pSrc, 16 | uint32_t * pDst, 17 | uint32_t blockSize); 18 | 19 | #endif 20 | -------------------------------------------------------------------------------- /1.Software/dsp/source/BasicMathFunctions/inc/arm_offset.h: -------------------------------------------------------------------------------- 1 | #ifndef _ARM_OFFSET_H 2 | #define _ARM_OFFSET_H 3 | 4 | #include "arm_math.h" 5 | 6 | void arm_offset_q7( 7 | const q7_t * pSrc, 8 | q7_t offset, 9 | q7_t * pDst, 10 | uint32_t blockSize); 11 | void arm_offset_q15( 12 | const q15_t * pSrc, 13 | q15_t offset, 14 | q15_t * pDst, 15 | uint32_t blockSize); 16 | void arm_offset_q31( 17 | const q31_t * pSrc, 18 | q31_t offset, 19 | q31_t * pDst, 20 | uint32_t blockSize); 21 | void arm_offset_f32( 22 | const float32_t * pSrc, 23 | float32_t offset, 24 | float32_t * pDst, 25 | uint32_t blockSize); 26 | 27 | #endif 28 | -------------------------------------------------------------------------------- /1.Software/dsp/source/BasicMathFunctions/inc/arm_or.h: -------------------------------------------------------------------------------- 1 | #ifndef _ARM_OR_H 2 | #define _ARM_OR_H 3 | 4 | #include "arm_math.h" 5 | 6 | void arm_or_u8( 7 | const uint8_t * pSrcA, 8 | const uint8_t * pSrcB, 9 | uint8_t * pDst, 10 | uint32_t blockSize); 11 | void arm_or_u16( 12 | const uint16_t * pSrcA, 13 | const uint16_t * pSrcB, 14 | uint16_t * pDst, 15 | uint32_t blockSize); 16 | void arm_or_u32( 17 | const uint32_t * pSrcA, 18 | const uint32_t * pSrcB, 19 | uint32_t * pDst, 20 | uint32_t blockSize); 21 | 22 | #endif 23 | -------------------------------------------------------------------------------- /1.Software/dsp/source/BasicMathFunctions/inc/arm_scale.h: -------------------------------------------------------------------------------- 1 | #ifndef _ARM_SCALE_H 2 | #define _ARM_SCALE_H 3 | 4 | #include "arm_math.h" 5 | 6 | void arm_scale_q7( 7 | const q7_t * pSrc, 8 | q7_t scaleFract, 9 | int8_t shift, 10 | q7_t * pDst, 11 | uint32_t blockSize); 12 | void arm_scale_q15( 13 | const q15_t * pSrc, 14 | q15_t scaleFract, 15 | int8_t shift, 16 | q15_t * pDst, 17 | uint32_t blockSize); 18 | void arm_scale_q31( 19 | const q31_t * pSrc, 20 | q31_t scaleFract, 21 | int8_t shift, 22 | q31_t * pDst, 23 | uint32_t blockSize); 24 | void arm_scale_f32( 25 | const float32_t * pSrc, 26 | float32_t scale, 27 | float32_t * pDst, 28 | uint32_t blockSize); 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /1.Software/dsp/source/BasicMathFunctions/inc/arm_shift.h: -------------------------------------------------------------------------------- 1 | #ifndef _ARM_SHIFT_H 2 | #define _ARM_SHIFT_H 3 | 4 | #include "arm_math.h" 5 | 6 | void arm_shift_q7( 7 | const q7_t * pSrc, 8 | int8_t shiftBits, 9 | q7_t * pDst, 10 | uint32_t blockSize); 11 | void arm_shift_q15( 12 | const q15_t * pSrc, 13 | int8_t shiftBits, 14 | q15_t * pDst, 15 | uint32_t blockSize); 16 | void arm_shift_q31( 17 | const q31_t * pSrc, 18 | int8_t shiftBits, 19 | q31_t * pDst, 20 | uint32_t blockSize); 21 | 22 | #endif 23 | -------------------------------------------------------------------------------- /1.Software/dsp/source/BasicMathFunctions/inc/arm_sub.h: -------------------------------------------------------------------------------- 1 | #ifndef _ARM_SUB_H 2 | #define _ARM_SUB_H 3 | 4 | #include "arm_math.h" 5 | 6 | void arm_sub_q7( 7 | const q7_t * pSrcA, 8 | const q7_t * pSrcB, 9 | q7_t * pDst, 10 | uint32_t blockSize); 11 | void arm_sub_q15( 12 | const q15_t * pSrcA, 13 | const q15_t * pSrcB, 14 | q15_t * pDst, 15 | uint32_t blockSize); 16 | void arm_sub_q31( 17 | const q31_t * pSrcA, 18 | const q31_t * pSrcB, 19 | q31_t * pDst, 20 | uint32_t blockSize); 21 | void arm_sub_f32( 22 | const float32_t * pSrcA, 23 | const float32_t * pSrcB, 24 | float32_t * pDst, 25 | uint32_t blockSize); 26 | 27 | #endif 28 | -------------------------------------------------------------------------------- /1.Software/dsp/source/BasicMathFunctions/inc/arm_xor.h: -------------------------------------------------------------------------------- 1 | #ifndef _ARM_XOR_H 2 | #define _ARM_XOR_H 3 | 4 | #include "arm_math.h" 5 | 6 | void arm_xor_u8( 7 | const uint8_t * pSrcA, 8 | const uint8_t * pSrcB, 9 | uint8_t * pDst, 10 | uint32_t blockSize); 11 | void arm_xor_u16( 12 | const uint16_t * pSrcA, 13 | const uint16_t * pSrcB, 14 | uint16_t * pDst, 15 | uint32_t blockSize); 16 | void arm_xor_u32( 17 | const uint32_t * pSrcA, 18 | const uint32_t * pSrcB, 19 | uint32_t * pDst, 20 | uint32_t blockSize); 21 | 22 | #endif 23 | -------------------------------------------------------------------------------- /1.Software/dsp/source/BasicMathFunctions/inc/basicmathfunctions.h: -------------------------------------------------------------------------------- 1 | #ifndef __BasicMathFunctions__H 2 | #define __BasicMathFunctions__H 3 | 4 | #include "arm_abs.h" 5 | #include "arm_add.h" 6 | #include "arm_and.h" 7 | #include "arm_clip.h" 8 | #include "arm_dot_prod.h" 9 | #include "arm_mult.h" 10 | #include "arm_negate.h" 11 | #include "arm_not.h" 12 | #include "arm_offset.h" 13 | #include "arm_or.h" 14 | #include "arm_scale.h" 15 | #include "arm_shift.h" 16 | #include "arm_sub.h" 17 | #include "arm_xor.h" 18 | 19 | #endif 20 | -------------------------------------------------------------------------------- /1.Software/dsp/source/BasicMathFunctions/src/arm_abs.c: -------------------------------------------------------------------------------- 1 | #include "../inc/basicmathfunctions.h" 2 | 3 | void arm_abs_q7( 4 | const q7_t * pSrc, 5 | q7_t * pDst, 6 | uint32_t blockSize) 7 | { 8 | uint32_t blkCnt; 9 | q7_t in; 10 | 11 | blkCnt = blockSize; 12 | 13 | while(blkCnt > 0) 14 | { 15 | in = *pSrc++; 16 | *pDst++ = (in > 0) ? in : ((in == (q7_t)0x80) ? (q7_t)0x7f : -in); 17 | blkCnt--; 18 | } 19 | } 20 | 21 | void arm_abs_q15( 22 | const q15_t * pSrc, 23 | q15_t * pDst, 24 | uint32_t blockSize) 25 | { 26 | uint32_t blkCnt; 27 | q15_t in; 28 | 29 | blkCnt = blockSize; 30 | 31 | while(blkCnt > 0) 32 | { 33 | in = *pSrc++; 34 | *pDst++ = (in > 0) ? in : ((in == (q15_t)0x8000) ? 0x7fff : -in); 35 | blkCnt--; 36 | } 37 | } 38 | 39 | void arm_abs_q31( 40 | const q31_t * pSrc, 41 | q31_t * pDst, 42 | uint32_t blockSize) 43 | { 44 | uint32_t blkCnt; 45 | q31_t in; 46 | 47 | blkCnt = blockSize; 48 | 49 | while(blkCnt > 0) 50 | { 51 | in = *pSrc++; 52 | *pDst++ = (in > 0) ? in : ((in == INT32_MIN) ? INT32_MAX : -in); 53 | blkCnt--; 54 | } 55 | } 56 | 57 | void arm_abs_f32( 58 | const float32_t * pSrc, 59 | float32_t * pDst, 60 | uint32_t blockSize) 61 | { 62 | uint32_t blkCnt; 63 | 64 | blkCnt = blockSize; 65 | 66 | while(blkCnt > 0) 67 | { 68 | *pDst++ = fabsf(*pSrc++); 69 | blkCnt--; 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /1.Software/dsp/source/BasicMathFunctions/src/arm_add.c: -------------------------------------------------------------------------------- 1 | #include "../inc/basicmathfunctions.h" 2 | 3 | void arm_add_q7( 4 | const q7_t * pSrcA, 5 | const q7_t * pSrcB, 6 | q7_t * pDst, 7 | uint32_t blockSize) 8 | { 9 | uint32_t blkCnt; 10 | 11 | blkCnt = blockSize; 12 | 13 | while(blkCnt > 0) 14 | { 15 | *pDst++ = (q7_t)__SSAT((q15_t) * pSrcA++ + *pSrcB++, 8); 16 | blkCnt--; 17 | } 18 | } 19 | 20 | void arm_add_q15( 21 | const q15_t * pSrcA, 22 | const q15_t * pSrcB, 23 | q15_t * pDst, 24 | uint32_t blockSize) 25 | { 26 | uint32_t blkCnt; 27 | 28 | blkCnt = blockSize; 29 | 30 | while(blkCnt > 0) 31 | { 32 | *pDst++ = (q15_t)__SSAT(((q31_t) * pSrcA++ + *pSrcB++), 16); 33 | blkCnt--; 34 | } 35 | } 36 | 37 | void arm_add_q31( 38 | const q31_t * pSrcA, 39 | const q31_t * pSrcB, 40 | q31_t * pDst, 41 | uint32_t blockSize) 42 | { 43 | uint32_t blkCnt; 44 | 45 | blkCnt = blockSize; 46 | 47 | while(blkCnt > 0) 48 | { 49 | *pDst++ = __QADD(*pSrcA++, *pSrcB++); 50 | blkCnt--; 51 | } 52 | } 53 | 54 | void arm_add_f32( 55 | const float32_t * pSrcA, 56 | const float32_t * pSrcB, 57 | float32_t * pDst, 58 | uint32_t blockSize) 59 | { 60 | uint32_t blkCnt; 61 | 62 | blkCnt = blockSize; 63 | 64 | while(blkCnt > 0) 65 | { 66 | *pDst++ = (*pSrcA++) + (*pSrcB++); 67 | blkCnt--; 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /1.Software/dsp/source/BasicMathFunctions/src/arm_and.c: -------------------------------------------------------------------------------- 1 | #include "../inc/basicmathfunctions.h" 2 | 3 | void arm_and_u8( 4 | const uint8_t * pSrcA, 5 | const uint8_t * pSrcB, 6 | uint8_t * pDst, 7 | uint32_t blockSize) 8 | { 9 | uint32_t blkCnt; 10 | blkCnt = blockSize; 11 | 12 | while(blkCnt > 0U) 13 | { 14 | *pDst++ = (*pSrcA++) & (*pSrcB++); 15 | blkCnt--; 16 | } 17 | } 18 | 19 | void arm_and_u16( 20 | const uint16_t * pSrcA, 21 | const uint16_t * pSrcB, 22 | uint16_t * pDst, 23 | uint32_t blockSize) 24 | { 25 | uint32_t blkCnt; 26 | blkCnt = blockSize; 27 | 28 | while(blkCnt > 0U) 29 | { 30 | *pDst++ = (*pSrcA++) & (*pSrcB++); 31 | blkCnt--; 32 | } 33 | } 34 | 35 | void arm_and_u32( 36 | const uint32_t * pSrcA, 37 | const uint32_t * pSrcB, 38 | uint32_t * pDst, 39 | uint32_t blockSize) 40 | { 41 | uint32_t blkCnt; 42 | blkCnt = blockSize; 43 | 44 | while(blkCnt > 0U) 45 | { 46 | *pDst++ = (*pSrcA++) & (*pSrcB++); 47 | blkCnt--; 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /1.Software/dsp/source/BasicMathFunctions/src/arm_dot_prod.c: -------------------------------------------------------------------------------- 1 | #include "../inc/basicmathfunctions.h" 2 | 3 | void arm_dot_prod_q7( 4 | const q7_t * pSrcA, 5 | const q7_t * pSrcB, 6 | uint32_t blockSize, 7 | q31_t * result) 8 | { 9 | uint32_t blkCnt; 10 | q31_t sum = 0; 11 | 12 | blkCnt = blockSize; 13 | 14 | while(blkCnt > 0U) 15 | { 16 | sum += (q31_t)((q15_t) * pSrcA++ * *pSrcB++); 17 | blkCnt--; 18 | } 19 | *result = sum; 20 | } 21 | 22 | void arm_dot_prod_q15( 23 | const q15_t * pSrcA, 24 | const q15_t * pSrcB, 25 | uint32_t blockSize, 26 | q63_t * result) 27 | { 28 | uint32_t blkCnt; 29 | q63_t sum = 0; 30 | 31 | blkCnt = blockSize; 32 | 33 | while(blkCnt > 0U) 34 | { 35 | sum += (q63_t)((q31_t) * pSrcA++ * *pSrcB++); 36 | blkCnt--; 37 | } 38 | *result = sum; 39 | } 40 | 41 | void arm_dot_prod_q31( 42 | const q31_t * pSrcA, 43 | const q31_t * pSrcB, 44 | uint32_t blockSize, 45 | q63_t * result) 46 | { 47 | uint32_t blkCnt; 48 | q63_t sum = 0; 49 | 50 | blkCnt = blockSize; 51 | 52 | while(blkCnt > 0U) 53 | { 54 | sum += ((q63_t) * pSrcA++ * *pSrcB++) >> 14U; 55 | blkCnt--; 56 | } 57 | *result = sum; 58 | } 59 | 60 | void arm_dot_prod_f32( 61 | const float32_t * pSrcA, 62 | const float32_t * pSrcB, 63 | uint32_t blockSize, 64 | float32_t * result) 65 | { 66 | uint32_t blkCnt; 67 | float32_t sum = 0.0f; 68 | 69 | blkCnt = blockSize; 70 | 71 | while(blkCnt > 0U) 72 | { 73 | sum += (*pSrcA++) * (*pSrcB++); 74 | blkCnt--; 75 | } 76 | *result = sum; 77 | } 78 | -------------------------------------------------------------------------------- /1.Software/dsp/source/BasicMathFunctions/src/arm_mult.c: -------------------------------------------------------------------------------- 1 | #include "../inc/basicmathfunctions.h" 2 | 3 | void arm_mult_q7( 4 | const q7_t * pSrcA, 5 | const q7_t * pSrcB, 6 | q7_t * pDst, 7 | uint32_t blockSize) 8 | { 9 | uint32_t blkCnt; 10 | blkCnt = blockSize; 11 | 12 | while(blkCnt > 0U) 13 | { 14 | *pDst++ = (q7_t) __SSAT((((q15_t)(*pSrcA++) * (*pSrcB++)) >> 7), 8); 15 | blkCnt--; 16 | } 17 | } 18 | 19 | void arm_mult_q15( 20 | const q15_t * pSrcA, 21 | const q15_t * pSrcB, 22 | q15_t * pDst, 23 | uint32_t blockSize) 24 | { 25 | uint32_t blkCnt; 26 | blkCnt = blockSize; 27 | 28 | while(blkCnt > 0U) 29 | { 30 | *pDst++ = (q15_t) __SSAT((((q31_t)(*pSrcA++) * (*pSrcB++)) >> 15), 16); 31 | blkCnt--; 32 | } 33 | } 34 | 35 | void arm_mult_q31( 36 | const q31_t * pSrcA, 37 | const q31_t * pSrcB, 38 | q31_t * pDst, 39 | uint32_t blockSize) 40 | { 41 | uint32_t blkCnt; 42 | q31_t out; 43 | blkCnt = blockSize; 44 | 45 | while(blkCnt > 0U) 46 | { 47 | out = ((q63_t) * pSrcA++ * *pSrcB++) >> 32; 48 | out = __SSAT(out, 31); 49 | *pDst++ = out << 1U; 50 | blkCnt--; 51 | } 52 | } 53 | 54 | void arm_mult_f32( 55 | const float32_t * pSrcA, 56 | const float32_t * pSrcB, 57 | float32_t * pDst, 58 | uint32_t blockSize) 59 | { 60 | uint32_t blkCnt; 61 | blkCnt = blockSize; 62 | 63 | while(blkCnt > 0U) 64 | { 65 | *pDst++ = (*pSrcA++) * (*pSrcB++); 66 | blkCnt--; 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /1.Software/dsp/source/BasicMathFunctions/src/arm_negate.c: -------------------------------------------------------------------------------- 1 | #include "../inc/basicmathfunctions.h" 2 | 3 | void arm_negate_q7( 4 | const q7_t * pSrc, 5 | q7_t * pDst, 6 | uint32_t blockSize) 7 | { 8 | uint32_t blkCnt; 9 | q7_t in; 10 | 11 | blkCnt = blockSize; 12 | 13 | while(blkCnt > 0U) 14 | { 15 | in = *pSrc++; 16 | *pDst++ = (in == (q7_t) 0x80) ? (q7_t) 0x7f : -in; 17 | blkCnt--; 18 | } 19 | } 20 | 21 | void arm_negate_q15( 22 | const q15_t * pSrc, 23 | q15_t * pDst, 24 | uint32_t blockSize) 25 | { 26 | uint32_t blkCnt; 27 | q15_t in; 28 | 29 | blkCnt = blockSize; 30 | 31 | while(blkCnt > 0U) 32 | { 33 | in = *pSrc++; 34 | *pDst++ = (in == (q15_t) 0x8000) ? (q15_t) 0x7fff : -in; 35 | blkCnt--; 36 | } 37 | } 38 | 39 | void arm_negate_q31( 40 | const q31_t * pSrc, 41 | q31_t * pDst, 42 | uint32_t blockSize) 43 | { 44 | uint32_t blkCnt; 45 | q31_t in; 46 | 47 | blkCnt = blockSize; 48 | 49 | while(blkCnt > 0U) 50 | { 51 | in = *pSrc++; 52 | *pDst++ = (in == INT32_MIN) ? INT32_MAX : -in; 53 | blkCnt--; 54 | } 55 | } 56 | 57 | void arm_negate_f32( 58 | const float32_t * pSrc, 59 | float32_t * pDst, 60 | uint32_t blockSize) 61 | { 62 | uint32_t blkCnt; 63 | 64 | blkCnt = blockSize; 65 | 66 | while(blkCnt > 0U) 67 | { 68 | *pDst++ = -*pSrc++; 69 | blkCnt--; 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /1.Software/dsp/source/BasicMathFunctions/src/arm_not.c: -------------------------------------------------------------------------------- 1 | #include "../inc/basicmathfunctions.h" 2 | 3 | void arm_not_u8( 4 | const uint8_t * pSrc, 5 | uint8_t * pDst, 6 | uint32_t blockSize) 7 | { 8 | uint32_t blkCnt; 9 | 10 | blkCnt = blockSize; 11 | 12 | while(blkCnt > 0U) 13 | { 14 | *pDst++ = ~(*pSrc++); 15 | blkCnt--; 16 | } 17 | } 18 | 19 | void arm_not_u16( 20 | const uint16_t * pSrc, 21 | uint16_t * pDst, 22 | uint32_t blockSize) 23 | { 24 | uint32_t blkCnt; 25 | 26 | blkCnt = blockSize; 27 | 28 | while(blkCnt > 0U) 29 | { 30 | *pDst++ = ~(*pSrc++); 31 | blkCnt--; 32 | } 33 | } 34 | 35 | void arm_not_u32( 36 | const uint32_t * pSrc, 37 | uint32_t * pDst, 38 | uint32_t blockSize) 39 | { 40 | uint32_t blkCnt; 41 | 42 | blkCnt = blockSize; 43 | 44 | while(blkCnt > 0U) 45 | { 46 | *pDst++ = ~(*pSrc++); 47 | blkCnt--; 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /1.Software/dsp/source/BasicMathFunctions/src/arm_offset.c: -------------------------------------------------------------------------------- 1 | #include "../inc/basicmathfunctions.h" 2 | 3 | void arm_offset_q7( 4 | const q7_t * pSrc, 5 | q7_t offset, 6 | q7_t * pDst, 7 | uint32_t blockSize) 8 | { 9 | uint32_t blkCnt; 10 | 11 | blkCnt = blockSize; 12 | 13 | while(blkCnt > 0) 14 | { 15 | *pDst++ = (q7_t)__SSAT((q15_t) * pSrc++ + offset, 8); 16 | blkCnt--; 17 | } 18 | } 19 | 20 | void arm_offset_q15( 21 | const q15_t * pSrc, 22 | q15_t offset, 23 | q15_t * pDst, 24 | uint32_t blockSize) 25 | { 26 | uint32_t blkCnt; 27 | 28 | blkCnt = blockSize; 29 | 30 | while(blkCnt > 0) 31 | { 32 | *pDst++ = (q15_t)__SSAT(((q31_t) * pSrc++ + offset), 16); 33 | blkCnt--; 34 | } 35 | } 36 | 37 | void arm_offset_q31( 38 | const q31_t * pSrc, 39 | q31_t offset, 40 | q31_t * pDst, 41 | uint32_t blockSize) 42 | { 43 | uint32_t blkCnt; 44 | 45 | blkCnt = blockSize; 46 | 47 | while(blkCnt > 0) 48 | { 49 | *pDst++ = (q31_t)clip_q63_to_q31((q63_t) * pSrc++ + offset); 50 | blkCnt--; 51 | } 52 | } 53 | 54 | void arm_offset_f32( 55 | const float32_t * pSrc, 56 | float32_t offset, 57 | float32_t * pDst, 58 | uint32_t blockSize) 59 | { 60 | uint32_t blkCnt; 61 | 62 | blkCnt = blockSize; 63 | 64 | while(blkCnt > 0) 65 | { 66 | *pDst++ = (*pSrc++) + offset; 67 | blkCnt--; 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /1.Software/dsp/source/BasicMathFunctions/src/arm_or.c: -------------------------------------------------------------------------------- 1 | #include "../inc/basicmathfunctions.h" 2 | 3 | void arm_or_u8( 4 | const uint8_t * pSrcA, 5 | const uint8_t * pSrcB, 6 | uint8_t * pDst, 7 | uint32_t blockSize) 8 | { 9 | uint32_t blkCnt; 10 | 11 | blkCnt = blockSize; 12 | 13 | while(blkCnt > 0U) 14 | { 15 | *pDst++ = (*pSrcA++) | (*pSrcB++); 16 | blkCnt--; 17 | } 18 | } 19 | 20 | void arm_or_u16( 21 | const uint16_t * pSrcA, 22 | const uint16_t * pSrcB, 23 | uint16_t * pDst, 24 | uint32_t blockSize) 25 | { 26 | uint32_t blkCnt; 27 | 28 | blkCnt = blockSize; 29 | 30 | while(blkCnt > 0U) 31 | { 32 | *pDst++ = (*pSrcA++) | (*pSrcB++); 33 | blkCnt--; 34 | } 35 | } 36 | 37 | void arm_or_u32( 38 | const uint32_t * pSrcA, 39 | const uint32_t * pSrcB, 40 | uint32_t * pDst, 41 | uint32_t blockSize) 42 | { 43 | uint32_t blkCnt; 44 | 45 | blkCnt = blockSize; 46 | 47 | while(blkCnt > 0U) 48 | { 49 | *pDst++ = (*pSrcA++) | (*pSrcB++); 50 | blkCnt--; 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /1.Software/dsp/source/BasicMathFunctions/src/arm_sub.c: -------------------------------------------------------------------------------- 1 | #include "../inc/basicmathfunctions.h" 2 | 3 | void arm_sub_q7( 4 | const q7_t * pSrcA, 5 | const q7_t * pSrcB, 6 | q7_t * pDst, 7 | uint32_t blockSize) 8 | { 9 | uint32_t blkCnt; 10 | 11 | blkCnt = blockSize; 12 | 13 | while(blkCnt > 0U) 14 | { 15 | *pDst++ = (q7_t) __SSAT((q15_t) * pSrcA++ - *pSrcB++, 8); 16 | blkCnt--; 17 | } 18 | } 19 | 20 | void arm_sub_q15( 21 | const q15_t * pSrcA, 22 | const q15_t * pSrcB, 23 | q15_t * pDst, 24 | uint32_t blockSize) 25 | { 26 | uint32_t blkCnt; 27 | 28 | blkCnt = blockSize; 29 | 30 | while(blkCnt > 0U) 31 | { 32 | *pDst++ = (q15_t) __SSAT(((q31_t) * pSrcA++ - *pSrcB++), 16); 33 | blkCnt--; 34 | } 35 | } 36 | 37 | void arm_sub_q31( 38 | const q31_t * pSrcA, 39 | const q31_t * pSrcB, 40 | q31_t * pDst, 41 | uint32_t blockSize) 42 | { 43 | uint32_t blkCnt; 44 | 45 | blkCnt = blockSize; 46 | 47 | while(blkCnt > 0U) 48 | { 49 | *pDst++ = __QSUB(*pSrcA++, *pSrcB++); 50 | blkCnt--; 51 | } 52 | } 53 | 54 | void arm_sub_f32( 55 | const float32_t * pSrcA, 56 | const float32_t * pSrcB, 57 | float32_t * pDst, 58 | uint32_t blockSize) 59 | { 60 | uint32_t blkCnt; 61 | 62 | blkCnt = blockSize; 63 | 64 | while(blkCnt > 0U) 65 | { 66 | *pDst++ = (*pSrcA++) - (*pSrcB++); 67 | blkCnt--; 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /1.Software/dsp/source/BasicMathFunctions/src/arm_xor.c: -------------------------------------------------------------------------------- 1 | #include "../inc/basicmathfunctions.h" 2 | 3 | void arm_xor_u8( 4 | const uint8_t * pSrcA, 5 | const uint8_t * pSrcB, 6 | uint8_t * pDst, 7 | uint32_t blockSize) 8 | { 9 | uint32_t blkCnt; 10 | 11 | blkCnt = blockSize; 12 | 13 | while(blkCnt > 0U) 14 | { 15 | *pDst++ = (*pSrcA++) ^ (*pSrcB++); 16 | blkCnt--; 17 | } 18 | } 19 | 20 | void arm_xor_u16( 21 | const uint16_t * pSrcA, 22 | const uint16_t * pSrcB, 23 | uint16_t * pDst, 24 | uint32_t blockSize) 25 | { 26 | uint32_t blkCnt; 27 | 28 | blkCnt = blockSize; 29 | 30 | while(blkCnt > 0U) 31 | { 32 | *pDst++ = (*pSrcA++) ^ (*pSrcB++); 33 | blkCnt--; 34 | } 35 | } 36 | 37 | void arm_xor_u32( 38 | const uint32_t * pSrcA, 39 | const uint32_t * pSrcB, 40 | uint32_t * pDst, 41 | uint32_t blockSize) 42 | { 43 | uint32_t blkCnt; 44 | 45 | blkCnt = blockSize; 46 | while(blkCnt > 0U) 47 | { 48 | *pDst++ = (*pSrcA++) ^ (*pSrcB++); 49 | blkCnt--; 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /1.Software/dsp/source/CommonTables/inc/commontables.h: -------------------------------------------------------------------------------- 1 | #ifndef __CommonTables__H 2 | #define __CommonTables__H 3 | 4 | #include "arm_math.h" 5 | 6 | extern const q15_t sqrt_initial_lut_q15[]; 7 | extern const q31_t sqrt_initial_lut_q31[]; 8 | extern const uint16_t armBitRevTable[]; 9 | extern const q15_t twiddleCoef_4096_q15[]; 10 | extern const q31_t twiddleCoef_4096_q31[]; 11 | extern const float32_t twiddleCoef_4096[]; 12 | #define twiddleCoef twiddleCoef_4096 13 | 14 | #endif 15 | -------------------------------------------------------------------------------- /1.Software/dsp/source/ComplexMathFunctions/inc/arm_cmplx_mag.h: -------------------------------------------------------------------------------- 1 | #ifndef _ARM_CMPLX_MAG_H 2 | #define _ARM_CMPLX_MAG_H 3 | 4 | #include "arm_math.h" 5 | 6 | void arm_cmplx_mag_q15( 7 | const q15_t * pSrc, 8 | q15_t * pDst, 9 | uint32_t numSamples); 10 | void arm_cmplx_mag_q31( 11 | const q31_t * pSrc, 12 | q31_t * pDst, 13 | uint32_t numSamples); 14 | void arm_cmplx_mag_f32( 15 | const float32_t * pSrc, 16 | float32_t * pDst, 17 | uint32_t numSamples); 18 | void arm_cmplx_mag_f64( 19 | const float64_t * pSrc, 20 | float64_t * pDst, 21 | uint32_t numSamples); 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /1.Software/dsp/source/ComplexMathFunctions/inc/complexmathfunctions.h: -------------------------------------------------------------------------------- 1 | #ifndef ComplexMathFunctions__H 2 | #define ComplexMathFunctions__H 3 | 4 | #include "arm_cmplx_mag.h" 5 | 6 | #endif 7 | -------------------------------------------------------------------------------- /1.Software/dsp/source/FastMathFunctions/inc/arm_sqrt.h: -------------------------------------------------------------------------------- 1 | #ifndef _ARM_SQRT_H 2 | #define _ARM_SQRT_H 3 | 4 | #include "arm_math.h" 5 | 6 | arm_status arm_sqrt_q15(q15_t in, q15_t * pOut); 7 | arm_status arm_sqrt_q31(q31_t in, q31_t * pOut); 8 | arm_status arm_sqrt_f32(float32_t in, float32_t * pOut); 9 | 10 | #endif 11 | -------------------------------------------------------------------------------- /1.Software/dsp/source/FastMathFunctions/inc/fastmathfunctions.h: -------------------------------------------------------------------------------- 1 | #ifndef __FastMathFunctions__H 2 | #define __FastMathFunctions__H 3 | 4 | #include "arm_sqrt.h" 5 | 6 | #endif 7 | -------------------------------------------------------------------------------- /1.Software/dsp/source/StatisticsFunctions/inc/arm_max.h: -------------------------------------------------------------------------------- 1 | #ifndef _ARM_MAX_H 2 | #define _ARM_MAX_H 3 | 4 | #include "arm_math.h" 5 | 6 | void arm_max_q7(const q7_t * pSrc, uint32_t blockSize, q7_t * pResult, uint32_t * pIndex); 7 | void arm_max_q15(const q15_t * pSrc, uint32_t blockSize, q15_t * pResult, uint32_t * pIndex); 8 | void arm_max_q31(const q31_t * pSrc, uint32_t blockSize, q31_t * pResult, uint32_t * pIndex); 9 | void arm_max_f32(const float32_t * pSrc, uint32_t blockSize, float32_t * pResult, uint32_t * pIndex); 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /1.Software/dsp/source/StatisticsFunctions/inc/arm_mean.h: -------------------------------------------------------------------------------- 1 | #ifndef _ARM_MEAN_H 2 | #define _ARM_MEAN_H 3 | 4 | #include "arm_math.h" 5 | 6 | void arm_mean_q7(const q7_t * pSrc, uint32_t blockSize, q7_t * pResult); 7 | void arm_mean_q15(const q15_t * pSrc, uint32_t blockSize, q15_t * pResult); 8 | void arm_mean_q31(const q31_t * pSrc, uint32_t blockSize, q31_t * pResult); 9 | void arm_mean_f32(const float32_t * pSrc, uint32_t blockSize, float32_t * pResult); 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /1.Software/dsp/source/StatisticsFunctions/inc/arm_min.h: -------------------------------------------------------------------------------- 1 | #ifndef _ARM_MIN_H 2 | #define _ARM_MIN_H 3 | 4 | #include "arm_math.h" 5 | 6 | void arm_min_q7(const q7_t * pSrc, uint32_t blockSize, q7_t * pResult, uint32_t * pIndex); 7 | void arm_min_q15(const q15_t * pSrc, uint32_t blockSize, q15_t * pResult, uint32_t * pIndex); 8 | void arm_min_q31(const q31_t * pSrc, uint32_t blockSize, q31_t * pResult, uint32_t * pIndex); 9 | void arm_min_f32(const float32_t * pSrc, uint32_t blockSize, float32_t * pResult, uint32_t * pIndex); 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /1.Software/dsp/source/StatisticsFunctions/inc/arm_power.h: -------------------------------------------------------------------------------- 1 | #ifndef _ARM_POWER_H 2 | #define _ARM_POWER_H 3 | 4 | #include "arm_math.h" 5 | 6 | void arm_power_q7(const q7_t * pSrc, uint32_t blockSize, q31_t * pResult); 7 | void arm_power_q15(const q15_t * pSrc, uint32_t blockSize, q63_t * pResult); 8 | void arm_power_q31(const q31_t * pSrc, uint32_t blockSize, q63_t * pResult); 9 | void arm_power_f32(const float32_t * pSrc, uint32_t blockSize, float32_t * pResult); 10 | #endif 11 | -------------------------------------------------------------------------------- /1.Software/dsp/source/StatisticsFunctions/inc/arm_rms.h: -------------------------------------------------------------------------------- 1 | #ifndef _ARM_RMS_H 2 | #define _ARM_RMS_H 3 | 4 | #include "arm_math.h" 5 | 6 | void arm_rms_q15(const q15_t * pSrc, uint32_t blockSize, q15_t * pResult); 7 | void arm_rms_q31(const q31_t * pSrc, uint32_t blockSize, q31_t * pResult); 8 | void arm_rms_f32(const float32_t * pSrc, uint32_t blockSize, float32_t * pResult); 9 | 10 | #endif 11 | -------------------------------------------------------------------------------- /1.Software/dsp/source/StatisticsFunctions/inc/statisticsfunctions.h: -------------------------------------------------------------------------------- 1 | #ifndef __statisticsfunctions__H 2 | #define __statisticsfunctions__H 3 | 4 | #include "arm_max.h" 5 | #include "arm_mean.h" 6 | #include "arm_min.h" 7 | #include "arm_power.h" 8 | #include "arm_rms.h" 9 | 10 | #endif 11 | -------------------------------------------------------------------------------- /1.Software/dsp/source/StatisticsFunctions/src/arm_mean.c: -------------------------------------------------------------------------------- 1 | #include "../inc/statisticsfunctions.h" 2 | 3 | void arm_mean_q7(const q7_t * pSrc, uint32_t blockSize, q7_t * pResult) 4 | { 5 | uint32_t blkCnt; 6 | q31_t sum = 0; 7 | 8 | blkCnt = blockSize; 9 | 10 | while(blkCnt > 0) 11 | { 12 | sum += *pSrc++; 13 | blkCnt--; 14 | } 15 | *pResult = (q7_t)(sum / (int32_t)blockSize); 16 | } 17 | 18 | void arm_mean_q15(const q15_t * pSrc, uint32_t blockSize, q15_t * pResult) 19 | { 20 | uint32_t blkCnt; 21 | q31_t sum = 0; 22 | 23 | blkCnt = blockSize; 24 | 25 | while(blkCnt > 0) 26 | { 27 | sum += *pSrc++; 28 | blkCnt--; 29 | } 30 | *pResult = (q15_t)(sum / (int32_t)blockSize); 31 | } 32 | 33 | void arm_mean_q31(const q31_t * pSrc, uint32_t blockSize, q31_t * pResult) 34 | { 35 | uint32_t blkCnt; 36 | q63_t sum = 0; 37 | 38 | blkCnt = blockSize; 39 | 40 | while(blkCnt > 0) 41 | { 42 | sum += *pSrc++; 43 | blkCnt--; 44 | } 45 | *pResult = (q31_t)(sum / blockSize); 46 | } 47 | 48 | void arm_mean_f32(const float32_t * pSrc, uint32_t blockSize, float32_t * pResult) 49 | { 50 | uint32_t blkCnt; 51 | float32_t sum = 0; 52 | 53 | blkCnt = blockSize; 54 | 55 | while(blkCnt > 0) 56 | { 57 | sum += *pSrc++; 58 | blkCnt--; 59 | } 60 | *pResult = (sum / blockSize); 61 | } 62 | -------------------------------------------------------------------------------- /1.Software/dsp/source/StatisticsFunctions/src/arm_power.c: -------------------------------------------------------------------------------- 1 | #include "../inc/statisticsfunctions.h" 2 | 3 | void arm_power_q7( 4 | const q7_t * pSrc, 5 | uint32_t blockSize, 6 | q31_t * pResult) 7 | { 8 | uint32_t blkCnt; 9 | q31_t sum = 0; 10 | q7_t in; 11 | 12 | blkCnt = blockSize; 13 | 14 | while(blkCnt > 0) 15 | { 16 | in = *pSrc++; 17 | sum += ((q15_t) in * in); 18 | blkCnt--; 19 | } 20 | *pResult = sum; 21 | } 22 | 23 | void arm_power_q15( 24 | const q15_t * pSrc, 25 | uint32_t blockSize, 26 | q63_t * pResult) 27 | { 28 | uint32_t blkCnt; 29 | q63_t sum = 0; 30 | q15_t in; 31 | 32 | blkCnt = blockSize; 33 | 34 | while(blkCnt > 0) 35 | { 36 | in = *pSrc++; 37 | sum += ((q31_t) in * in); 38 | blkCnt--; 39 | } 40 | *pResult = sum; 41 | } 42 | 43 | void arm_power_q31( 44 | const q31_t * pSrc, 45 | uint32_t blockSize, 46 | q63_t * pResult) 47 | { 48 | uint32_t blkCnt; 49 | q63_t sum = 0; 50 | q31_t in; 51 | 52 | blkCnt = blockSize; 53 | 54 | while(blkCnt > 0) 55 | { 56 | in = *pSrc++; 57 | sum += ((q63_t) in * in) >> 14U; 58 | blkCnt--; 59 | } 60 | *pResult = sum; 61 | } 62 | 63 | void arm_power_f32( 64 | const float32_t * pSrc, 65 | uint32_t blockSize, 66 | float32_t * pResult) 67 | { 68 | uint32_t blkCnt; 69 | float32_t sum = 0.0f; 70 | float32_t in; 71 | 72 | blkCnt = blockSize; 73 | 74 | while(blkCnt > 0) 75 | { 76 | in = *pSrc++; 77 | sum += in * in; 78 | blkCnt--; 79 | } 80 | *pResult = sum; 81 | } 82 | -------------------------------------------------------------------------------- /1.Software/dsp/source/StatisticsFunctions/src/arm_rms.c: -------------------------------------------------------------------------------- 1 | #include "../inc/statisticsfunctions.h" 2 | 3 | void arm_rms_q15(const q15_t * pSrc, uint32_t blockSize, q15_t * pResult) 4 | { 5 | uint32_t blkCnt; 6 | q63_t sum = 0; 7 | q15_t in; 8 | 9 | blkCnt = blockSize; 10 | 11 | while(blkCnt > 0) 12 | { 13 | in = *pSrc++; 14 | sum += ((q31_t)in * in); 15 | blkCnt--; 16 | } 17 | arm_sqrt_q15(__SSAT((sum / (q63_t)blockSize) >> 15, 16), pResult); 18 | } 19 | 20 | void arm_rms_q31(const q31_t * pSrc, uint32_t blockSize, q31_t * pResult) 21 | { 22 | uint32_t blkCnt; 23 | uint64_t sum = 0; 24 | q31_t in; 25 | 26 | blkCnt = blockSize; 27 | 28 | while(blkCnt > 0) 29 | { 30 | in = *pSrc++; 31 | sum += ((q63_t)in * in); 32 | blkCnt--; 33 | } 34 | arm_sqrt_q31(clip_q63_to_q31((sum / (q63_t)blockSize) >> 31), pResult); 35 | } 36 | 37 | void arm_rms_f32(const float32_t * pSrc, uint32_t blockSize, float32_t * pResult) 38 | { 39 | uint32_t blkCnt; 40 | float32_t sum = 0; 41 | float32_t in; 42 | 43 | blkCnt = blockSize; 44 | 45 | while(blkCnt > 0) 46 | { 47 | in = *pSrc++; 48 | sum += (in * in); 49 | blkCnt--; 50 | } 51 | arm_sqrt_f32(sum / (float32_t)blockSize, pResult); 52 | } 53 | -------------------------------------------------------------------------------- /1.Software/dsp/source/SupportFunctions/inc/arm_copy.h: -------------------------------------------------------------------------------- 1 | #ifndef _ARM_COPY_H 2 | #define _ARM_COPY_H 3 | 4 | #include "arm_math.h" 5 | 6 | void arm_copy_q7(const q7_t * pSrc, q7_t * pDst, uint32_t blockSize); 7 | void arm_copy_q15(const q15_t * pSrc, q15_t * pDst, uint32_t blockSize); 8 | void arm_copy_q31(const q31_t * pSrc, q31_t * pDst, uint32_t blockSize); 9 | void arm_copy_f32(const float32_t * pSrc, float32_t * pDst, uint32_t blockSize); 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /1.Software/dsp/source/SupportFunctions/inc/arm_fill.h: -------------------------------------------------------------------------------- 1 | #ifndef _ARM_FILL_H 2 | #define _ARM_FILL_H 3 | 4 | #include "arm_math.h" 5 | 6 | void arm_fill_q7(q7_t value, q7_t * pDst, uint32_t blockSize); 7 | void arm_fill_q15(q15_t value, q15_t * pDst, uint32_t blockSize); 8 | void arm_fill_q31(q31_t value, q31_t * pDst, uint32_t blockSize); 9 | void arm_fill_f32(float32_t value, float32_t * pDst, uint32_t blockSize); 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /1.Software/dsp/source/SupportFunctions/inc/supportfunctions.h: -------------------------------------------------------------------------------- 1 | #ifndef supportfunctions__H 2 | #define supportfunctions__H 3 | 4 | #include "arm_copy.h" 5 | #include "arm_fill.h" 6 | 7 | #endif 8 | -------------------------------------------------------------------------------- /1.Software/dsp/source/SupportFunctions/src/arm_copy.c: -------------------------------------------------------------------------------- 1 | #include "../inc/supportfunctions.h" 2 | 3 | void arm_copy_q7(const q7_t * pSrc, q7_t * pDst, uint32_t blockSize) 4 | { 5 | uint32_t blkCnt; 6 | blkCnt = blockSize; 7 | 8 | while(blkCnt > 0) 9 | { 10 | *pDst++ = *pSrc++; 11 | blkCnt--; 12 | } 13 | } 14 | 15 | void arm_copy_q15(const q15_t * pSrc, q15_t * pDst, uint32_t blockSize) 16 | { 17 | uint32_t blkCnt; 18 | blkCnt = blockSize; 19 | 20 | while(blkCnt > 0) 21 | { 22 | *pDst++ = *pSrc++; 23 | blkCnt--; 24 | } 25 | } 26 | 27 | void arm_copy_q31(const q31_t * pSrc, q31_t * pDst, uint32_t blockSize) 28 | { 29 | uint32_t blkCnt; 30 | blkCnt = blockSize; 31 | 32 | while(blkCnt > 0) 33 | { 34 | *pDst++ = *pSrc++; 35 | blkCnt--; 36 | } 37 | } 38 | 39 | void arm_copy_f32(const float32_t * pSrc, float32_t * pDst, uint32_t blockSize) 40 | { 41 | uint32_t blkCnt; 42 | blkCnt = blockSize; 43 | 44 | while(blkCnt > 0U) 45 | { 46 | *pDst++ = *pSrc++; 47 | blkCnt--; 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /1.Software/dsp/source/SupportFunctions/src/arm_fill.c: -------------------------------------------------------------------------------- 1 | #include "../inc/supportfunctions.h" 2 | 3 | void arm_fill_q7(q7_t value, q7_t * pDst, uint32_t blockSize) 4 | { 5 | uint32_t blkCnt; 6 | blkCnt = blockSize; 7 | 8 | while(blkCnt > 0U) 9 | { 10 | *pDst++ = value; 11 | blkCnt--; 12 | } 13 | } 14 | 15 | void arm_fill_q15(q15_t value, q15_t * pDst, uint32_t blockSize) 16 | { 17 | uint32_t blkCnt; 18 | blkCnt = blockSize; 19 | 20 | while(blkCnt > 0U) 21 | { 22 | *pDst++ = value; 23 | blkCnt--; 24 | } 25 | } 26 | 27 | void arm_fill_q31(q31_t value, q31_t * pDst, uint32_t blockSize) 28 | { 29 | uint32_t blkCnt; 30 | blkCnt = blockSize; 31 | 32 | while(blkCnt > 0U) 33 | { 34 | *pDst++ = value; 35 | blkCnt--; 36 | } 37 | } 38 | 39 | void arm_fill_f32(float32_t value, float32_t * pDst, uint32_t blockSize) 40 | { 41 | uint32_t blkCnt; 42 | blkCnt = blockSize; 43 | 44 | while(blkCnt > 0U) 45 | { 46 | *pDst++ = value; 47 | blkCnt--; 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /1.Software/dsp/source/TransformFunctions/inc/arm_cfft_radix4.h: -------------------------------------------------------------------------------- 1 | #ifndef _ARM_CFFT_RADIX4_H 2 | #define _ARM_CFFT_RADIX4_H 3 | 4 | #include "arm_math.h" 5 | 6 | void arm_cfft_radix4_q15(const arm_cfft_radix4_instance_q15 * S, q15_t * pSrc); 7 | void arm_cfft_radix4_q31(const arm_cfft_radix4_instance_q31 * S, q31_t * pSrc); 8 | void arm_cfft_radix4_f32(const arm_cfft_radix4_instance_f32 * S, float32_t * pSrc); 9 | 10 | #endif 11 | -------------------------------------------------------------------------------- /1.Software/dsp/source/TransformFunctions/inc/arm_cfft_radix4_init.h: -------------------------------------------------------------------------------- 1 | #ifndef _ARM_CFFT_RADIX4_INIT_H 2 | #define _ARM_CFFT_RADIX4_INIT_H 3 | 4 | #include "arm_math.h" 5 | 6 | arm_status arm_cfft_radix4_init_q15( 7 | arm_cfft_radix4_instance_q15 * S, 8 | uint16_t fftLen, 9 | uint8_t ifftFlag, 10 | uint8_t bitReverseFlag); 11 | arm_status arm_cfft_radix4_init_q31( 12 | arm_cfft_radix4_instance_q31 * S, 13 | uint16_t fftLen, 14 | uint8_t ifftFlag, 15 | uint8_t bitReverseFlag); 16 | arm_status arm_cfft_radix4_init_f32( 17 | arm_cfft_radix4_instance_f32 * S, 18 | uint16_t fftLen, 19 | uint8_t ifftFlag, 20 | uint8_t bitReverseFlag); 21 | 22 | #endif 23 | -------------------------------------------------------------------------------- /1.Software/f1c200s_library.code-workspace: -------------------------------------------------------------------------------- 1 | { 2 | "folders": [ 3 | { 4 | "path": "." 5 | } 6 | ], 7 | "settings": { 8 | "VsCodeTaskButtons.tasks": [ 9 | { 10 | "label": "编译", 11 | "task": "编译", 12 | "tooltip": "编译" 13 | }, 14 | { 15 | "label": "重新编译", 16 | "task": "重新编译", 17 | "tooltip": "重新编译" 18 | }, 19 | { 20 | "label": "清理", 21 | "task": "清理", 22 | "tooltip": "清理" 23 | }, 24 | { 25 | "label": "下载到SPI NOR FLASH", 26 | "task": "下载到SPI NOR FLASH", 27 | "tooltip": "下载到SPI NOR FLASH" 28 | }, 29 | { 30 | "label": "下载到SPI NAND FLASH", 31 | "task": "下载到SPI NAND FLASH", 32 | "tooltip": "下载到SPI NAND FLASH" 33 | }, 34 | ], 35 | "VsCodeTaskButtons.showCounter": false 36 | }, 37 | } -------------------------------------------------------------------------------- /1.Software/f1cx00s_lib/inc/f1cx00s_audio.h: -------------------------------------------------------------------------------- 1 | #ifndef __F1CX00S_AUDIO__H 2 | #define __F1CX00S_AUDIO__H 3 | 4 | #include "f1cx00s.h" 5 | 6 | typedef enum 7 | { 8 | ADC_CHANNEL_FMINL = 0, 9 | ADC_CHANNEL_FMINR, 10 | ADC_CHANNEL_LINL 11 | } ADC_CHANNEL; 12 | 13 | uint32_t AUDIO_READ_ADC(ADC_CHANNEL channel); 14 | void AUDIO_ADC_Init(void); 15 | 16 | #endif 17 | -------------------------------------------------------------------------------- /1.Software/f1cx00s_lib/inc/f1cx00s_conf.h: -------------------------------------------------------------------------------- 1 | #ifndef _F1CX00S__CONF_H_ 2 | #define _F1CX00S__CONF_H_ 3 | 4 | #include "f1cx00s_audio.h" 5 | #include "f1cx00s_ccu.h" 6 | #include "f1cx00s_exti.h" 7 | #include "f1cx00s_gpio.h" 8 | #include "f1cx00s_i2c.h" 9 | #include "f1cx00s_lcd.h" 10 | #include "f1cx00s_pwm.h" 11 | #include "f1cx00s_sdio.h" 12 | #include "f1cx00s_spi.h" 13 | #include "f1cx00s_uart.h" 14 | #include "f1cx00s_wdog.h" 15 | 16 | #endif 17 | -------------------------------------------------------------------------------- /1.Software/f1cx00s_lib/inc/f1cx00s_i2c.h: -------------------------------------------------------------------------------- 1 | #ifndef __F1CX00S_I2C__H 2 | #define __F1CX00S_I2C__H 3 | 4 | #include "f1cx00s.h" 5 | 6 | typedef enum 7 | { 8 | I2C_STAT_BUS_ERROR = 0x00, 9 | I2C_STAT_TX_START = 0x08, 10 | I2C_STAT_TX_RSTART = 0x10, 11 | I2C_STAT_TX_AW_ACK = 0x18, 12 | I2C_STAT_TX_AW_NAK = 0x20, 13 | I2C_STAT_TXD_ACK = 0x28, 14 | I2C_STAT_TXD_NAK = 0x30, 15 | I2C_STAT_LOST_ARB = 0x38, 16 | I2C_STAT_TX_AR_ACK = 0x40, 17 | I2C_STAT_TX_AR_NAK = 0x48, 18 | I2C_STAT_RXD_ACK = 0x50, 19 | I2C_STAT_RXD_NAK = 0x58, 20 | I2C_STAT_IDLE = 0xf8, 21 | } I2C_STAT; 22 | 23 | typedef enum 24 | { 25 | I2C_REG_SIZE_8BIT = 0, 26 | I2C_REG_SIZE_16BIT, 27 | } I2C_REG_SIZE; 28 | 29 | typedef struct 30 | { 31 | uint8_t SlaveAddress; 32 | uint32_t ClockSpeed; 33 | } I2C_InitTypeDef; 34 | 35 | void I2C_DeInit(I2C_TypeDef * I2Cx); 36 | void I2C_Init(I2C_TypeDef * I2Cx, I2C_InitTypeDef * I2C_InitStruct); 37 | void I2C_Cmd(I2C_TypeDef * I2Cx, FunctionalState NewState); 38 | void I2C_SetSlaveAddress(I2C_TypeDef * I2Cx, uint8_t SlaveAddress); 39 | void I2C_Write_Reg(I2C_TypeDef * I2Cx, I2C_REG_SIZE Reg_Size, uint16_t Reg, uint8_t * Data, uint32_t data_len); 40 | void I2C_Read_Reg(I2C_TypeDef * I2Cx, I2C_REG_SIZE Reg_Size, uint16_t Reg, uint8_t * Data, uint32_t data_len); 41 | 42 | #endif 43 | -------------------------------------------------------------------------------- /1.Software/f1cx00s_lib/inc/f1cx00s_lcd.h: -------------------------------------------------------------------------------- 1 | #ifndef __F1CX00S_LCD__H 2 | #define __F1CX00S_LCD__H 3 | 4 | #include "f1cx00s.h" 5 | 6 | typedef enum 7 | { 8 | VRAM_FORMAT_ARGB = 0, 9 | VRAM_FORMAT_RGB565, 10 | VRAM_FORMAT_RGB888, 11 | } VRAM_FORMAT; 12 | 13 | typedef struct 14 | { 15 | uint32_t pixel_clock_hz; 16 | uint32_t width; 17 | uint32_t height; 18 | uint32_t h_front_porch; 19 | uint32_t h_back_porch; 20 | uint32_t h_sync_len; 21 | uint32_t v_front_porch; 22 | uint32_t v_back_porch; 23 | uint32_t v_sync_len; 24 | uint32_t h_sync_active; 25 | uint32_t v_sync_active; 26 | uint32_t den_active; 27 | uint32_t clk_active; 28 | uint32_t line_per_pixel; 29 | uint32_t rstdefe; 30 | uint32_t rstdebe; 31 | uint32_t rsttcon; 32 | uint32_t backcolor; 33 | } LCD_CFG_Struct; 34 | 35 | typedef struct 36 | { 37 | uint8_t Layer_Num; 38 | uint32_t width; 39 | uint32_t height; 40 | uint32_t posx; 41 | uint32_t posy; 42 | uint32_t priority; 43 | uint32_t pipe; 44 | uint32_t alpha_value; 45 | uint32_t alpha_enable; 46 | uint32_t vram_format; 47 | void * vram; 48 | } LCD_Layer_Struct; 49 | 50 | void LCD_DeInit(void); 51 | void LCD_BE_Clk_Divider(uint8_t divider); 52 | void LCD_FE_Clk_Divider(uint8_t divider); 53 | void LCD_TCON_Cmd(FunctionalState NewState); 54 | void LCD_Init(LCD_CFG_Struct * cfg, LCD_Layer_Struct * lcd_layer); 55 | void LCD_Layer_Cmd(LCD_Layer_Struct * lcd_layer, FunctionalState NewState); 56 | void LCD_Swap_RGB(FunctionalState NewState); 57 | 58 | #endif // __F1CX00S_LCD__H 59 | -------------------------------------------------------------------------------- /1.Software/f1cx00s_lib/inc/f1cx00s_pwm.h: -------------------------------------------------------------------------------- 1 | #ifndef __F1CX00S_PWM__H 2 | #define __F1CX00S_PWM__H 3 | 4 | #include "f1cx00s.h" 5 | 6 | #define PWM_CHANNEL_0 0 7 | #define PWM_CHANNEL_1 1 8 | 9 | typedef struct 10 | { 11 | uint8_t channel; 12 | uint8_t duty_cycle; 13 | uint32_t period; 14 | uint8_t polarity; 15 | } PWM_InitTypeDef; 16 | 17 | void PWM_Init(PWM_InitTypeDef * PWM_InitStruct); 18 | void PWM_Cmd(uint8_t channel, FunctionalState NewState); 19 | void PWM_Set_Duty(uint8_t channel, uint8_t duty); 20 | 21 | #endif // !__F1CX00S_PWM__H 22 | -------------------------------------------------------------------------------- /1.Software/f1cx00s_lib/inc/f1cx00s_spi.h: -------------------------------------------------------------------------------- 1 | #ifndef __F1CX00S_SPI__H 2 | #define __F1CX00S_SPI__H 3 | 4 | #include "f1cx00s.h" 5 | 6 | #define SPI_Mode_Slave ((uint32_t)(0 << 1)) 7 | #define SPI_Mode_Master ((uint32_t)(1 << 1)) 8 | 9 | #define SPI_CPOL_Low ((uint32_t)(1 << 1)) 10 | #define SPI_CPOL_High ((uint32_t)(0 << 1)) 11 | 12 | #define SPI_CPHA_1Edge ((uint32_t)(1 << 0)) 13 | #define SPI_CPHA_2Edge ((uint32_t)(0 << 0)) 14 | 15 | #define SPI_NSS_Soft ((uint32_t)(0 << 6)) 16 | #define SPI_NSS_Hard ((uint32_t)(1 << 6)) 17 | 18 | #define SPI_BaudRatePrescaler_2 0 19 | #define SPI_BaudRatePrescaler_4 1 20 | #define SPI_BaudRatePrescaler_8 3 21 | #define SPI_BaudRatePrescaler_16 7 22 | #define SPI_BaudRatePrescaler_32 15 23 | #define SPI_BaudRatePrescaler_64 31 24 | #define SPI_BaudRatePrescaler_128 63 25 | #define SPI_BaudRatePrescaler_256 127 26 | 27 | #define SPI_FirstBit_MSB ((uint32_t)(0 << 12)) 28 | #define SPI_FirstBit_LSB ((uint32_t)(1 << 12)) 29 | 30 | typedef struct 31 | { 32 | uint16_t SPI_Mode; 33 | uint16_t SPI_CPOL; 34 | uint16_t SPI_CPHA; 35 | uint16_t SPI_NSS; 36 | uint16_t SPI_BaudRatePrescaler; 37 | uint16_t SPI_FirstBit; 38 | } SPI_InitTypeDef; 39 | 40 | void SPI_DeInit(SPI_TypeDef * SPIx); 41 | void SPI_Init(SPI_TypeDef * SPIx, SPI_InitTypeDef * SPI_InitStruct); 42 | void SPI_Cmd(SPI_TypeDef * SPIx, FunctionalState NewState); 43 | void SPI_TransmitData8(SPI_TypeDef * SPIx, uint8_t TxData); 44 | uint8_t SPI_ReceiveData8(SPI_TypeDef * SPIx); 45 | 46 | #endif 47 | -------------------------------------------------------------------------------- /1.Software/f1cx00s_lib/inc/f1cx00s_wdog.h: -------------------------------------------------------------------------------- 1 | #ifndef __F1CX00S_WDOG__H 2 | #define __F1CX00S_WDOG__H 3 | 4 | #include "f1cx00s.h" 5 | 6 | #define WDOG_RST_MODE (0x01) 7 | #define WDOG_IRQ_MODE (0x02) 8 | 9 | void WDOG_Set_Mode(uint8_t mode); 10 | void WDOG_Feed(void); 11 | void WDOG_Enable(void); 12 | void WDOG_Set_Value(uint8_t value); 13 | uint8_t WDOG_Get_Value(void); 14 | 15 | #endif 16 | -------------------------------------------------------------------------------- /1.Software/f1cx00s_lib/src/f1cx00s_spi.c: -------------------------------------------------------------------------------- 1 | #include "f1cx00s_spi.h" 2 | 3 | void SPI_DeInit(SPI_TypeDef * SPIx) 4 | { 5 | SPIx->GCR = SPIx->GCR | (1 << 31); 6 | } 7 | 8 | void SPI_Init(SPI_TypeDef * SPIx, SPI_InitTypeDef * SPI_InitStruct) 9 | { 10 | SPIx->CCR = SPIx->CCR & (~0x10FF); 11 | SPIx->CCR = SPIx->CCR | SPI_InitStruct->SPI_BaudRatePrescaler | 0x1000; 12 | 13 | SPIx->GCR = SPIx->GCR & (~(1 << 1)); 14 | SPIx->GCR = SPIx->GCR | SPI_InitStruct->SPI_Mode; 15 | 16 | SPIx->TCR = SPIx->TCR & (~0x1043); 17 | SPIx->TCR = SPIx->TCR | 18 | SPI_InitStruct->SPI_CPOL | 19 | SPI_InitStruct->SPI_CPHA | 20 | SPI_InitStruct->SPI_FirstBit | 21 | SPI_InitStruct->SPI_NSS | (1 << 2); 22 | 23 | SPIx->FCR = SPIx->FCR | (1 << 31) | (1 << 15); 24 | } 25 | 26 | void SPI_Cmd(SPI_TypeDef * SPIx, FunctionalState NewState) 27 | { 28 | SPIx->GCR = SPIx->GCR & (~(1 << 0)); 29 | SPIx->GCR = SPIx->GCR | NewState; 30 | } 31 | 32 | void SPI_TransmitData8(SPI_TypeDef * SPIx, uint8_t TxData) 33 | { 34 | SPIx->MBC = 1; 35 | SPIx->MTC = 1; 36 | SPIx->BCC = 1; 37 | *((volatile uint8_t *)(&SPIx->TXD_DATA)) = TxData; 38 | SPIx->TCR |= 1 << 31; 39 | } 40 | 41 | uint8_t SPI_ReceiveData8(SPI_TypeDef * SPIx) 42 | { 43 | return *((volatile uint8_t *)(&SPIx->RXD_DATA)); 44 | } 45 | -------------------------------------------------------------------------------- /1.Software/f1cx00s_lib/src/f1cx00s_wdog.c: -------------------------------------------------------------------------------- 1 | #include "f1cx00s_wdog.h" 2 | 3 | static const uint8_t timeout_map[] = {0, 1, 2, 3, 4, 5, 6, 8, 10, 12, 14, 16}; 4 | 5 | void WDOG_Set_Mode(uint8_t mode) 6 | { 7 | WDOG->CFG = mode & 0x03; 8 | } 9 | 10 | void WDOG_Feed(void) 11 | { 12 | WDOG->CTRL = ((0x0A57 << 1) | 0x01); 13 | } 14 | 15 | void WDOG_Enable(void) 16 | { 17 | WDOG->MODE |= 0x01; 18 | } 19 | 20 | void WDOG_Set_Value(uint8_t value) 21 | { 22 | uint8_t i = 0, timeout = value; 23 | 24 | if(timeout > 16) 25 | { 26 | timeout = 16; 27 | } 28 | 29 | for(i = timeout / 2; i < 12; i++) 30 | { 31 | if(timeout <= timeout_map[i]) 32 | { 33 | break; 34 | } 35 | } 36 | WDOG->MODE = (i & 0x0f) << 4; 37 | } 38 | 39 | uint8_t WDOG_Get_Value(void) 40 | { 41 | return timeout_map[((WDOG->MODE >> 4) & 0xf)]; 42 | } 43 | -------------------------------------------------------------------------------- /1.Software/hardware/inc/gpio.h: -------------------------------------------------------------------------------- 1 | #ifndef __GPIO_H 2 | #define __GPIO_H 3 | 4 | #include "sys.h" 5 | 6 | #define LED PEout(5) 7 | #define BUZZER PEout(4) 8 | 9 | void LED_Init(void); 10 | void BUZZER_Init(void); 11 | 12 | #endif 13 | -------------------------------------------------------------------------------- /1.Software/hardware/inc/sd3031.h: -------------------------------------------------------------------------------- 1 | #ifndef __SD3031_H__ 2 | #define __SD3031_H__ 3 | #include "sys.h" 4 | #include "delay.h" 5 | 6 | #define SD3031_ADDR 0x32 7 | 8 | #define SD3031_IIC I2C2 9 | 10 | typedef struct 11 | { 12 | uint8_t hour; 13 | uint8_t minute; 14 | uint8_t second; 15 | 16 | uint16_t year; 17 | uint8_t month; 18 | uint8_t day; 19 | uint8_t week; 20 | } RTC_TIME; 21 | 22 | int8_t SD3031_Init(void); 23 | void Get_SD3031_Time(RTC_TIME * calendar); 24 | void Set_SD3031_Time(RTC_TIME * set_calendar); // 设置时间 25 | #endif 26 | -------------------------------------------------------------------------------- /1.Software/hardware/inc/uart.h: -------------------------------------------------------------------------------- 1 | #ifndef _UART_H_ 2 | #define _UART_H_ 3 | 4 | #include "sys.h" 5 | #include "common.h" 6 | 7 | void UART1_Init(void); 8 | void My_Printf(char * format, ...); 9 | 10 | #endif /* _UART_H_ */ 11 | -------------------------------------------------------------------------------- /1.Software/hardware/inc/usbd_msc_config.h: -------------------------------------------------------------------------------- 1 | #ifndef USBD_MSC_CONFIG_H 2 | #define USBD_MSC_CONFIG_H 3 | 4 | #include 5 | #include 6 | #include "interrupt.h" 7 | #include "stdbool.h" 8 | #include "usb_phy.h" 9 | #include "usbd_core.h" 10 | #include "usbd_msc.h" 11 | #include "sdcard.h" 12 | 13 | #define USBD_BASE 0x01c13000 14 | 15 | #define MSC_IN_EP 0x81 16 | #define MSC_OUT_EP 0x02 17 | 18 | #define USBD_VID 0x8136 19 | #define USBD_PID 0xd497 20 | #define USBD_MAX_POWER 100 21 | #define USBD_LANGID_STRING 1033 22 | 23 | #define USB_CONFIG_SIZE (9 + MSC_DESCRIPTOR_LEN) 24 | 25 | #ifdef CONFIG_USB_HS 26 | #define MSC_MAX_MPS 512 27 | #else 28 | #define MSC_MAX_MPS 64 29 | #endif 30 | 31 | extern void usbd_msc_init(void); 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /1.Software/hardware/inc/usbh_msc_config.h: -------------------------------------------------------------------------------- 1 | #ifndef USBH_MSC_CONFIG_H 2 | #define USBH_MSC_CONFIG_H 3 | 4 | #include 5 | #include 6 | #include "interrupt.h" 7 | #include "stdbool.h" 8 | #include "usb_phy.h" 9 | #include "usbh_core.h" 10 | #include "usbh_msc.h" 11 | 12 | #define USBH_BASE 0x01c13000 13 | 14 | extern volatile bool mounted_flag; 15 | 16 | #endif 17 | -------------------------------------------------------------------------------- /1.Software/hardware/inc/w25nxx.h: -------------------------------------------------------------------------------- 1 | #ifndef __W25NXX_H 2 | #define __W25NXX_H 3 | 4 | #include "sys.h" 5 | #include "delay.h" 6 | 7 | #define W25NXX_CS PCout(1) // W25NXX的片选信号 8 | #define W25NXX_SPI SPI0 9 | 10 | 11 | /* 12 | * Default spi nand page size: 2048(11), 4096(12) 13 | */ 14 | // #define W25NXX_PAGE_SIZE 2048 15 | #define W25NXX_PAGE_BITS (11) 16 | #define W25NXX_PAGE_MASK ((1 << W25NXX_PAGE_BITS) - 1) 17 | #define W25NXX_PAGE_SIZE (1 << W25NXX_PAGE_BITS) 18 | 19 | // 指令表 20 | #define W25N_WriteEnable 0x06 21 | #define W25N_WriteDisable 0x04 22 | #define W25N_ReadStatusReg 0x0f 23 | #define W25N_WriteStatusReg 0x1f 24 | #define W25N_ReadPage 0x13 25 | #define W25N_ReadData 0x03 26 | #define W25N_PageProgram_Load 0x02 27 | #define W25N_Program_Execute 0x10 28 | #define W25N_JedecDeviceID 0x9F 29 | #define W25N_BlockErase 0xD8 30 | 31 | void W25NXX_Init(void); 32 | uint16_t W25NXX_ReadID(void); 33 | void W25NXX_Read_Buffer(uint8_t * pBuffer, uint32_t ReadAddr, uint16_t NumByteToRead); 34 | void W25NXX_Write_Buffer(uint8_t * pBuffer, uint32_t WriteAddr, uint16_t NumByteToRead); 35 | void W25NXX_FLASH_BlockErase(uint32_t BlockAddr); 36 | 37 | #endif 38 | -------------------------------------------------------------------------------- /1.Software/hardware/inc/wdog.h: -------------------------------------------------------------------------------- 1 | #ifndef __WOG_H 2 | #define __WOG_H 3 | 4 | #include "sys.h" 5 | 6 | void WDOG_Config(void); 7 | 8 | #endif 9 | -------------------------------------------------------------------------------- /1.Software/hardware/src/gpio.c: -------------------------------------------------------------------------------- 1 | #include "gpio.h" 2 | #include "delay.h" 3 | 4 | void LED_Init(void) 5 | { 6 | GPIO_InitTypeDef GPIO_InitStructure; 7 | 8 | GPIO_InitStructure.GPIO_Pin = GPIO_Pin_5; 9 | GPIO_InitStructure.GPIO_Mode = GPIO_Mode_OUT; 10 | GPIO_InitStructure.GPIO_DriveCurrent = GPIO_DriveCurrent_Level3; 11 | GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_NOPULL; 12 | GPIO_Init(GPIOE, &GPIO_InitStructure); 13 | 14 | LED = 0;// GPIO_ResetBits(GPIOE, GPIO_Pin_5); 15 | } 16 | 17 | void BUZZER_Init(void) 18 | { 19 | GPIO_InitTypeDef GPIO_InitStructure; 20 | 21 | GPIO_InitStructure.GPIO_Pin = GPIO_Pin_4; 22 | GPIO_InitStructure.GPIO_Mode = GPIO_Mode_OUT; 23 | GPIO_InitStructure.GPIO_DriveCurrent = GPIO_DriveCurrent_Level3; 24 | GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_NOPULL; 25 | GPIO_Init(GPIOE, &GPIO_InitStructure); 26 | 27 | BUZZER = 0;// GPIO_ResetBits(GPIOE, GPIO_Pin_4); 28 | } 29 | -------------------------------------------------------------------------------- /1.Software/hardware/src/usbh_msc_config.c: -------------------------------------------------------------------------------- 1 | #include "usbh_msc_config.h" 2 | 3 | volatile bool mounted_flag; 4 | USB_NOCACHE_RAM_SECTION struct usbh_msc * active_msc_class; 5 | 6 | extern void USBH_IRQHandler(uint8_t busid); 7 | 8 | static void My_USBH_IRQHandler(int irqno, void * param) 9 | { 10 | rt_interrupt_enter(); 11 | USBH_IRQHandler(0); 12 | rt_interrupt_leave(); 13 | } 14 | 15 | void usb_hc_low_level_init(struct usbh_bus * bus) 16 | { 17 | usb_phy_open_clock(); 18 | USBC_PhyConfig(); 19 | USBC_ConfigFIFO_Base(); 20 | USBC_EnableDpDmPullUp(); 21 | USBC_EnableIdPullUp(); 22 | USBC_ForceId(USBC_ID_TYPE_HOST); 23 | USBC_ForceVbusValid(USBC_VBUS_TYPE_HIGH); 24 | 25 | rt_hw_interrupt_install(USB_OTG_INTERRUPT, (rt_isr_handler_t)My_USBH_IRQHandler, NULL, "musb_irq"); 26 | rt_hw_interrupt_umask(USB_OTG_INTERRUPT); 27 | } 28 | 29 | void usb_disk_set_active_msc_class(void * ptr) 30 | { 31 | active_msc_class = (struct usbh_msc *)ptr; 32 | } 33 | 34 | void usbh_msc_run(struct usbh_msc * msc_class) 35 | { 36 | if(msc_class != NULL) 37 | { 38 | usb_disk_set_active_msc_class((void *)msc_class); 39 | mounted_flag = true; 40 | } 41 | } 42 | 43 | void usbh_msc_stop(struct usbh_msc * msc_class) 44 | { 45 | mounted_flag = false; 46 | } 47 | -------------------------------------------------------------------------------- /1.Software/hardware/src/wdog.c: -------------------------------------------------------------------------------- 1 | #include "wdog.h" 2 | 3 | void WDOG_Config(void) 4 | { 5 | WDOG_Set_Mode(WDOG_RST_MODE); 6 | WDOG_Set_Value(1);//喂狗周期为1s 7 | WDOG_Enable(); 8 | WDOG_Feed(); 9 | } 10 | -------------------------------------------------------------------------------- /1.Software/myresource/inc/myresource.h: -------------------------------------------------------------------------------- 1 | #ifndef MYRESOURCE_H 2 | #define MYRESOURCE_H 3 | 4 | #include "pagedemoselect.h" 5 | #include "pagegpiotest.h" 6 | #include "pagei2ctest.h" 7 | #include "pagepwmtest.h" 8 | #include "pagesdiotest.h" 9 | #include "pagespitest.h" 10 | #include "pageuarttest.h" 11 | #include "pageusbtest.h" 12 | #include "common.h" 13 | 14 | extern PageDemoSelect pageDemoSelect; 15 | extern Pagegpiotest pagegpiotest; 16 | extern Pagei2ctest pagei2ctest; 17 | extern Pagepwmtest pagepwmtest; 18 | extern Pagesdiotest pagesdiotest; 19 | extern Pagespitest pagespitest; 20 | extern Pageuarttest pageuarttest; 21 | extern Pageusbtest pageusbtest; 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /1.Software/myresource/inc/pagedemoselect.h: -------------------------------------------------------------------------------- 1 | #ifndef PAGEDEMOSELECT_H 2 | #define PAGEDEMOSELECT_H 3 | 4 | #include "lvgl/lvgl.h" 5 | 6 | typedef struct 7 | { 8 | lv_obj_t * view; 9 | 10 | lv_obj_t * lv_demos; 11 | 12 | lv_obj_t * benchmark_btn; 13 | lv_obj_t * benchmark_label; 14 | 15 | lv_obj_t * keypad_encoder_btn; 16 | lv_obj_t * keypad_encoder_label; 17 | 18 | lv_obj_t * music_btn; 19 | lv_obj_t * music_label; 20 | 21 | lv_obj_t * stress_btn; 22 | lv_obj_t * stress_label; 23 | 24 | lv_obj_t * widgets_btn; 25 | lv_obj_t * widgets_label; 26 | 27 | lv_obj_t * library_test; 28 | 29 | lv_obj_t * gpio_test_btn; 30 | lv_obj_t * gpio_test_label; 31 | 32 | lv_obj_t * i2c_test_btn; 33 | lv_obj_t * i2c_test_label; 34 | 35 | lv_obj_t * pwm_test_btn; 36 | lv_obj_t * pwm_test_label; 37 | 38 | lv_obj_t * sdio_test_btn; 39 | lv_obj_t * sdio_test_label; 40 | 41 | lv_obj_t * spi_test_btn; 42 | lv_obj_t * spi_test_label; 43 | 44 | lv_obj_t * uart_test_btn; 45 | lv_obj_t * uart_test_label; 46 | 47 | lv_obj_t * usb_test_btn; 48 | lv_obj_t * usb_test_label; 49 | } PageDemoSelect; 50 | 51 | void PageDemoSelect_Init(void); 52 | 53 | #endif 54 | -------------------------------------------------------------------------------- /1.Software/myresource/inc/pagegpiotest.h: -------------------------------------------------------------------------------- 1 | #ifndef PAGEGPIOTEST_H 2 | #define PAGEGPIOTEST_H 3 | 4 | #include "lvgl/lvgl.h" 5 | 6 | typedef struct 7 | { 8 | lv_obj_t * view; 9 | lv_obj_t * back_btn; 10 | lv_obj_t * back_btn_label; 11 | lv_obj_t * buzzer_label; 12 | lv_obj_t * buzzer_swicth; 13 | } Pagegpiotest; 14 | 15 | void Pagegpiotest_Init(void); 16 | 17 | #endif 18 | -------------------------------------------------------------------------------- /1.Software/myresource/inc/pagei2ctest.h: -------------------------------------------------------------------------------- 1 | #ifndef PAGEI2CTEST_H 2 | #define PAGEI2CTEST_H 3 | 4 | #include "lvgl/lvgl.h" 5 | 6 | typedef struct 7 | { 8 | lv_obj_t * view; 9 | lv_obj_t * back_btn; 10 | lv_obj_t * back_btn_label; 11 | lv_obj_t * real_time; 12 | 13 | lv_obj_t * set_date_btn; 14 | lv_obj_t * set_date_btn_label; 15 | 16 | lv_obj_t * set_time_btn; 17 | lv_obj_t * set_time_btn_label; 18 | 19 | lv_obj_t * date_msgbox; 20 | lv_obj_t * date_msgbox_btn_ok; 21 | lv_obj_t * date_msgbox_btn_ok_text; 22 | lv_obj_t * date_msgbox_btn_no; 23 | lv_obj_t * date_msgbox_btn_no_text; 24 | lv_obj_t * date_year_roller; 25 | lv_obj_t * date_month_roller; 26 | lv_obj_t * date_day_roller; 27 | lv_obj_t * time_msgbox; 28 | lv_obj_t * time_msgbox_btn_ok; 29 | lv_obj_t * time_msgbox_btn_ok_text; 30 | lv_obj_t * time_msgbox_btn_no; 31 | lv_obj_t * time_msgbox_btn_no_text; 32 | lv_obj_t * time_hour_roller; 33 | lv_obj_t * time_minute_roller; 34 | lv_obj_t * time_second_roller; 35 | 36 | lv_timer_t * timer; 37 | } Pagei2ctest; 38 | 39 | void Pagei2ctest_Init(void); 40 | 41 | #endif 42 | -------------------------------------------------------------------------------- /1.Software/myresource/inc/pagepwmtest.h: -------------------------------------------------------------------------------- 1 | #ifndef PAGEPWMTEST_H 2 | #define PAGEPWMTEST_H 3 | 4 | #include "lvgl/lvgl.h" 5 | 6 | typedef struct 7 | { 8 | lv_obj_t * view; 9 | lv_obj_t * back_btn; 10 | lv_obj_t * back_btn_label; 11 | lv_obj_t * brightness_label; 12 | lv_obj_t * brightness_slider; 13 | } Pagepwmtest; 14 | 15 | void Pagepwmtest_Init(void); 16 | 17 | #endif 18 | -------------------------------------------------------------------------------- /1.Software/myresource/inc/pagesdiotest.h: -------------------------------------------------------------------------------- 1 | #ifndef PAGESDIOTEST_H 2 | #define PAGESDIOTEST_H 3 | 4 | #include "lvgl/lvgl.h" 5 | 6 | typedef struct 7 | { 8 | lv_obj_t * view; 9 | lv_obj_t * back_btn; 10 | lv_obj_t * back_btn_label; 11 | 12 | lv_obj_t * sdio_view; 13 | lv_obj_t * sdio_connect_state; 14 | lv_obj_t * sdio_write_file_btn; 15 | lv_obj_t * sdio_write_file_btn_label; 16 | lv_obj_t * sdio_write_file_tips; 17 | 18 | lv_timer_t * timer; 19 | } Pagesdiotest; 20 | 21 | void Pagesdiotest_Init(void); 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /1.Software/myresource/inc/pagespitest.h: -------------------------------------------------------------------------------- 1 | #ifndef PAGESPITEST_H 2 | #define PAGESPITEST_H 3 | 4 | #include "lvgl/lvgl.h" 5 | 6 | typedef struct 7 | { 8 | lv_obj_t * view; 9 | lv_obj_t * back_btn; 10 | lv_obj_t * back_btn_label; 11 | 12 | lv_obj_t * spi_view; 13 | lv_obj_t * write_label; 14 | lv_obj_t * write_btn; 15 | lv_obj_t * write_btn_label; 16 | lv_obj_t * read_label; 17 | lv_obj_t * read_btn; 18 | lv_obj_t * read_btn_label; 19 | 20 | lv_obj_t * keyboard; 21 | } Pagespitest; 22 | 23 | void Pagespitest_Init(void); 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /1.Software/myresource/inc/pageuarttest.h: -------------------------------------------------------------------------------- 1 | #ifndef PAGEUARTTEST_H 2 | #define PAGEUARTTEST_H 3 | 4 | #include "lvgl/lvgl.h" 5 | 6 | typedef struct 7 | { 8 | lv_obj_t * view; 9 | lv_obj_t * back_btn; 10 | lv_obj_t * back_btn_label; 11 | lv_obj_t * clear_btn; 12 | lv_obj_t * clear_btn_label; 13 | lv_obj_t * receive_label; 14 | lv_obj_t * receive_data; 15 | lv_obj_t * send_label; 16 | lv_obj_t * send_data; 17 | 18 | lv_obj_t * keyboard; 19 | 20 | lv_timer_t * timer; 21 | } Pageuarttest; 22 | 23 | void Pageuarttest_Init(void); 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /1.Software/myresource/inc/pageusbtest.h: -------------------------------------------------------------------------------- 1 | #ifndef PAGEUSBTEST_H 2 | #define PAGEUSBTEST_H 3 | 4 | #include "lvgl/lvgl.h" 5 | #include "common.h" 6 | 7 | typedef struct 8 | { 9 | lv_obj_t * view; 10 | lv_obj_t * back_btn; 11 | lv_obj_t * back_btn_label; 12 | 13 | lv_obj_t * usb_mode_tips; 14 | #if TEST_USB_MODE == TEST_USB_MODE_HOST 15 | lv_obj_t * usbh_msc_view; 16 | lv_obj_t * usbh_msc_connect_state; 17 | lv_obj_t * usbh_msc_test_btn; 18 | lv_obj_t * usbh_msc_test_label; 19 | lv_obj_t * usbh_msc_write_file_tips; 20 | lv_timer_t * timer; 21 | #endif 22 | } Pageusbtest; 23 | 24 | void Pageusbtest_Init(void); 25 | 26 | #endif 27 | -------------------------------------------------------------------------------- /1.Software/system/inc/delay.h: -------------------------------------------------------------------------------- 1 | #ifndef SYSTEM_DELAY_H_ 2 | #define SYSTEM_DELAY_H_ 3 | 4 | #include "sys.h" 5 | #include "rtthread.h" 6 | 7 | static inline void delay_unit(int loops) 8 | { 9 | __asm__ __volatile__("1:\n" 10 | "subs %0, %1, #1\n" 11 | "bne 1b" 12 | : "=r"(loops) 13 | : "0"(loops)); 14 | } 15 | 16 | #define delay_us(n) delay_unit(n * 104) 17 | #define delay_ms rt_thread_mdelay 18 | 19 | #endif /* SYSTEM_DELAY_H_ */ 20 | -------------------------------------------------------------------------------- /1.Software/third_party/cherryusb/class/audio/usbd_audio.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2022, sakumisu 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | #ifndef USBD_AUDIO_H 7 | #define USBD_AUDIO_H 8 | 9 | #include "usb_audio.h" 10 | 11 | #ifdef __cplusplus 12 | extern "C" { 13 | #endif 14 | 15 | struct audio_entity_info { 16 | uint8_t bDescriptorSubtype; 17 | uint8_t bEntityId; 18 | uint8_t ep; 19 | }; 20 | 21 | /* Init audio interface driver */ 22 | struct usbd_interface *usbd_audio_init_intf(uint8_t busid, struct usbd_interface *intf, 23 | uint16_t uac_version, 24 | struct audio_entity_info *table, 25 | uint8_t num); 26 | 27 | void usbd_audio_open(uint8_t busid, uint8_t intf); 28 | void usbd_audio_close(uint8_t busid, uint8_t intf); 29 | 30 | void usbd_audio_set_volume(uint8_t busid, uint8_t ep, uint8_t ch, int volume); 31 | int usbd_audio_get_volume(uint8_t busid, uint8_t ep, uint8_t ch); 32 | void usbd_audio_set_mute(uint8_t busid, uint8_t ep, uint8_t ch, bool mute); 33 | bool usbd_audio_get_mute(uint8_t busid, uint8_t ep, uint8_t ch); 34 | void usbd_audio_set_sampling_freq(uint8_t busid, uint8_t ep, uint32_t sampling_freq); 35 | uint32_t usbd_audio_get_sampling_freq(uint8_t busid, uint8_t ep); 36 | 37 | void usbd_audio_get_sampling_freq_table(uint8_t busid, uint8_t ep, uint8_t **sampling_freq_table); 38 | 39 | #ifdef __cplusplus 40 | } 41 | #endif 42 | 43 | #endif /* USBD_AUDIO_H */ 44 | -------------------------------------------------------------------------------- /1.Software/third_party/cherryusb/class/cdc/usbd_cdc.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2022, sakumisu 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | #ifndef USBD_CDC_H 7 | #define USBD_CDC_H 8 | 9 | #include "usb_cdc.h" 10 | 11 | #ifdef __cplusplus 12 | extern "C" { 13 | #endif 14 | 15 | /* Init cdc acm interface driver */ 16 | struct usbd_interface *usbd_cdc_acm_init_intf(uint8_t busid, struct usbd_interface *intf); 17 | 18 | /* Setup request command callback api */ 19 | void usbd_cdc_acm_set_line_coding(uint8_t busid, uint8_t intf, struct cdc_line_coding *line_coding); 20 | void usbd_cdc_acm_get_line_coding(uint8_t busid, uint8_t intf, struct cdc_line_coding *line_coding); 21 | void usbd_cdc_acm_set_dtr(uint8_t busid, uint8_t intf, bool dtr); 22 | void usbd_cdc_acm_set_rts(uint8_t busid, uint8_t intf, bool rts); 23 | void usbd_cdc_acm_send_break(uint8_t busid, uint8_t intf); 24 | 25 | #ifdef __cplusplus 26 | } 27 | #endif 28 | 29 | #endif /* USBD_CDC_H */ 30 | -------------------------------------------------------------------------------- /1.Software/third_party/cherryusb/class/cdc/usbd_cdc_ecm.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2022, sakumisu 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | #ifndef USBD_CDC_ECM_H 7 | #define USBD_CDC_ECM_H 8 | 9 | #include "usb_cdc.h" 10 | 11 | #ifdef __cplusplus 12 | extern "C" { 13 | #endif 14 | 15 | /* Ethernet Maximum Segment size, typically 1514 bytes */ 16 | #define CONFIG_CDC_ECM_ETH_MAX_SEGSZE 1514U 17 | 18 | /* Init cdc ecm interface driver */ 19 | struct usbd_interface *usbd_cdc_ecm_init_intf(struct usbd_interface *intf, const uint8_t int_ep, const uint8_t out_ep, const uint8_t in_ep); 20 | 21 | /* Setup request command callback api */ 22 | void usbd_cdc_ecm_set_connect_speed(uint32_t speed[2]); 23 | 24 | /* Api for eth only without any net stack */ 25 | uint8_t *usbd_cdc_ecm_get_tx_buffer(void); 26 | void usbd_cdc_ecm_send_done(void); 27 | int usbd_cdc_ecm_start_write(uint8_t *buf, uint32_t len); 28 | void usbd_cdc_ecm_data_recv_done(uint8_t *buf, uint32_t len); 29 | void usbd_cdc_ecm_start_read_next(void); 30 | 31 | #ifdef CONFIG_USBDEV_CDC_ECM_USING_LWIP 32 | #include "lwip/netif.h" 33 | #include "lwip/pbuf.h" 34 | struct pbuf *usbd_cdc_ecm_eth_rx(void); 35 | int usbd_cdc_ecm_eth_tx(struct pbuf *p); 36 | #endif 37 | 38 | #ifdef __cplusplus 39 | } 40 | #endif 41 | 42 | #endif /* USBD_CDC_ECM_H */ 43 | -------------------------------------------------------------------------------- /1.Software/third_party/cherryusb/class/cdc/usbh_cdc_ecm.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2024, sakumisu 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | #ifndef USBH_CDC_ECM_H 7 | #define USBH_CDC_ECM_H 8 | 9 | #include "usb_cdc.h" 10 | 11 | #include "lwip/netif.h" 12 | #include "lwip/pbuf.h" 13 | 14 | struct usbh_cdc_ecm { 15 | struct usbh_hubport *hport; 16 | struct usb_endpoint_descriptor *bulkin; /* Bulk IN endpoint */ 17 | struct usb_endpoint_descriptor *bulkout; /* Bulk OUT endpoint */ 18 | struct usb_endpoint_descriptor *intin; /* Interrupt IN endpoint */ 19 | struct usbh_urb bulkout_urb; /* Bulk out endpoint */ 20 | struct usbh_urb bulkin_urb; /* Bulk IN endpoint */ 21 | struct usbh_urb intin_urb; /* Interrupt IN endpoint */ 22 | 23 | uint8_t ctrl_intf; /* Control interface number */ 24 | uint8_t data_intf; /* Data interface number */ 25 | uint8_t minor; 26 | 27 | uint8_t mac[6]; 28 | bool connect_status; 29 | uint16_t max_segment_size; 30 | uint32_t speed[2]; 31 | 32 | ip_addr_t ipaddr; 33 | ip_addr_t netmask; 34 | ip_addr_t gateway; 35 | }; 36 | 37 | #ifdef __cplusplus 38 | extern "C" { 39 | #endif 40 | 41 | int usbh_cdc_ecm_get_connect_status(struct usbh_cdc_ecm *cdc_ecm_class); 42 | 43 | void usbh_cdc_ecm_run(struct usbh_cdc_ecm *cdc_ecm_class); 44 | void usbh_cdc_ecm_stop(struct usbh_cdc_ecm *cdc_ecm_class); 45 | 46 | err_t usbh_cdc_ecm_linkoutput(struct netif *netif, struct pbuf *p); 47 | void usbh_cdc_ecm_rx_thread(void *argument); 48 | 49 | #ifdef __cplusplus 50 | } 51 | #endif 52 | 53 | #endif /* USBH_CDC_ECM_H */ 54 | -------------------------------------------------------------------------------- /1.Software/third_party/cherryusb/class/dfu/usbd_dfu.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2022, sakumisu 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | #ifndef USBD_DFU_H 7 | #define USBD_DFU_H 8 | 9 | #include "usb_dfu.h" 10 | 11 | #ifdef __cplusplus 12 | extern "C" { 13 | #endif 14 | 15 | /* Init dfu interface driver */ 16 | struct usbd_interface *usbd_dfu_init_intf(struct usbd_interface *intf); 17 | 18 | /* Interface functions that need to be implemented by the user */ 19 | uint8_t *dfu_read_flash(uint8_t *src, uint8_t *dest, uint32_t len); 20 | uint16_t dfu_write_flash(uint8_t *src, uint8_t *dest, uint32_t len); 21 | uint16_t dfu_erase_flash(uint32_t add); 22 | void dfu_leave(void); 23 | #ifdef __cplusplus 24 | } 25 | #endif 26 | 27 | #endif /* USBD_DFU_H */ 28 | -------------------------------------------------------------------------------- /1.Software/third_party/cherryusb/class/hid/usbd_hid.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2022, sakumisu 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | #ifndef USBD_HID_H 7 | #define USBD_HID_H 8 | 9 | #include "usb_hid.h" 10 | 11 | #ifdef __cplusplus 12 | extern "C" { 13 | #endif 14 | 15 | /* Init hid interface driver */ 16 | struct usbd_interface *usbd_hid_init_intf(uint8_t busid, struct usbd_interface *intf, const uint8_t *desc, uint32_t desc_len); 17 | 18 | /* Register desc api */ 19 | void usbd_hid_descriptor_register(uint8_t busid, uint8_t intf_num, const uint8_t *desc); 20 | void usbd_hid_report_descriptor_register(uint8_t busid, uint8_t intf_num, const uint8_t *desc, uint32_t desc_len); 21 | 22 | /* Setup request command callback api */ 23 | void usbd_hid_get_report(uint8_t busid, uint8_t intf, uint8_t report_id, uint8_t report_type, uint8_t **data, uint32_t *len); 24 | uint8_t usbd_hid_get_idle(uint8_t busid, uint8_t intf, uint8_t report_id); 25 | uint8_t usbd_hid_get_protocol(uint8_t busid, uint8_t intf); 26 | void usbd_hid_set_report(uint8_t busid, uint8_t intf, uint8_t report_id, uint8_t report_type, uint8_t *report, uint32_t report_len); 27 | void usbd_hid_set_idle(uint8_t busid, uint8_t intf, uint8_t report_id, uint8_t duration); 28 | void usbd_hid_set_protocol(uint8_t busid, uint8_t intf, uint8_t protocol); 29 | 30 | #ifdef __cplusplus 31 | } 32 | #endif 33 | 34 | #endif /* USBD_HID_H */ 35 | -------------------------------------------------------------------------------- /1.Software/third_party/cherryusb/class/hid/usbh_hid.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2022, sakumisu 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | #ifndef USBH_HID_H 7 | #define USBH_HID_H 8 | 9 | #include "usb_hid.h" 10 | 11 | struct usbh_hid { 12 | struct usbh_hubport *hport; 13 | struct usb_endpoint_descriptor *intin; /* INTR IN endpoint */ 14 | struct usb_endpoint_descriptor *intout; /* INTR OUT endpoint */ 15 | struct usbh_urb intin_urb; /* INTR IN urb */ 16 | struct usbh_urb intout_urb; /* INTR OUT urb */ 17 | 18 | uint8_t report_desc[128]; 19 | uint8_t intf; /* interface number */ 20 | uint8_t minor; 21 | }; 22 | 23 | #ifdef __cplusplus 24 | extern "C" { 25 | #endif 26 | 27 | int usbh_hid_set_idle(struct usbh_hid *hid_class, uint8_t report_id, uint8_t duration); 28 | int usbh_hid_get_idle(struct usbh_hid *hid_class, uint8_t *buffer); 29 | 30 | void usbh_hid_run(struct usbh_hid *hid_class); 31 | void usbh_hid_stop(struct usbh_hid *hid_class); 32 | 33 | #ifdef __cplusplus 34 | } 35 | #endif 36 | 37 | #endif /* USBH_HID_H */ 38 | -------------------------------------------------------------------------------- /1.Software/third_party/cherryusb/class/hub/usbh_hub.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2022, sakumisu 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | #ifndef USBH_HUB_H 7 | #define USBH_HUB_H 8 | 9 | #include "usb_hub.h" 10 | 11 | struct usbh_hub; 12 | 13 | #define USBH_HUB_MAX_PORTS 4 14 | /* Maximum size of an interrupt IN transfer */ 15 | #define USBH_HUB_INTIN_BUFSIZE ((USBH_HUB_MAX_PORTS + 8) >> 3) 16 | 17 | #ifdef __cplusplus 18 | extern "C" { 19 | #endif 20 | 21 | int usbh_hub_set_feature(struct usbh_hub *hub, uint8_t port, uint8_t feature); 22 | int usbh_hub_clear_feature(struct usbh_hub *hub, uint8_t port, uint8_t feature); 23 | 24 | void usbh_hub_thread_wakeup(struct usbh_hub *hub); 25 | 26 | int usbh_hub_initialize(struct usbh_bus *bus); 27 | int usbh_hub_deinitialize(struct usbh_bus *bus); 28 | 29 | #ifdef __cplusplus 30 | } 31 | #endif 32 | 33 | #endif /* USBH_HUB_H */ 34 | -------------------------------------------------------------------------------- /1.Software/third_party/cherryusb/class/msc/usbd_msc.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2022, sakumisu 3 | * Copyright (c) 2024, zhihong chen 4 | * 5 | * SPDX-License-Identifier: Apache-2.0 6 | */ 7 | #ifndef USBD_MSC_H 8 | #define USBD_MSC_H 9 | 10 | #include "usb_msc.h" 11 | 12 | #ifdef __cplusplus 13 | extern "C" { 14 | #endif 15 | 16 | /* Init msc interface driver */ 17 | struct usbd_interface *usbd_msc_init_intf(uint8_t busid, struct usbd_interface *intf, 18 | const uint8_t out_ep, 19 | const uint8_t in_ep); 20 | 21 | void usbd_msc_get_cap(uint8_t busid, uint8_t lun, uint32_t *block_num, uint32_t *block_size); 22 | int usbd_msc_sector_read(uint8_t busid, uint8_t lun, uint32_t sector, uint8_t *buffer, uint32_t length); 23 | int usbd_msc_sector_write(uint8_t busid, uint8_t lun, uint32_t sector, uint8_t *buffer, uint32_t length); 24 | 25 | void usbd_msc_set_readonly(uint8_t busid, bool readonly); 26 | bool usbd_msc_set_popup(uint8_t busid); 27 | 28 | #ifdef __cplusplus 29 | } 30 | #endif 31 | 32 | #endif /* USBD_MSC_H */ 33 | -------------------------------------------------------------------------------- /1.Software/third_party/cherryusb/class/msc/usbh_msc.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2022, sakumisu 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | #ifndef USBH_MSC_H 7 | #define USBH_MSC_H 8 | 9 | #include "usb_msc.h" 10 | #include "usb_scsi.h" 11 | 12 | struct usbh_msc { 13 | struct usbh_hubport *hport; 14 | struct usb_endpoint_descriptor *bulkin; /* Bulk IN endpoint */ 15 | struct usb_endpoint_descriptor *bulkout; /* Bulk OUT endpoint */ 16 | struct usbh_urb bulkin_urb; /* Bulk IN urb */ 17 | struct usbh_urb bulkout_urb; /* Bulk OUT urb */ 18 | 19 | uint8_t intf; /* Data interface number */ 20 | uint8_t sdchar; 21 | uint32_t blocknum; /* Number of blocks on the USB mass storage device */ 22 | uint16_t blocksize; /* Block size of USB mass storage device */ 23 | }; 24 | 25 | struct usbh_msc_modeswitch_config { 26 | const char *name; 27 | uint16_t vid; /* Vendor ID (for vendor/product specific devices) */ 28 | uint16_t pid; /* Product ID (for vendor/product specific devices) */ 29 | const uint8_t *message_content; 30 | }; 31 | 32 | void usbh_msc_modeswitch_enable(struct usbh_msc_modeswitch_config *config); 33 | int usbh_msc_scsi_write10(struct usbh_msc *msc_class, uint32_t start_sector, const uint8_t *buffer, uint32_t nsectors); 34 | int usbh_msc_scsi_read10(struct usbh_msc *msc_class, uint32_t start_sector, const uint8_t *buffer, uint32_t nsectors); 35 | 36 | void usbh_msc_run(struct usbh_msc *msc_class); 37 | void usbh_msc_stop(struct usbh_msc *msc_class); 38 | 39 | #ifdef __cplusplus 40 | extern "C" { 41 | #endif 42 | 43 | #ifdef __cplusplus 44 | } 45 | #endif 46 | 47 | #endif /* USBH_MSC_H */ 48 | -------------------------------------------------------------------------------- /1.Software/third_party/cherryusb/class/template/usb_xxx.h: -------------------------------------------------------------------------------- 1 | #ifndef _USB_XXX_H 2 | #define _USB_XXX_H 3 | 4 | #endif -------------------------------------------------------------------------------- /1.Software/third_party/cherryusb/class/template/usbd_xxx.c: -------------------------------------------------------------------------------- 1 | #include "usbd_core.h" 2 | #include "usbd_xxx.h" 3 | 4 | static int xxx_class_interface_request_handler(uint8_t busid, struct usb_setup_packet *setup, uint8_t **data, uint32_t *len) 5 | { 6 | USB_LOG_WRN("XXX Class request: " 7 | "bRequest 0x%02x\r\n", 8 | setup->bRequest); 9 | 10 | switch (setup->bRequest) { 11 | default: 12 | USB_LOG_WRN("Unhandled XXX Class bRequest 0x%02x\r\n", setup->bRequest); 13 | return -1; 14 | } 15 | 16 | return 0; 17 | } 18 | 19 | static void xxx_notify_handler(uint8_t busid, uint8_t event, void *arg) 20 | { 21 | switch (event) { 22 | case USBD_EVENT_RESET: 23 | 24 | break; 25 | 26 | default: 27 | break; 28 | } 29 | } 30 | 31 | struct usbd_interface *usbd_xxx_init_intf(uint8_t busid, struct usbd_interface *intf) 32 | { 33 | intf->class_interface_handler = xxx_class_interface_request_handler; 34 | intf->class_endpoint_handler = NULL; 35 | intf->vendor_handler = NULL; 36 | intf->notify_handler = xxx_notify_handler; 37 | 38 | return intf; 39 | } 40 | -------------------------------------------------------------------------------- /1.Software/third_party/cherryusb/class/template/usbd_xxx.h: -------------------------------------------------------------------------------- 1 | #ifndef _USBD_XXX_H_ 2 | #define _USBD_XXX_H_ 3 | 4 | #include "usb_xxx.h" 5 | 6 | #ifdef __cplusplus 7 | extern "C" { 8 | #endif 9 | 10 | struct usbd_interface *usbd_xxx_init_intf(uint8_t busid, struct usbd_interface *intf); 11 | 12 | #ifdef __cplusplus 13 | } 14 | #endif 15 | 16 | #endif /* _USBD_XXX_H_ */ 17 | -------------------------------------------------------------------------------- /1.Software/third_party/cherryusb/class/template/usbh_xxx.h: -------------------------------------------------------------------------------- 1 | #ifndef _USBH_XXX_H 2 | #define _USBH_XXX_H 3 | 4 | #include "usb_xxx.h" 5 | 6 | struct usbh_xxx { 7 | struct usbh_hubport *hport; 8 | struct usb_endpoint_descriptor *xxxin; 9 | struct usb_endpoint_descriptor *xxxout; 10 | struct usbh_urb xxxin_urb; 11 | struct usbh_urb xxxout_urb; 12 | 13 | uint8_t intf; /* interface number */ 14 | uint8_t minor; 15 | }; 16 | 17 | void usbh_xxx_run(struct usbh_xxx *xxx_class); 18 | void usbh_xxx_stop(struct usbh_xxx *xxx_class); 19 | 20 | #endif -------------------------------------------------------------------------------- /1.Software/third_party/cherryusb/class/video/usbd_video.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2022, sakumisu 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | #ifndef USBD_VIDEO_H 7 | #define USBD_VIDEO_H 8 | 9 | #include "usb_video.h" 10 | 11 | #ifdef __cplusplus 12 | extern "C" { 13 | #endif 14 | 15 | /* Init video interface driver */ 16 | struct usbd_interface *usbd_video_init_intf(uint8_t busid, struct usbd_interface *intf, 17 | uint32_t dwFrameInterval, 18 | uint32_t dwMaxVideoFrameSize, 19 | uint32_t dwMaxPayloadTransferSize); 20 | 21 | void usbd_video_open(uint8_t busid, uint8_t intf); 22 | void usbd_video_close(uint8_t busid, uint8_t intf); 23 | uint32_t usbd_video_mjpeg_payload_fill(uint8_t busid, uint8_t *input, uint32_t input_len, uint8_t *output, uint32_t *out_len); 24 | 25 | #ifdef __cplusplus 26 | } 27 | #endif 28 | 29 | #endif /* USBD_VIDEO_H */ 30 | -------------------------------------------------------------------------------- /1.Software/third_party/cherryusb/class/wireless/usbd_rndis.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2022, sakumisu 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | #ifndef USBD_RNDIS_H 7 | #define USBD_RNDIS_H 8 | 9 | #include "usb_cdc.h" 10 | 11 | #ifdef __cplusplus 12 | extern "C" { 13 | #endif 14 | 15 | /* Init rndis interface driver */ 16 | struct usbd_interface *usbd_rndis_init_intf(struct usbd_interface *intf, 17 | const uint8_t out_ep, 18 | const uint8_t in_ep, 19 | const uint8_t int_ep, uint8_t mac[6]); 20 | 21 | void usbd_rndis_data_recv_done(void); 22 | 23 | #ifdef CONFIG_USBDEV_RNDIS_USING_LWIP 24 | struct pbuf *usbd_rndis_eth_rx(void); 25 | int usbd_rndis_eth_tx(struct pbuf *p); 26 | #endif 27 | 28 | #ifdef __cplusplus 29 | } 30 | #endif 31 | 32 | #endif /* USBD_RNDIS_H */ 33 | -------------------------------------------------------------------------------- /1.Software/third_party/cherryusb/class/wireless/usbh_rndis.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2022, sakumisu 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | #ifndef USBH_RNDIS_H 7 | #define USBH_RNDIS_H 8 | 9 | #include "usb_cdc.h" 10 | 11 | #include "lwip/netif.h" 12 | #include "lwip/pbuf.h" 13 | 14 | struct usbh_rndis { 15 | struct usbh_hubport *hport; 16 | struct usb_endpoint_descriptor *bulkin; /* Bulk IN endpoint */ 17 | struct usb_endpoint_descriptor *bulkout; /* Bulk OUT endpoint */ 18 | struct usb_endpoint_descriptor *intin; /* INTR endpoint */ 19 | struct usbh_urb bulkin_urb; /* Bulk IN urb */ 20 | struct usbh_urb bulkout_urb; /* Bulk OUT urb */ 21 | struct usbh_urb intin_urb; /* INTR IN urb */ 22 | 23 | uint8_t ctrl_intf; /* Control interface number */ 24 | uint8_t data_intf; /* Data interface number */ 25 | uint8_t minor; 26 | 27 | uint32_t request_id; 28 | 29 | uint32_t link_speed; 30 | bool connect_status; 31 | uint8_t mac[6]; 32 | 33 | ip_addr_t ipaddr; 34 | ip_addr_t netmask; 35 | ip_addr_t gateway; 36 | }; 37 | 38 | #ifdef __cplusplus 39 | extern "C" { 40 | #endif 41 | 42 | int usbh_rndis_get_connect_status(struct usbh_rndis *rndis_class); 43 | int usbh_rndis_keepalive(struct usbh_rndis *rndis_class); 44 | 45 | void usbh_rndis_run(struct usbh_rndis *rndis_class); 46 | void usbh_rndis_stop(struct usbh_rndis *rndis_class); 47 | 48 | err_t usbh_rndis_linkoutput(struct netif *netif, struct pbuf *p); 49 | void usbh_rndis_rx_thread(void *argument); 50 | 51 | #ifdef __cplusplus 52 | } 53 | #endif 54 | 55 | #endif /* USBH_RNDIS_H */ 56 | -------------------------------------------------------------------------------- /1.Software/third_party/cherryusb/common/usb_errno.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, sakumisu 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | #ifndef USB_ERRNO_H 7 | #define USB_ERRNO_H 8 | 9 | #define USB_ERR_NOMEM 1 10 | #define USB_ERR_INVAL 2 11 | #define USB_ERR_NODEV 3 12 | #define USB_ERR_NOTCONN 4 13 | #define USB_ERR_NOTSUPP 5 14 | #define USB_ERR_BUSY 6 15 | #define USB_ERR_RANGE 7 16 | #define USB_ERR_STALL 8 17 | #define USB_ERR_BABBLE 9 18 | #define USB_ERR_NAK 10 19 | #define USB_ERR_DT 11 20 | #define USB_ERR_IO 12 21 | #define USB_ERR_SHUTDOWN 13 22 | #define USB_ERR_TIMEOUT 14 23 | 24 | #endif /* USB_ERRNO_H */ 25 | -------------------------------------------------------------------------------- /1.Software/third_party/lvgl/lvgl/demos/keypad_encoder/lv_demo_keypad_encoder.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_demo_keypad_encoder.h 3 | * 4 | */ 5 | 6 | #ifndef LV_DEMO_KEYPAD_ENCODER_H 7 | #define LV_DEMO_KEYPAD_ENCODER_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #include "../lv_demos.h" 17 | 18 | /********************* 19 | * DEFINES 20 | *********************/ 21 | 22 | /********************** 23 | * TYPEDEFS 24 | **********************/ 25 | 26 | /********************** 27 | * GLOBAL PROTOTYPES 28 | **********************/ 29 | void lv_demo_keypad_encoder(void); 30 | 31 | /********************** 32 | * MACROS 33 | **********************/ 34 | 35 | #ifdef __cplusplus 36 | } /* extern "C" */ 37 | #endif 38 | 39 | #endif /*LV_DEMO_KEYPAD_ENCODER_H*/ 40 | -------------------------------------------------------------------------------- /1.Software/third_party/lvgl/lvgl/demos/music/lv_demo_music.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_demo_music.h 3 | * 4 | */ 5 | 6 | #ifndef LV_DEMO_MUSIC_H 7 | #define LV_DEMO_MUSIC_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #include "../lv_demos.h" 17 | 18 | #if LV_USE_DEMO_MUSIC 19 | 20 | /********************* 21 | * DEFINES 22 | *********************/ 23 | 24 | #if LV_DEMO_MUSIC_LARGE 25 | # define LV_DEMO_MUSIC_HANDLE_SIZE 40 26 | #else 27 | # define LV_DEMO_MUSIC_HANDLE_SIZE 20 28 | #endif 29 | 30 | /********************** 31 | * TYPEDEFS 32 | **********************/ 33 | 34 | /********************** 35 | * GLOBAL PROTOTYPES 36 | **********************/ 37 | 38 | void lv_demo_music(void); 39 | const char * _lv_demo_music_get_title(uint32_t track_id); 40 | const char * _lv_demo_music_get_artist(uint32_t track_id); 41 | const char * _lv_demo_music_get_genre(uint32_t track_id); 42 | uint32_t _lv_demo_music_get_track_length(uint32_t track_id); 43 | 44 | /********************** 45 | * MACROS 46 | **********************/ 47 | 48 | #endif /*LV_USE_DEMO_MUSIC*/ 49 | 50 | #ifdef __cplusplus 51 | } /* extern "C" */ 52 | #endif 53 | 54 | #endif /*LV_DEMO_MUSIC_H*/ 55 | -------------------------------------------------------------------------------- /1.Software/third_party/lvgl/lvgl/demos/music/lv_demo_music_list.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_demo_music_list.h 3 | * 4 | */ 5 | 6 | #ifndef LV_DEMO_MUSIC_LIST_H 7 | #define LV_DEMO_MUSIC_LIST_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #include "lv_demo_music.h" 17 | #if LV_USE_DEMO_MUSIC 18 | 19 | /********************* 20 | * DEFINES 21 | *********************/ 22 | 23 | /********************** 24 | * TYPEDEFS 25 | **********************/ 26 | 27 | /********************** 28 | * GLOBAL PROTOTYPES 29 | **********************/ 30 | lv_obj_t * _lv_demo_music_list_create(lv_obj_t * parent); 31 | void _lv_demo_music_list_button_check(uint32_t track_id, bool state); 32 | 33 | /********************** 34 | * MACROS 35 | **********************/ 36 | 37 | #endif /*LV_USE_DEMO_MUSIC*/ 38 | 39 | #ifdef __cplusplus 40 | } /* extern "C" */ 41 | #endif 42 | 43 | #endif /*LV_DEMO_MUSIC_LIST_H*/ 44 | -------------------------------------------------------------------------------- /1.Software/third_party/lvgl/lvgl/demos/music/lv_demo_music_main.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_demo_music_main.h 3 | * 4 | */ 5 | 6 | #ifndef LV_DEMO_MUSIC_MAIN_H 7 | #define LV_DEMO_MUSIC_MAIN_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #include "lv_demo_music.h" 17 | 18 | #if LV_USE_DEMO_MUSIC 19 | 20 | #if LV_USE_GRID == 0 21 | #error "LV_USE_GRID needs to be enabled" 22 | #endif 23 | 24 | /********************* 25 | * DEFINES 26 | *********************/ 27 | 28 | /********************** 29 | * TYPEDEFS 30 | **********************/ 31 | 32 | /********************** 33 | * GLOBAL PROTOTYPES 34 | **********************/ 35 | lv_obj_t * _lv_demo_music_main_create(lv_obj_t * parent); 36 | void _lv_demo_music_play(uint32_t id); 37 | void _lv_demo_music_resume(void); 38 | void _lv_demo_music_pause(void); 39 | void _lv_demo_music_album_next(bool next); 40 | 41 | /********************** 42 | * MACROS 43 | **********************/ 44 | #endif /*LV_USE_DEMO_MUSIC*/ 45 | 46 | #ifdef __cplusplus 47 | } /* extern "C" */ 48 | #endif 49 | 50 | #endif /*LV_DEMO_MUSIC_MAIN_H*/ 51 | -------------------------------------------------------------------------------- /1.Software/third_party/lvgl/lvgl/demos/stress/lv_demo_stress.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_demo_stress.h 3 | * 4 | */ 5 | 6 | #ifndef LV_DEMO_STRESS_H 7 | #define LV_DEMO_STRESS_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #include "../lv_demos.h" 17 | 18 | /********************* 19 | * DEFINES 20 | *********************/ 21 | 22 | #define LV_DEMO_STRESS_TIME_STEP 50 23 | 24 | /********************** 25 | * TYPEDEFS 26 | **********************/ 27 | 28 | /********************** 29 | * GLOBAL PROTOTYPES 30 | **********************/ 31 | void lv_demo_stress(void); 32 | 33 | /** 34 | * Check if stress demo has finished one round. 35 | */ 36 | bool lv_demo_stress_finished(void); 37 | 38 | /********************** 39 | * MACROS 40 | **********************/ 41 | 42 | #ifdef __cplusplus 43 | } /* extern "C" */ 44 | #endif 45 | 46 | #endif /*LV_DEMO_STRESS_H*/ 47 | -------------------------------------------------------------------------------- /1.Software/third_party/lvgl/lvgl/demos/transform/lv_demo_transform.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_demo_transform.h 3 | * 4 | */ 5 | 6 | #ifndef LV_DEMO_TRANSFORM_H 7 | #define LV_DEMO_TRANSFORM_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #include "../lv_demos.h" 17 | 18 | #if LV_USE_DEMO_TRANSFORM 19 | 20 | #if LV_FONT_MONTSERRAT_18 == 0 21 | #error "LV_FONT_MONTSERRAT_18 is required for lv_demo_transform. Enable it in lv_conf.h." 22 | #endif 23 | 24 | #if LV_USE_GRID == 0 25 | #error "LV_USE_GRID needs to be enabled" 26 | #endif 27 | 28 | /********************* 29 | * DEFINES 30 | *********************/ 31 | 32 | /********************** 33 | * TYPEDEFS 34 | **********************/ 35 | 36 | /********************** 37 | * GLOBAL PROTOTYPES 38 | **********************/ 39 | void lv_demo_transform(void); 40 | 41 | /********************** 42 | * MACROS 43 | **********************/ 44 | 45 | #endif /*LV_USE_DEMO_TRANSFORM*/ 46 | 47 | #ifdef __cplusplus 48 | } /* extern "C" */ 49 | #endif 50 | 51 | #endif /*LV_DEMO_TRANSFORM_H*/ 52 | -------------------------------------------------------------------------------- /1.Software/third_party/lvgl/lvgl/demos/widgets/lv_demo_widgets.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_demo_widgets.h 3 | * 4 | */ 5 | 6 | #ifndef LV_DEMO_WIDGETS_H 7 | #define LV_DEMO_WIDGETS_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #include "../lv_demos.h" 17 | 18 | #if LV_USE_DEMO_WIDGETS 19 | 20 | #if LV_USE_GRID == 0 21 | #error "LV_USE_GRID needs to be enabled" 22 | #endif 23 | 24 | #if LV_USE_FLEX == 0 25 | #error "LV_USE_FLEX needs to be enabled" 26 | #endif 27 | 28 | /********************* 29 | * DEFINES 30 | *********************/ 31 | 32 | /********************** 33 | * TYPEDEFS 34 | **********************/ 35 | 36 | /********************** 37 | * GLOBAL PROTOTYPES 38 | **********************/ 39 | void lv_demo_widgets(void); 40 | void lv_demo_widgets_start_slideshow(void); 41 | 42 | /********************** 43 | * MACROS 44 | **********************/ 45 | 46 | #endif /*LV_USE_DEMO_WIDGETS*/ 47 | 48 | #ifdef __cplusplus 49 | } /* extern "C" */ 50 | #endif 51 | 52 | #endif /*LV_DEMO_WIDGETS_H*/ 53 | -------------------------------------------------------------------------------- /1.Software/third_party/lvgl/lvgl/porting/lv_port_disp.c: -------------------------------------------------------------------------------- 1 | #include "lv_port_disp.h" 2 | #include "common.h" 3 | 4 | static void disp_init(void); 5 | static void disp_flush(lv_display_t * disp, const lv_area_t * area, uint8_t * px_map); 6 | 7 | void lv_port_disp_init(void) 8 | { 9 | uint32_t color_size; 10 | static uint8_t *buf_1_1, *buf_1_2; 11 | disp_init(); 12 | 13 | lv_display_t *disp = lv_display_create(MY_DISP_HOR_RES, MY_DISP_VER_RES); 14 | lv_display_set_flush_cb(disp, disp_flush); 15 | 16 | color_size = MY_DISP_HOR_RES * 17 | MY_DISP_VER_RES * 18 | lv_color_format_get_size(LV_COLOR_FORMAT_NATIVE); 19 | buf_1_1 = (uint8_t *)rt_malloc(color_size); 20 | buf_1_2 = (uint8_t *)rt_malloc(color_size); 21 | lv_display_set_buffers(disp, 22 | buf_1_1, 23 | buf_1_2, 24 | color_size, 25 | LV_DISPLAY_RENDER_MODE_PARTIAL); 26 | } 27 | 28 | static void disp_init(void) 29 | { 30 | LCD_Config(); 31 | LCD_SetBrightness(0); 32 | } 33 | 34 | static void disp_flush(lv_display_t * disp_drv, const lv_area_t * area, uint8_t * px_map) 35 | { 36 | LCD_Color_Fill(area->x1, area->y1, area->x2, area->y2, px_map); 37 | lv_display_flush_ready(disp_drv); 38 | } 39 | -------------------------------------------------------------------------------- /1.Software/third_party/lvgl/lvgl/porting/lv_port_disp.h: -------------------------------------------------------------------------------- 1 | #ifndef LV_PORT_DISP_H 2 | #define LV_PORT_DISP_H 3 | 4 | #include "lvgl/lvgl.h" 5 | #include "lcd.h" 6 | 7 | void lv_port_disp_init(void); 8 | 9 | #endif /*LV_PORT_DISP_H*/ 10 | -------------------------------------------------------------------------------- /1.Software/third_party/lvgl/lvgl/porting/lv_port_fs.h: -------------------------------------------------------------------------------- 1 | #ifndef LV_PORT_FS_H 2 | #define LV_PORT_FS_H 3 | 4 | #include "lvgl/lvgl.h" 5 | 6 | void lv_port_fs_init(void); 7 | 8 | #endif /*LV_PORT_FS_H*/ 9 | -------------------------------------------------------------------------------- /1.Software/third_party/lvgl/lvgl/porting/lv_port_indev.h: -------------------------------------------------------------------------------- 1 | #ifndef LV_PORT_INDEV_H 2 | #define LV_PORT_INDEV_H 3 | 4 | #include "lvgl/lvgl.h" 5 | 6 | void lv_port_indev_init(void); 7 | 8 | #endif /*LV_PORT_INDEV_TEMPL_H*/ 9 | -------------------------------------------------------------------------------- /1.Software/third_party/lvgl/lvgl/src/draw/nxp/pxp/lv_pxp_osa.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_pxp_osa.h 3 | * 4 | */ 5 | 6 | /** 7 | * Copyright 2020, 2022-2023 NXP 8 | * 9 | * SPDX-License-Identifier: MIT 10 | */ 11 | 12 | #ifndef LV_PXP_OSA_H 13 | #define LV_PXP_OSA_H 14 | 15 | #ifdef __cplusplus 16 | extern "C" { 17 | #endif 18 | 19 | /********************* 20 | * INCLUDES 21 | *********************/ 22 | 23 | #include "../../../lv_conf_internal.h" 24 | 25 | #if LV_USE_DRAW_PXP 26 | #include "lv_pxp_cfg.h" 27 | 28 | /********************* 29 | * DEFINES 30 | *********************/ 31 | 32 | /********************** 33 | * TYPEDEFS 34 | **********************/ 35 | 36 | /********************** 37 | * GLOBAL PROTOTYPES 38 | **********************/ 39 | 40 | /** 41 | * PXP device interrupt handler. Used to check PXP task completion status. 42 | */ 43 | void PXP_IRQHandler(void); 44 | 45 | /** 46 | * Get the PXP default configuration. 47 | */ 48 | pxp_cfg_t * pxp_get_default_cfg(void); 49 | 50 | /********************** 51 | * MACROS 52 | **********************/ 53 | 54 | #endif /*LV_USE_DRAW_PXP*/ 55 | 56 | #ifdef __cplusplus 57 | } /*extern "C"*/ 58 | #endif 59 | 60 | #endif /*LV_PXP_OSA_H*/ 61 | -------------------------------------------------------------------------------- /1.Software/third_party/lvgl/lvgl/src/draw/renesas/dave2d/lv_draw_dave2d_utils.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_draw_dave2d_utils.h 3 | * 4 | */ 5 | 6 | #ifndef LV_DRAW_DAVE2D_UTILS_H 7 | #define LV_DRAW_DAVE2D_UTILS_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 | d2_color lv_draw_dave2d_lv_colour_to_d2_colour(lv_color_t color); 30 | 31 | d2_s32 lv_draw_dave2d_cf_fb_get(void); 32 | 33 | d2_u32 lv_draw_dave2d_lv_colour_fmt_to_d2_fmt(lv_color_format_t colour_format); 34 | 35 | void d2_framebuffer_from_layer(d2_device * handle, lv_layer_t * layer); 36 | 37 | /********************** 38 | * MACROS 39 | **********************/ 40 | 41 | #ifdef __cplusplus 42 | } /*extern "C"*/ 43 | #endif 44 | 45 | #endif /*LV_DRAW_DAVE2D_UTILS_H*/ 46 | -------------------------------------------------------------------------------- /1.Software/third_party/lvgl/lvgl/src/draw/sw/arm2d/lv_draw_sw_helium.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_draw_sw_helium.h 3 | * 4 | */ 5 | 6 | #ifndef LV_DRAW_SW_HELIUM_H 7 | #define LV_DRAW_SW_HELIUM_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /* *INDENT-OFF* */ 14 | 15 | /********************* 16 | * INCLUDES 17 | *********************/ 18 | 19 | #include "../../../lv_conf_internal.h" 20 | 21 | /* detect whether helium is available based on arm compilers' standard */ 22 | #if defined(__ARM_FEATURE_MVE) && __ARM_FEATURE_MVE 23 | 24 | #ifdef LV_DRAW_SW_HELIUM_CUSTOM_INCLUDE 25 | #include LV_DRAW_SW_HELIUM_CUSTOM_INCLUDE 26 | #endif 27 | 28 | /********************* 29 | * DEFINES 30 | *********************/ 31 | 32 | /********************** 33 | * TYPEDEFS 34 | **********************/ 35 | 36 | /********************** 37 | * GLOBAL PROTOTYPES 38 | **********************/ 39 | 40 | /********************** 41 | * TYPEDEFS 42 | **********************/ 43 | 44 | /********************** 45 | * GLOBAL PROTOTYPES 46 | **********************/ 47 | 48 | /********************* 49 | * POST INCLUDES 50 | *********************/ 51 | /* use arm-2d as the default helium acceleration */ 52 | #include "lv_draw_sw_arm2d.h" 53 | 54 | #endif /* defined(__ARM_FEATURE_MVE) && __ARM_FEATURE_MVE */ 55 | 56 | #ifdef __cplusplus 57 | } /*extern "C"*/ 58 | #endif 59 | 60 | #endif /*LV_DRAW_SW_HELIUM_H*/ 61 | -------------------------------------------------------------------------------- /1.Software/third_party/lvgl/lvgl/src/draw/sw/blend/lv_draw_sw_blend_to_argb8888.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_draw_sw_blend_argb8888.h 3 | * 4 | */ 5 | 6 | #ifndef LV_DRAW_SW_BLEND_ARGB8888_H 7 | #define LV_DRAW_SW_BLEND_ARGB8888_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #include "../lv_draw_sw.h" 17 | #if LV_USE_DRAW_SW 18 | 19 | /********************* 20 | * DEFINES 21 | *********************/ 22 | 23 | /********************** 24 | * TYPEDEFS 25 | **********************/ 26 | 27 | /********************** 28 | * GLOBAL PROTOTYPES 29 | **********************/ 30 | 31 | void /* LV_ATTRIBUTE_FAST_MEM */ lv_draw_sw_blend_color_to_argb8888(_lv_draw_sw_blend_fill_dsc_t * dsc); 32 | 33 | void /* LV_ATTRIBUTE_FAST_MEM */ lv_draw_sw_blend_image_to_argb8888(_lv_draw_sw_blend_image_dsc_t * dsc); 34 | 35 | /********************** 36 | * MACROS 37 | **********************/ 38 | 39 | #endif /*LV_USE_DRAW_SW*/ 40 | 41 | #ifdef __cplusplus 42 | } /*extern "C"*/ 43 | #endif 44 | 45 | #endif /*LV_DRAW_SW_BLEND_ARGB8888_H*/ 46 | -------------------------------------------------------------------------------- /1.Software/third_party/lvgl/lvgl/src/draw/sw/blend/lv_draw_sw_blend_to_rgb565.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_draw_sw_blend_rgb565.h 3 | * 4 | */ 5 | 6 | #ifndef LV_DRAW_SW_BLEND_RGB565_H 7 | #define LV_DRAW_SW_BLEND_RGB565_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #include "../lv_draw_sw.h" 17 | #if LV_USE_DRAW_SW 18 | 19 | /********************* 20 | * DEFINES 21 | *********************/ 22 | 23 | /********************** 24 | * TYPEDEFS 25 | **********************/ 26 | 27 | /********************** 28 | * GLOBAL PROTOTYPES 29 | **********************/ 30 | 31 | void /* LV_ATTRIBUTE_FAST_MEM */ lv_draw_sw_blend_color_to_rgb565(_lv_draw_sw_blend_fill_dsc_t * dsc); 32 | 33 | void /* LV_ATTRIBUTE_FAST_MEM */ lv_draw_sw_blend_image_to_rgb565(_lv_draw_sw_blend_image_dsc_t * dsc); 34 | 35 | /********************** 36 | * MACROS 37 | **********************/ 38 | 39 | #endif /*LV_USE_DRAW_SW*/ 40 | 41 | #ifdef __cplusplus 42 | } /*extern "C"*/ 43 | #endif 44 | 45 | #endif /*LV_DRAW_SW_BLEND_RGB565_H*/ 46 | -------------------------------------------------------------------------------- /1.Software/third_party/lvgl/lvgl/src/draw/sw/blend/lv_draw_sw_blend_to_rgb888.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_draw_sw_blend_rgb888.h 3 | * 4 | */ 5 | 6 | #ifndef LV_DRAW_SW_BLEND_RGB888_H 7 | #define LV_DRAW_SW_BLEND_RGB888_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #include "../lv_draw_sw.h" 17 | #if LV_USE_DRAW_SW 18 | 19 | /********************* 20 | * DEFINES 21 | *********************/ 22 | 23 | /********************** 24 | * TYPEDEFS 25 | **********************/ 26 | 27 | /********************** 28 | * GLOBAL PROTOTYPES 29 | **********************/ 30 | 31 | void /* LV_ATTRIBUTE_FAST_MEM */ lv_draw_sw_blend_color_to_rgb888(_lv_draw_sw_blend_fill_dsc_t * dsc, 32 | uint32_t dest_px_size); 33 | 34 | void /* LV_ATTRIBUTE_FAST_MEM */ lv_draw_sw_blend_image_to_rgb888(_lv_draw_sw_blend_image_dsc_t * dsc, 35 | uint32_t dest_px_size); 36 | 37 | /********************** 38 | * MACROS 39 | **********************/ 40 | 41 | #endif /*LV_USE_DRAW_SW*/ 42 | 43 | #ifdef __cplusplus 44 | } /*extern "C"*/ 45 | #endif 46 | 47 | #endif /*LV_DRAW_SW_BLEND_RGB888_H*/ 48 | -------------------------------------------------------------------------------- /1.Software/third_party/lvgl/lvgl/src/draw/vg_lite/lv_draw_buf_vg_lite.c: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_draw_buf_vg_lite.c 3 | * 4 | */ 5 | 6 | /********************* 7 | * INCLUDES 8 | *********************/ 9 | 10 | #include "lv_draw_vg_lite.h" 11 | 12 | #if LV_USE_DRAW_VG_LITE 13 | 14 | #include "lv_vg_lite_utils.h" 15 | 16 | /********************* 17 | * DEFINES 18 | *********************/ 19 | 20 | /********************** 21 | * TYPEDEFS 22 | **********************/ 23 | 24 | /********************** 25 | * STATIC PROTOTYPES 26 | **********************/ 27 | 28 | static uint32_t width_to_stride(uint32_t w, lv_color_format_t color_format); 29 | 30 | /********************** 31 | * STATIC VARIABLES 32 | **********************/ 33 | 34 | /********************** 35 | * MACROS 36 | **********************/ 37 | 38 | /********************** 39 | * GLOBAL FUNCTIONS 40 | **********************/ 41 | 42 | void lv_draw_buf_vg_lite_init_handlers(void) 43 | { 44 | lv_draw_buf_handlers_t * handlers = lv_draw_buf_get_handlers(); 45 | handlers->width_to_stride_cb = width_to_stride; 46 | } 47 | 48 | /********************** 49 | * STATIC FUNCTIONS 50 | **********************/ 51 | 52 | static uint32_t width_to_stride(uint32_t w, lv_color_format_t color_format) 53 | { 54 | return lv_vg_lite_width_to_stride(w, lv_vg_lite_vg_fmt(color_format)); 55 | } 56 | 57 | #endif /*LV_USE_DRAW_VG_LITE*/ 58 | -------------------------------------------------------------------------------- /1.Software/third_party/lvgl/lvgl/src/draw/vg_lite/lv_draw_vg_lite_type.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_draw_vg_lite_type.h 3 | * 4 | */ 5 | 6 | #ifndef LV_DRAW_VG_LITE_TYPE_H 7 | #define LV_DRAW_VG_LITE_TYPE_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | 17 | #include "../../lv_conf_internal.h" 18 | 19 | #if LV_USE_DRAW_VG_LITE 20 | 21 | #include "../lv_draw.h" 22 | #include "../../misc/lv_array.h" 23 | 24 | #if LV_USE_VG_LITE_THORVG 25 | #include "../../others/vg_lite_tvg/vg_lite.h" 26 | #else 27 | #include 28 | #endif 29 | 30 | /********************* 31 | * DEFINES 32 | *********************/ 33 | 34 | /********************** 35 | * TYPEDEFS 36 | **********************/ 37 | 38 | struct _lv_vg_lite_pending_t; 39 | 40 | struct _lv_draw_vg_lite_unit_t { 41 | lv_draw_unit_t base_unit; 42 | lv_draw_task_t * task_act; 43 | struct _lv_vg_lite_pending_t * image_dsc_pending; 44 | lv_cache_t * grad_cache; 45 | struct _lv_vg_lite_pending_t * grad_pending; 46 | uint16_t flush_count; 47 | vg_lite_buffer_t target_buffer; 48 | vg_lite_matrix_t global_matrix; 49 | struct _lv_vg_lite_path_t * global_path; 50 | bool path_in_use; 51 | }; 52 | 53 | /********************** 54 | * GLOBAL PROTOTYPES 55 | **********************/ 56 | 57 | /********************** 58 | * MACROS 59 | **********************/ 60 | 61 | #endif /*LV_USE_DRAW_VG_LITE*/ 62 | 63 | #ifdef __cplusplus 64 | } /*extern "C"*/ 65 | #endif 66 | 67 | #endif /*LV_VG_LITE_DRAW_H*/ 68 | -------------------------------------------------------------------------------- /1.Software/third_party/lvgl/lvgl/src/draw/vg_lite/lv_vg_lite_decoder.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_vg_lite_decoder.h 3 | * 4 | */ 5 | 6 | #ifndef LV_VG_LITE_DECODER_H 7 | #define LV_VG_LITE_DECODER_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | 17 | #include "../lv_image_decoder.h" 18 | 19 | #if LV_USE_DRAW_VG_LITE 20 | 21 | /********************* 22 | * DEFINES 23 | *********************/ 24 | 25 | /********************** 26 | * TYPEDEFS 27 | **********************/ 28 | 29 | /********************** 30 | * GLOBAL PROTOTYPES 31 | **********************/ 32 | 33 | void lv_vg_lite_decoder_init(void); 34 | 35 | void lv_vg_lite_decoder_deinit(void); 36 | 37 | /********************** 38 | * MACROS 39 | **********************/ 40 | 41 | #endif /*LV_USE_DRAW_VG_LITE*/ 42 | 43 | #ifdef __cplusplus 44 | } /*extern "C"*/ 45 | #endif 46 | 47 | #endif /*LV_VG_LITE_DECODER_H*/ 48 | -------------------------------------------------------------------------------- /1.Software/third_party/lvgl/lvgl/src/draw/vg_lite/lv_vg_lite_grad.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_vg_lite_grad.h 3 | * 4 | */ 5 | 6 | #ifndef LV_VG_LITE_GRAD_H 7 | #define LV_VG_LITE_GRAD_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | 17 | #include "../../lvgl.h" 18 | 19 | #if LV_USE_DRAW_VG_LITE 20 | 21 | #include "lv_vg_lite_utils.h" 22 | 23 | /********************* 24 | * DEFINES 25 | *********************/ 26 | 27 | /********************** 28 | * TYPEDEFS 29 | **********************/ 30 | 31 | /********************** 32 | * GLOBAL PROTOTYPES 33 | **********************/ 34 | 35 | void lv_vg_lite_grad_init(struct _lv_draw_vg_lite_unit_t * u); 36 | 37 | void lv_vg_lite_grad_deinit(struct _lv_draw_vg_lite_unit_t * u); 38 | 39 | void lv_vg_lite_grad_area_to_matrix(vg_lite_matrix_t * grad_matrix, const lv_area_t * area, lv_grad_dir_t dir); 40 | 41 | void lv_vg_lite_draw_linear_grad( 42 | struct _lv_draw_vg_lite_unit_t * u, 43 | vg_lite_buffer_t * buffer, 44 | vg_lite_path_t * path, 45 | const lv_grad_dsc_t * grad, 46 | const vg_lite_matrix_t * grad_matrix, 47 | const vg_lite_matrix_t * matrix, 48 | vg_lite_fill_t fill, 49 | vg_lite_blend_t blend); 50 | 51 | void lv_vg_lite_linear_grad_release_all(struct _lv_draw_vg_lite_unit_t * u); 52 | 53 | /********************** 54 | * MACROS 55 | **********************/ 56 | 57 | #endif /*LV_USE_DRAW_VG_LITE*/ 58 | 59 | #ifdef __cplusplus 60 | } /*extern "C"*/ 61 | #endif 62 | 63 | #endif /*LV_VG_LITE_GRAD_H*/ 64 | -------------------------------------------------------------------------------- /1.Software/third_party/lvgl/lvgl/src/draw/vg_lite/lv_vg_lite_math.c: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_vg_lite_math.h 3 | * 4 | */ 5 | 6 | /********************* 7 | * INCLUDES 8 | *********************/ 9 | 10 | #include "lv_vg_lite_math.h" 11 | 12 | #if LV_USE_DRAW_VG_LITE 13 | 14 | #include 15 | 16 | /********************* 17 | * DEFINES 18 | *********************/ 19 | 20 | /********************** 21 | * TYPEDEFS 22 | **********************/ 23 | 24 | /********************** 25 | * STATIC PROTOTYPES 26 | **********************/ 27 | 28 | /********************** 29 | * STATIC VARIABLES 30 | **********************/ 31 | 32 | /********************** 33 | * MACROS 34 | **********************/ 35 | 36 | /********************** 37 | * GLOBAL FUNCTIONS 38 | **********************/ 39 | 40 | float math_fast_inv_sqrtf(float number) 41 | { 42 | int32_t i; 43 | float x2, y; 44 | const float threehalfs = 1.5f; 45 | 46 | x2 = number * 0.5f; 47 | y = number; 48 | i = *(int32_t *)&y; /* evil floating point bit level hacking */ 49 | i = 0x5f3759df - (i >> 1); /* what the fuck? */ 50 | y = *(float *)&i; 51 | y = y * (threehalfs - (x2 * y * y)); /* 1st iteration */ 52 | 53 | return y; 54 | } 55 | 56 | /********************** 57 | * STATIC FUNCTIONS 58 | **********************/ 59 | 60 | #endif /*LV_USE_DRAW_VG_LITE*/ 61 | -------------------------------------------------------------------------------- /1.Software/third_party/lvgl/lvgl/src/drivers/README.md: -------------------------------------------------------------------------------- 1 | High level drivers for display controllers, frame buffers, etc -------------------------------------------------------------------------------- /1.Software/third_party/lvgl/lvgl/src/drivers/display/drm/lv_linux_drm.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_linux_drm_h 3 | * 4 | */ 5 | 6 | #ifndef LV_LINUX_DRM_H 7 | #define LV_LINUX_DRM_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | 17 | #include "../../../display/lv_display.h" 18 | 19 | #if LV_USE_LINUX_DRM 20 | 21 | /********************* 22 | * DEFINES 23 | *********************/ 24 | 25 | /********************** 26 | * TYPEDEFS 27 | **********************/ 28 | 29 | /********************** 30 | * GLOBAL PROTOTYPES 31 | **********************/ 32 | lv_display_t * lv_linux_drm_create(void); 33 | 34 | void lv_linux_drm_set_file(lv_display_t * disp, const char * file, int64_t connector_id); 35 | 36 | /********************** 37 | * MACROS 38 | **********************/ 39 | 40 | #endif /* LV_USE_LINUX_DRM */ 41 | 42 | #ifdef __cplusplus 43 | } /* extern "C" */ 44 | #endif 45 | 46 | #endif /* LV_LINUX_DRM_H */ 47 | -------------------------------------------------------------------------------- /1.Software/third_party/lvgl/lvgl/src/drivers/display/fb/lv_linux_fbdev.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_linux_fb_dev_h 3 | * 4 | */ 5 | 6 | #ifndef LV_LINUX_FB_DEV_H 7 | #define LV_LINUX_FB_DEV_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | 17 | #include "../../../display/lv_display.h" 18 | 19 | #if LV_USE_LINUX_FBDEV 20 | 21 | /********************* 22 | * DEFINES 23 | *********************/ 24 | 25 | /********************** 26 | * TYPEDEFS 27 | **********************/ 28 | 29 | /********************** 30 | * GLOBAL PROTOTYPES 31 | **********************/ 32 | lv_display_t * lv_linux_fbdev_create(void); 33 | 34 | void lv_linux_fbdev_set_file(lv_display_t * disp, const char * file); 35 | 36 | /** 37 | * Force the display to be refreshed on every change. 38 | * Expected to be used with LV_DISPLAY_RENDER_MODE_DIRECT or LV_DISPLAY_RENDER_MODE_FULL. 39 | */ 40 | void lv_linux_fbdev_set_force_refresh(lv_display_t * disp, bool enabled); 41 | 42 | /********************** 43 | * MACROS 44 | **********************/ 45 | 46 | #endif /* LV_USE_LINUX_FBDEV */ 47 | 48 | #ifdef __cplusplus 49 | } /* extern "C" */ 50 | #endif 51 | 52 | #endif /* LV_LINUX_FB_DEV_H */ 53 | -------------------------------------------------------------------------------- /1.Software/third_party/lvgl/lvgl/src/drivers/display/tft_espi/lv_tft_espi.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_linux_fb_dev_h 3 | * 4 | */ 5 | 6 | #ifndef LV_TFT_ESPI_H 7 | #define LV_TFT_ESPI_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #include "../../../display/lv_display.h" 17 | 18 | #if LV_USE_TFT_ESPI 19 | 20 | /********************* 21 | * DEFINES 22 | *********************/ 23 | 24 | /********************** 25 | * TYPEDEFS 26 | **********************/ 27 | 28 | /********************** 29 | * GLOBAL PROTOTYPES 30 | **********************/ 31 | lv_display_t * lv_tft_espi_create(uint32_t hor_res, uint32_t ver_res, void * buf, uint32_t buf_size_bytes); 32 | 33 | /********************** 34 | * MACROS 35 | **********************/ 36 | 37 | #endif /* LV_USE_TFT_ESPI */ 38 | 39 | #ifdef __cplusplus 40 | } /* extern "C" */ 41 | #endif 42 | 43 | #endif /* LV_TFT_ESPI_H */ 44 | -------------------------------------------------------------------------------- /1.Software/third_party/lvgl/lvgl/src/drivers/lv_drivers.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_drivers.h 3 | * 4 | */ 5 | 6 | #ifndef LV_DRIVERS_H 7 | #define LV_DRIVERS_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #include "sdl/lv_sdl_window.h" 17 | #include "sdl/lv_sdl_mouse.h" 18 | #include "sdl/lv_sdl_mousewheel.h" 19 | #include "sdl/lv_sdl_keyboard.h" 20 | 21 | #include "x11/lv_x11.h" 22 | 23 | #include "display/drm/lv_linux_drm.h" 24 | #include "display/fb/lv_linux_fbdev.h" 25 | 26 | #include "display/tft_espi/lv_tft_espi.h" 27 | 28 | #include "nuttx/lv_nuttx_entry.h" 29 | #include "nuttx/lv_nuttx_fbdev.h" 30 | #include "nuttx/lv_nuttx_touchscreen.h" 31 | #include "nuttx/lv_nuttx_lcd.h" 32 | #include "nuttx/lv_nuttx_libuv.h" 33 | 34 | #include "evdev/lv_evdev.h" 35 | #include "libinput/lv_libinput.h" 36 | 37 | #include "windows/lv_windows_input.h" 38 | #include "windows/lv_windows_display.h" 39 | 40 | /********************* 41 | * DEFINES 42 | *********************/ 43 | 44 | /********************** 45 | * TYPEDEFS 46 | **********************/ 47 | 48 | /********************** 49 | * GLOBAL PROTOTYPES 50 | **********************/ 51 | 52 | /********************** 53 | * MACROS 54 | **********************/ 55 | 56 | #ifdef __cplusplus 57 | } /*extern "C"*/ 58 | #endif 59 | 60 | #endif /*LV_DRIVERS_H*/ 61 | -------------------------------------------------------------------------------- /1.Software/third_party/lvgl/lvgl/src/drivers/nuttx/lv_nuttx_cache.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_nuttx_cache.h 3 | * 4 | */ 5 | 6 | #ifndef LV_NUTTX_CACHE_H 7 | #define LV_NUTTX_CACHE_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 | void lv_nuttx_cache_init(void); 30 | 31 | /********************** 32 | * MACROS 33 | **********************/ 34 | 35 | #ifdef __cplusplus 36 | } /*extern "C"*/ 37 | #endif 38 | 39 | #endif /*LV_NUTTX_CACHE_H*/ 40 | -------------------------------------------------------------------------------- /1.Software/third_party/lvgl/lvgl/src/drivers/nuttx/lv_nuttx_fbdev.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_nuttx_fbdev_h 3 | * 4 | */ 5 | 6 | #ifndef LV_NUTTX_FBDEV_H 7 | #define LV_NUTTX_FBDEV_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | 17 | #include "../../display/lv_display.h" 18 | 19 | #if LV_USE_NUTTX 20 | 21 | /********************* 22 | * DEFINES 23 | *********************/ 24 | 25 | /********************** 26 | * TYPEDEFS 27 | **********************/ 28 | 29 | /********************** 30 | * GLOBAL PROTOTYPES 31 | **********************/ 32 | 33 | /** 34 | * Create a new display with NuttX backend. 35 | */ 36 | lv_display_t * lv_nuttx_fbdev_create(void); 37 | 38 | /** 39 | * Initialize display with specified framebuffer device 40 | * @param disp pointer to display with NuttX backend 41 | * @param file the name of framebuffer device 42 | */ 43 | int lv_nuttx_fbdev_set_file(lv_display_t * disp, const char * file); 44 | 45 | /********************** 46 | * MACROS 47 | **********************/ 48 | 49 | #endif /* LV_USE_NUTTX */ 50 | 51 | #ifdef __cplusplus 52 | } /* extern "C" */ 53 | #endif 54 | 55 | #endif /* LV_NUTTX_FBDEV_H */ 56 | -------------------------------------------------------------------------------- /1.Software/third_party/lvgl/lvgl/src/drivers/nuttx/lv_nuttx_image_cache.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_nuttx_image_cache.h 3 | * 4 | */ 5 | 6 | #ifndef LV_NUTTX_IMAGE_CACHE_H 7 | #define LV_NUTTX_IMAGE_CACHE_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | 17 | #include "../../lv_conf_internal.h" 18 | 19 | #if LV_CACHE_DEF_SIZE > 0 20 | 21 | /********************* 22 | * DEFINES 23 | *********************/ 24 | 25 | /********************** 26 | * TYPEDEFS 27 | **********************/ 28 | 29 | /********************** 30 | * GLOBAL PROTOTYPES 31 | **********************/ 32 | 33 | void lv_nuttx_image_cache_init(void); 34 | 35 | /********************** 36 | * MACROS 37 | **********************/ 38 | 39 | #endif /*LV_CACHE_DEF_SIZE > 0*/ 40 | 41 | #ifdef __cplusplus 42 | } /*extern "C"*/ 43 | #endif 44 | 45 | #endif /*LV_NUTTX_IMAGE_CACHE_H*/ 46 | -------------------------------------------------------------------------------- /1.Software/third_party/lvgl/lvgl/src/drivers/nuttx/lv_nuttx_lcd.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_nuttx_lcd.h 3 | * 4 | */ 5 | 6 | #ifndef LV_NUTTX_LCD_H 7 | #define LV_NUTTX_LCD_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | 17 | #include "../../display/lv_display.h" 18 | 19 | #if LV_USE_NUTTX 20 | 21 | #if LV_USE_NUTTX_LCD 22 | 23 | /********************* 24 | * DEFINES 25 | *********************/ 26 | 27 | /********************** 28 | * TYPEDEFS 29 | **********************/ 30 | 31 | /********************** 32 | * GLOBAL PROTOTYPES 33 | **********************/ 34 | 35 | lv_display_t * lv_nuttx_lcd_create(const char * dev_path); 36 | 37 | /********************** 38 | * MACROS 39 | **********************/ 40 | 41 | #endif /* LV_USE_NUTTX_LCD */ 42 | 43 | #endif /* LV_USE_NUTTX*/ 44 | 45 | #ifdef __cplusplus 46 | } /* extern "C" */ 47 | #endif 48 | 49 | #endif /* LV_NUTTX_LCD_H */ 50 | -------------------------------------------------------------------------------- /1.Software/third_party/lvgl/lvgl/src/drivers/nuttx/lv_nuttx_libuv.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_nuttx_libuv.h 3 | * 4 | */ 5 | 6 | #ifndef LV_NUTTX_LIBUV_H 7 | #define LV_NUTTX_LIBUV_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | 17 | #include "../../display/lv_display.h" 18 | #include "../../indev/lv_indev.h" 19 | 20 | #if LV_USE_NUTTX 21 | 22 | #if LV_USE_NUTTX_LIBUV 23 | 24 | /********************* 25 | * DEFINES 26 | *********************/ 27 | 28 | /********************** 29 | * TYPEDEFS 30 | **********************/ 31 | 32 | typedef struct { 33 | void * loop; 34 | lv_display_t * disp; 35 | lv_indev_t * indev; 36 | } lv_nuttx_uv_t; 37 | 38 | /********************** 39 | * GLOBAL PROTOTYPES 40 | **********************/ 41 | 42 | /** 43 | * Initialize the uv_loop using the provided configuration information. 44 | * @param uv_info Pointer to the lv_nuttx_uv_t structure to be initialized. 45 | */ 46 | void * lv_nuttx_uv_init(lv_nuttx_uv_t * uv_info); 47 | 48 | /** 49 | * Deinitialize the uv_loop configuration for NuttX porting layer. 50 | * @param data Pointer to user data. 51 | */ 52 | void lv_nuttx_uv_deinit(void ** data); 53 | 54 | /********************** 55 | * MACROS 56 | **********************/ 57 | 58 | #endif /*LV_USE_NUTTX_LIBUV*/ 59 | 60 | #endif /*LV_USE_NUTTX*/ 61 | 62 | #ifdef __cplusplus 63 | } /* extern "C" */ 64 | #endif 65 | 66 | #endif /*LV_NUTTX_LIBUV_H*/ 67 | -------------------------------------------------------------------------------- /1.Software/third_party/lvgl/lvgl/src/drivers/nuttx/lv_nuttx_profiler.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_nuttx_profiler.h 3 | * 4 | */ 5 | 6 | #ifndef LV_NUTTX_PROFILER_H 7 | #define LV_NUTTX_PROFILER_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 | void lv_nuttx_profiler_init(void); 30 | 31 | /********************** 32 | * MACROS 33 | **********************/ 34 | 35 | #ifdef __cplusplus 36 | } /*extern "C"*/ 37 | #endif 38 | 39 | #endif /*LV_NUTTX_PROFILER_H*/ 40 | -------------------------------------------------------------------------------- /1.Software/third_party/lvgl/lvgl/src/drivers/nuttx/lv_nuttx_touchscreen.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_nuttx_touchscreen.h 3 | * 4 | */ 5 | 6 | /********************* 7 | * INCLUDES 8 | *********************/ 9 | 10 | #ifndef LV_NUTTX_TOUCHSCREEN_H 11 | #define LV_NUTTX_TOUCHSCREEN_H 12 | 13 | #ifdef __cplusplus 14 | extern "C" { 15 | #endif 16 | 17 | /********************* 18 | * INCLUDES 19 | *********************/ 20 | 21 | #include "../../indev/lv_indev.h" 22 | 23 | #if LV_USE_NUTTX 24 | 25 | #if LV_USE_NUTTX_TOUCHSCREEN 26 | 27 | /********************* 28 | * DEFINES 29 | *********************/ 30 | 31 | /********************** 32 | * TYPEDEFS 33 | **********************/ 34 | 35 | /********************** 36 | * GLOBAL PROTOTYPES 37 | **********************/ 38 | 39 | /** 40 | * Initialize indev with specified input device. 41 | * @param dev_path path of input device 42 | */ 43 | lv_indev_t * lv_nuttx_touchscreen_create(const char * dev_path); 44 | 45 | /********************** 46 | * MACROS 47 | **********************/ 48 | 49 | #endif /* LV_USE_NUTTX_TOUCHSCREEN */ 50 | 51 | #endif /* LV_USE_NUTTX*/ 52 | 53 | #ifdef __cplusplus 54 | } /* extern "C" */ 55 | #endif 56 | 57 | #endif /* LV_NUTTX_TOUCHSCREEN_H */ 58 | -------------------------------------------------------------------------------- /1.Software/third_party/lvgl/lvgl/src/drivers/sdl/lv_sdl_keyboard.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_sdl_keyboard.h 3 | * 4 | */ 5 | 6 | #ifndef LV_SDL_KEYBOARD_H 7 | #define LV_SDL_KEYBOARD_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #include "lv_sdl_window.h" 17 | #if LV_USE_SDL 18 | 19 | /********************* 20 | * DEFINES 21 | *********************/ 22 | #ifndef KEYBOARD_BUFFER_SIZE 23 | #define KEYBOARD_BUFFER_SIZE 32 24 | #endif 25 | 26 | /********************** 27 | * TYPEDEFS 28 | **********************/ 29 | 30 | /********************** 31 | * GLOBAL PROTOTYPES 32 | **********************/ 33 | 34 | lv_indev_t * lv_sdl_keyboard_create(void); 35 | 36 | /********************** 37 | * MACROS 38 | **********************/ 39 | 40 | #endif /*LV_USE_SDL*/ 41 | 42 | #ifdef __cplusplus 43 | } /* extern "C" */ 44 | #endif 45 | 46 | #endif /* LV_SDL_KEYBOARD_H */ 47 | -------------------------------------------------------------------------------- /1.Software/third_party/lvgl/lvgl/src/drivers/sdl/lv_sdl_mouse.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file Lv_sdl_mouse.h 3 | * 4 | */ 5 | 6 | #ifndef LV_SDL_MOUSE_H 7 | #define LV_SDL_MOUSE_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #include "lv_sdl_window.h" 17 | #if LV_USE_SDL 18 | 19 | /********************* 20 | * DEFINES 21 | *********************/ 22 | 23 | /********************** 24 | * TYPEDEFS 25 | **********************/ 26 | 27 | /********************** 28 | * GLOBAL PROTOTYPES 29 | **********************/ 30 | 31 | lv_indev_t * lv_sdl_mouse_create(void); 32 | 33 | /********************** 34 | * MACROS 35 | **********************/ 36 | 37 | #endif /*LV_USE_SDL*/ 38 | 39 | #ifdef __cplusplus 40 | } /* extern "C" */ 41 | #endif 42 | 43 | #endif /* LV_SDL_MOUSE_H */ 44 | -------------------------------------------------------------------------------- /1.Software/third_party/lvgl/lvgl/src/drivers/sdl/lv_sdl_mousewheel.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_sdl_mousewheel.h 3 | * 4 | */ 5 | 6 | #ifndef LV_SDL_MOUSEWHEEL_H 7 | #define LV_SDL_MOUSEWHEEL_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #include "lv_sdl_window.h" 17 | #if LV_USE_SDL && LV_SDL_MOUSEWHEEL_MODE == LV_SDL_MOUSEWHEEL_MODE_ENCODER 18 | 19 | /********************* 20 | * DEFINES 21 | *********************/ 22 | 23 | /********************** 24 | * TYPEDEFS 25 | **********************/ 26 | 27 | /********************** 28 | * GLOBAL PROTOTYPES 29 | **********************/ 30 | 31 | lv_indev_t * lv_sdl_mousewheel_create(void); 32 | 33 | /********************** 34 | * MACROS 35 | **********************/ 36 | 37 | #endif /*LV_USE_SDL*/ 38 | 39 | #ifdef __cplusplus 40 | } /* extern "C" */ 41 | #endif 42 | 43 | #endif /* LV_DEV_SDL_MOUSEWHEEL_H */ 44 | -------------------------------------------------------------------------------- /1.Software/third_party/lvgl/lvgl/src/drivers/sdl/lv_sdl_window.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_sdl_window.h 3 | * 4 | */ 5 | 6 | #ifndef LV_SDL_DISP_H 7 | #define LV_SDL_DISP_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | 17 | #include "../../display/lv_display.h" 18 | #include "../../indev/lv_indev.h" 19 | 20 | #if LV_USE_SDL 21 | 22 | /********************* 23 | * DEFINES 24 | *********************/ 25 | 26 | /* Possible values of LV_SDL_MOUSEWHEEL_MODE */ 27 | #define LV_SDL_MOUSEWHEEL_MODE_ENCODER 0 /* The mousewheel emulates an encoder input device*/ 28 | #define LV_SDL_MOUSEWHEEL_MODE_CROWN 1 /* The mousewheel emulates a smart watch crown*/ 29 | 30 | /********************** 31 | * TYPEDEFS 32 | **********************/ 33 | 34 | /********************** 35 | * GLOBAL PROTOTYPES 36 | **********************/ 37 | 38 | lv_display_t * lv_sdl_window_create(int32_t hor_res, int32_t ver_res); 39 | 40 | void lv_sdl_window_set_resizeable(lv_display_t * disp, bool value); 41 | 42 | void lv_sdl_window_set_zoom(lv_display_t * disp, uint8_t zoom); 43 | 44 | uint8_t lv_sdl_window_get_zoom(lv_display_t * disp); 45 | 46 | lv_display_t * _lv_sdl_get_disp_from_win_id(uint32_t win_id); 47 | 48 | void lv_sdl_window_set_title(lv_display_t * disp, const char * title); 49 | 50 | void * lv_sdl_window_get_renderer(lv_display_t * disp); 51 | 52 | void lv_sdl_quit(); 53 | 54 | /********************** 55 | * MACROS 56 | **********************/ 57 | 58 | #endif /* LV_DRV_SDL */ 59 | 60 | #ifdef __cplusplus 61 | } /* extern "C" */ 62 | #endif 63 | 64 | #endif /* LV_SDL_DISP_H */ 65 | -------------------------------------------------------------------------------- /1.Software/third_party/lvgl/lvgl/src/font/lv_binfont_loader.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_binfont_loader.h 3 | * 4 | */ 5 | 6 | #ifndef LV_FONT_LOADER_H 7 | #define LV_FONT_LOADER_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 | * Loads a `lv_font_t` object from a binary font file 31 | * @param path path where the font file is located 32 | * @return pointer to font where to load 33 | */ 34 | lv_font_t * lv_binfont_create(const char * font_name); 35 | 36 | #if LV_USE_FS_MEMFS 37 | /** 38 | * Loads a `lv_font_t` object from a memory buffer containing the binary font file. 39 | * Requires LV_USE_FS_MEMFS 40 | * @param buffer address of the font file in the memory 41 | * @param size size of the font file buffer 42 | * @return pointer to font where to load 43 | */ 44 | lv_font_t * lv_binfont_create_from_buffer(void * buffer, uint32_t size); 45 | #endif 46 | 47 | /** 48 | * Frees the memory allocated by the `lv_binfont_create()` function 49 | * @param font lv_font_t object created by the lv_binfont_create function 50 | */ 51 | void lv_binfont_destroy(lv_font_t * font); 52 | 53 | /********************** 54 | * MACROS 55 | **********************/ 56 | 57 | #ifdef __cplusplus 58 | } /*extern "C"*/ 59 | #endif 60 | 61 | #endif /*LV_FONT_LOADER_H*/ 62 | -------------------------------------------------------------------------------- /1.Software/third_party/lvgl/lvgl/src/libs/bmp/lv_bmp.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_bmp.h 3 | * 4 | */ 5 | 6 | #ifndef LV_BMP_H 7 | #define LV_BMP_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #include "../../lv_conf_internal.h" 17 | #if LV_USE_BMP 18 | 19 | /********************* 20 | * DEFINES 21 | *********************/ 22 | 23 | /********************** 24 | * TYPEDEFS 25 | **********************/ 26 | 27 | /********************** 28 | * GLOBAL PROTOTYPES 29 | **********************/ 30 | void lv_bmp_init(void); 31 | void lv_bmp_deinit(void); 32 | 33 | /********************** 34 | * MACROS 35 | **********************/ 36 | 37 | #endif /*LV_USE_BMP*/ 38 | 39 | #ifdef __cplusplus 40 | } /* extern "C" */ 41 | #endif 42 | 43 | #endif /*LV_BMP_H*/ 44 | -------------------------------------------------------------------------------- /1.Software/third_party/lvgl/lvgl/src/libs/freetype/arial.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lhdjply/f1c200s_library/8c92dfe21f338a180f4b68cd51b275c589efe3b9/1.Software/third_party/lvgl/lvgl/src/libs/freetype/arial.ttf -------------------------------------------------------------------------------- /1.Software/third_party/lvgl/lvgl/src/libs/fsdrv/lv_fs_cbfs.c: -------------------------------------------------------------------------------- 1 | // this file should not exist 2 | #ifdef __GNUC__ 3 | #define IS_NOT_USED __attribute__ ((unused)) 4 | #else 5 | #define IS_NOT_USED 6 | #endif 7 | IS_NOT_USED static void nothing(void) 8 | { 9 | // do nothing 10 | } 11 | -------------------------------------------------------------------------------- /1.Software/third_party/lvgl/lvgl/src/libs/fsdrv/lv_fsdrv.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_fsdrv.h 3 | * 4 | */ 5 | 6 | #ifndef LV_FSDRV_H 7 | #define LV_FSDRV_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #include "../../lv_conf_internal.h" 17 | 18 | /********************* 19 | * DEFINES 20 | *********************/ 21 | 22 | /********************** 23 | * TYPEDEFS 24 | **********************/ 25 | 26 | /********************** 27 | * GLOBAL PROTOTYPES 28 | **********************/ 29 | 30 | #if LV_USE_FS_FATFS 31 | void lv_fs_fatfs_init(void); 32 | #endif 33 | 34 | #if LV_USE_FS_STDIO 35 | void lv_fs_stdio_init(void); 36 | #endif 37 | 38 | #if LV_USE_FS_POSIX 39 | void lv_fs_posix_init(void); 40 | #endif 41 | 42 | #if LV_USE_FS_WIN32 43 | void lv_fs_win32_init(void); 44 | #endif 45 | 46 | #if LV_USE_FS_MEMFS 47 | void lv_fs_memfs_init(void); 48 | #endif 49 | 50 | #if LV_USE_FS_LITTLEFS 51 | void lv_fs_littlefs_init(void); 52 | #endif 53 | 54 | /********************** 55 | * MACROS 56 | **********************/ 57 | 58 | #ifdef __cplusplus 59 | } /* extern "C" */ 60 | #endif 61 | 62 | #endif /*LV_FSDRV_H*/ 63 | -------------------------------------------------------------------------------- /1.Software/third_party/lvgl/lvgl/src/libs/libjpeg_turbo/lv_libjpeg_turbo.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_libjpeg_turbo.h 3 | * 4 | */ 5 | 6 | #ifndef LV_LIBJPEG_TURBO_H 7 | #define LV_LIBJPEG_TURBO_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #include "../../lv_conf_internal.h" 17 | #if LV_USE_LIBJPEG_TURBO 18 | 19 | /********************* 20 | * DEFINES 21 | *********************/ 22 | 23 | /********************** 24 | * TYPEDEFS 25 | **********************/ 26 | 27 | /********************** 28 | * GLOBAL PROTOTYPES 29 | **********************/ 30 | 31 | /** 32 | * Register the JPEG-Turbo decoder functions in LVGL 33 | */ 34 | void lv_libjpeg_turbo_init(void); 35 | 36 | void lv_libjpeg_turbo_deinit(void); 37 | 38 | /********************** 39 | * MACROS 40 | **********************/ 41 | 42 | #endif /*LV_USE_LIBJPEG_TURBO*/ 43 | 44 | #ifdef __cplusplus 45 | } /* extern "C" */ 46 | #endif 47 | 48 | #endif /*LV_LIBJPEG_TURBO_H*/ 49 | -------------------------------------------------------------------------------- /1.Software/third_party/lvgl/lvgl/src/libs/libpng/lv_libpng.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_libpng.h 3 | * 4 | */ 5 | 6 | #ifndef LV_LIBPNG_H 7 | #define LV_LIBPNG_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #include "../../lv_conf_internal.h" 17 | #if LV_USE_LIBPNG 18 | 19 | /********************* 20 | * DEFINES 21 | *********************/ 22 | 23 | /********************** 24 | * TYPEDEFS 25 | **********************/ 26 | 27 | /********************** 28 | * GLOBAL PROTOTYPES 29 | **********************/ 30 | 31 | /** 32 | * Register the PNG decoder functions in LVGL 33 | */ 34 | void lv_libpng_init(void); 35 | 36 | void lv_libpng_deinit(void); 37 | 38 | /********************** 39 | * MACROS 40 | **********************/ 41 | 42 | #endif /*LV_USE_LIBPNG*/ 43 | 44 | #ifdef __cplusplus 45 | } /* extern "C" */ 46 | #endif 47 | 48 | #endif /*LV_LIBPNG_H*/ 49 | -------------------------------------------------------------------------------- /1.Software/third_party/lvgl/lvgl/src/libs/lodepng/lv_lodepng.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_lodepng.h 3 | * 4 | */ 5 | 6 | #ifndef LV_LODEPNG_H 7 | #define LV_LODEPNG_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #include "../../lv_conf_internal.h" 17 | #if LV_USE_LODEPNG 18 | 19 | /********************* 20 | * DEFINES 21 | *********************/ 22 | 23 | /********************** 24 | * TYPEDEFS 25 | **********************/ 26 | 27 | /********************** 28 | * GLOBAL PROTOTYPES 29 | **********************/ 30 | 31 | /** 32 | * Register the PNG decoder functions in LVGL 33 | */ 34 | void lv_lodepng_init(void); 35 | 36 | void lv_lodepng_deinit(void); 37 | 38 | /********************** 39 | * MACROS 40 | **********************/ 41 | 42 | #endif /*LV_USE_LODEPNG*/ 43 | 44 | #ifdef __cplusplus 45 | } /* extern "C" */ 46 | #endif 47 | 48 | #endif /*LV_LODEPNG_H*/ 49 | -------------------------------------------------------------------------------- /1.Software/third_party/lvgl/lvgl/src/libs/lz4/LICENSE: -------------------------------------------------------------------------------- 1 | LZ4 Library 2 | Copyright (c) 2011-2020, Yann Collet 3 | All rights reserved. 4 | 5 | Redistribution and use in source and binary forms, with or without modification, 6 | are permitted provided that the following conditions are met: 7 | 8 | * Redistributions of source code must retain the above copyright notice, this 9 | list of conditions and the following disclaimer. 10 | 11 | * Redistributions in binary form must reproduce the above copyright notice, this 12 | list of conditions and the following disclaimer in the documentation and/or 13 | other materials provided with the distribution. 14 | 15 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 16 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR 19 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 22 | ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | -------------------------------------------------------------------------------- /1.Software/third_party/lvgl/lvgl/src/libs/rle/lv_rle.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_rle.h 3 | * 4 | */ 5 | 6 | #ifndef LV_RLE_H 7 | #define LV_RLE_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #include "../../lv_conf_internal.h" 17 | 18 | #if LV_USE_RLE 19 | 20 | /********************* 21 | * DEFINES 22 | *********************/ 23 | 24 | /********************** 25 | * TYPEDEFS 26 | **********************/ 27 | 28 | /********************** 29 | * GLOBAL PROTOTYPES 30 | **********************/ 31 | 32 | uint32_t lv_rle_decompress(const uint8_t * input, 33 | uint32_t input_buff_len, uint8_t * output, 34 | uint32_t output_buff_len, uint8_t blk_size); 35 | 36 | /********************** 37 | * MACROS 38 | **********************/ 39 | 40 | #endif /*LV_USE_RLE*/ 41 | 42 | #ifdef __cplusplus 43 | } /* extern "C" */ 44 | #endif 45 | 46 | #endif /*LV_RLE_H*/ 47 | -------------------------------------------------------------------------------- /1.Software/third_party/lvgl/lvgl/src/libs/thorvg/add_lvgl_if.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | #Add LVGL #if LV_USE_THORVG_INTERNAL guard 4 | #Usage 5 | # find -name "*.cpp" | xargs ./add_lvgl_if.sh 6 | # find -name "t*.h" | xargs ./add_lvgl_if.sh 7 | 8 | sed '0,/\*\/$/ {/\*\/$/ {n; s|^|\n#include "../../lv_conf_internal.h"\n#if LV_USE_THORVG_INTERNAL\n|}}' $@ -i 9 | 10 | sed -i -e '$a\ 11 | \ 12 | #endif /* LV_USE_THORVG_INTERNAL */\ 13 | ' $@ -i 14 | -------------------------------------------------------------------------------- /1.Software/third_party/lvgl/lvgl/src/libs/thorvg/config.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Autogenerated by the Meson build system. 3 | * Do not edit, your changes will be lost. 4 | */ 5 | 6 | #pragma once 7 | 8 | #define THORVG_CAPI_BINDING_SUPPORT 1 9 | 10 | #define THORVG_SVG_LOADER_SUPPORT 1 11 | 12 | #define THORVG_SW_RASTER_SUPPORT 1 13 | 14 | #define THORVG_VERSION_STRING "0.11.99" 15 | 16 | -------------------------------------------------------------------------------- /1.Software/third_party/lvgl/lvgl/src/libs/thorvg/tvgSvgPath.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2020 - 2023 the ThorVG project. All rights reserved. 3 | 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | 11 | * The above copyright notice and this permission notice shall be included in all 12 | * copies or substantial portions of the Software. 13 | 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | * SOFTWARE. 21 | */ 22 | 23 | #include "../../lv_conf_internal.h" 24 | #if LV_USE_THORVG_INTERNAL 25 | 26 | #ifndef _TVG_SVG_PATH_H_ 27 | #define _TVG_SVG_PATH_H_ 28 | 29 | #include "tvgCommon.h" 30 | 31 | bool svgPathToTvgPath(const char* svgPath, Array& cmds, Array& pts); 32 | 33 | #endif //_TVG_SVG_PATH_H_ 34 | 35 | #endif /* LV_USE_THORVG_INTERNAL */ 36 | 37 | -------------------------------------------------------------------------------- /1.Software/third_party/lvgl/lvgl/src/libs/thorvg/tvgSvgUtil.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2020 - 2023 the ThorVG project. All rights reserved. 3 | 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | 11 | * The above copyright notice and this permission notice shall be included in all 12 | * copies or substantial portions of the Software. 13 | 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | * SOFTWARE. 21 | */ 22 | 23 | #include "../../lv_conf_internal.h" 24 | #if LV_USE_THORVG_INTERNAL 25 | 26 | #ifndef _TVG_SVG_UTIL_H_ 27 | #define _TVG_SVG_UTIL_H_ 28 | 29 | #include "tvgCommon.h" 30 | 31 | size_t svgUtilURLDecode(const char *src, char** dst); 32 | 33 | #endif //_TVG_SVG_UTIL_H_ 34 | 35 | #endif /* LV_USE_THORVG_INTERNAL */ 36 | 37 | -------------------------------------------------------------------------------- /1.Software/third_party/lvgl/lvgl/src/libs/tjpgd/lv_tjpgd.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_tjpgd.h 3 | * 4 | */ 5 | 6 | #ifndef LV_TJPGD_H 7 | #define LV_TJPGD_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | 17 | #if LV_USE_TJPGD 18 | 19 | /********************* 20 | * DEFINES 21 | *********************/ 22 | 23 | /********************** 24 | * TYPEDEFS 25 | **********************/ 26 | 27 | /********************** 28 | * GLOBAL PROTOTYPES 29 | **********************/ 30 | 31 | void lv_tjpgd_init(void); 32 | 33 | void lv_tjpgd_deinit(void); 34 | 35 | /********************** 36 | * MACROS 37 | **********************/ 38 | 39 | #endif /*LV_USE_TJPGD*/ 40 | 41 | #ifdef __cplusplus 42 | } 43 | #endif 44 | 45 | #endif /* LV_TJPGD_H */ 46 | -------------------------------------------------------------------------------- /1.Software/third_party/lvgl/lvgl/src/libs/tjpgd/tjpgdcnf.h: -------------------------------------------------------------------------------- 1 | /*----------------------------------------------*/ 2 | /* TJpgDec System Configurations R0.03 */ 3 | /*----------------------------------------------*/ 4 | 5 | #define JD_SZBUF 512 6 | /* Specifies size of stream input buffer */ 7 | 8 | #define JD_FORMAT 0 9 | /* Specifies output pixel format. 10 | / 0: RGB888 (24-bit/pix) 11 | / 1: RGB565 (16-bit/pix) 12 | / 2: Grayscale (8-bit/pix) 13 | */ 14 | 15 | #define JD_USE_SCALE 0 16 | /* Switches output descaling feature. 17 | / 0: Disable 18 | / 1: Enable 19 | */ 20 | 21 | #define JD_TBLCLIP 1 22 | /* Use table conversion for saturation arithmetic. A bit faster, but increases 1 KB of code size. 23 | / 0: Disable 24 | / 1: Enable 25 | */ 26 | 27 | #define JD_FASTDECODE 1 28 | /* Optimization level 29 | / 0: Basic optimization. Suitable for 8/16-bit MCUs. 30 | / 1: + 32-bit barrel shifter. Suitable for 32-bit MCUs. 31 | / 2: + Table conversion for huffman decoding (wants 6 << HUFF_BIT bytes of RAM) 32 | */ 33 | 34 | -------------------------------------------------------------------------------- /1.Software/third_party/lvgl/lvgl/src/lv_api_map_v9_0.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_api_map_v9_0.h 3 | * 4 | */ 5 | 6 | #ifndef LV_API_MAP_V9_0_H 7 | #define LV_API_MAP_V9_0_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #include "misc/lv_types.h" 17 | 18 | /********************* 19 | * DEFINES 20 | *********************/ 21 | 22 | /********************** 23 | * TYPEDEFS 24 | **********************/ 25 | 26 | /********************** 27 | * GLOBAL PROTOTYPES 28 | **********************/ 29 | 30 | /********************** 31 | * MACROS 32 | **********************/ 33 | #define lv_image_set_align lv_image_set_inner_align 34 | #define lv_image_get_align lv_image_get_inner_align 35 | 36 | #ifndef LV_DRAW_LAYER_SIMPLE_BUF_SIZE 37 | #define LV_DRAW_LAYER_SIMPLE_BUF_SIZE LV_DRAW_SW_LAYER_SIMPLE_BUF_SIZE 38 | #endif 39 | 40 | /********************** 41 | * MACROS 42 | **********************/ 43 | 44 | /********************** 45 | * DEPRECATED FUNCTIONS 46 | **********************/ 47 | 48 | #ifdef __cplusplus 49 | } /*extern "C"*/ 50 | #endif 51 | 52 | #endif /*LV_API_MAP_V9_0_H*/ 53 | -------------------------------------------------------------------------------- /1.Software/third_party/lvgl/lvgl/src/lv_init.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_init.h 3 | * 4 | */ 5 | 6 | #ifndef LV_INIT_H 7 | #define LV_INIT_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #include 17 | #include "lv_conf_internal.h" 18 | 19 | /********************* 20 | * DEFINES 21 | *********************/ 22 | 23 | /********************** 24 | * TYPEDEFS 25 | **********************/ 26 | 27 | /********************** 28 | * GLOBAL PROTOTYPES 29 | **********************/ 30 | 31 | /** 32 | * Initialize LVGL library. 33 | * Should be called before any other LVGL related function. 34 | */ 35 | void lv_init(void); 36 | 37 | /** 38 | * Deinit the 'lv' library 39 | */ 40 | void lv_deinit(void); 41 | 42 | /** 43 | * Returns whether the 'lv' library is currently initialized 44 | */ 45 | bool lv_is_initialized(void); 46 | 47 | /********************** 48 | * MACROS 49 | **********************/ 50 | 51 | #ifdef __cplusplus 52 | } /*extern "C"*/ 53 | #endif 54 | 55 | #endif /*LV_INIT_H*/ 56 | -------------------------------------------------------------------------------- /1.Software/third_party/lvgl/lvgl/src/lvgl.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lvgl.h 3 | * This file exists only to be compatible with Arduino's library structure 4 | */ 5 | 6 | #ifndef LVGL_SRC_H 7 | #define LVGL_SRC_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #include "../lvgl.h" 17 | #include "lv_conf_internal.h" 18 | 19 | /********************* 20 | * DEFINES 21 | *********************/ 22 | 23 | /********************** 24 | * TYPEDEFS 25 | **********************/ 26 | 27 | /********************** 28 | * GLOBAL PROTOTYPES 29 | **********************/ 30 | 31 | /********************** 32 | * MACROS 33 | **********************/ 34 | 35 | #ifdef __cplusplus 36 | } /*extern "C"*/ 37 | #endif 38 | 39 | #endif /*LVGL_SRC_H*/ 40 | -------------------------------------------------------------------------------- /1.Software/third_party/lvgl/lvgl/src/lvgl_private.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lvgl_private.h 3 | * 4 | */ 5 | 6 | #ifndef LVGL_PRIVATE_H 7 | #define LVGL_PRIVATE_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #include "display/lv_display_private.h" 17 | #include "indev/lv_indev_private.h" 18 | 19 | /********************* 20 | * DEFINES 21 | *********************/ 22 | 23 | /********************** 24 | * TYPEDEFS 25 | **********************/ 26 | 27 | /********************** 28 | * GLOBAL PROTOTYPES 29 | **********************/ 30 | 31 | /********************** 32 | * MACROS 33 | **********************/ 34 | 35 | #ifdef __cplusplus 36 | } /*extern "C"*/ 37 | #endif 38 | 39 | #endif /*LVGL_PRIVATE_H*/ 40 | -------------------------------------------------------------------------------- /1.Software/third_party/lvgl/lvgl/src/misc/cache/_lv_cache_lru_rb.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file _lv_cache_lru_rb.h 3 | * 4 | */ 5 | 6 | #ifndef LV_CACHE_LRU_RB_H 7 | #define LV_CACHE_LRU_RB_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #include "lv_cache_entry.h" 17 | #include "lv_cache_private.h" 18 | 19 | /********************* 20 | * DEFINES 21 | *********************/ 22 | 23 | /********************** 24 | * TYPEDEFS 25 | **********************/ 26 | 27 | /********************** 28 | * GLOBAL PROTOTYPES 29 | **********************/ 30 | 31 | /************************* 32 | * GLOBAL VARIABLES 33 | *************************/ 34 | LV_ATTRIBUTE_EXTERN_DATA extern const lv_cache_class_t lv_cache_class_lru_rb_count; 35 | LV_ATTRIBUTE_EXTERN_DATA extern const lv_cache_class_t lv_cache_class_lru_rb_size; 36 | /********************** 37 | * MACROS 38 | **********************/ 39 | 40 | #ifdef __cplusplus 41 | } /*extern "C"*/ 42 | #endif 43 | 44 | #endif /*LV_CACHE_LRU_RB_H*/ 45 | -------------------------------------------------------------------------------- /1.Software/third_party/lvgl/lvgl/src/misc/cache/lv_cache_entry_private.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_cache_entry_private.h 3 | * 4 | */ 5 | 6 | #ifndef LV_CACHE_ENTRY_PRIVATE 7 | #define LV_CACHE_ENTRY_PRIVATE 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #include "../lv_types.h" 17 | #include 18 | #include 19 | #include "../../osal/lv_os.h" 20 | /********************* 21 | * DEFINES 22 | *********************/ 23 | 24 | /********************** 25 | * TYPEDEFS 26 | **********************/ 27 | 28 | /********************** 29 | * GLOBAL PROTOTYPES 30 | **********************/ 31 | void lv_cache_entry_reset_ref(lv_cache_entry_t * entry); 32 | void lv_cache_entry_inc_ref(lv_cache_entry_t * entry); 33 | void lv_cache_entry_dec_ref(lv_cache_entry_t * entry); 34 | void lv_cache_entry_set_node_size(lv_cache_entry_t * entry, uint32_t node_size); 35 | void lv_cache_entry_set_invalid(lv_cache_entry_t * entry, bool is_invalid); 36 | void lv_cache_entry_set_cache(lv_cache_entry_t * entry, const lv_cache_t * cache); 37 | void * lv_cache_entry_acquire_data(lv_cache_entry_t * entry); 38 | void lv_cache_entry_release_data(lv_cache_entry_t * entry, void * user_data); 39 | /************************* 40 | * GLOBAL VARIABLES 41 | *************************/ 42 | 43 | /********************** 44 | * MACROS 45 | **********************/ 46 | 47 | #ifdef __cplusplus 48 | } /*extern "C"*/ 49 | #endif 50 | 51 | #endif /*LV_CACHE_ENTRY_PRIVATE*/ 52 | -------------------------------------------------------------------------------- /1.Software/third_party/lvgl/lvgl/src/misc/lv_async.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_async.h 3 | * 4 | */ 5 | 6 | #ifndef LV_ASYNC_H 7 | #define LV_ASYNC_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | 17 | #include "lv_types.h" 18 | 19 | /********************* 20 | * DEFINES 21 | *********************/ 22 | 23 | /********************** 24 | * TYPEDEFS 25 | **********************/ 26 | 27 | /** 28 | * Type for async callback. 29 | */ 30 | typedef void (*lv_async_cb_t)(void *); 31 | 32 | /********************** 33 | * GLOBAL PROTOTYPES 34 | **********************/ 35 | 36 | /** 37 | * Call an asynchronous function the next time lv_timer_handler() is run. This function is likely to return 38 | * **before** the call actually happens! 39 | * @param async_xcb a callback which is the task itself. 40 | * (the 'x' in the argument name indicates that it's not a fully generic function because it not follows 41 | * the `func_name(object, callback, ...)` convention) 42 | * @param user_data custom parameter 43 | */ 44 | lv_result_t lv_async_call(lv_async_cb_t async_xcb, void * user_data); 45 | 46 | /** 47 | * Cancel an asynchronous function call 48 | * @param async_xcb a callback which is the task itself. 49 | * @param user_data custom parameter 50 | */ 51 | lv_result_t lv_async_call_cancel(lv_async_cb_t async_xcb, void * user_data); 52 | 53 | /********************** 54 | * MACROS 55 | **********************/ 56 | 57 | #ifdef __cplusplus 58 | } /*extern "C"*/ 59 | #endif 60 | 61 | #endif /*LV_ASYNC_H*/ 62 | -------------------------------------------------------------------------------- /1.Software/third_party/lvgl/lvgl/src/misc/lv_color_op.c: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_color.c 3 | * 4 | */ 5 | 6 | /********************* 7 | * INCLUDES 8 | *********************/ 9 | #include "lv_color.h" 10 | #include "lv_log.h" 11 | #include "../misc/lv_color.h" 12 | 13 | /********************* 14 | * DEFINES 15 | *********************/ 16 | 17 | /********************** 18 | * TYPEDEFS 19 | **********************/ 20 | 21 | /********************** 22 | * STATIC PROTOTYPES 23 | **********************/ 24 | 25 | /********************** 26 | * STATIC VARIABLES 27 | **********************/ 28 | 29 | /********************** 30 | * MACROS 31 | **********************/ 32 | 33 | /********************** 34 | * GLOBAL FUNCTIONS 35 | **********************/ 36 | -------------------------------------------------------------------------------- /1.Software/third_party/lvgl/lvgl/src/misc/lv_profiler.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_profiler.h 3 | * 4 | */ 5 | 6 | #ifndef LV_PROFILER_H 7 | #define LV_PROFILER_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | 17 | #include "../lv_conf_internal.h" 18 | 19 | #if LV_USE_PROFILER 20 | 21 | #include LV_PROFILER_INCLUDE 22 | 23 | /********************* 24 | * DEFINES 25 | *********************/ 26 | 27 | /********************** 28 | * TYPEDEFS 29 | **********************/ 30 | 31 | /********************** 32 | * GLOBAL PROTOTYPES 33 | **********************/ 34 | 35 | /********************** 36 | * MACROS 37 | **********************/ 38 | 39 | #else 40 | 41 | #define LV_PROFILER_BEGIN 42 | #define LV_PROFILER_END 43 | #define LV_PROFILER_BEGIN_TAG(tag) LV_UNUSED(tag) 44 | #define LV_PROFILER_END_TAG(tag) LV_UNUSED(tag) 45 | 46 | #endif /*LV_USE_PROFILER*/ 47 | 48 | #ifdef __cplusplus 49 | } /*extern "C"*/ 50 | #endif 51 | 52 | #endif /*LV_PROFILER_H*/ 53 | -------------------------------------------------------------------------------- /1.Software/third_party/lvgl/lvgl/src/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 | /*This typedef exists purely to keep -Wpedantic happy when the file is empty.*/ 19 | /*It can be removed.*/ 20 | typedef int _keep_pedantic_happy; 21 | 22 | /********************** 23 | * STATIC PROTOTYPES 24 | **********************/ 25 | 26 | /********************** 27 | * STATIC VARIABLES 28 | **********************/ 29 | 30 | /********************** 31 | * MACROS 32 | **********************/ 33 | 34 | /********************** 35 | * GLOBAL FUNCTIONS 36 | **********************/ 37 | 38 | /********************** 39 | * STATIC FUNCTIONS 40 | **********************/ 41 | -------------------------------------------------------------------------------- /1.Software/third_party/lvgl/lvgl/src/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 | #ifdef __cplusplus 34 | } /*extern "C"*/ 35 | #endif 36 | 37 | #endif /*LV_TEMPL_H*/ 38 | -------------------------------------------------------------------------------- /1.Software/third_party/lvgl/lvgl/src/misc/lv_text_ap.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_text_ap.h 3 | * 4 | */ 5 | 6 | #ifndef LV_TEXT_AP_H 7 | #define LV_TEXT_AP_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #include 17 | #include "lv_text.h" 18 | #include "../draw/lv_draw.h" 19 | 20 | #if LV_USE_ARABIC_PERSIAN_CHARS == 1 21 | 22 | /********************* 23 | * DEFINES 24 | *********************/ 25 | 26 | #define LV_UNDEF_ARABIC_PERSIAN_CHARS (UINT32_MAX) 27 | #define LV_AP_ALPHABET_BASE_CODE 0x0622 28 | #define LV_AP_END_CHARS_LIST {0,0,0,0,0,{0,0}} 29 | /********************** 30 | * TYPEDEFS 31 | **********************/ 32 | 33 | /********************** 34 | * GLOBAL PROTOTYPES 35 | **********************/ 36 | uint32_t _lv_text_ap_calc_bytes_count(const char * txt); 37 | void _lv_text_ap_proc(const char * txt, char * txt_out); 38 | 39 | /********************** 40 | * MACROS 41 | **********************/ 42 | 43 | #endif // LV_USE_ARABIC_PERSIAN_CHARS 44 | 45 | #ifdef __cplusplus 46 | } /*extern "C"*/ 47 | #endif 48 | 49 | #endif /*LV_TEXT_AP_H*/ 50 | -------------------------------------------------------------------------------- /1.Software/third_party/lvgl/lvgl/src/osal/lv_cmsis_rtos2.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_cmsis_rtos2.h 3 | * 4 | */ 5 | 6 | /* 7 | * Copyright (C) 2023 Arm Limited or its affiliates. All rights reserved. 8 | * 9 | * SPDX-License-Identifier: Apache-2.0 10 | */ 11 | 12 | #ifndef LV_CMSIS_RTOS2_H 13 | #define LV_CMSIS_RTOS2_H 14 | 15 | #ifdef __cplusplus 16 | extern "C" { 17 | #endif 18 | 19 | /********************* 20 | * INCLUDES 21 | *********************/ 22 | #if LV_USE_OS == LV_OS_CMSIS_RTOS2 23 | 24 | #include "cmsis_os2.h" 25 | 26 | /********************* 27 | * DEFINES 28 | *********************/ 29 | 30 | /********************** 31 | * TYPEDEFS 32 | **********************/ 33 | typedef osThreadId_t lv_thread_t; 34 | 35 | typedef osMutexId_t lv_mutex_t; 36 | 37 | typedef osEventFlagsId_t lv_thread_sync_t; 38 | 39 | /********************** 40 | * GLOBAL PROTOTYPES 41 | **********************/ 42 | 43 | /********************** 44 | * MACROS 45 | **********************/ 46 | 47 | #endif /*LV_USE_OS == LV_OS_CMSIS_RTOS2*/ 48 | 49 | #ifdef __cplusplus 50 | } /*extern "C"*/ 51 | #endif 52 | 53 | #endif /*LV_OS_CMSIS_RTOS2*/ 54 | -------------------------------------------------------------------------------- /1.Software/third_party/lvgl/lvgl/src/osal/lv_os_none.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_os_none.h 3 | * 4 | */ 5 | 6 | #ifndef LV_OS_NONE_H 7 | #define LV_OS_NONE_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #if LV_USE_OS == LV_OS_NONE 17 | 18 | /********************* 19 | * DEFINES 20 | *********************/ 21 | 22 | /********************** 23 | * TYPEDEFS 24 | **********************/ 25 | typedef int lv_mutex_t; 26 | typedef int lv_thread_t; 27 | typedef int lv_thread_sync_t; 28 | 29 | /********************** 30 | * GLOBAL PROTOTYPES 31 | **********************/ 32 | 33 | /********************** 34 | * MACROS 35 | **********************/ 36 | 37 | #endif /*LV_USE_OS == LV_OS_NONE*/ 38 | 39 | #ifdef __cplusplus 40 | } /*extern "C"*/ 41 | #endif 42 | 43 | #endif /*LV_OS_NONE_H*/ 44 | -------------------------------------------------------------------------------- /1.Software/third_party/lvgl/lvgl/src/osal/lv_pthread.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_pthread.h 3 | * 4 | */ 5 | 6 | #ifndef LV_PTHREAD_H 7 | #define LV_PTHREAD_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #if LV_USE_OS == LV_OS_PTHREAD 17 | 18 | #include 19 | #include 20 | #include 21 | 22 | /********************* 23 | * DEFINES 24 | *********************/ 25 | 26 | /********************** 27 | * TYPEDEFS 28 | **********************/ 29 | typedef struct { 30 | pthread_t thread; 31 | void (*callback)(void *); 32 | void * user_data; 33 | } lv_thread_t; 34 | 35 | typedef pthread_mutex_t lv_mutex_t; 36 | 37 | typedef struct { 38 | pthread_mutex_t mutex; 39 | pthread_cond_t cond; 40 | bool v; 41 | } lv_thread_sync_t; 42 | 43 | /********************** 44 | * GLOBAL PROTOTYPES 45 | **********************/ 46 | 47 | /********************** 48 | * MACROS 49 | **********************/ 50 | 51 | #endif /*LV_USE_OS == LV_OS_PTHREAD*/ 52 | 53 | #ifdef __cplusplus 54 | } /*extern "C"*/ 55 | #endif 56 | 57 | #endif /*LV_PTHREAD_H*/ 58 | -------------------------------------------------------------------------------- /1.Software/third_party/lvgl/lvgl/src/osal/lv_rtthread.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_rtthread.h 3 | * 4 | */ 5 | 6 | #ifndef LV_RTTHREAD_H 7 | #define LV_RTTHREAD_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #if LV_USE_OS == LV_OS_RTTHREAD 17 | 18 | #include 19 | #include 20 | 21 | /********************* 22 | * DEFINES 23 | *********************/ 24 | 25 | /********************** 26 | * TYPEDEFS 27 | **********************/ 28 | typedef struct { 29 | rt_thread_t thread; 30 | } lv_thread_t; 31 | 32 | typedef struct { 33 | rt_mutex_t mutex; 34 | } lv_mutex_t; 35 | 36 | typedef struct { 37 | rt_sem_t sem; 38 | } lv_thread_sync_t; 39 | 40 | /********************** 41 | * GLOBAL PROTOTYPES 42 | **********************/ 43 | 44 | /********************** 45 | * MACROS 46 | **********************/ 47 | 48 | #endif /*LV_USE_OS == LV_OS_RTTHREAD*/ 49 | 50 | #ifdef __cplusplus 51 | } /*extern "C"*/ 52 | #endif 53 | 54 | #endif /*LV_RTTHREAD_H*/ 55 | -------------------------------------------------------------------------------- /1.Software/third_party/lvgl/lvgl/src/osal/lv_windows.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_windows.h 3 | * 4 | */ 5 | 6 | #ifndef LV_WINDOWS_H 7 | #define LV_WINDOWS_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | 17 | #if LV_USE_OS == LV_OS_WINDOWS 18 | 19 | #include 20 | #include 21 | 22 | /********************* 23 | * DEFINES 24 | *********************/ 25 | 26 | /********************** 27 | * TYPEDEFS 28 | **********************/ 29 | 30 | typedef HANDLE lv_thread_t; 31 | 32 | typedef CRITICAL_SECTION lv_mutex_t; 33 | 34 | typedef struct { 35 | CRITICAL_SECTION cs; 36 | CONDITION_VARIABLE cv; 37 | bool v; 38 | } lv_thread_sync_t; 39 | 40 | /********************** 41 | * GLOBAL PROTOTYPES 42 | **********************/ 43 | 44 | /********************** 45 | * MACROS 46 | **********************/ 47 | 48 | #endif /*LV_USE_OS == LV_OS_WINDOWS*/ 49 | 50 | #ifdef __cplusplus 51 | } /*extern "C"*/ 52 | #endif 53 | 54 | #endif /*LV_WINDOWS_H*/ 55 | -------------------------------------------------------------------------------- /1.Software/third_party/lvgl/lvgl/src/others/fragment/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lhdjply/f1c200s_library/8c92dfe21f338a180f4b68cd51b275c589efe3b9/1.Software/third_party/lvgl/lvgl/src/others/fragment/README.md -------------------------------------------------------------------------------- /1.Software/third_party/lvgl/lvgl/src/stdlib/clib/lv_sprintf_clib.c: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * @file lv_templ.c 4 | * 5 | */ 6 | 7 | /********************* 8 | * INCLUDES 9 | *********************/ 10 | #include "../../lv_conf_internal.h" 11 | #if LV_USE_STDLIB_SPRINTF == LV_STDLIB_CLIB 12 | #include 13 | #include 14 | #include "../lv_sprintf.h" 15 | 16 | /********************* 17 | * DEFINES 18 | *********************/ 19 | 20 | /********************** 21 | * TYPEDEFS 22 | **********************/ 23 | 24 | /********************** 25 | * STATIC PROTOTYPES 26 | **********************/ 27 | 28 | /********************** 29 | * STATIC VARIABLES 30 | **********************/ 31 | 32 | /********************** 33 | * MACROS 34 | **********************/ 35 | 36 | /********************** 37 | * GLOBAL FUNCTIONS 38 | **********************/ 39 | 40 | int lv_snprintf(char * buffer, size_t count, const char * format, ...) 41 | { 42 | va_list va; 43 | va_start(va, format); 44 | const int ret = vsnprintf(buffer, count, format, va); 45 | va_end(va); 46 | return ret; 47 | } 48 | 49 | int lv_vsnprintf(char * buffer, size_t count, const char * format, va_list va) 50 | { 51 | return vsnprintf(buffer, count, format, va); 52 | } 53 | 54 | /********************** 55 | * STATIC FUNCTIONS 56 | **********************/ 57 | 58 | #endif 59 | -------------------------------------------------------------------------------- /1.Software/third_party/lvgl/lvgl/src/stdlib/lv_sprintf.h: -------------------------------------------------------------------------------- 1 | /** 2 | * lv_snprintf.h 3 | * 4 | */ 5 | 6 | #ifndef _LV_SPRINTF_H_ 7 | #define _LV_SPRINTF_H_ 8 | 9 | #if defined(__has_include) 10 | #if __has_include() 11 | #include 12 | /* platform-specific printf format for int32_t, usually "d" or "ld" */ 13 | #define LV_PRId32 PRId32 14 | #define LV_PRIu32 PRIu32 15 | #define LV_PRIx32 PRIx32 16 | #define LV_PRIX32 PRIX32 17 | #else 18 | #define LV_PRId32 "d" 19 | #define LV_PRIu32 "u" 20 | #define LV_PRIx32 "x" 21 | #define LV_PRIX32 "X" 22 | #endif 23 | #else 24 | /* hope this is correct for ports without __has_include or without inttypes.h */ 25 | #define LV_PRId32 "d" 26 | #define LV_PRIu32 "u" 27 | #define LV_PRIx32 "x" 28 | #define LV_PRIX32 "X" 29 | #endif 30 | 31 | #include 32 | #include 33 | #include 34 | 35 | #ifdef __cplusplus 36 | extern "C" { 37 | #endif 38 | 39 | int lv_snprintf(char * buffer, size_t count, const char * format, ...); 40 | 41 | int lv_vsnprintf(char * buffer, size_t count, const char * format, va_list va); 42 | 43 | #ifdef __cplusplus 44 | } /*extern "C"*/ 45 | #endif 46 | 47 | #endif /* _LV_SPRINTF_H_*/ 48 | -------------------------------------------------------------------------------- /1.Software/third_party/lvgl/lvgl/src/stdlib/rtthread/lv_sprintf_rtthread.c: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_sprintf_rtthread.c 3 | * 4 | */ 5 | 6 | /********************* 7 | * INCLUDES 8 | *********************/ 9 | #include "../../lv_conf_internal.h" 10 | #if LV_USE_STDLIB_SPRINTF == LV_STDLIB_RTTHREAD 11 | #include 12 | #include 13 | #include "../lv_sprintf.h" 14 | 15 | #if LV_USE_FLOAT == 1 16 | #warning "lv_sprintf_rtthread: rtthread not support float in sprintf" 17 | #endif 18 | 19 | /********************* 20 | * DEFINES 21 | *********************/ 22 | 23 | /********************** 24 | * TYPEDEFS 25 | **********************/ 26 | 27 | /********************** 28 | * STATIC PROTOTYPES 29 | **********************/ 30 | 31 | /********************** 32 | * STATIC VARIABLES 33 | **********************/ 34 | 35 | /********************** 36 | * MACROS 37 | **********************/ 38 | 39 | /********************** 40 | * GLOBAL FUNCTIONS 41 | **********************/ 42 | 43 | int lv_snprintf(char * buffer, size_t count, const char * format, ...) 44 | { 45 | va_list va; 46 | va_start(va, format); 47 | const int ret = rt_vsnprintf(buffer, count, format, va); 48 | va_end(va); 49 | return ret; 50 | } 51 | 52 | int lv_vsnprintf(char * buffer, size_t count, const char * format, va_list va) 53 | { 54 | return rt_vsnprintf(buffer, count, format, va); 55 | } 56 | 57 | /********************** 58 | * STATIC FUNCTIONS 59 | **********************/ 60 | 61 | #endif /*LV_STDLIB_RTTHREAD*/ 62 | -------------------------------------------------------------------------------- /1.Software/third_party/lvgl/lvgl/src/themes/mono/lv_theme_mono.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_theme_mono.h 3 | * 4 | */ 5 | 6 | #ifndef LV_USE_THEME_MONO_H 7 | #define LV_USE_THEME_MONO_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #include "../lv_theme.h" 17 | 18 | #if LV_USE_THEME_MONO 19 | 20 | /********************* 21 | * DEFINES 22 | *********************/ 23 | 24 | /********************** 25 | * TYPEDEFS 26 | **********************/ 27 | 28 | /********************** 29 | * GLOBAL PROTOTYPES 30 | **********************/ 31 | 32 | /** 33 | * Initialize the theme 34 | * @param disp pointer to display 35 | * @param dark_bg 36 | * @param font pointer to a font to use. 37 | * @return a pointer to reference this theme later 38 | */ 39 | lv_theme_t * lv_theme_mono_init(lv_display_t * disp, bool dark_bg, const lv_font_t * font); 40 | 41 | /** 42 | * Check if the theme is initialized 43 | * @return true if default theme is initialized, false otherwise 44 | */ 45 | bool lv_theme_mono_is_inited(void); 46 | 47 | /** 48 | * Deinitialize the mono theme 49 | */ 50 | void lv_theme_mono_deinit(void); 51 | 52 | /********************** 53 | * MACROS 54 | **********************/ 55 | 56 | #endif 57 | 58 | #ifdef __cplusplus 59 | } /*extern "C"*/ 60 | #endif 61 | 62 | #endif /*LV_USE_THEME_MONO_H*/ 63 | -------------------------------------------------------------------------------- /1.Software/third_party/lvgl/lvgl/src/themes/simple/lv_theme_simple.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_theme_simple.h 3 | * 4 | */ 5 | 6 | #ifndef LV_THEME_SIMPLE_H 7 | #define LV_THEME_SIMPLE_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #include "../lv_theme.h" 17 | #include "../../display/lv_display.h" 18 | 19 | #if LV_USE_THEME_SIMPLE 20 | 21 | /********************* 22 | * DEFINES 23 | *********************/ 24 | 25 | /********************** 26 | * TYPEDEFS 27 | **********************/ 28 | 29 | /********************** 30 | * GLOBAL PROTOTYPES 31 | **********************/ 32 | 33 | /** 34 | * Initialize the theme 35 | * @param disp pointer to display to attach the theme 36 | * @return a pointer to reference this theme later 37 | */ 38 | lv_theme_t * lv_theme_simple_init(lv_display_t * disp); 39 | 40 | /** 41 | * Check if the theme is initialized 42 | * @return true if default theme is initialized, false otherwise 43 | */ 44 | bool lv_theme_simple_is_inited(void); 45 | 46 | /** 47 | * Get simple theme 48 | * @return a pointer to simple theme, or NULL if this is not initialized 49 | */ 50 | lv_theme_t * lv_theme_simple_get(void); 51 | 52 | /** 53 | * Deinitialize the simple theme 54 | */ 55 | void lv_theme_simple_deinit(void); 56 | 57 | /********************** 58 | * MACROS 59 | **********************/ 60 | 61 | #endif 62 | 63 | #ifdef __cplusplus 64 | } /*extern "C"*/ 65 | #endif 66 | 67 | #endif /*LV_THEME_SIMPLE_H*/ 68 | -------------------------------------------------------------------------------- /1.Software/third_party/lvgl/lvgl/src/widgets/button/lv_button.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_btn.h 3 | * 4 | */ 5 | 6 | #ifndef LV_BUTTON_H 7 | #define LV_BUTTON_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #include "../../lv_conf_internal.h" 17 | 18 | #if LV_USE_BUTTON != 0 19 | #include "../../core/lv_obj.h" 20 | 21 | /********************* 22 | * DEFINES 23 | *********************/ 24 | 25 | /********************** 26 | * TYPEDEFS 27 | **********************/ 28 | 29 | typedef struct { 30 | lv_obj_t obj; 31 | } lv_button_t; 32 | 33 | LV_ATTRIBUTE_EXTERN_DATA extern const lv_obj_class_t lv_button_class; 34 | 35 | /********************** 36 | * GLOBAL PROTOTYPES 37 | **********************/ 38 | 39 | /** 40 | * Create a button object 41 | * @param parent pointer to an object, it will be the parent of the new button 42 | * @return pointer to the created button 43 | */ 44 | lv_obj_t * lv_button_create(lv_obj_t * parent); 45 | 46 | /********************** 47 | * MACROS 48 | **********************/ 49 | 50 | #endif /*LV_USE_BUTTON*/ 51 | 52 | #ifdef __cplusplus 53 | } /*extern "C"*/ 54 | #endif 55 | 56 | #endif /*LV_BUTTON_H*/ 57 | -------------------------------------------------------------------------------- /1.Software/third_party/lvgl/lvgl/src/widgets/calendar/lv_calendar_header_arrow.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_calendar_header_arrow.h 3 | * 4 | */ 5 | 6 | #ifndef LV_CALENDAR_HEADER_ARROW_H 7 | #define LV_CALENDAR_HEADER_ARROW_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #include "../../core/lv_obj.h" 17 | #if LV_USE_CALENDAR && LV_USE_CALENDAR_HEADER_ARROW 18 | 19 | /********************* 20 | * DEFINES 21 | *********************/ 22 | 23 | /********************** 24 | * TYPEDEFS 25 | **********************/ 26 | LV_ATTRIBUTE_EXTERN_DATA extern const lv_obj_class_t lv_calendar_header_arrow_class; 27 | 28 | /********************** 29 | * GLOBAL PROTOTYPES 30 | **********************/ 31 | 32 | /** 33 | * Create a calendar header with drop-drowns to select the year and month 34 | * @param parent pointer to a calendar object. 35 | * @return the created header 36 | */ 37 | lv_obj_t * lv_calendar_header_arrow_create(lv_obj_t * parent); 38 | 39 | /********************** 40 | * MACROS 41 | **********************/ 42 | 43 | #endif /*LV_USE_CALENDAR_HEADER_ARROW*/ 44 | 45 | #ifdef __cplusplus 46 | } /*extern "C"*/ 47 | #endif 48 | 49 | #endif /*LV_CALENDAR_HEADER_ARROW_H*/ 50 | -------------------------------------------------------------------------------- /1.Software/third_party/lvgl/lvgl/src/widgets/spinner/lv_spinner.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_spinner.h 3 | * 4 | */ 5 | 6 | #ifndef LV_SPINNER_H 7 | #define LV_SPINNER_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #include "../../lv_conf_internal.h" 17 | 18 | #if LV_USE_SPINNER 19 | 20 | /*Testing of dependencies*/ 21 | #if LV_USE_ARC == 0 22 | #error "lv_spinner: lv_arc is required. Enable it in lv_conf.h (LV_USE_ARC 1) " 23 | #endif 24 | 25 | /********************* 26 | * DEFINES 27 | *********************/ 28 | 29 | /********************** 30 | * TYPEDEFS 31 | **********************/ 32 | LV_ATTRIBUTE_EXTERN_DATA extern const lv_obj_class_t lv_spinner_class; 33 | 34 | /********************** 35 | * GLOBAL PROTOTYPES 36 | **********************/ 37 | 38 | /** 39 | * Create a spinner widget 40 | * @param parent pointer to an object, it will be the parent of the new spinner. 41 | * @return the created spinner 42 | */ 43 | lv_obj_t * lv_spinner_create(lv_obj_t * parent); 44 | 45 | /** 46 | * Set the animation time and arc length of the spinner 47 | * @param obj pointer to a spinner 48 | * @param t the animation time in milliseconds 49 | * @param angle the angle of the arc in degrees 50 | */ 51 | void lv_spinner_set_anim_params(lv_obj_t * obj, uint32_t t, uint32_t angle); 52 | 53 | /********************** 54 | * MACROS 55 | **********************/ 56 | 57 | #endif /*LV_USE_SPINNER*/ 58 | 59 | #ifdef __cplusplus 60 | } /*extern "C"*/ 61 | #endif 62 | 63 | #endif /*LV_SPINNER_H*/ 64 | -------------------------------------------------------------------------------- /1.Software/third_party/lvgl/lvgl/src/widgets/switch/lv_switch.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_switch.h 3 | * 4 | */ 5 | 6 | #ifndef LV_SWITCH_H 7 | #define LV_SWITCH_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #include "../../lv_conf_internal.h" 17 | 18 | #if LV_USE_SWITCH != 0 19 | 20 | #include "../../core/lv_obj.h" 21 | 22 | /********************* 23 | * DEFINES 24 | *********************/ 25 | 26 | /** Switch knob extra area correction factor */ 27 | #define _LV_SWITCH_KNOB_EXT_AREA_CORRECTION 2 28 | 29 | /********************** 30 | * TYPEDEFS 31 | **********************/ 32 | 33 | typedef struct { 34 | lv_obj_t obj; 35 | int32_t anim_state; 36 | } lv_switch_t; 37 | 38 | LV_ATTRIBUTE_EXTERN_DATA extern const lv_obj_class_t lv_switch_class; 39 | 40 | /********************** 41 | * GLOBAL PROTOTYPES 42 | **********************/ 43 | 44 | /** 45 | * Create a switch object 46 | * @param parent pointer to an object, it will be the parent of the new switch 47 | * @return pointer to the created switch 48 | */ 49 | lv_obj_t * lv_switch_create(lv_obj_t * parent); 50 | 51 | /********************** 52 | * MACROS 53 | **********************/ 54 | 55 | #endif /*LV_USE_SWITCH*/ 56 | 57 | #ifdef __cplusplus 58 | } /*extern "C"*/ 59 | #endif 60 | 61 | #endif /*LV_SWITCH_H*/ 62 | -------------------------------------------------------------------------------- /1.Software/third_party/lvgl/lvgl/src/widgets/win/lv_win.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_win.h 3 | * 4 | */ 5 | 6 | #ifndef LV_WIN_H 7 | #define LV_WIN_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #include "../../lv_conf_internal.h" 17 | #if LV_USE_WIN 18 | /********************* 19 | * DEFINES 20 | *********************/ 21 | 22 | /********************** 23 | * TYPEDEFS 24 | **********************/ 25 | typedef struct { 26 | lv_obj_t obj; 27 | } lv_win_t; 28 | 29 | LV_ATTRIBUTE_EXTERN_DATA extern const lv_obj_class_t lv_win_class; 30 | 31 | /********************** 32 | * GLOBAL PROTOTYPES 33 | **********************/ 34 | 35 | lv_obj_t * lv_win_create(lv_obj_t * parent); 36 | 37 | lv_obj_t * lv_win_add_title(lv_obj_t * win, const char * txt); 38 | lv_obj_t * lv_win_add_button(lv_obj_t * win, const void * icon, int32_t btn_w); 39 | 40 | lv_obj_t * lv_win_get_header(lv_obj_t * win); 41 | lv_obj_t * lv_win_get_content(lv_obj_t * win); 42 | /********************** 43 | * MACROS 44 | **********************/ 45 | #endif /*LV_USE_WIN*/ 46 | #ifdef __cplusplus 47 | } /*extern "C"*/ 48 | #endif 49 | 50 | #endif /*LV_WIN_H*/ 51 | -------------------------------------------------------------------------------- /1.Software/third_party/rt-thread/components/libc/compilers/common/cctype.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006-2022, RT-Thread Development Team 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Change Logs: 7 | * Date Author Notes 8 | * 2022-06-07 Meco Man The first version. 9 | */ 10 | 11 | #include "posix/ctype.h" 12 | 13 | #if !(defined(__ICCARM__) && (__VER__ > 9000000)) /* IAR9.0 has defined */ 14 | #ifndef isascii /* some toolchain use macro to define it */ 15 | int isascii(int c) 16 | { 17 | return c >= 0x00 && c <= 0x7f; 18 | } 19 | #endif 20 | #endif /* !(defined(__ICCARM__) && (__VER__ > 9000000)) */ 21 | 22 | #ifndef toascii 23 | int toascii(int c) 24 | { 25 | return (c)&0177; 26 | } 27 | #endif 28 | -------------------------------------------------------------------------------- /1.Software/third_party/rt-thread/components/libc/compilers/common/extension/sys/types.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006-2022, RT-Thread Development Team 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Change Logs: 7 | * Date Author Notes 8 | * 2020-09-05 Meco Man fix bugs 9 | * 2020-12-16 Meco Man add useconds_t 10 | */ 11 | 12 | #ifndef __SYS_TYPES_H__ 13 | #define __SYS_TYPES_H__ 14 | 15 | #include 16 | #include 17 | #include 18 | 19 | #ifdef __cplusplus 20 | extern "C" { 21 | #endif 22 | 23 | typedef int32_t clockid_t; 24 | typedef int32_t key_t; /* Used for interprocess communication. */ 25 | typedef int pid_t; /* Used for process IDs and process group IDs. */ 26 | typedef unsigned short uid_t; 27 | typedef unsigned short gid_t; 28 | typedef signed long off_t; 29 | typedef int mode_t; 30 | typedef signed long ssize_t; /* Used for a count of bytes or an error indication. */ 31 | typedef unsigned long __timer_t; 32 | typedef __timer_t timer_t; 33 | typedef long suseconds_t; /* microseconds. */ 34 | typedef unsigned long useconds_t; /* microseconds (unsigned) */ 35 | 36 | typedef unsigned long dev_t; 37 | 38 | typedef unsigned int u_int; 39 | typedef unsigned char u_char; 40 | typedef unsigned long u_long; 41 | 42 | #ifdef __cplusplus 43 | } 44 | #endif 45 | 46 | #endif 47 | -------------------------------------------------------------------------------- /1.Software/third_party/rt-thread/components/libc/compilers/common/include/compiler_private.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006-2022, RT-Thread Development Team 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Change Logs: 7 | * Date Author Notes 8 | * 2021-12-26 Meco Man First Version 9 | */ 10 | 11 | #ifndef __COMPILER_PRIVATE_H__ 12 | #define __COMPILER_PRIVATE_H__ 13 | 14 | #define _WARNING_WITHOUT_FS "Please enable RT_USING_POSIX_FS" 15 | #define _WARNING_WITHOUT_STDIO "Please enable RT_USING_POSIX_FS and RT_USING_POSIX_STDIO" 16 | 17 | #endif /* __COMPILER_PRIVATE_H__ */ 18 | -------------------------------------------------------------------------------- /1.Software/third_party/rt-thread/components/libc/compilers/common/include/posix/ctype.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006-2022, RT-Thread Development Team 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Change Logs: 7 | * Date Author Notes 8 | * 2022-06-07 Meco Man The first version. 9 | */ 10 | 11 | #ifndef __POSIX_CTYPE_H__ 12 | #define __POSIX_CTYPE_H__ 13 | 14 | #ifdef __cplusplus 15 | extern "C" { 16 | #endif 17 | 18 | #include 19 | 20 | #if !(defined(__ICCARM__) && (__VER__ > 9000000)) /* IAR9.0 has defined */ 21 | #ifndef isascii /* some toolchain use macro to define it */ 22 | int isascii(int c); 23 | #endif 24 | #endif /* !(defined(__ICCARM__) && (__VER__ > 9000000)) */ 25 | 26 | #ifndef toascii 27 | int toascii(int c); 28 | #endif 29 | 30 | #ifdef __cplusplus 31 | } 32 | #endif 33 | 34 | #endif /* __POSIX_CTYPE_H__ */ 35 | -------------------------------------------------------------------------------- /1.Software/third_party/rt-thread/components/libc/compilers/common/include/posix/stdio.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006-2022, RT-Thread Development Team 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Change Logs: 7 | * Date Author Notes 8 | * 2022-06-07 Meco Man first version 9 | */ 10 | 11 | #ifndef __POSIX_STDIO_H__ 12 | #define __POSIX_STDIO_H__ 13 | 14 | #ifdef __cplusplus 15 | extern "C" { 16 | #endif 17 | 18 | #include 19 | #include 20 | 21 | #ifdef DFS_USING_POSIX 22 | ssize_t getdelim(char **lineptr, size_t *n, int delim, FILE *stream); 23 | ssize_t getline(char **lineptr, size_t *n, FILE *stream); 24 | #endif /* DFS_USING_POSIX */ 25 | 26 | #ifdef __cplusplus 27 | } 28 | #endif 29 | 30 | #endif /* __POSIX_STDIO_H__ */ 31 | -------------------------------------------------------------------------------- /1.Software/third_party/rt-thread/components/libc/compilers/common/include/posix/stdlib.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006-2022, RT-Thread Development Team 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Change Logs: 7 | * Date Author Notes 8 | * 2022-06-07 Meco Man The first version. 9 | */ 10 | 11 | #ifndef __POSIX_STDLIB_H__ 12 | #define __POSIX_STDLIB_H__ 13 | 14 | #ifdef __cplusplus 15 | extern "C" { 16 | #endif 17 | 18 | #include 19 | #include 20 | 21 | char *itoa(int n, char *buffer, int radix); 22 | char *lltoa(int64_t ll, char *buffer, int radix); 23 | char *ltoa(long l, char *buffer, int radix); 24 | char *ulltoa(uint64_t ll, char *buffer, int radix); 25 | char *ultoa(unsigned long l, char *buffer, int radix); 26 | char *utoa(unsigned int n, char *buffer, int radix); 27 | 28 | #ifdef __cplusplus 29 | } 30 | #endif 31 | 32 | #endif /* __POSIX_STDLIB_H__ */ 33 | -------------------------------------------------------------------------------- /1.Software/third_party/rt-thread/components/libc/compilers/common/include/posix/string.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006-2022, RT-Thread Development Team 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Change Logs: 7 | * Date Author Notes 8 | * 2022-01-12 Meco Man The first version. 9 | */ 10 | 11 | #ifndef __POSIX_STRING_H__ 12 | #define __POSIX_STRING_H__ 13 | 14 | #ifdef __cplusplus 15 | extern "C" { 16 | #endif 17 | 18 | #include 19 | #include 20 | 21 | void bzero(void * s, size_t n); 22 | void bcopy(const void * src, void * dest, size_t n); 23 | int bcmp(const void * s1, const void * s2, size_t n); 24 | void explicit_bzero(void * s, size_t n); 25 | char *index(const char * s, int c); 26 | char *rindex(const char * s, int c); 27 | int ffs(int i); 28 | int ffsl(long i); 29 | int ffsll(long long i); 30 | void *memrchr(const void* ptr, int ch, size_t pos); 31 | size_t strnlen(const char *s, size_t maxlen); 32 | char* strchrnul(const char *s, int c); 33 | int strcasecmp(const char * s1, const char * s2); 34 | int strncasecmp(const char * s1, const char * s2, size_t n); 35 | char *strdup(const char *s); 36 | char *strndup(const char *s, size_t size); 37 | char *strtok_r(char *str, const char *delim, char **saveptr); 38 | 39 | #ifdef __cplusplus 40 | } 41 | #endif 42 | 43 | #endif /* __POSIX_STRING_H__ */ 44 | -------------------------------------------------------------------------------- /1.Software/third_party/rt-thread/components/libc/compilers/common/include/posix/wchar.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006-2022, RT-Thread Development Team 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Change Logs: 7 | * Date Author Notes 8 | * 2022-06-07 Meco Man The first version 9 | */ 10 | 11 | #ifndef __POSIX_WCHAR_H__ 12 | #define __POSIX_WCHAR_H__ 13 | 14 | #ifdef __cplusplus 15 | extern "C" { 16 | #endif 17 | 18 | #include 19 | 20 | int wcwidth(wchar_t); 21 | int wcswidth(const wchar_t*, size_t); 22 | 23 | #ifdef __cplusplus 24 | } 25 | #endif 26 | 27 | #endif /* __POSIX_WCHAR_H__ */ 28 | -------------------------------------------------------------------------------- /1.Software/third_party/rt-thread/components/libc/compilers/common/include/sys/statfs.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006-2022, RT-Thread Development Team 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Change Logs: 7 | * Date Author Notes 8 | * 2023-03-27 xqyjlj adapt musl 9 | */ 10 | 11 | #ifndef __SYS_STATFS_H__ 12 | #define __SYS_STATFS_H__ 13 | 14 | #include 15 | 16 | #ifdef __cplusplus 17 | extern "C" { 18 | #endif 19 | 20 | #ifdef RT_USING_MUSLLIBC 21 | /* this is required for musl */ 22 | #ifndef _POSIX_SOURCE 23 | #define _POSIX_SOURCE 24 | #include_next 25 | /* limiting influence of _POSIX_SOURCE */ 26 | #undef _POSIX_SOURCE 27 | 28 | #else /* def _POSIX_SOURCE */ 29 | #include_next 30 | #endif 31 | #else 32 | struct statfs 33 | { 34 | size_t f_bsize; /* block size */ 35 | size_t f_blocks; /* total data blocks in file system */ 36 | size_t f_bfree; /* free blocks in file system */ 37 | size_t f_bavail; /* free blocks available to unprivileged user*/ 38 | }; 39 | 40 | int statfs(const char *path, struct statfs *buf); 41 | int fstatfs(int fd, struct statfs *buf); 42 | 43 | #endif 44 | 45 | #ifdef __cplusplus 46 | } 47 | #endif 48 | 49 | #endif 50 | -------------------------------------------------------------------------------- /1.Software/third_party/rt-thread/components/libc/compilers/common/include/sys/utsname.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006-2023, RT-Thread Development Team 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Change Logs: 7 | * Date Author Notes 8 | * 2023-03-27 xqyjlj add uname 9 | */ 10 | 11 | #ifndef __SYS_UTSNAME_H__ 12 | #define __SYS_UTSNAME_H__ 13 | 14 | #ifdef __cplusplus 15 | extern "C" { 16 | #endif 17 | 18 | #ifdef RT_USING_MUSLLIBC 19 | /* this is required for musl */ 20 | #ifndef _POSIX_SOURCE 21 | #define _POSIX_SOURCE 22 | #include_next 23 | /* limiting influence of _POSIX_SOURCE */ 24 | #undef _POSIX_SOURCE 25 | 26 | #else /* def _POSIX_SOURCE */ 27 | #include_next 28 | #endif 29 | #else 30 | 31 | struct utsname 32 | { 33 | char sysname[65]; 34 | char nodename[65]; 35 | char release[65]; 36 | char version[65]; 37 | char machine[65]; 38 | char domainname[65]; 39 | }; 40 | 41 | int uname(struct utsname *); 42 | 43 | #endif 44 | 45 | #ifdef __cplusplus 46 | } 47 | #endif 48 | 49 | #endif 50 | -------------------------------------------------------------------------------- /1.Software/third_party/rt-thread/components/libc/compilers/common/include/sys/vfs.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006-2022, RT-Thread Development Team 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Change Logs: 7 | * Date Author Notes 8 | * 2021-09-11 Meco Man First version 9 | */ 10 | 11 | #ifndef __SYS_VFS_H__ 12 | #define __SYS_VFS_H__ 13 | 14 | #include "statfs.h" /* */ 15 | 16 | #endif 17 | -------------------------------------------------------------------------------- /1.Software/third_party/rt-thread/components/libc/compilers/common/include/unistd.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006-2023, RT-Thread Development Team 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Change Logs: 7 | * Date Author Notes 8 | * 2023/06/08 Bernard Add macro definition for `#pragma once` 9 | */ 10 | 11 | #ifndef UNISTD_H__ 12 | #define UNISTD_H__ 13 | 14 | #include "sys/unistd.h" 15 | 16 | #ifndef F_OK 17 | #define F_OK 0 18 | #endif 19 | 20 | #ifndef R_OK 21 | #define R_OK 4 22 | #endif 23 | 24 | #ifndef W_OK 25 | #define W_OK 2 26 | #endif 27 | 28 | #ifndef X_OK 29 | #define X_OK 1 30 | #endif 31 | 32 | #endif /* UNISTD_H__ */ 33 | -------------------------------------------------------------------------------- /1.Software/third_party/rt-thread/components/libc/compilers/newlib/fcntl.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006-2021, RT-Thread Development Team 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Change Logs: 7 | * Date Author Notes 8 | * 2021-09-02 Meco Man First version 9 | */ 10 | 11 | #ifndef __FCNTL_H__ 12 | #define __FCNTL_H__ 13 | 14 | #include 15 | 16 | #ifndef O_EXEC 17 | #define O_EXEC 0x400000 18 | #endif 19 | 20 | #ifndef O_TMPFILE 21 | #define O_TMPFILE 0x800000 22 | #endif 23 | 24 | #ifndef O_BINARY 25 | #define O_BINARY 0x10000 26 | #endif 27 | 28 | #ifndef O_NOFOLLOW 29 | #define O_NOFOLLOW 0x100000 30 | #endif 31 | 32 | #ifndef O_DIRECTORY 33 | #define O_DIRECTORY 0x200000 34 | #endif 35 | 36 | #endif 37 | -------------------------------------------------------------------------------- /1.Software/third_party/rt-thread/components/libc/compilers/newlib/machine/time.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006-2021, RT-Thread Development Team 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Change Logs: 7 | * Date Author Notes 8 | * 2021-02-16 Meco Man The first version 9 | */ 10 | 11 | #ifndef _MACHTIME_H_ 12 | #define _MACHTIME_H_ 13 | 14 | #include 15 | #define _CLOCKS_PER_SEC_ RT_TICK_PER_SECOND 16 | 17 | #endif /* _MACHTIME_H_ */ 18 | -------------------------------------------------------------------------------- /1.Software/third_party/rt-thread/include/rtconfig.h: -------------------------------------------------------------------------------- 1 | #ifndef RT_CONFIG_H__ 2 | #define RT_CONFIG_H__ 3 | 4 | /* Automatically generated file; DO NOT EDIT. */ 5 | /* RT-Thread Configuration */ 6 | 7 | /* RT-Thread Kernel */ 8 | #define RT_NAME_MAX 16 9 | #define RT_ALIGN_SIZE 4 10 | //#define RT_THREAD_PRIORITY_32 11 | #define RT_THREAD_PRIORITY_MAX 10 12 | #define RT_TICK_PER_SECOND 1000 13 | //#define RT_USING_OVERFLOW_CHECK 14 | #define RT_USING_HOOK 15 | #define RT_HOOK_USING_FUNC_PTR 16 | //#define RT_USING_IDLE_HOOK 17 | //#define RT_IDLE_HOOK_LIST_SIZE 4 18 | //#define IDLE_THREAD_STACK_SIZE 256 19 | #define RT_USING_TIMER_SOFT 20 | #define RT_TIMER_THREAD_PRIO 4 21 | #define RT_TIMER_THREAD_STACK_SIZE 512 22 | #define RT_USING_LIBC 23 | #define RT_USING_CACHE 24 | 25 | /* Inter-Thread communication */ 26 | #define RT_USING_SEMAPHORE 27 | #define RT_USING_MUTEX 28 | // #define RT_USING_EVENT 29 | #define RT_USING_MAILBOX 30 | #define RT_USING_MESSAGEQUEUE 31 | 32 | /* Memory Management */ 33 | //#define RT_USING_MEMPOOL 34 | #define RT_USING_SMALL_MEM 35 | #define RT_USING_SMALL_MEM_AS_HEAP 36 | #define RT_USING_HEAP 37 | 38 | /* RT-Thread Components */ 39 | #define RT_USING_COMPONENTS_INIT 40 | #define RT_USING_USER_MAIN 41 | #define RT_MAIN_THREAD_STACK_SIZE 256 42 | #define RT_MAIN_THREAD_PRIORITY 3 43 | 44 | 45 | #endif 46 | -------------------------------------------------------------------------------- /1.Software/third_party/rt-thread/include/rtm.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006-2021, RT-Thread Development Team 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Change Logs: 7 | * Date Author Notes 8 | */ 9 | 10 | #ifndef __RTM_H__ 11 | #define __RTM_H__ 12 | 13 | #include 14 | #include 15 | 16 | #ifdef RT_USING_MODULE 17 | struct rt_module_symtab 18 | { 19 | void *addr; 20 | const char *name; 21 | }; 22 | 23 | #if defined(_MSC_VER) 24 | #pragma section("RTMSymTab$f",read) 25 | #define RTM_EXPORT(symbol) \ 26 | __declspec(allocate("RTMSymTab$f"))const char __rtmsym_##symbol##_name[] = "__vs_rtm_"#symbol; 27 | #pragma comment(linker, "/merge:RTMSymTab=mytext") 28 | 29 | #elif defined(__MINGW32__) 30 | #define RTM_EXPORT(symbol) 31 | 32 | #else 33 | #define RTM_EXPORT(symbol) \ 34 | const char __rtmsym_##symbol##_name[] rt_section(".rodata.name") = #symbol; \ 35 | const struct rt_module_symtab __rtmsym_##symbol rt_section("RTMSymTab")= \ 36 | { \ 37 | (void *)&symbol, \ 38 | __rtmsym_##symbol##_name \ 39 | }; 40 | #endif 41 | 42 | #else 43 | #define RTM_EXPORT(symbol) 44 | #endif 45 | 46 | #endif 47 | -------------------------------------------------------------------------------- /1.Software/third_party/rt-thread/libcpu/f1c100s/cpu.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006-2021, RT-Thread Development Team 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Change Logs: 7 | * Date Author Notes 8 | * 2018-02-08 RT-Thread the first version 9 | */ 10 | 11 | #include 12 | #include 13 | 14 | rt_weak void machine_reset(void) 15 | { 16 | rt_kprintf("reboot system...\n"); 17 | rt_hw_interrupt_disable(); 18 | while (1); 19 | } 20 | 21 | rt_weak void machine_shutdown(void) 22 | { 23 | rt_kprintf("shutdown...\n"); 24 | rt_hw_interrupt_disable(); 25 | while (1); 26 | } 27 | 28 | -------------------------------------------------------------------------------- /1.Software/third_party/rt-thread/libcpu/f1c100s/cpuport.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006-2020, RT-Thread Development Team 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Change Logs: 7 | * Date Author Notes 8 | */ 9 | 10 | #ifndef CPUPORT_H__ 11 | #define CPUPORT_H__ 12 | 13 | #ifdef RT_USING_SMP 14 | typedef union { 15 | unsigned long slock; 16 | struct __arch_tickets { 17 | unsigned short owner; 18 | unsigned short next; 19 | } tickets; 20 | } rt_hw_spinlock_t; 21 | #endif 22 | 23 | #endif /*CPUPORT_H__*/ 24 | -------------------------------------------------------------------------------- /1.Software/tools/code-format.cfg: -------------------------------------------------------------------------------- 1 | --style=allman 2 | --indent=spaces=2 3 | --indent-classes 4 | --indent-switches 5 | --indent-cases 6 | --indent-preproc-block 7 | --indent-preproc-define 8 | --indent-col1-comments 9 | --pad-oper 10 | --unpad-paren 11 | --align-pointer=middle 12 | --align-reference=middle 13 | --convert-tabs 14 | --max-code-length=120 15 | --break-after-logical 16 | --break-closing-braces 17 | --attach-closing-while 18 | --min-conditional-indent=0 19 | --max-continuation-indent=120 20 | --mode=c 21 | --lineend=linux 22 | --suffix=none 23 | --preserve-date 24 | --formatted 25 | --ignore-exclude-errors 26 | --ignore-exclude-errors-x 27 | --exclude=../third_party 28 | -------------------------------------------------------------------------------- /1.Software/tools/code-format.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | import os 4 | 5 | # print("\nFormatting demos") 6 | os.system('astyle --options=code-format.cfg --recursive "../*.c,*.h"') 7 | -------------------------------------------------------------------------------- /1.Software/tools/libusb-1.0.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lhdjply/f1c200s_library/8c92dfe21f338a180f4b68cd51b275c589efe3b9/1.Software/tools/libusb-1.0.dll -------------------------------------------------------------------------------- /1.Software/tools/libwinpthread-1.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lhdjply/f1c200s_library/8c92dfe21f338a180f4b68cd51b275c589efe3b9/1.Software/tools/libwinpthread-1.dll -------------------------------------------------------------------------------- /1.Software/tools/mksunxi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lhdjply/f1c200s_library/8c92dfe21f338a180f4b68cd51b275c589efe3b9/1.Software/tools/mksunxi -------------------------------------------------------------------------------- /1.Software/tools/mksunxi.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lhdjply/f1c200s_library/8c92dfe21f338a180f4b68cd51b275c589efe3b9/1.Software/tools/mksunxi.exe -------------------------------------------------------------------------------- /1.Software/tools/sunxi-fel: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lhdjply/f1c200s_library/8c92dfe21f338a180f4b68cd51b275c589efe3b9/1.Software/tools/sunxi-fel -------------------------------------------------------------------------------- /1.Software/tools/sunxi-fel.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lhdjply/f1c200s_library/8c92dfe21f338a180f4b68cd51b275c589efe3b9/1.Software/tools/sunxi-fel.exe -------------------------------------------------------------------------------- /1.Software/tools/xfel: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lhdjply/f1c200s_library/8c92dfe21f338a180f4b68cd51b275c589efe3b9/1.Software/tools/xfel -------------------------------------------------------------------------------- /1.Software/tools/xfel.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lhdjply/f1c200s_library/8c92dfe21f338a180f4b68cd51b275c589efe3b9/1.Software/tools/xfel.exe -------------------------------------------------------------------------------- /1.Software/user/common.h: -------------------------------------------------------------------------------- 1 | #ifndef USER_COMMON_H_ 2 | #define USER_COMMON_H_ 3 | 4 | #include "rtthread.h" 5 | #include "stdio.h" 6 | #include "stdlib.h" 7 | #include "stdbool.h" 8 | #include "sys.h" 9 | #include "delay.h" 10 | #include "gpio.h" 11 | #include "uart.h" 12 | #include "sd3031.h" 13 | #include "sdcard.h" 14 | #include "w25qxx.h" 15 | #include "w25nxx.h" 16 | #include "lcd.h" 17 | #include "wdog.h" 18 | #include "myresource.h" 19 | #include "lv_port_disp.h" 20 | #include "lv_port_indev.h" 21 | #include "lv_port_fs.h" 22 | #include "usbh_msc_config.h" 23 | #include "usbd_msc_config.h" 24 | #include "ff.h" 25 | 26 | #define SET_RX_Len 500 27 | #define SET_TX_Len 500 28 | 29 | #define TEST_USB_MODE_HOST 0 30 | #define TEST_USB_MODE_DEVICE 1 31 | #define TEST_USB_MODE TEST_USB_MODE_HOST 32 | 33 | typedef enum 34 | { 35 | FLASH_TYPE_SPI_NOR = 0, 36 | FLASH_TYPE_SPI_NAND, 37 | } FLASH_TYPE; 38 | 39 | typedef struct 40 | { 41 | RTC_TIME real_time; 42 | uint8_t lcd_brightness; 43 | FLASH_TYPE flash_type; 44 | FRESULT sd_res; 45 | uint8_t sd_write_ok_flag; 46 | #if TEST_USB_MODE==TEST_USB_MODE_HOST 47 | FRESULT usb_res; 48 | uint8_t usb_write_ok_flag; 49 | #endif 50 | } DATA; 51 | 52 | typedef struct 53 | { 54 | uint32_t count; 55 | uint32_t len; 56 | uint32_t time; 57 | uint8_t receiving_flag; 58 | uint8_t receive_complete_flag; 59 | uint8_t RXD_BUF[SET_RX_Len]; 60 | uint8_t TXD_BUF[SET_TX_Len]; 61 | } UART_DATA; // 串口数据 62 | 63 | #endif /* USER_COMMON_H_ */ 64 | -------------------------------------------------------------------------------- /2.Hardware/f1c200s测试板V1.1.eprj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lhdjply/f1c200s_library/8c92dfe21f338a180f4b68cd51b275c589efe3b9/2.Hardware/f1c200s测试板V1.1.eprj -------------------------------------------------------------------------------- /2.Hardware/元器件材料清单.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lhdjply/f1c200s_library/8c92dfe21f338a180f4b68cd51b275c589efe3b9/2.Hardware/元器件材料清单.pdf -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 lhdjply 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Version: -------------------------------------------------------------------------------- 1 | V1.0.0 --------------------------------------------------------------------------------