├── KiCAD
├── BOM_V1.xlsx
├── DIY_generator_schematics.pdf
├── Files
│ ├── AD9833module.dcm
│ ├── AD9833module.lib
│ ├── Analog.sch
│ ├── Analog.sch-bak
│ ├── ESP32-WROOM-32.pretty
│ │ └── ESP32-WROOM-32.kicad_mod
│ ├── FinalPCB-cache.lib
│ ├── FinalPCB-rescue.dcm
│ ├── FinalPCB-rescue.lib
│ ├── FinalPCB.kicad_pcb
│ ├── FinalPCB.kicad_pcb-bak
│ ├── FinalPCB.net
│ ├── FinalPCB.pretty
│ │ ├── AD9833_module.kicad_mod
│ │ ├── Relay_DPDT_Omron_G6K-2F-Y.kicad_mod
│ │ ├── Switch.kicad_mod
│ │ ├── User_FPC_40pin_05pitch_BottomContact.kicad_mod
│ │ ├── User_FPC_4pin_05pitch_bot_cont.kicad_mod
│ │ ├── User_FPC_4pin_05pitch_top_cont.kicad_mod
│ │ └── User_FPC_6pin_05pitch_top_cont.kicad_mod
│ ├── FinalPCB.pro
│ ├── FinalPCB.sch
│ ├── FinalPCB.sch-bak
│ ├── LV52117.pretty
│ │ └── LV52117QA.kicad_mod
│ ├── LV52117QA.dcm
│ ├── LV52117QA.lib
│ ├── MCU.sch
│ ├── MCU.sch-bak
│ ├── MCU2.sch
│ ├── MCU2.sch-bak
│ ├── Power.sch
│ ├── Power.sch-bak
│ ├── SMA_Samtec
│ │ └── SMA_Samtec_SMA-J-P-X-ST-EM1_EdgeMount.kicad_mod
│ ├── Type-C.pretty
│ │ ├── .gitattributes
│ │ ├── .gitignore
│ │ ├── 12401598E4#2A.kicad_mod
│ │ ├── HRO TYPE-C-31-M-12.step
│ │ ├── HRO-3DSettings.png
│ │ ├── HRO-TYPE-C-31-M-12-Assembly.kicad_mod
│ │ ├── HRO-TYPE-C-31-M-12-HandSoldering.kicad_mod
│ │ ├── HRO-TYPE-C-31-M-12.kicad_mod
│ │ ├── HRO-TYPE-C-31-M-13.kicad_mod
│ │ ├── README.md
│ │ ├── Type-C.bak
│ │ ├── Type-C.bck
│ │ ├── Type-C.dcm
│ │ ├── Type-C.lib
│ │ ├── USB_C_GCT_USB4085.kicad_mod
│ │ ├── Wurth-632723300011-HandSoldering.kicad_mod
│ │ ├── Wurth-632723300011-MaximumExtensionMount.kicad_mod
│ │ └── Wurth-632723300011.kicad_mod
│ ├── fp-info-cache
│ ├── fp-lib-table
│ ├── gerber
│ │ ├── FinalPCB-B_Cu.gbr
│ │ ├── FinalPCB-B_Mask.gbr
│ │ ├── FinalPCB-B_SilkS.gbr
│ │ ├── FinalPCB-Edge_Cuts.gbr
│ │ ├── FinalPCB-F_Cu.gbr
│ │ ├── FinalPCB-F_Mask.gbr
│ │ ├── FinalPCB-F_SilkS.gbr
│ │ └── FinalPCB.drl
│ └── sym-lib-table
└── gerberV1.zip
├── LICENSE
├── PlatformIO
└── DIY_Signal_Generator_V1
│ ├── .gitignore
│ ├── .travis.yml
│ ├── .vscode
│ └── extensions.json
│ ├── include
│ ├── README
│ ├── clear.h
│ ├── index.h
│ ├── reboot.h
│ ├── reset.h
│ ├── setting.h
│ └── setup.h
│ ├── lib
│ ├── AD9833
│ │ ├── ad9833.cpp
│ │ └── ad9833.h
│ ├── BQ24295
│ │ ├── bq24295.cpp
│ │ └── bq24295.h
│ ├── OTA
│ │ ├── ota.cpp
│ │ └── ota.h
│ ├── README
│ ├── TFT_eSPI
│ │ ├── .gitattributes
│ │ ├── .gitignore
│ │ ├── Extensions
│ │ │ ├── Button.cpp
│ │ │ ├── Button.h
│ │ │ ├── Smooth_font.cpp
│ │ │ ├── Smooth_font.h
│ │ │ ├── Sprite.cpp
│ │ │ ├── Sprite.h
│ │ │ ├── Touch.cpp
│ │ │ └── Touch.h
│ │ ├── Fonts
│ │ │ ├── Custom
│ │ │ │ ├── Orbitron_Light_24.h
│ │ │ │ ├── Orbitron_Light_32.h
│ │ │ │ ├── Roboto_Thin_24.h
│ │ │ │ ├── Satisfy_24.h
│ │ │ │ └── Yellowtail_32.h
│ │ │ ├── Font16.c
│ │ │ ├── Font16.h
│ │ │ ├── Font32rle.c
│ │ │ ├── Font32rle.h
│ │ │ ├── Font64rle.c
│ │ │ ├── Font64rle.h
│ │ │ ├── Font72rle.c
│ │ │ ├── Font72rle.h
│ │ │ ├── Font72x53rle.c
│ │ │ ├── Font72x53rle.h
│ │ │ ├── Font7srle.c
│ │ │ ├── Font7srle.h
│ │ │ ├── GFXFF
│ │ │ │ ├── FreeMono12pt7b.h
│ │ │ │ ├── FreeMono18pt7b.h
│ │ │ │ ├── FreeMono24pt7b.h
│ │ │ │ ├── FreeMono9pt7b.h
│ │ │ │ ├── FreeMonoBold12pt7b.h
│ │ │ │ ├── FreeMonoBold18pt7b.h
│ │ │ │ ├── FreeMonoBold24pt7b.h
│ │ │ │ ├── FreeMonoBold9pt7b.h
│ │ │ │ ├── FreeMonoBoldOblique12pt7b.h
│ │ │ │ ├── FreeMonoBoldOblique18pt7b.h
│ │ │ │ ├── FreeMonoBoldOblique24pt7b.h
│ │ │ │ ├── FreeMonoBoldOblique9pt7b.h
│ │ │ │ ├── FreeMonoOblique12pt7b.h
│ │ │ │ ├── FreeMonoOblique18pt7b.h
│ │ │ │ ├── FreeMonoOblique24pt7b.h
│ │ │ │ ├── FreeMonoOblique9pt7b.h
│ │ │ │ ├── FreeSans12pt7b.h
│ │ │ │ ├── FreeSans18pt7b.h
│ │ │ │ ├── FreeSans24pt7b.h
│ │ │ │ ├── FreeSans9pt7b.h
│ │ │ │ ├── FreeSansBold12pt7b.h
│ │ │ │ ├── FreeSansBold18pt7b.h
│ │ │ │ ├── FreeSansBold24pt7b.h
│ │ │ │ ├── FreeSansBold9pt7b.h
│ │ │ │ ├── FreeSansBoldOblique12pt7b.h
│ │ │ │ ├── FreeSansBoldOblique18pt7b.h
│ │ │ │ ├── FreeSansBoldOblique24pt7b.h
│ │ │ │ ├── FreeSansBoldOblique9pt7b.h
│ │ │ │ ├── FreeSansOblique12pt7b.h
│ │ │ │ ├── FreeSansOblique18pt7b.h
│ │ │ │ ├── FreeSansOblique24pt7b.h
│ │ │ │ ├── FreeSansOblique9pt7b.h
│ │ │ │ ├── FreeSerif12pt7b.h
│ │ │ │ ├── FreeSerif18pt7b.h
│ │ │ │ ├── FreeSerif24pt7b.h
│ │ │ │ ├── FreeSerif9pt7b.h
│ │ │ │ ├── FreeSerifBold12pt7b.h
│ │ │ │ ├── FreeSerifBold18pt7b.h
│ │ │ │ ├── FreeSerifBold24pt7b.h
│ │ │ │ ├── FreeSerifBold9pt7b.h
│ │ │ │ ├── FreeSerifBoldItalic12pt7b.h
│ │ │ │ ├── FreeSerifBoldItalic18pt7b.h
│ │ │ │ ├── FreeSerifBoldItalic24pt7b.h
│ │ │ │ ├── FreeSerifBoldItalic9pt7b.h
│ │ │ │ ├── FreeSerifItalic12pt7b.h
│ │ │ │ ├── FreeSerifItalic18pt7b.h
│ │ │ │ ├── FreeSerifItalic24pt7b.h
│ │ │ │ ├── FreeSerifItalic9pt7b.h
│ │ │ │ ├── TomThumb.h
│ │ │ │ ├── gfxfont.h
│ │ │ │ ├── license.txt
│ │ │ │ └── print.txt
│ │ │ ├── TrueType
│ │ │ │ └── Not_yet_supported.txt
│ │ │ └── glcdfont.c
│ │ ├── Processors
│ │ │ ├── TFT_eSPI_ESP32.c
│ │ │ ├── TFT_eSPI_ESP32.h
│ │ │ ├── TFT_eSPI_Generic.c
│ │ │ └── TFT_eSPI_Generic.h
│ │ ├── README.md
│ │ ├── README.txt
│ │ ├── TFT_Drivers
│ │ │ ├── R61581_Defines.h
│ │ │ ├── R61581_Init.h
│ │ │ └── R61581_Rotation.h
│ │ ├── TFT_eSPI.cpp
│ │ ├── TFT_eSPI.h
│ │ ├── User_Setup.h
│ │ ├── User_Setup_Select.h
│ │ ├── User_Setups
│ │ │ ├── SetupX_Template.h
│ │ │ └── User_Custom_Fonts.h
│ │ ├── keywords.txt
│ │ ├── library.json
│ │ ├── library.properties
│ │ └── license.txt
│ ├── device
│ │ ├── device-wifi.cpp
│ │ ├── device-wifi.h
│ │ ├── device.cpp
│ │ └── device.h
│ ├── generator
│ │ ├── calibration.h
│ │ ├── generator.cpp
│ │ └── generator.h
│ ├── lcd_interface
│ │ ├── lcd_interface.cpp
│ │ └── lcd_interface.h
│ ├── lvgl
│ │ ├── .github
│ │ │ └── stale.yml
│ │ ├── .gitignore
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── examples
│ │ │ ├── ESP32_TFT_eSPI
│ │ │ │ └── ESP32_TFT_eSPI.ino
│ │ │ ├── ESP32_TFT_eSPI_Slider
│ │ │ │ ├── Callbacks.ino
│ │ │ │ ├── ESP32_TFT_eSPI_Slider.ino
│ │ │ │ ├── Loop.ino
│ │ │ │ ├── Readme.md
│ │ │ │ └── Setup.ino
│ │ │ └── STM32_TFT_eSPI_Slider
│ │ │ │ ├── Readme.md
│ │ │ │ ├── STM32_TFT_eSPI_Slider.ino
│ │ │ │ └── photo_2020-04-02_01-55-36.jpg
│ │ ├── extras
│ │ │ └── img
│ │ │ │ └── lvglarduino.jpg
│ │ ├── keywords.txt
│ │ ├── library.json
│ │ ├── library.properties
│ │ ├── lv_conf.h
│ │ └── src
│ │ │ ├── CHANGELOG.md
│ │ │ ├── LICENCE.txt
│ │ │ ├── README.md
│ │ │ ├── docs
│ │ │ ├── CODE_OF_CONDUCT.md
│ │ │ ├── CODING_STYLE.md
│ │ │ └── CONTRIBUTING.md
│ │ │ ├── library.json
│ │ │ ├── lv_conf_template.h
│ │ │ ├── lvgl.h
│ │ │ ├── lvgl.mk
│ │ │ ├── porting
│ │ │ ├── lv_port_disp_template.c
│ │ │ ├── lv_port_disp_template.h
│ │ │ ├── lv_port_fs_template.c
│ │ │ ├── lv_port_fs_template.h
│ │ │ ├── lv_port_indev_template.c
│ │ │ └── lv_port_indev_template.h
│ │ │ ├── scripts
│ │ │ ├── Doxyfile
│ │ │ ├── built_in_font
│ │ │ │ ├── DejaVuSans.ttf
│ │ │ │ ├── FontAwesome5-Solid+Brands+Regular.woff
│ │ │ │ ├── Montserrat-Medium.ttf
│ │ │ │ ├── SimSun.woff
│ │ │ │ ├── built_in_font_gen.py
│ │ │ │ └── generate_all.py
│ │ │ ├── code-format.cfg
│ │ │ ├── code-format.sh
│ │ │ ├── cppcheck_run.sh
│ │ │ ├── infer_run.sh
│ │ │ ├── lv_conf_checker.py
│ │ │ └── release_patch.py
│ │ │ ├── src
│ │ │ ├── lv_api_map.h
│ │ │ ├── lv_conf_internal.h
│ │ │ ├── lv_core
│ │ │ │ ├── lv_core.mk
│ │ │ │ ├── lv_disp.c
│ │ │ │ ├── lv_disp.h
│ │ │ │ ├── lv_group.c
│ │ │ │ ├── lv_group.h
│ │ │ │ ├── lv_indev.c
│ │ │ │ ├── lv_indev.h
│ │ │ │ ├── lv_obj.c
│ │ │ │ ├── lv_obj.h
│ │ │ │ ├── lv_obj_style_dec.h
│ │ │ │ ├── lv_refr.c
│ │ │ │ ├── lv_refr.h
│ │ │ │ ├── lv_style.c
│ │ │ │ └── lv_style.h
│ │ │ ├── lv_draw
│ │ │ │ ├── lv_draw.h
│ │ │ │ ├── lv_draw.mk
│ │ │ │ ├── lv_draw_arc.c
│ │ │ │ ├── lv_draw_arc.h
│ │ │ │ ├── lv_draw_blend.c
│ │ │ │ ├── lv_draw_blend.h
│ │ │ │ ├── lv_draw_img.c
│ │ │ │ ├── lv_draw_img.h
│ │ │ │ ├── lv_draw_label.c
│ │ │ │ ├── lv_draw_label.h
│ │ │ │ ├── lv_draw_line.c
│ │ │ │ ├── lv_draw_line.h
│ │ │ │ ├── lv_draw_mask.c
│ │ │ │ ├── lv_draw_mask.h
│ │ │ │ ├── lv_draw_rect.c
│ │ │ │ ├── lv_draw_rect.h
│ │ │ │ ├── lv_draw_triangle.c
│ │ │ │ ├── lv_draw_triangle.h
│ │ │ │ ├── lv_img_buf.c
│ │ │ │ ├── lv_img_buf.h
│ │ │ │ ├── lv_img_cache.c
│ │ │ │ ├── lv_img_cache.h
│ │ │ │ ├── lv_img_decoder.c
│ │ │ │ └── lv_img_decoder.h
│ │ │ ├── lv_font
│ │ │ │ ├── lv_font.c
│ │ │ │ ├── lv_font.h
│ │ │ │ ├── lv_font.mk
│ │ │ │ ├── lv_font_dejavu_16_persian_hebrew.c
│ │ │ │ ├── lv_font_fmt_txt.c
│ │ │ │ ├── lv_font_fmt_txt.h
│ │ │ │ ├── lv_font_loader.c
│ │ │ │ ├── lv_font_loader.h
│ │ │ │ ├── lv_font_montserrat_12.c
│ │ │ │ ├── lv_font_montserrat_12_subpx.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_simsun_16_cjk.c
│ │ │ │ ├── lv_font_unscii_8.c
│ │ │ │ └── lv_symbol_def.h
│ │ │ ├── lv_gpu
│ │ │ │ ├── lv_gpu.mk
│ │ │ │ ├── lv_gpu_stm32_dma2d.c
│ │ │ │ └── lv_gpu_stm32_dma2d.h
│ │ │ ├── lv_hal
│ │ │ │ ├── lv_hal.h
│ │ │ │ ├── lv_hal.mk
│ │ │ │ ├── lv_hal_disp.c
│ │ │ │ ├── lv_hal_disp.h
│ │ │ │ ├── lv_hal_indev.c
│ │ │ │ ├── lv_hal_indev.h
│ │ │ │ ├── lv_hal_tick.c
│ │ │ │ └── lv_hal_tick.h
│ │ │ ├── lv_misc
│ │ │ │ ├── lv_anim.c
│ │ │ │ ├── lv_anim.h
│ │ │ │ ├── lv_area.c
│ │ │ │ ├── lv_area.h
│ │ │ │ ├── lv_async.c
│ │ │ │ ├── lv_async.h
│ │ │ │ ├── lv_bidi.c
│ │ │ │ ├── lv_bidi.h
│ │ │ │ ├── lv_color.c
│ │ │ │ ├── lv_color.h
│ │ │ │ ├── lv_debug.c
│ │ │ │ ├── lv_debug.h
│ │ │ │ ├── lv_fs.c
│ │ │ │ ├── lv_fs.h
│ │ │ │ ├── lv_gc.c
│ │ │ │ ├── lv_gc.h
│ │ │ │ ├── lv_ll.c
│ │ │ │ ├── lv_ll.h
│ │ │ │ ├── lv_log.c
│ │ │ │ ├── lv_log.h
│ │ │ │ ├── lv_math.c
│ │ │ │ ├── lv_math.h
│ │ │ │ ├── lv_mem.c
│ │ │ │ ├── lv_mem.h
│ │ │ │ ├── lv_misc.mk
│ │ │ │ ├── lv_printf.c
│ │ │ │ ├── lv_printf.h
│ │ │ │ ├── lv_task.c
│ │ │ │ ├── lv_task.h
│ │ │ │ ├── lv_templ.c
│ │ │ │ ├── lv_templ.h
│ │ │ │ ├── lv_txt.c
│ │ │ │ ├── lv_txt.h
│ │ │ │ ├── lv_txt_ap.c
│ │ │ │ ├── lv_txt_ap.h
│ │ │ │ ├── lv_types.h
│ │ │ │ ├── lv_utils.c
│ │ │ │ └── lv_utils.h
│ │ │ ├── lv_themes
│ │ │ │ ├── lv_theme.c
│ │ │ │ ├── lv_theme.h
│ │ │ │ ├── lv_theme_empty.c
│ │ │ │ ├── lv_theme_empty.h
│ │ │ │ ├── lv_theme_material.c
│ │ │ │ ├── lv_theme_material.h
│ │ │ │ ├── lv_theme_mono.c
│ │ │ │ ├── lv_theme_mono.h
│ │ │ │ ├── lv_theme_template.c
│ │ │ │ ├── lv_theme_template.h
│ │ │ │ └── lv_themes.mk
│ │ │ ├── lv_widgets
│ │ │ │ ├── lv_arc.c
│ │ │ │ ├── lv_arc.h
│ │ │ │ ├── lv_bar.c
│ │ │ │ ├── lv_bar.h
│ │ │ │ ├── lv_btn.c
│ │ │ │ ├── lv_btn.h
│ │ │ │ ├── lv_btnmatrix.c
│ │ │ │ ├── lv_btnmatrix.h
│ │ │ │ ├── lv_calendar.c
│ │ │ │ ├── lv_calendar.h
│ │ │ │ ├── lv_canvas.c
│ │ │ │ ├── lv_canvas.h
│ │ │ │ ├── lv_chart.c
│ │ │ │ ├── lv_chart.h
│ │ │ │ ├── lv_checkbox.c
│ │ │ │ ├── lv_checkbox.h
│ │ │ │ ├── lv_cont.c
│ │ │ │ ├── lv_cont.h
│ │ │ │ ├── lv_cpicker.c
│ │ │ │ ├── lv_cpicker.h
│ │ │ │ ├── lv_dropdown.c
│ │ │ │ ├── lv_dropdown.h
│ │ │ │ ├── lv_gauge.c
│ │ │ │ ├── lv_gauge.h
│ │ │ │ ├── lv_img.c
│ │ │ │ ├── lv_img.h
│ │ │ │ ├── lv_imgbtn.c
│ │ │ │ ├── lv_imgbtn.h
│ │ │ │ ├── lv_keyboard.c
│ │ │ │ ├── lv_keyboard.h
│ │ │ │ ├── lv_label.c
│ │ │ │ ├── lv_label.h
│ │ │ │ ├── lv_led.c
│ │ │ │ ├── lv_led.h
│ │ │ │ ├── lv_line.c
│ │ │ │ ├── lv_line.h
│ │ │ │ ├── lv_linemeter.c
│ │ │ │ ├── lv_linemeter.h
│ │ │ │ ├── lv_list.c
│ │ │ │ ├── lv_list.h
│ │ │ │ ├── lv_msgbox.c
│ │ │ │ ├── lv_msgbox.h
│ │ │ │ ├── lv_objmask.c
│ │ │ │ ├── lv_objmask.h
│ │ │ │ ├── lv_objx_templ.c
│ │ │ │ ├── lv_objx_templ.h
│ │ │ │ ├── lv_page.c
│ │ │ │ ├── lv_page.h
│ │ │ │ ├── lv_roller.c
│ │ │ │ ├── lv_roller.h
│ │ │ │ ├── lv_slider.c
│ │ │ │ ├── lv_slider.h
│ │ │ │ ├── lv_spinbox.c
│ │ │ │ ├── lv_spinbox.h
│ │ │ │ ├── lv_spinner.c
│ │ │ │ ├── lv_spinner.h
│ │ │ │ ├── lv_switch.c
│ │ │ │ ├── lv_switch.h
│ │ │ │ ├── lv_table.c
│ │ │ │ ├── lv_table.h
│ │ │ │ ├── lv_tabview.c
│ │ │ │ ├── lv_tabview.h
│ │ │ │ ├── lv_textarea.c
│ │ │ │ ├── lv_textarea.h
│ │ │ │ ├── lv_tileview.c
│ │ │ │ ├── lv_tileview.h
│ │ │ │ ├── lv_widgets.mk
│ │ │ │ ├── lv_win.c
│ │ │ │ └── lv_win.h
│ │ │ └── lvgl.h
│ │ │ └── tests
│ │ │ ├── Makefile
│ │ │ ├── build.py
│ │ │ ├── icon.png
│ │ │ ├── icon2.png
│ │ │ ├── lv_test_assert.c
│ │ │ ├── lv_test_assert.h
│ │ │ ├── lv_test_conf.h
│ │ │ ├── lv_test_core
│ │ │ ├── lv_test_core.c
│ │ │ ├── lv_test_core.h
│ │ │ ├── lv_test_obj.c
│ │ │ ├── lv_test_obj.h
│ │ │ ├── lv_test_style.c
│ │ │ └── lv_test_style.h
│ │ │ ├── lv_test_main.c
│ │ │ ├── lv_test_objx
│ │ │ ├── lv_test_cont.c
│ │ │ └── lv_test_cont.h
│ │ │ └── lv_test_ref_imgs
│ │ │ └── lv_test_obj_1_1.png
│ └── touch_drv
│ │ ├── touch_drv.cpp
│ │ └── touch_drv.h
│ ├── platformio.ini
│ └── src
│ └── main.cpp
└── README.md
/KiCAD/BOM_V1.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/daumemo/DIY-Signal-Generator/7b449094d92bef584b805de9c50e9535e7786d8f/KiCAD/BOM_V1.xlsx
--------------------------------------------------------------------------------
/KiCAD/DIY_generator_schematics.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/daumemo/DIY-Signal-Generator/7b449094d92bef584b805de9c50e9535e7786d8f/KiCAD/DIY_generator_schematics.pdf
--------------------------------------------------------------------------------
/KiCAD/Files/AD9833module.dcm:
--------------------------------------------------------------------------------
1 | EESchema-DOCLIB Version 2.0
2 | #
3 | #End Doc Library
4 |
--------------------------------------------------------------------------------
/KiCAD/Files/AD9833module.lib:
--------------------------------------------------------------------------------
1 | EESchema-LIBRARY Version 2.4
2 | #encoding utf-8
3 | #
4 | # AD9833_module
5 | #
6 | DEF AD9833_module U 0 40 Y Y 1 F N
7 | F0 "U" -100 450 50 H V C CNN
8 | F1 "AD9833_module" 150 -450 50 H V C CNN
9 | F2 "" 0 0 50 H I C CNN
10 | F3 "" 0 0 50 H I C CNN
11 | DRAW
12 | C 300 -300 50 0 1 0 N
13 | C 300 300 50 0 1 0 N
14 | S -150 400 400 -400 0 1 0 N
15 | X VCC 1 -350 300 200 R 50 50 1 1 U
16 | X DGND 2 -350 200 200 R 50 50 1 1 U
17 | X SDATA 3 -350 100 200 R 50 50 1 1 U
18 | X SCLK 4 -350 0 200 R 50 50 1 1 U
19 | X FSYNC 5 -350 -100 200 R 50 50 1 1 U
20 | X AGND 6 -350 -200 200 R 50 50 1 1 U
21 | X OUT 7 -350 -300 200 R 50 50 1 1 U
22 | ENDDRAW
23 | ENDDEF
24 | #
25 | #End Library
26 |
--------------------------------------------------------------------------------
/KiCAD/Files/FinalPCB-rescue.dcm:
--------------------------------------------------------------------------------
1 | EESchema-DOCLIB Version 2.0
2 | #
3 | #End Doc Library
4 |
--------------------------------------------------------------------------------
/KiCAD/Files/FinalPCB.pretty/AD9833_module.kicad_mod:
--------------------------------------------------------------------------------
1 | (module AD9833_module (layer F.Cu) (tedit 5E8B36BF)
2 | (fp_text reference REF** (at 4.4 -3) (layer F.SilkS)
3 | (effects (font (size 1 1) (thickness 0.15)))
4 | )
5 | (fp_text value AD9833_module (at 9.525 0 90) (layer F.Fab)
6 | (effects (font (size 1 1) (thickness 0.15)))
7 | )
8 | (fp_line (start 11.43 8.89) (end -1.905 8.89) (layer F.SilkS) (width 0.15))
9 | (fp_line (start 11.43 -8.89) (end 11.43 8.89) (layer F.SilkS) (width 0.15))
10 | (fp_line (start -1.905 -8.89) (end 11.43 -8.89) (layer F.SilkS) (width 0.15))
11 | (fp_line (start -1.905 8.89) (end -1.905 -8.89) (layer F.SilkS) (width 0.15))
12 | (pad 7 thru_hole circle (at 0 7.62) (size 1.9 1.9) (drill 1.1) (layers *.Cu *.Mask))
13 | (pad 6 thru_hole circle (at 0 5.08) (size 1.9 1.9) (drill 1.1) (layers *.Cu *.Mask))
14 | (pad 5 thru_hole circle (at 0 2.54) (size 1.9 1.9) (drill 1.1) (layers *.Cu *.Mask))
15 | (pad 4 thru_hole circle (at 0 0) (size 1.9 1.9) (drill 1.1) (layers *.Cu *.Mask))
16 | (pad 3 thru_hole circle (at 0 -2.54) (size 1.9 1.9) (drill 1.1) (layers *.Cu *.Mask))
17 | (pad 2 thru_hole circle (at 0 -5.08) (size 1.9 1.9) (drill 1.1) (layers *.Cu *.Mask))
18 | (pad 1 thru_hole circle (at 0 -7.62) (size 1.9 1.9) (drill 1.1) (layers *.Cu *.Mask))
19 | )
20 |
--------------------------------------------------------------------------------
/KiCAD/Files/FinalPCB.pretty/Relay_DPDT_Omron_G6K-2F-Y.kicad_mod:
--------------------------------------------------------------------------------
1 | (module Relay_DPDT_Omron_G6K-2F-Y (layer F.Cu) (tedit 5A565DE2)
2 | (descr "Omron G6K-2F-Y relay package http://omronfs.omron.com/en_US/ecb/products/pdf/en-g6k.pdf")
3 | (tags "Omron G6K-2F-Y relay")
4 | (attr smd)
5 | (fp_text reference REF** (at 0 -6) (layer F.SilkS)
6 | (effects (font (size 1 1) (thickness 0.15)))
7 | )
8 | (fp_text value Relay_DPDT_Omron_G6K-2F-Y (at -0.04 6.3) (layer F.Fab)
9 | (effects (font (size 1 1) (thickness 0.15)))
10 | )
11 | (fp_text user %R (at 0.01 0) (layer F.Fab)
12 | (effects (font (size 1 1) (thickness 0.15)))
13 | )
14 | (fp_line (start -3.3 -3.09) (end -3.9 -3.09) (layer F.SilkS) (width 0.12))
15 | (fp_line (start -3.3 -4.59) (end -3.9 -4.59) (layer F.SilkS) (width 0.12))
16 | (fp_line (start -3.3 -5.09) (end -3.3 -4.59) (layer F.SilkS) (width 0.12))
17 | (fp_line (start -3.3 -1.69) (end -3.3 -3.09) (layer F.SilkS) (width 0.12))
18 | (fp_line (start -3.34 0.8) (end -3.34 0) (layer F.SilkS) (width 0.12))
19 | (fp_line (start -3.34 3) (end -3.34 2.4) (layer F.SilkS) (width 0.12))
20 | (fp_line (start -3.34 5.1) (end -3.34 4.6) (layer F.SilkS) (width 0.12))
21 | (fp_line (start 3.36 5.1) (end -3.34 5.1) (layer F.SilkS) (width 0.12))
22 | (fp_line (start 3.36 4.6) (end 3.36 5.1) (layer F.SilkS) (width 0.12))
23 | (fp_line (start 3.36 2.4) (end 3.36 3) (layer F.SilkS) (width 0.12))
24 | (fp_line (start 3.36 0) (end 3.36 0.8) (layer F.SilkS) (width 0.12))
25 | (fp_line (start 3.36 -3) (end 3.36 -1.6) (layer F.SilkS) (width 0.12))
26 | (fp_line (start 3.36 -5.1) (end 3.36 -4.6) (layer F.SilkS) (width 0.12))
27 | (fp_line (start -3.3 -5.09) (end 3.36 -5.1) (layer F.SilkS) (width 0.12))
28 | (fp_line (start -3.24 -4) (end -2.24 -5) (layer F.Fab) (width 0.12))
29 | (fp_line (start -3.24 5) (end -3.24 -4) (layer F.Fab) (width 0.12))
30 | (fp_line (start 3.26 5) (end -3.24 5) (layer F.Fab) (width 0.12))
31 | (fp_line (start 3.26 -5) (end 3.26 5) (layer F.Fab) (width 0.12))
32 | (fp_line (start -2.24 -5) (end 3.26 -5) (layer F.Fab) (width 0.12))
33 | (fp_line (start -4.65 -5.25) (end 4.65 -5.25) (layer F.CrtYd) (width 0.05))
34 | (fp_line (start -4.65 -5.25) (end -4.65 5.25) (layer F.CrtYd) (width 0.05))
35 | (fp_line (start 4.65 5.25) (end 4.65 -5.25) (layer F.CrtYd) (width 0.05))
36 | (fp_line (start 4.65 5.25) (end -4.65 5.25) (layer F.CrtYd) (width 0.05))
37 | (pad 8 smd rect (at 3.5 -3.8) (size 1.8 0.8) (layers F.Cu F.Paste F.Mask))
38 | (pad 7 smd rect (at 3.5 -0.6) (size 1.8 0.8) (layers F.Cu F.Paste F.Mask))
39 | (pad 6 smd rect (at 3.5 1.6) (size 1.8 0.8) (layers F.Cu F.Paste F.Mask))
40 | (pad 5 smd rect (at 3.5 3.8) (size 1.8 0.8) (layers F.Cu F.Paste F.Mask))
41 | (pad 4 smd rect (at -3.5 3.8) (size 1.8 0.8) (layers F.Cu F.Paste F.Mask))
42 | (pad 3 smd rect (at -3.5 1.6) (size 1.8 0.8) (layers F.Cu F.Paste F.Mask))
43 | (pad 2 smd rect (at -3.5 -0.6) (size 1.8 0.8) (layers F.Cu F.Paste F.Mask))
44 | (pad 1 smd rect (at -3.5 -3.8) (size 1.8 0.8) (layers F.Cu F.Paste F.Mask))
45 | (model ${KISYS3DMOD}/Relay_SMD.3dshapes/Relay_DPDT_Omron_G6K-2F-Y.wrl
46 | (at (xyz 0 0 0))
47 | (scale (xyz 1 1 1))
48 | (rotate (xyz 0 0 0))
49 | )
50 | )
51 |
--------------------------------------------------------------------------------
/KiCAD/Files/FinalPCB.pretty/Switch.kicad_mod:
--------------------------------------------------------------------------------
1 | (module Switch (layer F.Cu) (tedit 5E8B34F6)
2 | (fp_text reference REF** (at 4.75 -4) (layer F.SilkS)
3 | (effects (font (size 1 1) (thickness 0.15)))
4 | )
5 | (fp_text value Switch (at -3.5 -4) (layer F.Fab)
6 | (effects (font (size 1 1) (thickness 0.15)))
7 | )
8 | (fp_line (start 6.4 0) (end 0 0) (layer F.Fab) (width 0.12))
9 | (fp_line (start 6.4 -6.4) (end 6.4 0) (layer F.Fab) (width 0.12))
10 | (fp_line (start -6.4 -6.4) (end 6.4 -6.4) (layer F.Fab) (width 0.12))
11 | (fp_line (start -6.4 0) (end -6.4 -6.4) (layer F.Fab) (width 0.12))
12 | (fp_line (start 0 0) (end -6.4 0) (layer F.Fab) (width 0.12))
13 | (fp_line (start 0 -9) (end 0 -6.4) (layer F.Fab) (width 0.12))
14 | (fp_line (start -2.8 -9) (end 0 -9) (layer F.Fab) (width 0.12))
15 | (fp_line (start -2.8 -6.4) (end -2.8 -9) (layer F.Fab) (width 0.12))
16 | (fp_line (start -5 2) (end -4.2 2) (layer F.Fab) (width 0.12))
17 | (fp_line (start 4.2 6) (end 4.2 0) (layer F.Fab) (width 0.12))
18 | (fp_line (start 5 6) (end 4.2 6) (layer F.Fab) (width 0.12))
19 | (fp_line (start 5 0) (end 5 6) (layer F.Fab) (width 0.12))
20 | (fp_line (start 4.2 2) (end 5 2) (layer F.Fab) (width 0.12))
21 | (fp_line (start -0.4 2) (end 0.4 2) (layer F.Fab) (width 0.12))
22 | (fp_line (start 0.4 6) (end 0.4 0) (layer F.Fab) (width 0.12))
23 | (fp_line (start -0.4 6) (end 0.4 6) (layer F.Fab) (width 0.12))
24 | (fp_line (start -0.4 0) (end -0.4 6) (layer F.Fab) (width 0.12))
25 | (fp_line (start -4.2 6) (end -4.2 0) (layer F.Fab) (width 0.12))
26 | (fp_line (start -5 6) (end -4.2 6) (layer F.Fab) (width 0.12))
27 | (fp_line (start -5 0) (end -5 6) (layer F.Fab) (width 0.12))
28 | (pad 3 smd rect (at 3.8 4) (size 3 4) (layers F.Cu F.Paste F.Mask))
29 | (pad 2 smd rect (at 0 4) (size 3 4) (layers F.Cu F.Paste F.Mask))
30 | (pad 1 smd rect (at -3.8 4) (size 3 4) (layers F.Cu F.Paste F.Mask))
31 | )
32 |
--------------------------------------------------------------------------------
/KiCAD/Files/FinalPCB.pretty/User_FPC_4pin_05pitch_bot_cont.kicad_mod:
--------------------------------------------------------------------------------
1 | (module User_FPC_4pin_05pitch_bot_cont (layer F.Cu) (tedit 5E8B2B05)
2 | (fp_text reference User_FPC_4pin_05pitch (at -1 -3.75) (layer F.SilkS)
3 | (effects (font (size 1 1) (thickness 0.15)))
4 | )
5 | (fp_text value VAL** (at 5.75 -1.5) (layer F.SilkS)
6 | (effects (font (size 1 1) (thickness 0.15)))
7 | )
8 | (fp_line (start 3.4 0) (end 3.4 2.4) (layer F.SilkS) (width 0.15))
9 | (fp_line (start 3.4 2.4) (end 3.4 2.9) (layer F.SilkS) (width 0.15))
10 | (fp_line (start 3.4 2.9) (end 4.4 2.9) (layer F.SilkS) (width 0.15))
11 | (fp_line (start 4.4 2.9) (end 4.4 3.9) (layer F.SilkS) (width 0.15))
12 | (fp_line (start 4.4 3.9) (end -0.5 3.9) (layer F.SilkS) (width 0.15))
13 | (fp_line (start -3.4 0) (end -3.4 2.9) (layer F.SilkS) (width 0.15))
14 | (fp_line (start -3.4 2.9) (end -4.4 2.9) (layer F.SilkS) (width 0.15))
15 | (fp_line (start -4.4 2.9) (end -4.4 3.9) (layer F.SilkS) (width 0.15))
16 | (fp_line (start -4.4 3.9) (end -0.5 3.9) (layer F.SilkS) (width 0.15))
17 | (fp_line (start 3.4 0) (end 3.4 -1.2) (layer F.SilkS) (width 0.15))
18 | (fp_line (start 3.4 -1.2) (end -0.5 -1.2) (layer F.SilkS) (width 0.15))
19 | (fp_line (start -3.4 0) (end -3.4 -1.2) (layer F.SilkS) (width 0.15))
20 | (fp_line (start -3.4 -1.2) (end -0.5 -1.2) (layer F.SilkS) (width 0.15))
21 | (pad 1 smd rect (at -0.75 -1.75) (size 0.3 2) (layers F.Cu F.Paste F.Mask)
22 | (clearance 0.15))
23 | (pad 2 smd rect (at -0.25 -1.75) (size 0.3 2) (layers F.Cu F.Paste F.Mask)
24 | (clearance 0.15))
25 | (pad 3 smd rect (at 0.25 -1.75) (size 0.3 2) (layers F.Cu F.Paste F.Mask)
26 | (clearance 0.15))
27 | (pad 4 smd rect (at 0.75 -1.75) (size 0.3 2) (layers F.Cu F.Paste F.Mask)
28 | (clearance 0.15))
29 | (pad gnd smd rect (at -3.5 1) (size 2.5 3) (layers F.Cu F.Paste F.Mask))
30 | (pad gnd1 smd rect (at 3.5 1) (size 2.5 3) (layers F.Cu F.Paste F.Mask))
31 | )
32 |
--------------------------------------------------------------------------------
/KiCAD/Files/FinalPCB.pretty/User_FPC_4pin_05pitch_top_cont.kicad_mod:
--------------------------------------------------------------------------------
1 | (module User_FPC_4pin_05pitch_top_cont (layer F.Cu) (tedit 5E8B2B32)
2 | (fp_text reference User_FPC_4pin_05pitch (at -1 -3.75) (layer F.SilkS)
3 | (effects (font (size 1 1) (thickness 0.15)))
4 | )
5 | (fp_text value VAL** (at 5.75 -1.5) (layer F.SilkS)
6 | (effects (font (size 1 1) (thickness 0.15)))
7 | )
8 | (fp_line (start 3.4 0) (end 3.4 2.4) (layer F.SilkS) (width 0.15))
9 | (fp_line (start 3.4 2.4) (end 3.4 2.9) (layer F.SilkS) (width 0.15))
10 | (fp_line (start 3.4 2.9) (end 4.4 2.9) (layer F.SilkS) (width 0.15))
11 | (fp_line (start 4.4 2.9) (end 4.4 3.9) (layer F.SilkS) (width 0.15))
12 | (fp_line (start 4.4 3.9) (end -0.5 3.9) (layer F.SilkS) (width 0.15))
13 | (fp_line (start -3.4 0) (end -3.4 2.9) (layer F.SilkS) (width 0.15))
14 | (fp_line (start -3.4 2.9) (end -4.4 2.9) (layer F.SilkS) (width 0.15))
15 | (fp_line (start -4.4 2.9) (end -4.4 3.9) (layer F.SilkS) (width 0.15))
16 | (fp_line (start -4.4 3.9) (end -0.5 3.9) (layer F.SilkS) (width 0.15))
17 | (fp_line (start 3.4 0) (end 3.4 -1.2) (layer F.SilkS) (width 0.15))
18 | (fp_line (start 3.4 -1.2) (end -0.5 -1.2) (layer F.SilkS) (width 0.15))
19 | (fp_line (start -3.4 0) (end -3.4 -1.2) (layer F.SilkS) (width 0.15))
20 | (fp_line (start -3.4 -1.2) (end -0.5 -1.2) (layer F.SilkS) (width 0.15))
21 | (pad 1 smd rect (at 0.75 -1.75) (size 0.3 2) (layers F.Cu F.Paste F.Mask)
22 | (clearance 0.15))
23 | (pad 2 smd rect (at 0.25 -1.75) (size 0.3 2) (layers F.Cu F.Paste F.Mask)
24 | (clearance 0.15))
25 | (pad 3 smd rect (at -0.25 -1.75) (size 0.3 2) (layers F.Cu F.Paste F.Mask)
26 | (clearance 0.15))
27 | (pad 4 smd rect (at -0.75 -1.75) (size 0.3 2) (layers F.Cu F.Paste F.Mask)
28 | (clearance 0.15))
29 | (pad gnd smd rect (at -3.5 1) (size 2.5 3) (layers F.Cu F.Paste F.Mask))
30 | (pad gnd1 smd rect (at 3.5 1) (size 2.5 3) (layers F.Cu F.Paste F.Mask))
31 | )
32 |
--------------------------------------------------------------------------------
/KiCAD/Files/FinalPCB.pretty/User_FPC_6pin_05pitch_top_cont.kicad_mod:
--------------------------------------------------------------------------------
1 | (module User_FPC_6pin_05pitch_top_cont (layer F.Cu) (tedit 5E8B2ACA)
2 | (fp_text reference User_FPC_6pin_05pitch (at 0 -3.25) (layer F.SilkS)
3 | (effects (font (size 1 1) (thickness 0.15)))
4 | )
5 | (fp_text value VAL** (at 6.25 -1.5) (layer F.SilkS)
6 | (effects (font (size 1 1) (thickness 0.15)))
7 | )
8 | (fp_line (start 3.9 0) (end 3.9 2.4) (layer F.SilkS) (width 0.15))
9 | (fp_line (start 3.9 2.4) (end 3.9 2.9) (layer F.SilkS) (width 0.15))
10 | (fp_line (start 3.9 2.9) (end 4.9 2.9) (layer F.SilkS) (width 0.15))
11 | (fp_line (start 4.9 2.9) (end 4.9 3.9) (layer F.SilkS) (width 0.15))
12 | (fp_line (start 4.9 3.9) (end 0 3.9) (layer F.SilkS) (width 0.15))
13 | (fp_line (start -3.9 0) (end -3.9 2.9) (layer F.SilkS) (width 0.15))
14 | (fp_line (start -3.9 2.9) (end -4.9 2.9) (layer F.SilkS) (width 0.15))
15 | (fp_line (start -4.9 2.9) (end -4.9 3.9) (layer F.SilkS) (width 0.15))
16 | (fp_line (start -4.9 3.9) (end 0 3.9) (layer F.SilkS) (width 0.15))
17 | (fp_line (start 3.9 0) (end 3.9 -1.2) (layer F.SilkS) (width 0.15))
18 | (fp_line (start 3.9 -1.2) (end 0 -1.2) (layer F.SilkS) (width 0.15))
19 | (fp_line (start -3.9 0) (end -3.9 -1.2) (layer F.SilkS) (width 0.15))
20 | (fp_line (start -3.9 -1.2) (end 0 -1.2) (layer F.SilkS) (width 0.15))
21 | (pad 1 smd rect (at 1.25 -1.75) (size 0.3 2) (layers F.Cu F.Paste F.Mask)
22 | (clearance 0.15))
23 | (pad 2 smd rect (at 0.75 -1.75) (size 0.3 2) (layers F.Cu F.Paste F.Mask)
24 | (clearance 0.15))
25 | (pad 3 smd rect (at 0.25 -1.75) (size 0.3 2) (layers F.Cu F.Paste F.Mask)
26 | (clearance 0.15))
27 | (pad 4 smd rect (at -0.25 -1.75) (size 0.3 2) (layers F.Cu F.Paste F.Mask)
28 | (clearance 0.15))
29 | (pad 5 smd rect (at -0.75 -1.75) (size 0.3 2) (layers F.Cu F.Paste F.Mask)
30 | (clearance 0.15))
31 | (pad 6 smd rect (at -1.25 -1.75) (size 0.3 2) (layers F.Cu F.Paste F.Mask)
32 | (clearance 0.15))
33 | (pad gnd smd rect (at -3.75 1) (size 2.5 3) (layers F.Cu F.Paste F.Mask))
34 | (pad gnd1 smd rect (at 3.75 1) (size 2.5 3) (layers F.Cu F.Paste F.Mask))
35 | )
36 |
--------------------------------------------------------------------------------
/KiCAD/Files/FinalPCB.sch:
--------------------------------------------------------------------------------
1 | EESchema Schematic File Version 4
2 | LIBS:FinalPCB-cache
3 | EELAYER 30 0
4 | EELAYER END
5 | $Descr A4 11693 8268
6 | encoding utf-8
7 | Sheet 1 4
8 | Title "DIY portable Wi-Fi enabled waveform generator"
9 | Date "2020-09-14"
10 | Rev "B"
11 | Comp "daumemo.com"
12 | Comment1 ""
13 | Comment2 ""
14 | Comment3 ""
15 | Comment4 ""
16 | $EndDescr
17 | $Sheet
18 | S 950 950 1450 850
19 | U 5E861099
20 | F0 "Analog" 50
21 | F1 "Analog.sch" 50
22 | $EndSheet
23 | $Sheet
24 | S 2700 950 1450 850
25 | U 5E8611D9
26 | F0 "Power" 50
27 | F1 "Power.sch" 50
28 | $EndSheet
29 | $Sheet
30 | S 4450 950 1400 850
31 | U 5E861374
32 | F0 "MCU" 50
33 | F1 "MCU.sch" 50
34 | $EndSheet
35 | $EndSCHEMATC
36 |
--------------------------------------------------------------------------------
/KiCAD/Files/FinalPCB.sch-bak:
--------------------------------------------------------------------------------
1 | EESchema Schematic File Version 4
2 | LIBS:FinalPCB-cache
3 | EELAYER 30 0
4 | EELAYER END
5 | $Descr A4 11693 8268
6 | encoding utf-8
7 | Sheet 1 4
8 | Title "DIY portable Wi-Fi enabled waveform generator"
9 | Date "2020-09-14"
10 | Rev "B"
11 | Comp "daumemo.com"
12 | Comment1 ""
13 | Comment2 ""
14 | Comment3 ""
15 | Comment4 ""
16 | $EndDescr
17 | $Sheet
18 | S 950 950 1450 850
19 | U 5E861099
20 | F0 "Analog" 50
21 | F1 "Analog.sch" 50
22 | $EndSheet
23 | $Sheet
24 | S 2700 950 1450 850
25 | U 5E8611D9
26 | F0 "Power" 50
27 | F1 "Power.sch" 50
28 | $EndSheet
29 | $Sheet
30 | S 4450 950 1400 850
31 | U 5E861374
32 | F0 "MCU" 50
33 | F1 "MCU.sch" 50
34 | $EndSheet
35 | $EndSCHEMATC
36 |
--------------------------------------------------------------------------------
/KiCAD/Files/LV52117.pretty/LV52117QA.kicad_mod:
--------------------------------------------------------------------------------
1 | (module LV52117QA (layer F.Cu) (tedit 5DC30A06)
2 | (clearance 0.14)
3 | (attr smd)
4 | (fp_text reference REF** (at -2.15 0.5 90) (layer F.SilkS)
5 | (effects (font (size 0.6 0.6) (thickness 0.12)))
6 | )
7 | (fp_text value LV52117QA (at -0.05 -2.35) (layer F.Fab)
8 | (effects (font (size 0.6 0.6) (thickness 0.13)))
9 | )
10 | (fp_line (start -1.5 -1.5) (end 1.5 -1.5) (layer F.Fab) (width 0.08))
11 | (fp_line (start 1.5 -1.5) (end 1.5 1.5) (layer F.Fab) (width 0.08))
12 | (fp_line (start 1.5 1.5) (end -1.5 1.5) (layer F.Fab) (width 0.08))
13 | (fp_line (start -1.5 1.5) (end -1.5 -1.5) (layer F.Fab) (width 0.08))
14 | (fp_circle (center 1.8 -1.5) (end 1.9 -1.5) (layer F.SilkS) (width 0.1))
15 | (fp_line (start 1.65 -1) (end 1.65 1.65) (layer F.SilkS) (width 0.1))
16 | (fp_line (start 1.65 1.65) (end 1.4 1.65) (layer F.SilkS) (width 0.1))
17 | (fp_line (start -1.4 1.65) (end -1.65 1.65) (layer F.SilkS) (width 0.1))
18 | (fp_line (start -1.65 1.65) (end -1.65 -1.65) (layer F.SilkS) (width 0.1))
19 | (fp_line (start -1.65 -1.65) (end -1.4 -1.65) (layer F.SilkS) (width 0.1))
20 | (pad 0 smd rect (at 0 0) (size 2.4 1.7) (layers F.Cu F.Paste F.Mask))
21 | (pad 1 smd rect (at 1.125 -1.5) (size 0.3 0.7) (layers F.Cu F.Paste F.Mask))
22 | (pad 2 smd rect (at 0.675 -1.5) (size 0.3 0.7) (layers F.Cu F.Paste F.Mask))
23 | (pad 3 smd rect (at 0.225 -1.5) (size 0.3 0.7) (layers F.Cu F.Paste F.Mask))
24 | (pad 4 smd rect (at -0.225 -1.5) (size 0.3 0.7) (layers F.Cu F.Paste F.Mask))
25 | (pad 5 smd rect (at -0.675 -1.5) (size 0.3 0.7) (layers F.Cu F.Paste F.Mask))
26 | (pad 6 smd rect (at -1.125 -1.5) (size 0.3 0.7) (layers F.Cu F.Paste F.Mask))
27 | (pad 7 smd rect (at -1.125 1.5) (size 0.3 0.7) (layers F.Cu F.Paste F.Mask))
28 | (pad 8 smd rect (at -0.675 1.5) (size 0.3 0.7) (layers F.Cu F.Paste F.Mask))
29 | (pad 9 smd rect (at -0.225 1.5) (size 0.3 0.7) (layers F.Cu F.Paste F.Mask))
30 | (pad 10 smd rect (at 0.225 1.5) (size 0.3 0.7) (layers F.Cu F.Paste F.Mask))
31 | (pad 11 smd rect (at 0.675 1.5) (size 0.3 0.7) (layers F.Cu F.Paste F.Mask))
32 | (pad 12 smd rect (at 1.125 1.5) (size 0.3 0.7) (layers F.Cu F.Paste F.Mask))
33 | )
34 |
--------------------------------------------------------------------------------
/KiCAD/Files/LV52117QA.dcm:
--------------------------------------------------------------------------------
1 | EESchema-DOCLIB Version 2.0
2 | #
3 | #End Doc Library
4 |
--------------------------------------------------------------------------------
/KiCAD/Files/LV52117QA.lib:
--------------------------------------------------------------------------------
1 | EESchema-LIBRARY Version 2.4
2 | #encoding utf-8
3 | #
4 | # LV52117QA
5 | #
6 | DEF LV52117QA U 0 40 Y Y 1 F N
7 | F0 "U" -300 -550 50 H V C CNN
8 | F1 "LV52117QA" -150 500 50 H V C CNN
9 | F2 "" -50 100 50 H I C CNN
10 | F3 "" -50 100 50 H I C CNN
11 | DRAW
12 | S -350 450 300 -500 0 1 0 N
13 | X Pad 0 0 -700 200 U 50 50 1 1 U
14 | X LX1 1 -550 350 200 R 50 50 1 1 U
15 | X VDCO2 10 500 50 200 L 50 50 1 1 U
16 | X LX2 11 500 200 200 L 50 50 1 1 U
17 | X VIN 12 500 350 200 L 50 50 1 1 U
18 | X VDCO1 2 -550 200 200 R 50 50 1 1 U
19 | X PGND 3 -550 50 200 R 50 50 1 1 U
20 | X FB1 4 -550 -100 200 R 50 50 1 1 U
21 | X SGND 5 -550 -250 200 R 50 50 1 1 U
22 | X EN 6 -550 -400 200 R 50 50 1 1 U
23 | X NC 7 500 -400 200 L 50 50 1 1 U
24 | X VREF 8 500 -250 200 L 50 50 1 1 U
25 | X FB2 9 500 -100 200 L 50 50 1 1 U
26 | ENDDRAW
27 | ENDDEF
28 | #
29 | #End Library
30 |
--------------------------------------------------------------------------------
/KiCAD/Files/MCU2.sch:
--------------------------------------------------------------------------------
1 | EESchema Schematic File Version 4
2 | LIBS:AnalogFrontendV1-cache
3 | LIBS:LV52117-cache
4 | LIBS:TPS65131 12V dual psu V1-cache
5 | LIBS:BQ24295 Battery Charger-cache
6 | EELAYER 30 0
7 | EELAYER END
8 | $Descr A4 11693 8268
9 | encoding utf-8
10 | Sheet 4 4
11 | Title ""
12 | Date ""
13 | Rev ""
14 | Comp ""
15 | Comment1 ""
16 | Comment2 ""
17 | Comment3 ""
18 | Comment4 ""
19 | $EndDescr
20 | $EndSCHEMATC
21 |
--------------------------------------------------------------------------------
/KiCAD/Files/Type-C.pretty/.gitattributes:
--------------------------------------------------------------------------------
1 | # Auto detect text files and perform LF normalization
2 | * text=auto
3 |
4 | # Custom for Visual Studio
5 | *.cs diff=csharp
6 |
7 | # Standard to msysgit
8 | *.doc diff=astextplain
9 | *.DOC diff=astextplain
10 | *.docx diff=astextplain
11 | *.DOCX diff=astextplain
12 | *.dot diff=astextplain
13 | *.DOT diff=astextplain
14 | *.pdf diff=astextplain
15 | *.PDF diff=astextplain
16 | *.rtf diff=astextplain
17 | *.RTF diff=astextplain
18 |
--------------------------------------------------------------------------------
/KiCAD/Files/Type-C.pretty/.gitignore:
--------------------------------------------------------------------------------
1 | # Windows image file caches
2 | Thumbs.db
3 | ehthumbs.db
4 |
5 | # Folder config file
6 | Desktop.ini
7 |
8 | # Recycle Bin used on file shares
9 | $RECYCLE.BIN/
10 |
11 | # Windows Installer files
12 | *.cab
13 | *.msi
14 | *.msm
15 | *.msp
16 |
17 | # Windows shortcuts
18 | *.lnk
19 |
20 | # =========================
21 | # Operating System Files
22 | # =========================
23 |
24 | # OSX
25 | # =========================
26 |
27 | .DS_Store
28 | .AppleDouble
29 | .LSOverride
30 |
31 | # Thumbnails
32 | ._*
33 |
34 | # Files that might appear in the root of a volume
35 | .DocumentRevisions-V100
36 | .fseventsd
37 | .Spotlight-V100
38 | .TemporaryItems
39 | .Trashes
40 | .VolumeIcon.icns
41 |
42 | # Directories potentially created on remote AFP share
43 | .AppleDB
44 | .AppleDesktop
45 | Network Trash Folder
46 | Temporary Items
47 | .apdisk
48 |
--------------------------------------------------------------------------------
/KiCAD/Files/Type-C.pretty/HRO-3DSettings.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/daumemo/DIY-Signal-Generator/7b449094d92bef584b805de9c50e9535e7786d8f/KiCAD/Files/Type-C.pretty/HRO-3DSettings.png
--------------------------------------------------------------------------------
/KiCAD/Files/Type-C.pretty/HRO-TYPE-C-31-M-12-Assembly.kicad_mod:
--------------------------------------------------------------------------------
1 | (module HRO-TYPE-C-31-M-12-Assembly (layer F.Cu) (tedit 5C42C666)
2 | (attr smd)
3 | (fp_text reference REF** (at 0 -9.25) (layer F.SilkS)
4 | (effects (font (size 1 1) (thickness 0.15)))
5 | )
6 | (fp_text value HRO-TYPE-C-31-M-12-Assembly (at 0 1.15) (layer Dwgs.User)
7 | (effects (font (size 1 1) (thickness 0.15)))
8 | )
9 | (fp_line (start -4.47 -7.3) (end 4.47 -7.3) (layer Dwgs.User) (width 0.15))
10 | (fp_line (start 4.47 0) (end 4.47 -7.3) (layer Dwgs.User) (width 0.15))
11 | (fp_line (start -4.47 0) (end -4.47 -7.3) (layer Dwgs.User) (width 0.15))
12 | (fp_line (start -4.47 0) (end 4.47 0) (layer Dwgs.User) (width 0.15))
13 | (fp_text user %R (at 0 -9.25) (layer F.Fab)
14 | (effects (font (size 1 1) (thickness 0.15)))
15 | )
16 | (fp_line (start -4.5 -7.5) (end 4.5 -7.5) (layer F.CrtYd) (width 0.15))
17 | (fp_line (start 4.5 -7.5) (end 4.5 0) (layer F.CrtYd) (width 0.15))
18 | (fp_line (start 4.5 0) (end -4.5 0) (layer F.CrtYd) (width 0.15))
19 | (fp_line (start -4.5 0) (end -4.5 -7.5) (layer F.CrtYd) (width 0.15))
20 | (fp_line (start -3.75 -7.5) (end -3.75 -8.5) (layer F.CrtYd) (width 0.15))
21 | (fp_line (start -3.75 -8.5) (end 3.75 -8.5) (layer F.CrtYd) (width 0.15))
22 | (fp_line (start 3.75 -8.5) (end 3.75 -7.5) (layer F.CrtYd) (width 0.15))
23 | (pad 13 thru_hole oval (at 4.32 -2.6) (size 1 1.6) (drill oval 0.6 1.2) (layers *.Cu *.Mask))
24 | (pad 13 thru_hole oval (at -4.32 -2.6) (size 1 1.6) (drill oval 0.6 1.2) (layers *.Cu *.Mask))
25 | (pad 13 thru_hole oval (at 4.32 -6.78) (size 1 2.1) (drill oval 0.6 1.7) (layers *.Cu *.Mask))
26 | (pad 13 thru_hole oval (at -4.32 -6.78) (size 1 2.1) (drill oval 0.6 1.7) (layers *.Cu *.Mask))
27 | (pad "" np_thru_hole circle (at -2.89 -6.25) (size 0.65 0.65) (drill 0.65) (layers *.Cu *.Mask))
28 | (pad "" np_thru_hole circle (at 2.89 -6.25) (size 0.65 0.65) (drill 0.65) (layers *.Cu *.Mask))
29 | (pad 6 smd rect (at -0.25 -7.695) (size 0.3 1.45) (layers F.Cu F.Paste F.Mask))
30 | (pad 7 smd rect (at 0.25 -7.695) (size 0.3 1.45) (layers F.Cu F.Paste F.Mask))
31 | (pad 8 smd rect (at 0.75 -7.695) (size 0.3 1.45) (layers F.Cu F.Paste F.Mask))
32 | (pad 5 smd rect (at -0.75 -7.695) (size 0.3 1.45) (layers F.Cu F.Paste F.Mask))
33 | (pad 9 smd rect (at 1.25 -7.695) (size 0.3 1.45) (layers F.Cu F.Paste F.Mask))
34 | (pad 4 smd rect (at -1.25 -7.695) (size 0.3 1.45) (layers F.Cu F.Paste F.Mask))
35 | (pad 10 smd rect (at 1.75 -7.695) (size 0.3 1.45) (layers F.Cu F.Paste F.Mask))
36 | (pad 3 smd rect (at -1.75 -7.695) (size 0.3 1.45) (layers F.Cu F.Paste F.Mask))
37 | (pad 2 smd rect (at -2.45 -7.695) (size 0.6 1.45) (layers F.Cu F.Paste F.Mask))
38 | (pad 11 smd rect (at 2.45 -7.695) (size 0.6 1.45) (layers F.Cu F.Paste F.Mask))
39 | (pad 1 smd rect (at -3.225 -7.695) (size 0.6 1.45) (layers F.Cu F.Paste F.Mask))
40 | (pad 12 smd rect (at 3.225 -7.695) (size 0.6 1.45) (layers F.Cu F.Paste F.Mask))
41 | )
42 |
--------------------------------------------------------------------------------
/KiCAD/Files/Type-C.pretty/HRO-TYPE-C-31-M-12-HandSoldering.kicad_mod:
--------------------------------------------------------------------------------
1 | (module HRO-TYPE-C-31-M-12-HandSoldering (layer F.Cu) (tedit 5E8B60C6)
2 | (attr smd)
3 | (fp_text reference REF** (at 0 -10.2) (layer F.SilkS)
4 | (effects (font (size 1 1) (thickness 0.15)))
5 | )
6 | (fp_text value HRO-TYPE-C-31-M-12-HandSoldering (at 0 1.15) (layer Dwgs.User)
7 | (effects (font (size 1 1) (thickness 0.15)))
8 | )
9 | (fp_line (start -4.47 -7.3) (end 4.47 -7.3) (layer Dwgs.User) (width 0.15))
10 | (fp_line (start 4.47 0) (end 4.47 -7.3) (layer Dwgs.User) (width 0.15))
11 | (fp_line (start -4.47 0) (end -4.47 -7.3) (layer Dwgs.User) (width 0.15))
12 | (fp_line (start -4.47 0) (end 4.47 0) (layer Dwgs.User) (width 0.15))
13 | (pad 13 thru_hole oval (at 4.32 -2.6) (size 1 1.6) (drill oval 0.6 1.2) (layers *.Cu B.Mask))
14 | (pad 13 thru_hole oval (at -4.32 -2.6) (size 1 1.6) (drill oval 0.6 1.2) (layers *.Cu B.Mask))
15 | (pad 13 thru_hole oval (at 4.32 -6.78) (size 1 2.1) (drill oval 0.6 1.7) (layers *.Cu B.Mask))
16 | (pad 13 thru_hole oval (at -4.32 -6.78) (size 1 2.1) (drill oval 0.6 1.7) (layers *.Cu B.Mask))
17 | (pad "" np_thru_hole circle (at -2.89 -6.25) (size 0.65 0.65) (drill 0.65) (layers *.Cu *.Mask))
18 | (pad "" np_thru_hole circle (at 2.89 -6.25) (size 0.65 0.65) (drill 0.65) (layers *.Cu *.Mask))
19 | (pad A6 smd rect (at -0.25 -8.195) (size 0.3 2.45) (layers F.Cu F.Paste F.Mask))
20 | (pad A7 smd rect (at 0.25 -8.195) (size 0.3 2.45) (layers F.Cu F.Paste F.Mask))
21 | (pad B6 smd rect (at 0.75 -8.195) (size 0.3 2.45) (layers F.Cu F.Paste F.Mask))
22 | (pad B7 smd rect (at -0.75 -8.195) (size 0.3 2.45) (layers F.Cu F.Paste F.Mask))
23 | (pad A8 smd rect (at 1.25 -8.195) (size 0.3 2.45) (layers F.Cu F.Paste F.Mask))
24 | (pad A5 smd rect (at -1.25 -8.195) (size 0.3 2.45) (layers F.Cu F.Paste F.Mask))
25 | (pad B5 smd rect (at 1.75 -8.195) (size 0.3 2.45) (layers F.Cu F.Paste F.Mask))
26 | (pad B8 smd rect (at -1.75 -8.195) (size 0.3 2.45) (layers F.Cu F.Paste F.Mask))
27 | (pad A4 smd rect (at -2.45 -8.195) (size 0.6 2.45) (layers F.Cu F.Paste F.Mask))
28 | (pad A4 smd rect (at 2.45 -8.195) (size 0.6 2.45) (layers F.Cu F.Paste F.Mask))
29 | (pad A1 smd rect (at -3.225 -8.195) (size 0.6 2.45) (layers F.Cu F.Paste F.Mask))
30 | (pad A1 smd rect (at 3.225 -8.195) (size 0.6 2.45) (layers F.Cu F.Paste F.Mask))
31 | )
32 |
--------------------------------------------------------------------------------
/KiCAD/Files/Type-C.pretty/HRO-TYPE-C-31-M-12.kicad_mod:
--------------------------------------------------------------------------------
1 | (module HRO-TYPE-C-31-M-12 (layer F.Cu) (tedit 5C42C658)
2 | (attr smd)
3 | (fp_text reference REF** (at 0 -9.25) (layer F.SilkS)
4 | (effects (font (size 1 1) (thickness 0.15)))
5 | )
6 | (fp_text value HRO-TYPE-C-31-M-12 (at 0 1.15) (layer Dwgs.User)
7 | (effects (font (size 1 1) (thickness 0.15)))
8 | )
9 | (fp_line (start -4.47 -7.3) (end 4.47 -7.3) (layer Dwgs.User) (width 0.15))
10 | (fp_line (start 4.47 0) (end 4.47 -7.3) (layer Dwgs.User) (width 0.15))
11 | (fp_line (start -4.47 0) (end -4.47 -7.3) (layer Dwgs.User) (width 0.15))
12 | (fp_line (start -4.47 0) (end 4.47 0) (layer Dwgs.User) (width 0.15))
13 | (pad 13 thru_hole oval (at 4.32 -2.6) (size 1 1.6) (drill oval 0.6 1.2) (layers *.Cu B.Mask))
14 | (pad 13 thru_hole oval (at -4.32 -2.6) (size 1 1.6) (drill oval 0.6 1.2) (layers *.Cu B.Mask))
15 | (pad 13 thru_hole oval (at 4.32 -6.78) (size 1 2.1) (drill oval 0.6 1.7) (layers *.Cu B.Mask))
16 | (pad 13 thru_hole oval (at -4.32 -6.78) (size 1 2.1) (drill oval 0.6 1.7) (layers *.Cu B.Mask))
17 | (pad "" np_thru_hole circle (at -2.89 -6.25) (size 0.65 0.65) (drill 0.65) (layers *.Cu *.Mask))
18 | (pad "" np_thru_hole circle (at 2.89 -6.25) (size 0.65 0.65) (drill 0.65) (layers *.Cu *.Mask))
19 | (pad 6 smd rect (at -0.25 -7.695) (size 0.3 1.45) (layers F.Cu F.Paste F.Mask))
20 | (pad 7 smd rect (at 0.25 -7.695) (size 0.3 1.45) (layers F.Cu F.Paste F.Mask))
21 | (pad 8 smd rect (at 0.75 -7.695) (size 0.3 1.45) (layers F.Cu F.Paste F.Mask))
22 | (pad 5 smd rect (at -0.75 -7.695) (size 0.3 1.45) (layers F.Cu F.Paste F.Mask))
23 | (pad 9 smd rect (at 1.25 -7.695) (size 0.3 1.45) (layers F.Cu F.Paste F.Mask))
24 | (pad 4 smd rect (at -1.25 -7.695) (size 0.3 1.45) (layers F.Cu F.Paste F.Mask))
25 | (pad 10 smd rect (at 1.75 -7.695) (size 0.3 1.45) (layers F.Cu F.Paste F.Mask))
26 | (pad 3 smd rect (at -1.75 -7.695) (size 0.3 1.45) (layers F.Cu F.Paste F.Mask))
27 | (pad 2 smd rect (at -2.45 -7.695) (size 0.6 1.45) (layers F.Cu F.Paste F.Mask))
28 | (pad 11 smd rect (at 2.45 -7.695) (size 0.6 1.45) (layers F.Cu F.Paste F.Mask))
29 | (pad 1 smd rect (at -3.225 -7.695) (size 0.6 1.45) (layers F.Cu F.Paste F.Mask))
30 | (pad 12 smd rect (at 3.225 -7.695) (size 0.6 1.45) (layers F.Cu F.Paste F.Mask))
31 | )
32 |
--------------------------------------------------------------------------------
/KiCAD/Files/Type-C.pretty/HRO-TYPE-C-31-M-13.kicad_mod:
--------------------------------------------------------------------------------
1 | (module HRO-TYPE-C-31-M-13 (layer F.Cu) (tedit 5C5191F3)
2 | (attr smd)
3 | (fp_text reference REF** (at 0 -9.25) (layer F.SilkS)
4 | (effects (font (size 1 1) (thickness 0.15)))
5 | )
6 | (fp_text value HRO-TYPE-C-31-M-13 (at 0 1.15) (layer Dwgs.User)
7 | (effects (font (size 1 1) (thickness 0.15)))
8 | )
9 | (fp_line (start 7 0) (end 4.8 0) (layer Dwgs.User) (width 0.15))
10 | (fp_text user %R (at 0 -9.25) (layer F.Fab)
11 | (effects (font (size 1 1) (thickness 0.15)))
12 | )
13 | (fp_line (start -4.8 -6.8) (end -4.8 0) (layer F.Fab) (width 0.15))
14 | (fp_line (start 4.8 -6.8) (end 4.8 0) (layer F.Fab) (width 0.15))
15 | (fp_line (start 4.8 -6.8) (end -4.8 -6.8) (layer F.Fab) (width 0.15))
16 | (fp_line (start -4.8 0) (end -7 0) (layer Dwgs.User) (width 0.15))
17 | (fp_line (start 4.8 0) (end -4.8 0) (layer F.Fab) (width 0.15))
18 | (fp_line (start -3.6 -6.8) (end -3.6 -8.1) (layer F.Fab) (width 0.15))
19 | (fp_line (start -3.6 -8.1) (end 3.6 -8.1) (layer F.Fab) (width 0.15))
20 | (fp_line (start 3.6 -8.1) (end 3.6 -6.8) (layer F.Fab) (width 0.15))
21 | (pad 12 smd rect (at 3.2 -7.4) (size 0.6 1.15) (layers F.Cu F.Paste F.Mask))
22 | (pad 1 smd rect (at -3.2 -7.4) (size 0.6 1.15) (layers F.Cu F.Paste F.Mask))
23 | (pad 11 smd rect (at 2.4 -7.4) (size 0.6 1.15) (layers F.Cu F.Paste F.Mask))
24 | (pad 2 smd rect (at -2.4 -7.4) (size 0.6 1.15) (layers F.Cu F.Paste F.Mask))
25 | (pad 3 smd rect (at -1.75 -7.4) (size 0.3 1.15) (layers F.Cu F.Paste F.Mask))
26 | (pad 10 smd rect (at 1.75 -7.4) (size 0.3 1.15) (layers F.Cu F.Paste F.Mask))
27 | (pad 4 smd rect (at -1.25 -7.4) (size 0.3 1.15) (layers F.Cu F.Paste F.Mask))
28 | (pad 9 smd rect (at 1.25 -7.4) (size 0.3 1.15) (layers F.Cu F.Paste F.Mask))
29 | (pad 5 smd rect (at -0.75 -7.4) (size 0.3 1.15) (layers F.Cu F.Paste F.Mask))
30 | (pad 8 smd rect (at 0.75 -7.4) (size 0.3 1.15) (layers F.Cu F.Paste F.Mask))
31 | (pad 7 smd rect (at 0.25 -7.4) (size 0.3 1.15) (layers F.Cu F.Paste F.Mask))
32 | (pad 6 smd rect (at -0.25 -7.4) (size 0.3 1.15) (layers F.Cu F.Paste F.Mask))
33 | (pad 13 thru_hole oval (at -5.62 -6.1) (size 1 1.8) (drill oval 0.6 1.4) (layers *.Cu *.Mask))
34 | (pad 13 thru_hole oval (at 5.62 -6.1) (size 1 1.8) (drill oval 0.6 1.4) (layers *.Cu *.Mask))
35 | (pad 13 thru_hole oval (at -5.62 -2.1) (size 1 2.2) (drill oval 0.6 1.8) (layers *.Cu *.Mask))
36 | (pad 13 thru_hole oval (at 5.62 -2.1) (size 1 2.2) (drill oval 0.6 1.8) (layers *.Cu *.Mask))
37 | )
38 |
--------------------------------------------------------------------------------
/KiCAD/Files/Type-C.pretty/README.md:
--------------------------------------------------------------------------------
1 | # Type-C.pretty
2 | KiCad library for various Type-C USB connectors
3 |
4 | Currently included connectors:
5 |
6 | [Wurth 632723300011](https://www.digikey.com/product-detail/en/wurth-electronics-inc/632723300011/732-9618-1-ND/5806673)
7 |
8 | - 1.6mm PCB compatibility
9 | - Through-hole secondary pins; theoretically fully hand-solderable
10 | - Most expensive of the three
11 |
12 | [HRO TYPE-C-31-M-12](https://lcsc.com/product-detail/USB-Type-C_TYPE-C-31-M-12-Female-16P-SMD_C165948.html)
13 |
14 | - Extremely cheap
15 | - Simplified design with only one row; hand-solderable
16 | - Legs do not extend long enough to "officially" support 1.6mm PCBs (Can be soldered in, but legs will be shorter than PCB)
17 |
18 | [Amphenol 12401598E4#2A](https://www.digikey.com/product-detail/en/amphenol-commercial-products/12401598E4-2A/12401598E4-2ACT-ND/6051824)
19 |
20 | - 1.6mm PCB compatibility
21 | - Half the cost of the Wurth connector
22 | - Requires reflow station or similar to solder full set of SMT pins below barrel
23 |
24 | [GCT USB4085-GF-A](https://www.digikey.com/product-detail/en/gct/USB4085-GF-A/2073-USB4085-GF-ACT-ND/9859733)
25 |
26 | - Only pins for USB 2.0
27 | - All pins are through hole and are hand solderable
28 | - Data pins barely break the surface of 1.6mm PCB
29 | - Half the cost of the Amphenol
30 |
--------------------------------------------------------------------------------
/KiCAD/Files/Type-C.pretty/Type-C.bck:
--------------------------------------------------------------------------------
1 | EESchema-DOCLIB Version 2.0
2 | #
3 | #End Doc Library
4 |
--------------------------------------------------------------------------------
/KiCAD/Files/Type-C.pretty/Type-C.dcm:
--------------------------------------------------------------------------------
1 | EESchema-DOCLIB Version 2.0
2 | #
3 | #End Doc Library
4 |
--------------------------------------------------------------------------------
/KiCAD/Files/Type-C.pretty/USB_C_GCT_USB4085.kicad_mod:
--------------------------------------------------------------------------------
1 | (module Connector_USB:USB_C_USB4085 (layer F.Cu) (tedit 5C944084)
2 | (fp_text reference REF** (at 0 1.85) (layer F.SilkS)
3 | (effects (font (size 1 1) (thickness 0.15)))
4 | )
5 | (fp_text value USB_C_USB4085 (at 0 0.85) (layer F.Fab)
6 | (effects (font (size 1 1) (thickness 0.15)))
7 | )
8 | (fp_line (start 0 0) (end 0 -1.27) (layer F.SilkS) (width 0.15))
9 | (fp_line (start -4.475 2.51) (end -4.48 1.75) (layer F.SilkS) (width 0.15))
10 | (fp_line (start -4.475 2.51) (end 4.475 2.51) (layer F.SilkS) (width 0.15))
11 | (fp_line (start 4.48 1.75) (end 4.475 2.51) (layer F.SilkS) (width 0.15))
12 | (fp_line (start -4.475 -6.66) (end 4.475 -6.66) (layer F.SilkS) (width 0.15))
13 | (fp_line (start -4.625 0) (end 4.625 0) (layer F.SilkS) (width 0.15))
14 | (pad S1 thru_hole oval (at 4.325 -1.74) (size 0.9 1.7) (drill oval 0.6 1.4) (layers *.Cu *.Mask))
15 | (pad S1 thru_hole oval (at -4.325 -1.74) (size 0.9 1.7) (drill oval 0.6 1.4) (layers *.Cu *.Mask))
16 | (pad S1 thru_hole oval (at 4.325 -5.12) (size 0.9 2.4) (drill oval 0.6 2.1) (layers *.Cu *.Mask))
17 | (pad S1 thru_hole oval (at -4.325 -5.12) (size 0.9 2.4) (drill oval 0.6 2.1) (layers *.Cu *.Mask))
18 | (pad B1 thru_hole circle (at 2.98 -4.775) (size 0.65 0.65) (drill 0.4) (layers *.Cu *.Mask))
19 | (pad B4 thru_hole circle (at 2.13 -4.775) (size 0.65 0.65) (drill 0.4) (layers *.Cu *.Mask))
20 | (pad B5 thru_hole circle (at 1.28 -4.775) (size 0.65 0.65) (drill 0.4) (layers *.Cu *.Mask))
21 | (pad B6 thru_hole circle (at 0.43 -4.775) (size 0.65 0.65) (drill 0.4) (layers *.Cu *.Mask))
22 | (pad B7 thru_hole circle (at -0.42 -4.775) (size 0.65 0.65) (drill 0.4) (layers *.Cu *.Mask))
23 | (pad B8 thru_hole circle (at -1.27 -4.775) (size 0.65 0.65) (drill 0.4) (layers *.Cu *.Mask))
24 | (pad B9 thru_hole circle (at -2.12 -4.775) (size 0.65 0.65) (drill 0.4) (layers *.Cu *.Mask))
25 | (pad B12 thru_hole circle (at -2.975 -4.775) (size 0.65 0.65) (drill 0.4) (layers *.Cu *.Mask))
26 | (pad A12 thru_hole circle (at 2.975 -6.1) (size 0.65 0.65) (drill 0.4) (layers *.Cu *.Mask))
27 | (pad A9 thru_hole circle (at 2.125 -6.1) (size 0.65 0.65) (drill 0.4) (layers *.Cu *.Mask))
28 | (pad A8 thru_hole circle (at 1.275 -6.1) (size 0.65 0.65) (drill 0.4) (layers *.Cu *.Mask))
29 | (pad A7 thru_hole circle (at 0.425 -6.1) (size 0.65 0.65) (drill 0.4) (layers *.Cu *.Mask))
30 | (pad A6 thru_hole circle (at -0.425 -6.1) (size 0.65 0.65) (drill 0.4) (layers *.Cu *.Mask))
31 | (pad A4 thru_hole circle (at -2.125 -6.1) (size 0.65 0.65) (drill 0.4) (layers *.Cu *.Mask))
32 | (pad A1 thru_hole circle (at -2.975 -6.1) (size 0.65 0.65) (drill 0.4) (layers *.Cu *.Mask))
33 | (pad A5 thru_hole circle (at -1.275 -6.1) (size 0.65 0.65) (drill 0.4) (layers *.Cu *.Mask))
34 | )
35 |
--------------------------------------------------------------------------------
/KiCAD/Files/fp-lib-table:
--------------------------------------------------------------------------------
1 | (fp_lib_table
2 | (lib (name LV52117)(type KiCad)(uri ${KIPRJMOD}/LV52117.pretty)(options "")(descr ""))
3 | (lib (name ESP32-WROOM-32)(type KiCad)(uri ${KIPRJMOD}/ESP32-WROOM-32.pretty)(options "")(descr ""))
4 | (lib (name SMA_Samtec)(type KiCad)(uri ${KIPRJMOD}/SMA_Samtec)(options "")(descr ""))
5 | (lib (name FinalPCB)(type KiCad)(uri ${KIPRJMOD}/FinalPCB.pretty)(options "")(descr ""))
6 | (lib (name Type-C)(type KiCad)(uri ${KIPRJMOD}/Type-C.pretty)(options "")(descr ""))
7 | )
8 |
--------------------------------------------------------------------------------
/KiCAD/Files/gerber/FinalPCB-Edge_Cuts.gbr:
--------------------------------------------------------------------------------
1 | G04 #@! TF.GenerationSoftware,KiCad,Pcbnew,(5.1.4)-1*
2 | G04 #@! TF.CreationDate,2020-09-15T19:50:09+03:00*
3 | G04 #@! TF.ProjectId,FinalPCB,46696e61-6c50-4434-922e-6b696361645f,rev?*
4 | G04 #@! TF.SameCoordinates,Original*
5 | G04 #@! TF.FileFunction,Profile,NP*
6 | %FSLAX46Y46*%
7 | G04 Gerber Fmt 4.6, Leading zero omitted, Abs format (unit mm)*
8 | G04 Created by KiCad (PCBNEW (5.1.4)-1) date 2020-09-15 19:50:09*
9 | %MOMM*%
10 | %LPD*%
11 | G04 APERTURE LIST*
12 | %ADD10C,0.050000*%
13 | G04 APERTURE END LIST*
14 | D10*
15 | X89700000Y-100100000D02*
16 | X116800000Y-100100000D01*
17 | X89700000Y-83600000D02*
18 | X89700000Y-100100000D01*
19 | X85200000Y-83600000D02*
20 | X89700000Y-83600000D01*
21 | X85200000Y-66100000D02*
22 | X85200000Y-83600000D01*
23 | X96800000Y-66100000D02*
24 | X85200000Y-66100000D01*
25 | X96800000Y-52800000D02*
26 | X96800000Y-66100000D01*
27 | X169300000Y-52800000D02*
28 | X96800000Y-52800000D01*
29 | X169300000Y-100100000D02*
30 | X169300000Y-52800000D01*
31 | X116800000Y-100100000D02*
32 | X169300000Y-100100000D01*
33 | M02*
34 |
--------------------------------------------------------------------------------
/KiCAD/Files/sym-lib-table:
--------------------------------------------------------------------------------
1 | (sym_lib_table
2 | (lib (name FinalPCB-rescue)(type Legacy)(uri ${KIPRJMOD}/FinalPCB-rescue.lib)(options "")(descr ""))
3 | (lib (name LV52117QA)(type Legacy)(uri "C:/Users/Daumantas/GoogleDrive/KiCAD/Projects 2019/Diy Generator/Final/FinalPCB/LV52117QA.lib")(options "")(descr ""))
4 | (lib (name AD9833module)(type Legacy)(uri ${KIPRJMOD}/AD9833module.lib)(options "")(descr ""))
5 | )
6 |
--------------------------------------------------------------------------------
/KiCAD/gerberV1.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/daumemo/DIY-Signal-Generator/7b449094d92bef584b805de9c50e9535e7786d8f/KiCAD/gerberV1.zip
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | All project files are under MIT licence unless stated otherwise in particular project folders
2 |
3 | MIT License
4 |
5 | Copyright (c) 2020 daumemo
6 |
7 | Permission is hereby granted, free of charge, to any person obtaining a copy
8 | of this software and associated documentation files (the "Software"), to deal
9 | in the Software without restriction, including without limitation the rights
10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 | copies of the Software, and to permit persons to whom the Software is
12 | furnished to do so, subject to the following conditions:
13 |
14 | The above copyright notice and this permission notice shall be included in all
15 | copies or substantial portions of the Software.
16 |
17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23 | SOFTWARE.
24 |
--------------------------------------------------------------------------------
/PlatformIO/DIY_Signal_Generator_V1/.gitignore:
--------------------------------------------------------------------------------
1 | .pio
2 | .vscode/.browse.c_cpp.db*
3 | .vscode/c_cpp_properties.json
4 | .vscode/launch.json
5 | .vscode/ipch
6 |
--------------------------------------------------------------------------------
/PlatformIO/DIY_Signal_Generator_V1/.travis.yml:
--------------------------------------------------------------------------------
1 | # Continuous Integration (CI) is the practice, in software
2 | # engineering, of merging all developer working copies with a shared mainline
3 | # several times a day < https://docs.platformio.org/page/ci/index.html >
4 | #
5 | # Documentation:
6 | #
7 | # * Travis CI Embedded Builds with PlatformIO
8 | # < https://docs.travis-ci.com/user/integration/platformio/ >
9 | #
10 | # * PlatformIO integration with Travis CI
11 | # < https://docs.platformio.org/page/ci/travis.html >
12 | #
13 | # * User Guide for `platformio ci` command
14 | # < https://docs.platformio.org/page/userguide/cmd_ci.html >
15 | #
16 | #
17 | # Please choose one of the following templates (proposed below) and uncomment
18 | # it (remove "# " before each line) or use own configuration according to the
19 | # Travis CI documentation (see above).
20 | #
21 |
22 |
23 | #
24 | # Template #1: General project. Test it using existing `platformio.ini`.
25 | #
26 |
27 | # language: python
28 | # python:
29 | # - "2.7"
30 | #
31 | # sudo: false
32 | # cache:
33 | # directories:
34 | # - "~/.platformio"
35 | #
36 | # install:
37 | # - pip install -U platformio
38 | # - platformio update
39 | #
40 | # script:
41 | # - platformio run
42 |
43 |
44 | #
45 | # Template #2: The project is intended to be used as a library with examples.
46 | #
47 |
48 | # language: python
49 | # python:
50 | # - "2.7"
51 | #
52 | # sudo: false
53 | # cache:
54 | # directories:
55 | # - "~/.platformio"
56 | #
57 | # env:
58 | # - PLATFORMIO_CI_SRC=path/to/test/file.c
59 | # - PLATFORMIO_CI_SRC=examples/file.ino
60 | # - PLATFORMIO_CI_SRC=path/to/test/directory
61 | #
62 | # install:
63 | # - pip install -U platformio
64 | # - platformio update
65 | #
66 | # script:
67 | # - platformio ci --lib="." --board=ID_1 --board=ID_2 --board=ID_N
68 |
--------------------------------------------------------------------------------
/PlatformIO/DIY_Signal_Generator_V1/.vscode/extensions.json:
--------------------------------------------------------------------------------
1 | {
2 | // See http://go.microsoft.com/fwlink/?LinkId=827846
3 | // for the documentation about the extensions.json format
4 | "recommendations": [
5 | "platformio.platformio-ide"
6 | ]
7 | }
8 |
--------------------------------------------------------------------------------
/PlatformIO/DIY_Signal_Generator_V1/include/README:
--------------------------------------------------------------------------------
1 |
2 | This directory is intended for project header files.
3 |
4 | A header file is a file containing C declarations and macro definitions
5 | to be shared between several project source files. You request the use of a
6 | header file in your project source file (C, C++, etc) located in `src` folder
7 | by including it, with the C preprocessing directive `#include'.
8 |
9 | ```src/main.c
10 |
11 | #include "header.h"
12 |
13 | int main (void)
14 | {
15 | ...
16 | }
17 | ```
18 |
19 | Including a header file produces the same results as copying the header file
20 | into each source file that needs it. Such copying would be time-consuming
21 | and error-prone. With a header file, the related declarations appear
22 | in only one place. If they need to be changed, they can be changed in one
23 | place, and programs that include the header file will automatically use the
24 | new version when next recompiled. The header file eliminates the labor of
25 | finding and changing all the copies as well as the risk that a failure to
26 | find one copy will result in inconsistencies within a program.
27 |
28 | In C, the usual convention is to give header files names that end with `.h'.
29 | It is most portable to use only letters, digits, dashes, and underscores in
30 | header file names, and at most one dot.
31 |
32 | Read more about using header files in official GCC documentation:
33 |
34 | * Include Syntax
35 | * Include Operation
36 | * Once-Only Headers
37 | * Computed Includes
38 |
39 | https://gcc.gnu.org/onlinedocs/cpp/Header-Files.html
40 |
--------------------------------------------------------------------------------
/PlatformIO/DIY_Signal_Generator_V1/include/clear.h:
--------------------------------------------------------------------------------
1 | const char CLEAR_page[] PROGMEM = R"=====(
2 |
3 |
4 |
5 |
6 |
7 |
46 |
47 |
48 |
49 |
55 |
56 |
57 |
58 | )=====";
--------------------------------------------------------------------------------
/PlatformIO/DIY_Signal_Generator_V1/include/reboot.h:
--------------------------------------------------------------------------------
1 | const char REBOOT_page[] PROGMEM = R"=====(
2 |
3 |
4 |
5 |
6 |
7 |
46 |
47 |
48 |
49 |
53 |
54 |
55 |
56 | )=====";
--------------------------------------------------------------------------------
/PlatformIO/DIY_Signal_Generator_V1/include/reset.h:
--------------------------------------------------------------------------------
1 | const char RESET_page[] PROGMEM = R"=====(
2 |
3 |
4 |
5 |
6 |
7 |
86 |
87 |
88 |
89 |
90 |
93 |
Reboot Device
94 |
Forget WiFi and Reboot
95 |
96 |
97 |
98 | )=====";
--------------------------------------------------------------------------------
/PlatformIO/DIY_Signal_Generator_V1/include/setting.h:
--------------------------------------------------------------------------------
1 | const char SETTING_page[] PROGMEM = R"=====(
2 |
3 |
4 |
5 |
6 |
7 |
46 |
47 |
48 |
49 |
54 |
55 |
56 |
57 | )=====";
--------------------------------------------------------------------------------
/PlatformIO/DIY_Signal_Generator_V1/lib/OTA/ota.cpp:
--------------------------------------------------------------------------------
1 | #include
2 |
3 | void OtaSetup()
4 | {
5 | // Port defaults to 8266
6 | // ArduinoOTA.setPort(8266);
7 |
8 | // Hostname defaults to esp8266-[ChipID]
9 | // ArduinoOTA.setHostname("myesp8266");
10 |
11 | // No authentication by default
12 | // ArduinoOTA.setPassword((const char *)"123");
13 |
14 | ArduinoOTA.onStart([]() {
15 | Serial.println("Start");
16 | //Debug.Send("Started OTA Flashing");
17 | });
18 | ArduinoOTA.onEnd([]() {
19 | Serial.println("\nEnd");
20 | ESP.restart();
21 | //Debug.Send("Finished OTA Flashing");
22 | });
23 | ArduinoOTA.onProgress([](unsigned int progress, unsigned int total) {
24 | Serial.printf("Progress: %u%%\r", (progress / (total / 100)));
25 | });
26 | ArduinoOTA.onError([](ota_error_t error) {
27 | Serial.printf("Error[%u]: ", error);
28 | if (error == OTA_AUTH_ERROR) Serial.println("Auth Failed");
29 | else if (error == OTA_BEGIN_ERROR) Serial.println("Begin Failed");
30 | else if (error == OTA_CONNECT_ERROR) Serial.println("Connect Failed");
31 | else if (error == OTA_RECEIVE_ERROR) Serial.println("Receive Failed");
32 | else if (error == OTA_END_ERROR) Serial.println("End Failed");
33 | //Debug.Send("OTA Flashing Error");
34 | });
35 | ArduinoOTA.begin();
36 |
37 | Serial.println("Ready :)");
38 | Serial.print("IP address: ");
39 | Serial.println(WiFi.localIP());
40 | }
41 |
42 | void OtaHandleRequests()
43 | {
44 | ArduinoOTA.handle();
45 | }
46 |
--------------------------------------------------------------------------------
/PlatformIO/DIY_Signal_Generator_V1/lib/OTA/ota.h:
--------------------------------------------------------------------------------
1 | #ifndef _OTA_FLASHING_H
2 | #define _OTA_FLASHING_H
3 |
4 | //#include
5 | #include
6 | #include
7 | #include
8 | #include
9 | #include
10 | //#include "udpDebug.h"
11 |
12 | void OtaSetup(void);
13 | void OtaHandleRequests(void);
14 |
15 | #endif
16 |
--------------------------------------------------------------------------------
/PlatformIO/DIY_Signal_Generator_V1/lib/README:
--------------------------------------------------------------------------------
1 |
2 | This directory is intended for project specific (private) libraries.
3 | PlatformIO will compile them to static libraries and link into executable file.
4 |
5 | The source code of each library should be placed in a an own separate directory
6 | ("lib/your_library_name/[here are source files]").
7 |
8 | For example, see a structure of the following two libraries `Foo` and `Bar`:
9 |
10 | |--lib
11 | | |
12 | | |--Bar
13 | | | |--docs
14 | | | |--examples
15 | | | |--src
16 | | | |- Bar.c
17 | | | |- Bar.h
18 | | | |- library.json (optional, custom build options, etc) https://docs.platformio.org/page/librarymanager/config.html
19 | | |
20 | | |--Foo
21 | | | |- Foo.c
22 | | | |- Foo.h
23 | | |
24 | | |- README --> THIS FILE
25 | |
26 | |- platformio.ini
27 | |--src
28 | |- main.c
29 |
30 | and a contents of `src/main.c`:
31 | ```
32 | #include
33 | #include
34 |
35 | int main (void)
36 | {
37 | ...
38 | }
39 |
40 | ```
41 |
42 | PlatformIO Library Dependency Finder will find automatically dependent
43 | libraries scanning project source files.
44 |
45 | More information about PlatformIO Library Dependency Finder
46 | - https://docs.platformio.org/page/librarymanager/ldf.html
47 |
--------------------------------------------------------------------------------
/PlatformIO/DIY_Signal_Generator_V1/lib/TFT_eSPI/.gitattributes:
--------------------------------------------------------------------------------
1 | # Auto detect text files and perform LF normalization
2 | * text=auto
3 |
4 | # Custom for Visual Studio
5 | *.cs diff=csharp
6 |
7 | # Standard to msysgit
8 | *.doc diff=astextplain
9 | *.DOC diff=astextplain
10 | *.docx diff=astextplain
11 | *.DOCX diff=astextplain
12 | *.dot diff=astextplain
13 | *.DOT diff=astextplain
14 | *.pdf diff=astextplain
15 | *.PDF diff=astextplain
16 | *.rtf diff=astextplain
17 | *.RTF diff=astextplain
18 |
--------------------------------------------------------------------------------
/PlatformIO/DIY_Signal_Generator_V1/lib/TFT_eSPI/.gitignore:
--------------------------------------------------------------------------------
1 | # Windows image file caches
2 | Thumbs.db
3 | ehthumbs.db
4 |
5 | # Folder config file
6 | Desktop.ini
7 |
8 | # Recycle Bin used on file shares
9 | $RECYCLE.BIN/
10 |
11 | # Windows Installer files
12 | *.cab
13 | *.msi
14 | *.msm
15 | *.msp
16 |
17 | # Windows shortcuts
18 | *.lnk
19 |
20 | # =========================
21 | # Operating System Files
22 | # =========================
23 |
24 | # OSX
25 | # =========================
26 |
27 | .DS_Store
28 | .AppleDouble
29 | .LSOverride
30 |
31 | # Thumbnails
32 | ._*
33 |
34 | # Files that might appear in the root of a volume
35 | .DocumentRevisions-V100
36 | .fseventsd
37 | .Spotlight-V100
38 | .TemporaryItems
39 | .Trashes
40 | .VolumeIcon.icns
41 |
42 | # Directories potentially created on remote AFP share
43 | .AppleDB
44 | .AppleDesktop
45 | Network Trash Folder
46 | Temporary Items
47 | .apdisk
48 |
--------------------------------------------------------------------------------
/PlatformIO/DIY_Signal_Generator_V1/lib/TFT_eSPI/Extensions/Button.cpp:
--------------------------------------------------------------------------------
1 | /***************************************************************************************
2 | ** Code for the GFX button UI element
3 | ** Grabbed from Adafruit_GFX library and enhanced to handle any label font
4 | ***************************************************************************************/
5 | TFT_eSPI_Button::TFT_eSPI_Button(void) {
6 | _gfx = 0;
7 | _xd = 0;
8 | _yd = 0;
9 | _textdatum = MC_DATUM;
10 | }
11 |
12 | // Classic initButton() function: pass center & size
13 | void TFT_eSPI_Button::initButton(
14 | TFT_eSPI *gfx, int16_t x, int16_t y, uint16_t w, uint16_t h,
15 | uint16_t outline, uint16_t fill, uint16_t textcolor,
16 | char *label, uint8_t textsize)
17 | {
18 | // Tweak arguments and pass to the newer initButtonUL() function...
19 | initButtonUL(gfx, x - (w / 2), y - (h / 2), w, h, outline, fill,
20 | textcolor, label, textsize);
21 | }
22 |
23 | // Newer function instead accepts upper-left corner & size
24 | void TFT_eSPI_Button::initButtonUL(
25 | TFT_eSPI *gfx, int16_t x1, int16_t y1, uint16_t w, uint16_t h,
26 | uint16_t outline, uint16_t fill, uint16_t textcolor,
27 | char *label, uint8_t textsize)
28 | {
29 | _x1 = x1;
30 | _y1 = y1;
31 | _w = w;
32 | _h = h;
33 | _outlinecolor = outline;
34 | _fillcolor = fill;
35 | _textcolor = textcolor;
36 | _textsize = textsize;
37 | _gfx = gfx;
38 | strncpy(_label, label, 9);
39 | }
40 |
41 | // Adjust text datum and x, y deltas
42 | void TFT_eSPI_Button::setLabelDatum(int16_t x_delta, int16_t y_delta, uint8_t datum)
43 | {
44 | _xd = x_delta;
45 | _yd = y_delta;
46 | _textdatum = datum;
47 | }
48 |
49 | void TFT_eSPI_Button::drawButton(bool inverted, String long_name) {
50 | uint16_t fill, outline, text;
51 |
52 | if(!inverted) {
53 | fill = _fillcolor;
54 | outline = _outlinecolor;
55 | text = _textcolor;
56 | } else {
57 | fill = _textcolor;
58 | outline = _outlinecolor;
59 | text = _fillcolor;
60 | }
61 |
62 | uint8_t r = min(_w, _h) / 4; // Corner radius
63 | _gfx->fillRoundRect(_x1, _y1, _w, _h, r, fill);
64 | _gfx->drawRoundRect(_x1, _y1, _w, _h, r, outline);
65 |
66 | _gfx->setTextColor(text, fill);
67 | _gfx->setTextSize(_textsize);
68 |
69 | uint8_t tempdatum = _gfx->getTextDatum();
70 | _gfx->setTextDatum(_textdatum);
71 | if (long_name == "")
72 | _gfx->drawString(_label, _x1 + (_w/2) + _xd, _y1 + (_h/2) - 4 + _yd);
73 | else
74 | _gfx->drawString(long_name, _x1 + (_w/2) + _xd, _y1 + (_h/2) - 4 + _yd);
75 | _gfx->setTextDatum(tempdatum);
76 | }
77 |
78 | bool TFT_eSPI_Button::contains(int16_t x, int16_t y) {
79 | return ((x >= _x1) && (x < (_x1 + _w)) &&
80 | (y >= _y1) && (y < (_y1 + _h)));
81 | }
82 |
83 | void TFT_eSPI_Button::press(bool p) {
84 | laststate = currstate;
85 | currstate = p;
86 | }
87 |
88 | bool TFT_eSPI_Button::isPressed() { return currstate; }
89 | bool TFT_eSPI_Button::justPressed() { return (currstate && !laststate); }
90 | bool TFT_eSPI_Button::justReleased() { return (!currstate && laststate); }
91 |
--------------------------------------------------------------------------------
/PlatformIO/DIY_Signal_Generator_V1/lib/TFT_eSPI/Extensions/Button.h:
--------------------------------------------------------------------------------
1 | /***************************************************************************************
2 | // The following button class has been ported over from the Adafruit_GFX library so
3 | // should be compatible.
4 | // A slightly different implementation in this TFT_eSPI library allows the button
5 | // legends to be in any font, allow longer labels and to adjust text positioning
6 | // within button
7 | ***************************************************************************************/
8 |
9 | class TFT_eSPI_Button {
10 |
11 | public:
12 | TFT_eSPI_Button(void);
13 | // "Classic" initButton() uses center & size
14 | void initButton(TFT_eSPI *gfx, int16_t x, int16_t y,
15 | uint16_t w, uint16_t h, uint16_t outline, uint16_t fill,
16 | uint16_t textcolor, char *label, uint8_t textsize);
17 |
18 | // New/alt initButton() uses upper-left corner & size
19 | void initButtonUL(TFT_eSPI *gfx, int16_t x1, int16_t y1,
20 | uint16_t w, uint16_t h, uint16_t outline, uint16_t fill,
21 | uint16_t textcolor, char *label, uint8_t textsize);
22 |
23 | // Adjust text datum and x, y deltas
24 | void setLabelDatum(int16_t x_delta, int16_t y_delta, uint8_t datum = MC_DATUM);
25 |
26 | void drawButton(bool inverted = false, String long_name = "");
27 | bool contains(int16_t x, int16_t y);
28 |
29 | void press(bool p);
30 | bool isPressed();
31 | bool justPressed();
32 | bool justReleased();
33 |
34 | private:
35 | TFT_eSPI *_gfx;
36 | int16_t _x1, _y1; // Coordinates of top-left corner of button
37 | int16_t _xd, _yd; // Button text datum offsets (wrt center of button)
38 | uint16_t _w, _h; // Width and height of button
39 | uint8_t _textsize, _textdatum; // Text size multiplier and text datum for button
40 | uint16_t _outlinecolor, _fillcolor, _textcolor;
41 | char _label[10]; // Button text is 9 chars maximum unless long_name used
42 |
43 | bool currstate, laststate; // Button states
44 | };
45 |
--------------------------------------------------------------------------------
/PlatformIO/DIY_Signal_Generator_V1/lib/TFT_eSPI/Extensions/Smooth_font.h:
--------------------------------------------------------------------------------
1 | // Coded by Bodmer 10/2/18, see license in root directory.
2 | // This is part of the TFT_eSPI class and is associated with anti-aliased font functions
3 |
4 | public:
5 |
6 | // These are for the new antialiased fonts
7 | void loadFont(const uint8_t array[]);
8 | #ifdef FONT_FS_AVAILABLE
9 | void loadFont(String fontName, fs::FS &ffs);
10 | #endif
11 | void loadFont(String fontName, bool flash = true);
12 | void unloadFont( void );
13 | bool getUnicodeIndex(uint16_t unicode, uint16_t *index);
14 |
15 | virtual void drawGlyph(uint16_t code);
16 |
17 | void showFont(uint32_t td);
18 |
19 | // This is for the whole font
20 | typedef struct
21 | {
22 | const uint8_t* gArray; //array start pointer
23 | uint16_t gCount; // Total number of characters
24 | uint16_t yAdvance; // Line advance
25 | uint16_t spaceWidth; // Width of a space character
26 | int16_t ascent; // Height of top of 'd' above baseline, other characters may be taller
27 | int16_t descent; // Offset to bottom of 'p', other characters may have a larger descent
28 | uint16_t maxAscent; // Maximum ascent found in font
29 | uint16_t maxDescent; // Maximum descent found in font
30 | } fontMetrics;
31 |
32 | fontMetrics gFont = { nullptr, 0, 0, 0, 0, 0, 0, 0 };
33 |
34 | // These are for the metrics for each individual glyph (so we don't need to seek this in file and waste time)
35 | uint16_t* gUnicode = NULL; //UTF-16 code, the codes are searched so do not need to be sequential
36 | uint8_t* gHeight = NULL; //cheight
37 | uint8_t* gWidth = NULL; //cwidth
38 | uint8_t* gxAdvance = NULL; //setWidth
39 | int16_t* gdY = NULL; //topExtent
40 | int8_t* gdX = NULL; //leftExtent
41 | uint32_t* gBitmap = NULL; //file pointer to greyscale bitmap
42 |
43 | bool fontLoaded = false; // Flags when a anti-aliased font is loaded
44 |
45 | #ifdef FONT_FS_AVAILABLE
46 | fs::File fontFile;
47 | fs::FS &fontFS = SPIFFS;
48 | bool spiffs = true;
49 | bool fs_font = false; // For ESP32/8266 use smooth font file or FLASH (PROGMEM) array
50 |
51 | #else
52 | bool fontFile = true;
53 | #endif
54 |
55 | private:
56 |
57 | void loadMetrics(void);
58 | uint32_t readInt32(void);
59 |
60 | uint8_t* fontPtr = nullptr;
61 |
62 |
--------------------------------------------------------------------------------
/PlatformIO/DIY_Signal_Generator_V1/lib/TFT_eSPI/Extensions/Touch.h:
--------------------------------------------------------------------------------
1 | // Coded by Bodmer 10/2/18, see license in root directory.
2 | // This is part of the TFT_eSPI class and is associated with the Touch Screen handlers
3 |
4 | public:
5 | // Get raw x,y ADC values from touch controller
6 | uint8_t getTouchRaw(uint16_t *x, uint16_t *y);
7 | // Get raw z (i.e. pressure) ADC value from touch controller
8 | uint16_t getTouchRawZ(void);
9 | // Convert raw x,y values to calibrated and correctly rotated screen coordinates
10 | void convertRawXY(uint16_t *x, uint16_t *y);
11 | // Get the screen touch coordinates, returns true if screen has been touched
12 | // if the touch cordinates are off screen then x and y are not updated
13 | uint8_t getTouch(uint16_t *x, uint16_t *y, uint16_t threshold = 600);
14 |
15 | // Run screen calibration and test, report calibration values to the serial port
16 | void calibrateTouch(uint16_t *data, uint32_t color_fg, uint32_t color_bg, uint8_t size);
17 | // Set the screen calibration values
18 | void setTouch(uint16_t *data);
19 |
20 | private:
21 | // Legacy support only - deprecated TODO: delete
22 | void spi_begin_touch();
23 | void spi_end_touch();
24 |
25 | // Handlers for the touch controller bus settings
26 | inline void begin_touch_read_write() __attribute__((always_inline));
27 | inline void end_touch_read_write() __attribute__((always_inline));
28 |
29 | // Private function to validate a touch, allow settle time and reduce spurious coordinates
30 | uint8_t validTouch(uint16_t *x, uint16_t *y, uint16_t threshold = 600);
31 |
32 | // Initialise with example calibration values so processor does not crash if setTouch() not called in setup()
33 | uint16_t touchCalibration_x0 = 300, touchCalibration_x1 = 3600, touchCalibration_y0 = 300, touchCalibration_y1 = 3600;
34 | uint8_t touchCalibration_rotate = 1, touchCalibration_invert_x = 2, touchCalibration_invert_y = 0;
35 |
36 | uint32_t _pressTime; // Press and hold time-out
37 | uint16_t _pressX, _pressY; // For future use (last sampled calibrated coordinates)
38 |
--------------------------------------------------------------------------------
/PlatformIO/DIY_Signal_Generator_V1/lib/TFT_eSPI/Fonts/Font16.h:
--------------------------------------------------------------------------------
1 | #include
2 |
3 | #define nr_chrs_f16 96
4 | #define chr_hgt_f16 16
5 | #define baseline_f16 13
6 | #define data_size_f16 8
7 | #define firstchr_f16 32
8 |
9 | extern const unsigned char widtbl_f16[96];
10 | extern const unsigned char* const chrtbl_f16[96];
11 |
--------------------------------------------------------------------------------
/PlatformIO/DIY_Signal_Generator_V1/lib/TFT_eSPI/Fonts/Font32rle.h:
--------------------------------------------------------------------------------
1 | #include
2 |
3 | #define nr_chrs_f32 96
4 | #define chr_hgt_f32 26
5 | #define baseline_f32 19
6 | #define data_size_f32 8
7 | #define firstchr_f32 32
8 |
9 | extern const unsigned char widtbl_f32[96];
10 | extern const unsigned char* const chrtbl_f32[96];
11 |
--------------------------------------------------------------------------------
/PlatformIO/DIY_Signal_Generator_V1/lib/TFT_eSPI/Fonts/Font64rle.h:
--------------------------------------------------------------------------------
1 | #include
2 |
3 | #define nr_chrs_f64 96
4 | #define chr_hgt_f64 48
5 | #define baseline_f64 36
6 | #define data_size_f64 8
7 | #define firstchr_f64 32
8 |
9 | extern const unsigned char widtbl_f64[96];
10 | extern const unsigned char* const chrtbl_f64[96];
11 |
--------------------------------------------------------------------------------
/PlatformIO/DIY_Signal_Generator_V1/lib/TFT_eSPI/Fonts/Font72rle.h:
--------------------------------------------------------------------------------
1 | #include
2 |
3 | #define nr_chrs_f72 96
4 | #define chr_hgt_f72 75
5 | #define baseline_f72 73
6 | #define data_size_f72 8
7 | #define firstchr_f72 32
8 |
9 | extern const unsigned char widtbl_f72[96];
10 | extern const unsigned char* const chrtbl_f72[96];
11 |
--------------------------------------------------------------------------------
/PlatformIO/DIY_Signal_Generator_V1/lib/TFT_eSPI/Fonts/Font72x53rle.h:
--------------------------------------------------------------------------------
1 | #include
2 |
3 | #define nr_chrs_f72 96
4 | #define chr_hgt_f72 75
5 | #define baseline_f72 73
6 | #define data_size_f72 8
7 | #define firstchr_f72 32
8 |
9 | extern const unsigned char widtbl_f72[96];
10 | extern const unsigned char* const chrtbl_f72[96];
11 |
--------------------------------------------------------------------------------
/PlatformIO/DIY_Signal_Generator_V1/lib/TFT_eSPI/Fonts/Font7srle.h:
--------------------------------------------------------------------------------
1 | #include
2 |
3 | #define nr_chrs_f7s 96
4 | #define chr_hgt_f7s 48
5 | #define baseline_f7s 47
6 | #define data_size_f7s 8
7 | #define firstchr_f7s 32
8 |
9 | extern const unsigned char widtbl_f7s[96];
10 | extern const unsigned char* const chrtbl_f7s[96];
11 |
--------------------------------------------------------------------------------
/PlatformIO/DIY_Signal_Generator_V1/lib/TFT_eSPI/Fonts/GFXFF/license.txt:
--------------------------------------------------------------------------------
1 | This TFT_eSPI library has been developed from the Adafruit_GFX library:
2 |
3 | https://github.com/adafruit/Adafruit-GFX-Library
4 |
5 | It has been modified extensively to improve rendering speed on
6 | ESP8266 processors. There follows the original library license text.
7 |
8 |
9 | Original text follows:
10 |
11 | Software License Agreement (BSD License)
12 |
13 | Copyright (c) 2012 Adafruit Industries. All rights reserved.
14 |
15 | Redistribution and use in source and binary forms, with or without
16 | modification, are permitted provided that the following conditions are met:
17 |
18 | - Redistributions of source code must retain the above copyright notice,
19 | this list of conditions and the following disclaimer.
20 | - Redistributions in binary form must reproduce the above copyright notice,
21 | this list of conditions and the following disclaimer in the documentation
22 | and/or other materials provided with the distribution.
23 |
24 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
25 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
26 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
27 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
28 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
29 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
30 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
31 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
32 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
33 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
34 | POSSIBILITY OF SUCH DAMAGE.
35 |
--------------------------------------------------------------------------------
/PlatformIO/DIY_Signal_Generator_V1/lib/TFT_eSPI/Fonts/GFXFF/print.txt:
--------------------------------------------------------------------------------
1 | #define TT1 TomThumb
2 |
3 | #define FF1 FreeMono9pt7b
4 | #define FF2 FreeMono12pt7b
5 | #define FF3 FreeMono18pt7b
6 | #define FF4 FreeMono24pt7b
7 |
8 | #define FF5 FreeMonoBold9pt7b
9 | #define FF6 FreeMonoBold12pt7b
10 | #define FF7 FreeMonoBold18pt7b
11 | #define FF8 FreeMonoBold24pt7b
12 |
13 | #define FF9 FreeMonoBoldOblique9pt7b
14 | #define FF10 FreeMonoBoldOblique12pt7b
15 | #define FF11 FreeMonoBoldOblique18pt7b
16 | #define FF12 FreeMonoBoldOblique24pt7b
17 |
18 | #define FF13 FreeMonoOblique9pt7b
19 | #define FF14 FreeMonoOblique12pt7b
20 | #define FF15 FreeMonoOblique18pt7b
21 | #define FF16 FreeMonoOblique24pt7b
22 |
23 | #define FF17 FreeSans9pt7b
24 | #define FF18 FreeSans12pt7b
25 | #define FF19 FreeSans18pt7b
26 | #define FF20 FreeSans24pt7b
27 |
28 | #define FF21 FreeSansBold9pt7b
29 | #define FF22 FreeSansBold12pt7b
30 | #define FF23 FreeSansBold18pt7b
31 | #define FF24 FreeSansBold24pt7b
32 |
33 | #define FF25 FreeSansBoldOblique9pt7b
34 | #define FF26 FreeSansBoldOblique12pt7b
35 | #define FF27 FreeSansBoldOblique18pt7b
36 | #define FF28 FreeSansBoldOblique24pt7b
37 |
38 | #define FF29 FreeSansOblique9pt7b
39 | #define FF30 FreeSansOblique12pt7b
40 | #define FF31 FreeSansOblique18pt7b
41 | #define FF32 FreeSansOblique24pt7b
42 |
43 | #define FF33 FreeSerif9pt7b
44 | #define FF34 FreeSerif12pt7b
45 | #define FF35 FreeSerif18pt7b
46 | #define FF36 FreeSerif24pt7b
47 |
48 | #define FF37 FreeSerifBold9pt7b
49 | #define FF38 FreeSerifBold12pt7b
50 | #define FF39 FreeSerifBold18pt7b
51 | #define FF40 FreeSerifBold24pt7b
52 |
53 | #define FF41 FreeSerifBoldItalic9pt7b
54 | #define FF42 FreeSerifBoldItalic12pt7b
55 | #define FF43 FreeSerifBoldItalic18pt7b
56 | #define FF44 FreeSerifBoldItalic24pt7b
57 |
58 | #define FF45 FreeSerifItalic9pt7b
59 | #define FF46 FreeSerifItalic12pt7b
60 | #define FF47 FreeSerifItalic18pt7b
61 | #define FF48 FreeSerifItalic24pt7b
62 |
--------------------------------------------------------------------------------
/PlatformIO/DIY_Signal_Generator_V1/lib/TFT_eSPI/Fonts/TrueType/Not_yet_supported.txt:
--------------------------------------------------------------------------------
1 | TO DO: Add support for converted True Type fonts in an RLE format.
--------------------------------------------------------------------------------
/PlatformIO/DIY_Signal_Generator_V1/lib/TFT_eSPI/README.txt:
--------------------------------------------------------------------------------
1 | This is a standalone library that contains both graphics functions
2 | and the TFT chip driver library. It supports the ESP8266, ESP32 and
3 | STM32 processors with performance optimised code. Other Arduino IDE
4 | compatible boards are also supported but the library then uses
5 | generic functions which will be slower. The library uses 32 bit
6 | variables extensively so this will affect performance on 8 and 16
7 | bit processors.
8 |
--------------------------------------------------------------------------------
/PlatformIO/DIY_Signal_Generator_V1/lib/TFT_eSPI/TFT_Drivers/R61581_Defines.h:
--------------------------------------------------------------------------------
1 | // Change the width and height if required (defined in portrait mode)
2 | // or use the constructor to over-ride defaults
3 | #define TFT_WIDTH 320
4 | #define TFT_HEIGHT 480
5 |
6 |
7 | // Delay between some initialisation commands
8 | #define TFT_INIT_DELAY 0x80 // Not used unless commandlist invoked
9 |
10 |
11 | // Generic commands used by TFT_eSPI.cpp
12 | #define TFT_NOP 0x00
13 | #define TFT_SWRST 0x01
14 |
15 | #define TFT_SLPIN 0x10
16 | #define TFT_SLPOUT 0x11
17 |
18 | #define TFT_INVOFF 0x20
19 | #define TFT_INVON 0x21
20 |
21 | #define TFT_DISPOFF 0x28
22 | #define TFT_DISPON 0x29
23 |
24 | #define TFT_CASET 0x2A
25 | #define TFT_PASET 0x2B
26 | #define TFT_RAMWR 0x2C
27 |
28 | #define TFT_RAMRD 0x2E
29 |
30 | #define TFT_MADCTL 0x36
31 |
32 | #define TFT_MAD_MY 0x80
33 | #define TFT_MAD_MX 0x40
34 | #define TFT_MAD_MV 0x20
35 | #define TFT_MAD_ML 0x10
36 | #define TFT_MAD_RGB 0x00
37 | #define TFT_MAD_BGR 0x08
38 | #define TFT_MAD_MH 0x04
39 | #define TFT_MAD_SS 0x02
40 | #define TFT_MAD_GS 0x01
41 |
42 | #define TFT_IDXRD 0x00 // ILI9341 only, indexed control register read
43 |
--------------------------------------------------------------------------------
/PlatformIO/DIY_Signal_Generator_V1/lib/TFT_eSPI/TFT_Drivers/R61581_Rotation.h:
--------------------------------------------------------------------------------
1 | // This is the command sequence that rotates the R61581 driver coordinate frame
2 |
3 | writecommand(TFT_MADCTL);
4 | rotation = m % 4;
5 | switch (rotation) {
6 | case 0: // Portrait
7 | writedata(TFT_MAD_RGB);
8 | _width = TFT_WIDTH;
9 | _height = TFT_HEIGHT;
10 | break;
11 | case 1: // Landscape (Portrait + 90)
12 | writedata(TFT_MAD_MV | TFT_MAD_MX | TFT_MAD_RGB);
13 | _width = TFT_HEIGHT;
14 | _height = TFT_WIDTH;
15 | break;
16 | case 2: // Portrait + 180
17 | writedata(TFT_MAD_RGB | TFT_MAD_GS | TFT_MAD_MX);
18 | _width = TFT_WIDTH;
19 | _height = TFT_HEIGHT;
20 | break;
21 | case 3: // Landscape + 180
22 | writedata(TFT_MAD_MV | TFT_MAD_RGB | TFT_MAD_GS);
23 | _width = TFT_HEIGHT;
24 | _height = TFT_WIDTH;
25 | break;
26 | }
27 |
--------------------------------------------------------------------------------
/PlatformIO/DIY_Signal_Generator_V1/lib/TFT_eSPI/User_Setups/User_Custom_Fonts.h:
--------------------------------------------------------------------------------
1 |
2 | // Custom "Adafruit" compatible font files can be added to the "TFT_eSPI/Fonts/Custom" folder
3 | // Fonts in a suitable format can be created using a Squix blog web based tool here:
4 | /*
5 | https://blog.squix.org/2016/10/font-creator-now-creates-adafruit-gfx-fonts.html
6 | */
7 |
8 | // Note: At the time of writing there is a last character code definition bug in the
9 | // Squix font file format so do NOT try and print the tilda (~) symbol (ASCII 0x7E)
10 | // Alternatively look at the end of the font header file and edit: 0x7E to read 0x7D
11 | /* e.g. vvvv
12 | (uint8_t *)Orbitron_Light_32Bitmaps,(GFXglyph *)Orbitron_Light_32Glyphs,0x20, 0x7D, 32};
13 | ^^^^
14 | */
15 |
16 | // When font files are placed in the Custom folder (TFT_eSPI\Fonts\Custom) then they must
17 | // also be #included here:
18 |
19 | // The CF_OL24 etc are a shorthand reference, but this is not essential to use the fonts
20 |
21 | #ifdef LOAD_GFXFF
22 |
23 | // New custom font file #includes
24 | #include // CF_OL24
25 | #include // CF_OL32
26 | #include // CF_RT24
27 | #include // CF_S24
28 | #include // CF_Y32
29 |
30 | #endif
31 |
32 | // Shorthand references - any coding scheme can be used, here CF_ = Custom Font
33 | // The #defines below MUST be added to sketches to use shorthand references, so
34 | // they are only put here for reference and copy+paste purposes!
35 | /*
36 | #define CF_OL24 &Orbitron_Light_24
37 | #define CF_OL32 &Orbitron_Light_32
38 | #define CF_RT24 &Roboto_Thin_24
39 | #define CF_S24 &Satisfy_24
40 | #define CF_Y32 &Yellowtail_32
41 | */
42 |
--------------------------------------------------------------------------------
/PlatformIO/DIY_Signal_Generator_V1/lib/TFT_eSPI/keywords.txt:
--------------------------------------------------------------------------------
1 | TFT_eSPI KEYWORD1
2 |
3 | init KEYWORD2
4 | drawPixel KEYWORD2
5 | drawChar KEYWORD2
6 | setAddrWindow KEYWORD2
7 | setWindow KEYWORD2
8 | startWrite KEYWORD2
9 | writeColor KEYWORD2
10 | endWrite KEYWORD2
11 | pushColor KEYWORD2
12 | pushColors KEYWORD2
13 | fillScreen KEYWORD2
14 | writeBegin KEYWORD2
15 | writeEnd KEYWORD2
16 | drawLine KEYWORD2
17 | drawFastVLine KEYWORD2
18 | drawFastHLine KEYWORD2
19 | drawRect KEYWORD2
20 | fillRect KEYWORD2
21 | drawRoundRect KEYWORD2
22 | fillRoundRect KEYWORD2
23 | setRotation KEYWORD2
24 | invertDisplay KEYWORD2
25 | drawCircle KEYWORD2
26 | drawCircleHelper KEYWORD2
27 | fillCircle KEYWORD2
28 | fillCircleHelper KEYWORD2
29 | drawEllipse KEYWORD2
30 | fillEllipse KEYWORD2
31 | drawTriangle KEYWORD2
32 | fillTriangle KEYWORD2
33 | drawBitmap KEYWORD2
34 | drawXBitmap KEYWORD2
35 | setCursor KEYWORD2
36 | getCursorX KEYWORD2
37 | getCursorY KEYWORD2
38 | setTextColor KEYWORD2
39 | setTextSize KEYWORD2
40 | setTextFont KEYWORD2
41 | setFreeFont KEYWORD2
42 | setTextWrap KEYWORD2
43 | setTextDatum KEYWORD2
44 | setTextPadding KEYWORD2
45 | spiwrite KEYWORD2
46 | writecommand KEYWORD2
47 | writedata KEYWORD2
48 | commandList KEYWORD2
49 | readcommand8 KEYWORD2
50 | readcommand16 KEYWORD2
51 | readcommand32 KEYWORD2
52 | readPixel KEYWORD2
53 | readRect KEYWORD2
54 | pushRect KEYWORD2
55 | pushImage KEYWORD2
56 | setSwapBytes KEYWORD2
57 | getSwapBytes KEYWORD2
58 | readRectRGB KEYWORD2
59 | getRotation KEYWORD2
60 | getTextDatum KEYWORD2
61 | fontsLoaded KEYWORD2
62 | color565 KEYWORD2
63 | color16to8 KEYWORD2
64 | color8to16 KEYWORD2
65 | drawNumber KEYWORD2
66 | drawFloat KEYWORD2
67 | drawString KEYWORD2
68 | drawCentreString KEYWORD2
69 | drawRightString KEYWORD2
70 | height KEYWORD2
71 | width KEYWORD2
72 | textWidth KEYWORD2
73 | fontHeight KEYWORD2
74 | getSetup KEYWORD2
75 | setAttribute KEYWORD2
76 | getAttribute KEYWORD2
77 | alphaBlend KEYWORD2
78 |
79 | getSPIinstance KEYWORD2
80 | pushBlock KEYWORD2
81 | pushPixels KEYWORD2
82 |
83 | initDMA KEYWORD2
84 | deInitDMA KEYWORD2
85 | pushImageDMA KEYWORD2
86 | pushBlockDMA KEYWORD2
87 | pushPixelsDMA KEYWORD2
88 | dmaBusy KEYWORD2
89 |
90 | getTouchRaw KEYWORD2
91 | convertRawXY KEYWORD2
92 | getTouchRawZ KEYWORD2
93 | getTouch KEYWORD2
94 | calibrateTouch KEYWORD2
95 | setTouch KEYWORD2
96 |
97 | TFT_eSPI_Button KEYWORD1
98 |
99 | initButton KEYWORD2
100 | textcolor KEYWORD2
101 | initButtonUL KEYWORD2
102 | setLabelDatum KEYWORD2
103 | drawButton KEYWORD2
104 | contains KEYWORD2
105 | press KEYWORD2
106 | isPressed KEYWORD2
107 | justPressed KEYWORD2
108 | justReleased KEYWORD2
109 |
110 |
111 | TFT_eSprite KEYWORD1
112 |
113 | createSprite KEYWORD2
114 | createPalette KEYWORD2
115 | setColorDepth KEYWORD2
116 | getColorDepth KEYWORD2
117 | deleteSprite KEYWORD2
118 | pushRotated KEYWORD2
119 | pushRotatedHP KEYWORD2
120 | rotatedBounds KEYWORD2
121 | setPivot KEYWORD2
122 | getPivotX KEYWORD2
123 | getPivotY KEYWORD2
124 | fillSprite KEYWORD2
125 | pushBitmap KEYWORD2
126 | pushSprite KEYWORD2
127 | setScrollRect KEYWORD2
128 | scroll KEYWORD2
129 | printToSprite KEYWORD2
130 | frameBuffer KEYWORD2
131 | setBitmapColor KEYWORD2
132 |
133 | showFont KEYWORD2
134 | loadFont KEYWORD2
135 | unloadFont KEYWORD2
136 | getUnicodeIndex KEYWORD2
137 | decodeUTF8 KEYWORD2
138 | drawGlyph KEYWORD2
139 |
--------------------------------------------------------------------------------
/PlatformIO/DIY_Signal_Generator_V1/lib/TFT_eSPI/library.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "TFT_eSPI",
3 | "version": "2.1.6",
4 | "keywords": "Arduino, tft, ePaper, display, STM32, ESP8266, NodeMCU, ESP32, M5Stack, ILI9341, ST7735, ILI9163, S6D02A1, ILI9486, ST7789, RM68140",
5 | "description": "A TFT and ePaper SPI graphics library with optimisation for ESP8266, ESP32 and STM32",
6 | "repository":
7 | {
8 | "type": "git",
9 | "url": "https://github.com/Bodmer/TFT_eSPI"
10 | },
11 | "authors":
12 | [
13 | {
14 | "name": "Bodmer",
15 | "email": "bodmer@anola.net",
16 | "maintainer": true
17 | }
18 | ],
19 | "frameworks": "arduino",
20 | "platforms": "espressif8266, espressif32, ststm32"
21 | }
22 |
--------------------------------------------------------------------------------
/PlatformIO/DIY_Signal_Generator_V1/lib/TFT_eSPI/library.properties:
--------------------------------------------------------------------------------
1 | name=TFT_eSPI
2 | version=2.1.6
3 | author=Bodmer
4 | maintainer=Bodmer
5 | sentence=TFT graphics library for Arduino processors with performance optimisation for STM32, ESP8266 and ESP32
6 | paragraph=Supports TFT displays using drivers (ILI9341 etc) that operate with hardware SPI or 8 bit parallel.
7 | category=Display
8 | url=https://github.com/Bodmer/TFT_eSPI
9 | architectures=*
10 | includes=TFT_eSPI.h
11 |
12 |
--------------------------------------------------------------------------------
/PlatformIO/DIY_Signal_Generator_V1/lib/device/device-wifi.h:
--------------------------------------------------------------------------------
1 | #ifndef DEVICE_WIFI_LIB_H
2 | #define DEVICE_WIFI_LIB_H
3 |
4 | #include "Arduino.h"
5 | #include "device.h"
6 |
7 | void launchWeb(int webtype);
8 | void handleRoot(void);
9 | void handleData(void);
10 | void handleOutput(void);
11 | void handleWaveForm(void);
12 | void handleFreq(void);
13 | void handleAmpl(void);
14 | void handleOffs(void);
15 | void handleDuty(void);
16 | void handleCharger();
17 |
18 | void init_first_boot();
19 | bool testWifi(void);
20 | void setupAP(void);
21 | void createWebServer(int webtype);
22 |
23 | void server_do_stuff();
24 | void wifi_turn_off();
25 | String wifi_get_ssid();
26 | String wifi_get_pass();
27 | void wifi_turn_on();
28 | void ap_turn_off();
29 |
30 | String ap_get_ssid();
31 | String ap_get_pass();
32 | String wifi_get_ip();
33 | void ap_save_to_eeprom(String ssid, String pass);
34 | void wifi_save_to_eeprom(String ssid, String pass);
35 | void eeprom_write_byte(int index, uint8_t value);
36 | uint8_t eeprom_read_byte(int index);
37 |
38 | #endif
--------------------------------------------------------------------------------
/PlatformIO/DIY_Signal_Generator_V1/lib/device/device.h:
--------------------------------------------------------------------------------
1 | #ifndef DEVICE_LIB_H
2 | #define DEVICE_LIB_H
3 |
4 | #include
5 | //#include "bq24295.h"
6 |
7 |
8 |
9 | #define BATTERY_READS_TO_AVERAGE 100
10 | #define BATT_PERCENT_TO_AVERAGE 100
11 |
12 | class Device_Object{
13 |
14 | private:
15 | int currentBrightness;
16 | volatile int currentBatteryVal;
17 | volatile int batteryArray[BATTERY_READS_TO_AVERAGE];
18 | volatile int battPercentArray[BATT_PERCENT_TO_AVERAGE];
19 | volatile int currentBattPercentIndex;
20 | bool wifiIsOn = false;
21 | bool apIsOn = false;
22 |
23 | double adcToMiliVolt(int adcvalue);
24 | int miliVoltToPercent(double voltval);
25 |
26 | public:
27 |
28 | Device_Object(void);
29 |
30 | void SetAP(String SSID, String pass);
31 | void SetWiFi(String SSID, String pass);
32 | void EnableAP(bool status);
33 | void EnableWiFi(bool status);
34 | String GetMyIP();
35 | bool IsApOn();
36 | bool IsWiFiOn();
37 | void MeasureBattery();
38 | int GetBatteryValue();
39 | void SetBrightness(int value);
40 | int GetBrightness();
41 | void ServerHandlesClient();
42 | String GetWiFiSSID();
43 | String GetWiFiPass();
44 | String GetApSSID();
45 | String GetApPass();
46 |
47 | void SaveSettings();
48 | void LoadSettings();
49 |
50 | //BQ24295_IC Charger;
51 | };
52 |
53 | extern Device_Object Device;
54 |
55 | #endif
--------------------------------------------------------------------------------
/PlatformIO/DIY_Signal_Generator_V1/lib/generator/calibration.h:
--------------------------------------------------------------------------------
1 | /**************************************************************************
2 | * This file is used to calibrate generator's offset and amplitude
3 | * values.
4 | *
5 | * To set an output value, the generator needs to know how to convert
6 | * a voltage value being set up to the actual PWM value which is used to
7 | * output that voltage.
8 | *
9 | * To convert voltage value being set up to the PWM value, the generator
10 | * uses mathematical line function, which general for is:
11 | * PWM = A*Voltage + B;
12 | *
13 | * PWM is a value which needs to be set up to get a Voltage value.
14 | * Coefficients A and B needs to be worked out.
15 | *
16 | * How to find out A and B coefficients:
17 | * Set desired output voltage (for e.g. 2V). Measure real output voltage.
18 | * Using default coefficients (see definitions below) find out what actual
19 | * PWM was set to get the measured voltage. Measure a second point
20 | * (for e.g 10V) and calculate PWM value. From these two points it is
21 | * possible to calculate corrected A and B coefficients (there are a lot
22 | * of information how to calculate line coefficients from two points on the
23 | * internet).
24 | *
25 | * In total there are three sets of coefficients:
26 | * SINE_TRI_COEF... - used for amplitude setting for sine and triangle waves
27 | * SQUARE_COEF... - used for square wave amplitude calculation
28 | * OFFSET_COEF... - used for offset calculation (all waveforms)
29 | *
30 | * Offset values should be measured with minimum waveform amplitude.
31 | * Although generator's interface uses Vpp (peak to peak) to set output
32 | * amplitude, for calculation a real apmlitude value is used (Vpp/2).
33 | *
34 | * The generator has physical limits for setting output values. That limit is
35 | * defined by possible min/max PWM duty values and gain values which are set
36 | * for voltage setting op-amps. Interface should not allow to set such values
37 | * which are outside of the useable values range.
38 | *
39 | * SINE_TRI_MAX_AMPLITUDE - sets a limit for the maximum allowable amplitude
40 | * for sine and triangle waves (yet again in Vp (Vpp/2), not Vpp)
41 | *
42 | * SQUARE_MAX_AMPLITUDE sets a limit for the maximum allowable amplitude
43 | * for square wave (yet again in Vp (Vpp/2), not Vpp)
44 | *
45 | * OFFSET_MAX_VOLTAGE and OFFSET_MIN_VOLTAGE setts minimum and maximum
46 | * allowed voltages for setting output offset.
47 | * *************************************************************************/
48 |
49 | #ifndef OUTPUT_CALIBRATION_H
50 | #define OUTPUT_CALIBRATION_H
51 |
52 |
53 | #define SINE_TRI_COEF_A 387
54 | #define SINE_TRI_COEF_B 257
55 |
56 | #define SINE_TRI_MAX_AMPLITUDE 10
57 |
58 | #define SQUARE_COEF_A 621.5
59 | #define SQUARE_COEF_B 246.7
60 |
61 | #define SQUARE_MAX_AMPLITUDE 6
62 |
63 |
64 | #define OFFSET_COEF_A -248
65 | #define OFFSET_COEF_B 2005.0
66 |
67 | #define OFFSET_MAX_VOLTAGE 10
68 | #define OFFSET_MIN_VOLTAGE -10
69 |
70 | #endif
71 |
--------------------------------------------------------------------------------
/PlatformIO/DIY_Signal_Generator_V1/lib/generator/generator.h:
--------------------------------------------------------------------------------
1 | /**
2 | * A library which encapsulates everything, what is needed to control generator's output parameters
3 | *
4 | * daumemo.com
5 | * */
6 |
7 | #ifndef GENERATOR_LIB_H
8 | #define GENERATOR_LIB_H
9 |
10 | #define OUTPUT_RELAY_PIN 2
11 | #define OFFSET_PWM_PIN 13
12 | #define OFFSET_PWM_CHANNEL 1
13 | #define AMPLITUDE_PWM_PIN 14
14 | #define AMPLITUDE_PWM_CHANNEL 2
15 | #define PWMOUT_PWM_PIN 4
16 | #define PWMOUT_PWM_CHANNEL 5
17 |
18 | #define MAX_OFFSET_VALUE 10
19 | #define MIN_OFFSET_VALUE -10
20 | #define MAX_AMPLITUDE_VALUE 10
21 | #define MIN_AMPLITUDE_VALUE 0
22 | #define MAX_DUTY_VALUE 100
23 | #define MIN_DUTY_VALUE 0
24 |
25 | #define MAX_AD_FREQ_VALUE 25000000
26 | #define MIN_AD_FREQ_VALUE 0.1
27 | #define MAX_PWMOUT_FREQ_VALUE 5000000
28 | #define MIN_PWMOUT_FREQ_VALUE 1
29 |
30 | #include
31 | #include "ad9833.h"
32 |
33 | class Generator_Object {
34 | private:
35 | uint8_t waveform;
36 | double frequency;
37 | double offsetVoltage;
38 | double amplitudeVoltage;
39 | double duty;
40 | bool relay;
41 | AD9833_IC AD9833;
42 |
43 | String keepFreqUnit = "";
44 | String keepAmpUnit = "";
45 | String keepOffsUnit = "V";
46 | String keepDutyUnit = "%";
47 |
48 | void convertToAmplitudePwm(double value);
49 | void convertToOffsetPwm(double value);
50 | void startPwmOutput();
51 | void stopPwmOutput();
52 | void startSqOutput();
53 | void stopSqOutput();
54 |
55 | public:
56 |
57 | /**
58 | * class initialisation
59 | *
60 | */
61 | Generator_Object(void);
62 |
63 | void SetWaveform(uint8_t wavef);
64 | uint8_t GetWaveform();
65 |
66 | void SetFrequency(double freq);
67 | double GetFrequency();
68 |
69 | void SetOffset(double voltage);
70 | double GetOffset();
71 |
72 | void SetAmplitude(double voltage);
73 | double GetAmplitude();
74 |
75 | void SetDuty(double value);
76 | double GetDuty();
77 |
78 | void SetOutputRelay(bool status);
79 | bool GetOutputRelay();
80 |
81 | void SaveFreqUnit(String value);
82 | String GetFreqUnit();
83 |
84 | void SaveAmplitudeUnit(String value);
85 | String GetAmplitudeUnit();
86 |
87 | void SaveOffsetUnit(String value);
88 | String GetOffsetUnit();
89 |
90 | void SaveDutyUnit(String value);
91 | String GetDutyUnit();
92 | };
93 |
94 | extern Generator_Object Generator;
95 |
96 | #endif
--------------------------------------------------------------------------------
/PlatformIO/DIY_Signal_Generator_V1/lib/lcd_interface/lcd_interface.h:
--------------------------------------------------------------------------------
1 | #include "../lvgl/src/lvgl.h"
2 | #include "../TFT_eSPI/TFT_eSPI.h"
3 | #include "generator.h"
4 |
5 | #ifndef LCD_INTERFACE_H
6 | #define LCD_INTERFACE_H
7 |
8 | #define COLOR_BACKGROUND 0x1084
9 | #define COLOR_TOUCH_POINT TFT_BLUE
10 |
11 | void interface_init();
12 | void interface_update();
13 | void interface_update_output();
14 | void interface_update_battery();
15 |
16 | #endif
--------------------------------------------------------------------------------
/PlatformIO/DIY_Signal_Generator_V1/lib/lvgl/.github/stale.yml:
--------------------------------------------------------------------------------
1 | # Number of days of inactivity before an issue becomes stale
2 | daysUntilStale: 21
3 | # Number of days of inactivity before a stale issue is closed
4 | daysUntilClose: 7
5 | # Issues with these labels will never be considered stale
6 | exemptLabels:
7 | - architecture
8 | - pinned
9 | # Label to use when marking an issue as stale
10 | staleLabel: stale
11 | # Comment to post when marking an issue as stale. Set to `false` to disable
12 | markComment: >
13 | This issue or pull request has been automatically marked as stale because it has not had
14 | recent activity. It will be closed if no further activity occurs. Thank you
15 | for your contributions.
16 | # Comment to post when closing a stale issue. Set to `false` to disable
17 | closeComment: false
18 |
--------------------------------------------------------------------------------
/PlatformIO/DIY_Signal_Generator_V1/lib/lvgl/.gitignore:
--------------------------------------------------------------------------------
1 | # Prerequisites
2 | *.d
3 |
4 | # Object files
5 | *.o
6 | *.ko
7 | *.obj
8 | *.elf
9 |
10 | # Linker output
11 | *.ilk
12 | *.map
13 | *.exp
14 |
15 | # Precompiled Headers
16 | *.gch
17 | *.pch
18 |
19 | # Libraries
20 | *.lib
21 | *.a
22 | *.la
23 | *.lo
24 |
25 | # Shared objects (inc. Windows DLLs)
26 | *.dll
27 | *.so
28 | *.so.*
29 | *.dylib
30 |
31 | # Executables
32 | *.exe
33 | *.out
34 | *.app
35 | *.i*86
36 | *.x86_64
37 | *.hex
38 |
39 | # Debug files
40 | *.dSYM/
41 | *.su
42 | *.idb
43 | *.pdb
44 |
45 | # Kernel Module Compile Results
46 | *.mod*
47 | *.cmd
48 | .tmp_versions/
49 | modules.order
50 | Module.symvers
51 | Mkfile.old
52 | dkms.conf
53 |
--------------------------------------------------------------------------------
/PlatformIO/DIY_Signal_Generator_V1/lib/lvgl/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2019 Littlev Graphics Library
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 |
--------------------------------------------------------------------------------
/PlatformIO/DIY_Signal_Generator_V1/lib/lvgl/README.md:
--------------------------------------------------------------------------------
1 | # LVGL Arduino library
2 |
3 | This library allows to use LVGL (v7.0.x) as an Arduino library. Library can be installed via Arduino IDE Library Manager or as an .ZIP library.
4 |
5 | ## Example
6 |
7 | There is simple example which uses https://github.com/Bodmer/TFT_eSPI library as an TFT driver to simplify testing. To get all this to work you have to setup TFT_eSPI to work with your TFT display type via editing the `User_Setup.h` file in TFT_eSPI library folder, or by selecting your own configurtion in the `User_Setup_Select.h` file in TFT_eSPI library folder.
8 |
9 | LittlevGL library has its own configuration file in `lv_conf.h` file, which is locatd in LittlevGL library folder. Please get in mind to check that the corresponding resolutions in LVGL configuration match the ones in TFT_eSPI and with the physical resolution of your display.
10 |
11 | Example result should look like this:
12 |
13 | 
14 |
15 | Tested with:
16 |
17 | * My own ESP32 board, module ESP32 Wroom
18 | * PC OS: Linux, Ubuntu 20.04 LTS
19 | * IDE: Arduino IDE 1.8.12
20 | * ESP32 Core: 1.0.4
21 |
22 | ## Debugging
23 |
24 | In case of trouble there are debug informations inside LVGL. In the `ESP32_TFT_eSPI` example there is `my_print` method, which allow to send this debug informations to the serial interface. To enable this feature you have to edit `lv_conf.h` file and enable logging in section `log settings`:
25 |
26 | ```c
27 | /*Log settings*/
28 | #define USE_LV_LOG 1 /*Enable/disable the log module*/
29 | #if LV_USE_LOG
30 | /* How important log should be added:
31 | * LV_LOG_LEVEL_TRACE A lot of logs to give detailed information
32 | * LV_LOG_LEVEL_INFO Log important events
33 | * LV_LOG_LEVEL_WARN Log if something unwanted happened but didn't cause a problem
34 | * LV_LOG_LEVEL_ERROR Only critical issue, when the system may fail
35 | * LV_LOG_LEVEL_NONE Do not log anything
36 | */
37 | # define LV_LOG_LEVEL LV_LOG_LEVEL_WARN
38 | ```
39 |
40 | After enabling log module and setting LV_LOG_LEVEL accordingly the output log is sent to the `Serial` port @ 115200 Bd.
41 |
--------------------------------------------------------------------------------
/PlatformIO/DIY_Signal_Generator_V1/lib/lvgl/examples/ESP32_TFT_eSPI/ESP32_TFT_eSPI.ino:
--------------------------------------------------------------------------------
1 | #include
2 | #include
3 |
4 | TFT_eSPI tft = TFT_eSPI(); /* TFT instance */
5 | static lv_disp_buf_t disp_buf;
6 | static lv_color_t buf[LV_HOR_RES_MAX * 10];
7 |
8 | #if USE_LV_LOG != 0
9 | /* Serial debugging */
10 | void my_print(lv_log_level_t level, const char * file, uint32_t line, const char * dsc)
11 | {
12 |
13 | Serial.printf("%s@%d->%s\r\n", file, line, dsc);
14 | Serial.flush();
15 | }
16 | #endif
17 |
18 | /* Display flushing */
19 | void my_disp_flush(lv_disp_drv_t *disp, const lv_area_t *area, lv_color_t *color_p)
20 | {
21 | uint32_t w = (area->x2 - area->x1 + 1);
22 | uint32_t h = (area->y2 - area->y1 + 1);
23 |
24 | tft.startWrite();
25 | tft.setAddrWindow(area->x1, area->y1, w, h);
26 | tft.pushColors(&color_p->full, w * h, true);
27 | tft.endWrite();
28 |
29 | lv_disp_flush_ready(disp);
30 | }
31 |
32 | /* Reading input device (simulated encoder here) */
33 | bool read_encoder(lv_indev_drv_t * indev, lv_indev_data_t * data)
34 | {
35 | static int32_t last_diff = 0;
36 | int32_t diff = 0; /* Dummy - no movement */
37 | int btn_state = LV_INDEV_STATE_REL; /* Dummy - no press */
38 |
39 | data->enc_diff = diff - last_diff;;
40 | data->state = btn_state;
41 |
42 | last_diff = diff;
43 |
44 | return false;
45 | }
46 |
47 | void setup()
48 | {
49 |
50 | Serial.begin(115200); /* prepare for possible serial debug */
51 |
52 | lv_init();
53 |
54 | #if USE_LV_LOG != 0
55 | lv_log_register_print_cb(my_print); /* register print function for debugging */
56 | #endif
57 |
58 | tft.begin(); /* TFT init */
59 | tft.setRotation(1); /* Landscape orientation */
60 |
61 | lv_disp_buf_init(&disp_buf, buf, NULL, LV_HOR_RES_MAX * 10);
62 |
63 | /*Initialize the display*/
64 | lv_disp_drv_t disp_drv;
65 | lv_disp_drv_init(&disp_drv);
66 | disp_drv.hor_res = 320;
67 | disp_drv.ver_res = 240;
68 | disp_drv.flush_cb = my_disp_flush;
69 | disp_drv.buffer = &disp_buf;
70 | lv_disp_drv_register(&disp_drv);
71 |
72 | /*Initialize the (dummy) input device driver*/
73 | lv_indev_drv_t indev_drv;
74 | lv_indev_drv_init(&indev_drv);
75 | indev_drv.type = LV_INDEV_TYPE_ENCODER;
76 | indev_drv.read_cb = read_encoder;
77 | lv_indev_drv_register(&indev_drv);
78 |
79 | /* Create simple label */
80 | lv_obj_t *label = lv_label_create(lv_scr_act(), NULL);
81 | lv_label_set_text(label, "Hello Arduino! (V7.0.X)");
82 | lv_obj_align(label, NULL, LV_ALIGN_CENTER, 0, 0);
83 | }
84 |
85 |
86 | void loop()
87 | {
88 |
89 | lv_task_handler(); /* let the GUI do its work */
90 | delay(5);
91 | }
92 |
--------------------------------------------------------------------------------
/PlatformIO/DIY_Signal_Generator_V1/lib/lvgl/examples/ESP32_TFT_eSPI_Slider/Callbacks.ino:
--------------------------------------------------------------------------------
1 |
2 | void slider_event_cb(lv_obj_t * slider, lv_event_t event)
3 | {
4 |
5 | printEvent("Slider", event);
6 |
7 | if(event == LV_EVENT_VALUE_CHANGED) {
8 | static char buf[4]; /* max 3 bytes for number plus 1 null terminating byte */
9 | snprintf(buf, 4, "%u", lv_slider_get_value(slider));
10 | lv_label_set_text(slider_label, buf); /*Refresh the text*/
11 | }
12 | }
13 |
14 | void printEvent(String Event, lv_event_t event)
15 | {
16 |
17 | Serial.print(Event);
18 | printf(" ");
19 |
20 | switch(event) {
21 | case LV_EVENT_PRESSED:
22 | printf("Pressed\n");
23 | break;
24 |
25 | case LV_EVENT_SHORT_CLICKED:
26 | printf("Short clicked\n");
27 | break;
28 |
29 | case LV_EVENT_CLICKED:
30 | printf("Clicked\n");
31 | break;
32 |
33 | case LV_EVENT_LONG_PRESSED:
34 | printf("Long press\n");
35 | break;
36 |
37 | case LV_EVENT_LONG_PRESSED_REPEAT:
38 | printf("Long press repeat\n");
39 | break;
40 |
41 | case LV_EVENT_RELEASED:
42 | printf("Released\n");
43 | break;
44 | }
45 | }
46 |
47 |
--------------------------------------------------------------------------------
/PlatformIO/DIY_Signal_Generator_V1/lib/lvgl/examples/ESP32_TFT_eSPI_Slider/ESP32_TFT_eSPI_Slider.ino:
--------------------------------------------------------------------------------
1 | #include
2 | #include
3 | #include
4 |
5 | #define LVGL_TICK_PERIOD 60
6 |
7 | Ticker tick; /* timer for interrupt handler */
8 | TFT_eSPI tft = TFT_eSPI(); /* TFT instance */
9 | static lv_disp_buf_t disp_buf;
10 | static lv_color_t buf[LV_HOR_RES_MAX * 10];
11 |
12 | lv_obj_t * slider_label;
13 | int screenWidth = 480;
14 | int screenHeight = 320;
15 |
16 | #if USE_LV_LOG != 0
17 | /* Serial debugging */
18 | void my_print(lv_log_level_t level, const char * file, uint32_t line, const char * dsc)
19 | {
20 |
21 | Serial.printf("%s@%d->%s\r\n", file, line, dsc);
22 | delay(100);
23 | }
24 | #endif
25 |
26 | /* Display flushing */
27 | void my_disp_flush(lv_disp_drv_t *disp, const lv_area_t *area, lv_color_t *color_p)
28 | {
29 | uint16_t c;
30 |
31 | tft.startWrite(); /* Start new TFT transaction */
32 | tft.setAddrWindow(area->x1, area->y1, (area->x2 - area->x1 + 1), (area->y2 - area->y1 + 1)); /* set the working window */
33 | for (int y = area->y1; y <= area->y2; y++) {
34 | for (int x = area->x1; x <= area->x2; x++) {
35 | c = color_p->full;
36 | tft.writeColor(c, 1);
37 | color_p++;
38 | }
39 | }
40 | tft.endWrite(); /* terminate TFT transaction */
41 | lv_disp_flush_ready(disp); /* tell lvgl that flushing is done */
42 | }
43 |
44 | bool my_touchpad_read(lv_indev_drv_t * indev_driver, lv_indev_data_t * data)
45 | {
46 | uint16_t touchX, touchY;
47 |
48 | bool touched = tft.getTouch(&touchX, &touchY, 600);
49 |
50 | if(!touched)
51 | {
52 | return false;
53 | }
54 |
55 | if(touchX>screenWidth || touchY > screenHeight)
56 | {
57 | Serial.println("Y or y outside of expected parameters..");
58 | Serial.print("y:");
59 | Serial.print(touchX);
60 | Serial.print(" x:");
61 | Serial.print(touchY);
62 | }
63 | else
64 | {
65 |
66 | data->state = touched ? LV_INDEV_STATE_PR : LV_INDEV_STATE_REL;
67 |
68 | /*Save the state and save the pressed coordinate*/
69 | //if(data->state == LV_INDEV_STATE_PR) touchpad_get_xy(&last_x, &last_y);
70 |
71 | /*Set the coordinates (if released use the last pressed coordinates)*/
72 | data->point.x = touchX;
73 | data->point.y = touchY;
74 |
75 | Serial.print("Data x");
76 | Serial.println(touchX);
77 |
78 | Serial.print("Data y");
79 | Serial.println(touchY);
80 |
81 | }
82 |
83 | return false; /*Return `false` because we are not buffering and no more data to read*/
84 | }
85 |
86 | /* Interrupt driven periodic handler */
87 | static void lv_tick_handler(void)
88 | {
89 |
90 | lv_tick_inc(LVGL_TICK_PERIOD);
91 | }
92 |
--------------------------------------------------------------------------------
/PlatformIO/DIY_Signal_Generator_V1/lib/lvgl/examples/ESP32_TFT_eSPI_Slider/Loop.ino:
--------------------------------------------------------------------------------
1 | void loop() {
2 |
3 | lv_task_handler(); /* let the GUI do its work */
4 | delay(5);
5 | }
6 |
--------------------------------------------------------------------------------
/PlatformIO/DIY_Signal_Generator_V1/lib/lvgl/examples/ESP32_TFT_eSPI_Slider/Readme.md:
--------------------------------------------------------------------------------
1 | # Example for lv_arduino using a slider
2 |
3 | This example has the screen set to 320x480 (ILI9488), change this by altering the following lines in the main ino file:
4 |
5 | ```C
6 | int screenWidth = 480;
7 | int screenHeight = 320;
8 | ```
9 |
10 | ## Backlight
11 |
12 | Change pin 32 to your preferred backlight pin using a PNP transistor (2N3906) or remove the following code and connect directly to +ve:
13 |
14 | ```C
15 | ledcSetup(10, 5000/*freq*/, 10 /*resolution*/);
16 | ledcAttachPin(32, 10);
17 | analogReadResolution(10);
18 | ledcWrite(10,768);
19 | ```
20 |
21 | ## Theme selection
22 |
23 | Change the following to change the theme:
24 |
25 | ```C
26 | lv_theme_t * th = lv_theme_night_init(210, NULL); //Set a HUE value and a Font for the Night Theme
27 | lv_theme_set_current(th);
28 | ```
29 |
30 | ## Calibration
31 |
32 | This is using the bodmer tft_espi driver for touch. To correctly set the calibration load the calibration sketch and replace the following with your values:
33 |
34 | ```C
35 | uint16_t calData[5] = { 275, 3620, 264, 3532, 1 };
36 | ```
37 |
38 | ## Screen rotation
39 |
40 | Check the following if you need to alter your screen rotation:
41 |
42 | ```C
43 | tft.setRotation(3);
44 | ```
45 |
--------------------------------------------------------------------------------
/PlatformIO/DIY_Signal_Generator_V1/lib/lvgl/examples/ESP32_TFT_eSPI_Slider/Setup.ino:
--------------------------------------------------------------------------------
1 | void setup() {
2 |
3 | ledcSetup(10, 5000/*freq*/, 10 /*resolution*/);
4 | ledcAttachPin(32, 10);
5 | analogReadResolution(10);
6 | ledcWrite(10,768);
7 |
8 | Serial.begin(115200); /* prepare for possible serial debug */
9 |
10 | lv_init();
11 |
12 | #if USE_LV_LOG != 0
13 | lv_log_register_print_cb(my_print); /* register print function for debugging */
14 | #endif
15 |
16 | tft.begin(); /* TFT init */
17 | tft.setRotation(3);
18 |
19 | uint16_t calData[5] = { 275, 3620, 264, 3532, 1 };
20 | tft.setTouch(calData);
21 |
22 | lv_disp_buf_init(&disp_buf, buf, NULL, LV_HOR_RES_MAX * 10);
23 |
24 | /*Initialize the display*/
25 | lv_disp_drv_t disp_drv;
26 | lv_disp_drv_init(&disp_drv);
27 | disp_drv.hor_res = screenWidth;
28 | disp_drv.ver_res = screenHeight;
29 | disp_drv.flush_cb = my_disp_flush;
30 | disp_drv.buffer = &disp_buf;
31 | lv_disp_drv_register(&disp_drv);
32 |
33 | /*Initialize the input device driver*/
34 | lv_indev_drv_t indev_drv;
35 | lv_indev_drv_init(&indev_drv); /*Descriptor of a input device driver*/
36 | indev_drv.type = LV_INDEV_TYPE_POINTER; /*Touch pad is a pointer-like device*/
37 | indev_drv.read_cb = my_touchpad_read; /*Set your driver function*/
38 | lv_indev_drv_register(&indev_drv); /*Finally register the driver*/
39 |
40 | /*Initialize the graphics library's tick*/
41 | tick.attach_ms(LVGL_TICK_PERIOD, lv_tick_handler);
42 |
43 | //Set the theme..
44 | lv_theme_t * th = lv_theme_night_init(210, NULL); //Set a HUE value and a Font for the Night Theme
45 | lv_theme_set_current(th);
46 |
47 | lv_obj_t * scr = lv_cont_create(NULL, NULL);
48 | lv_disp_load_scr(scr);
49 |
50 | //lv_obj_t * tv = lv_tabview_create(scr, NULL);
51 | //lv_obj_set_size(tv, lv_disp_get_hor_res(NULL), lv_disp_get_ver_res(NULL));
52 |
53 | /* Create simple label */
54 | lv_obj_t *label = lv_label_create(lv_scr_act(), NULL);
55 | lv_label_set_text(label, "Hello Arduino! (V6.1)");
56 | lv_obj_align(label, NULL, LV_ALIGN_CENTER, 0, -50);
57 |
58 | /* Create a slider in the center of the display */
59 | lv_obj_t * slider = lv_slider_create(lv_scr_act(), NULL);
60 | lv_obj_set_width(slider, screenWidth-50); /*Set the width*/
61 | lv_obj_set_height(slider, 50);
62 | lv_obj_align(slider, NULL, LV_ALIGN_CENTER, 0, 0); /*Align to the center of the parent (screen)*/
63 | lv_obj_set_event_cb(slider, slider_event_cb); /*Assign an event function*/
64 |
65 | /* Create a label below the slider */
66 | slider_label = lv_label_create(lv_scr_act(), NULL);
67 | lv_label_set_text(slider_label, "0");
68 | lv_obj_set_auto_realign(slider, true);
69 | lv_obj_align(slider_label, slider, LV_ALIGN_OUT_BOTTOM_MID, 0, 10);
70 |
71 | }
72 |
73 |
--------------------------------------------------------------------------------
/PlatformIO/DIY_Signal_Generator_V1/lib/lvgl/examples/STM32_TFT_eSPI_Slider/Readme.md:
--------------------------------------------------------------------------------
1 | Littlevgl on STM32F103C BluePill and ILI9341 in 8-Bit Parallel with XPT2046 Touch-pad on SPI2 port.
2 | Which able to dim an LED attached to PB6 Pin (thru 100to330 ohm series resistor from GND) by adjusting the slider.
3 | Library dependencies:
4 | 1. TFT_eSPI https://github.com/Bodmer/TFT_eSPI
5 | and choosing the right setup inside User_Setup_Select.h and also set right pins on selected user file.
6 | 2. TFT_eTouch.h https://github.com/achillhasler/TFT_eTouch
7 | and set the right pins inside TFT_eTouchUser.h and also run calibrate.ino to get the calibration value and store it inside
8 | TFT_eTouchUser.h like #define TOUCH_DEFAULT_CALIBRATION { 294, 3913, 339, 3869, 2 }
9 | Note that TFT_eSPI touch include extension does nether support second SPI port nor touch in parallel mode.
10 | 3. Installing the last master Arduino_Core_STM32 on https://github.com/stm32duino/Arduino_Core_STM32
11 | because the Hardwaretimer definitions changed a bit in 1.9.0 version which about to release.
12 | 4. lv_arduino https://github.com/littlevgl/lv_arduino
13 | and config the lv_conf.h eg:
14 | #define LV_HOR_RES_MAX (320)
15 | #define LV_VER_RES_MAX (240)
16 | #define LV_USE_THEME_NIGHT 1 /*Dark elegant theme*/
17 | #define LV_MEM_CUSTOM 1 // otherwise overfloe the flash on STM32F103CB
18 |
19 | 
20 |
21 |
22 | Created by Hamid Saffari @ Apr 2020. https://github.com/HamidSaffari/
23 | Released into the public domain.
24 |
--------------------------------------------------------------------------------
/PlatformIO/DIY_Signal_Generator_V1/lib/lvgl/examples/STM32_TFT_eSPI_Slider/photo_2020-04-02_01-55-36.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/daumemo/DIY-Signal-Generator/7b449094d92bef584b805de9c50e9535e7786d8f/PlatformIO/DIY_Signal_Generator_V1/lib/lvgl/examples/STM32_TFT_eSPI_Slider/photo_2020-04-02_01-55-36.jpg
--------------------------------------------------------------------------------
/PlatformIO/DIY_Signal_Generator_V1/lib/lvgl/extras/img/lvglarduino.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/daumemo/DIY-Signal-Generator/7b449094d92bef584b805de9c50e9535e7786d8f/PlatformIO/DIY_Signal_Generator_V1/lib/lvgl/extras/img/lvglarduino.jpg
--------------------------------------------------------------------------------
/PlatformIO/DIY_Signal_Generator_V1/lib/lvgl/keywords.txt:
--------------------------------------------------------------------------------
1 | #######################################
2 | # Syntax Coloring Map LowPower
3 | #######################################
4 |
5 | #######################################
6 | # Datatypes (KEYWORD1)
7 | #######################################
8 |
9 | #######################################
10 | # Methods and Functions (KEYWORD2)
11 | #######################################
12 |
13 | #######################################
14 | # Instances (KEYWORD2)
15 | #######################################
16 |
17 | #######################################
18 | # Constants (LITERAL1)
19 | #######################################
20 |
--------------------------------------------------------------------------------
/PlatformIO/DIY_Signal_Generator_V1/lib/lvgl/library.json:
--------------------------------------------------------------------------------
1 | {
2 | "name":"lv_arduino",
3 | "description":"Full-featured Graphics Library for embedded systems",
4 | "keywords":"display,gui",
5 | "authors":
6 | {
7 | "name": "Gabor Kiss-Vamosi",
8 | "maintainer": true
9 | },
10 | "repository":
11 | {
12 | "type": "git",
13 | "url": "https://github.com/lvgl/lv_arduino"
14 | },
15 | "version": "3.0.0",
16 | "license": "MIT",
17 | "frameworks": "arduino",
18 | "build": {
19 | "libCompatMode": "strict"
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/PlatformIO/DIY_Signal_Generator_V1/lib/lvgl/library.properties:
--------------------------------------------------------------------------------
1 | name=lv_arduino
2 | version=3.0.0
3 | author=Gabor Kiss-Vamosi
4 | maintainer=Pavel Brychta
5 | sentence=Full-featured Graphics Library for embedded systems
6 | paragraph=Littlev Graphics Library provides everything you need to create a Graphical User Interface (GUI) on embedded systems with easy-to-use graphical elements, beautiful visual effects and low memory footprint.
7 | category=Display
8 | url=https://lvgl.io
9 | architectures=*
10 | includes=lvgl.h
11 |
--------------------------------------------------------------------------------
/PlatformIO/DIY_Signal_Generator_V1/lib/lvgl/src/LICENCE.txt:
--------------------------------------------------------------------------------
1 | MIT licence
2 | Copyright (c) 2020 LVGL LLC
3 |
4 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
5 |
6 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
7 |
8 | THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
9 |
--------------------------------------------------------------------------------
/PlatformIO/DIY_Signal_Generator_V1/lib/lvgl/src/library.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "lvgl",
3 | "version": "v7.0.1",
4 | "keywords": "graphics, gui, embedded, littlevgl",
5 | "description": "Graphics library to create embedded GUI with easy-to-use graphical elements, beautiful visual effects and low memory footprint. It offers anti-aliasing, opacity, and animations using only one frame buffer.",
6 | "repository":
7 | {
8 | "type": "git",
9 | "url": "https://github.com/lvgl/lvgl.git"
10 | },
11 | "build": {
12 | "includeDir": "."
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/PlatformIO/DIY_Signal_Generator_V1/lib/lvgl/src/lvgl.mk:
--------------------------------------------------------------------------------
1 | include $(LVGL_DIR)/$(LVGL_DIR_NAME)/src/lv_core/lv_core.mk
2 | include $(LVGL_DIR)/$(LVGL_DIR_NAME)/src/lv_hal/lv_hal.mk
3 | include $(LVGL_DIR)/$(LVGL_DIR_NAME)/src/lv_widgets/lv_widgets.mk
4 | include $(LVGL_DIR)/$(LVGL_DIR_NAME)/src/lv_font/lv_font.mk
5 | include $(LVGL_DIR)/$(LVGL_DIR_NAME)/src/lv_misc/lv_misc.mk
6 | include $(LVGL_DIR)/$(LVGL_DIR_NAME)/src/lv_themes/lv_themes.mk
7 | include $(LVGL_DIR)/$(LVGL_DIR_NAME)/src/lv_draw/lv_draw.mk
8 | include $(LVGL_DIR)/$(LVGL_DIR_NAME)/src/lv_gpu/lv_gpu.mk
9 |
10 |
11 |
--------------------------------------------------------------------------------
/PlatformIO/DIY_Signal_Generator_V1/lib/lvgl/src/porting/lv_port_disp_template.h:
--------------------------------------------------------------------------------
1 | /**
2 | * @file lv_port_disp_templ.h
3 | *
4 | */
5 |
6 | /*Copy this file as "lv_port_disp.h" and set this value to "1" to enable content*/
7 | #if 0
8 |
9 | #ifndef LV_PORT_DISP_TEMPL_H
10 | #define LV_PORT_DISP_TEMPL_H
11 |
12 | #ifdef __cplusplus
13 | extern "C" {
14 | #endif
15 |
16 | /*********************
17 | * INCLUDES
18 | *********************/
19 | #include "lvgl/lvgl.h"
20 |
21 | /*********************
22 | * DEFINES
23 | *********************/
24 |
25 | /**********************
26 | * TYPEDEFS
27 | **********************/
28 |
29 | /**********************
30 | * GLOBAL PROTOTYPES
31 | **********************/
32 |
33 | /**********************
34 | * MACROS
35 | **********************/
36 |
37 |
38 | #ifdef __cplusplus
39 | } /* extern "C" */
40 | #endif
41 |
42 | #endif /*LV_PORT_DISP_TEMPL_H*/
43 |
44 | #endif /*Disable/Enable content*/
45 |
--------------------------------------------------------------------------------
/PlatformIO/DIY_Signal_Generator_V1/lib/lvgl/src/porting/lv_port_fs_template.h:
--------------------------------------------------------------------------------
1 | /**
2 | * @file lv_port_fs_templ.h
3 | *
4 | */
5 |
6 | /*Copy this file as "lv_port_fs.h" and set this value to "1" to enable content*/
7 | #if 0
8 |
9 | #ifndef LV_PORT_FS_TEMPL_H
10 | #define LV_PORT_FS_TEMPL_H
11 |
12 | #ifdef __cplusplus
13 | extern "C" {
14 | #endif
15 |
16 | /*********************
17 | * INCLUDES
18 | *********************/
19 | #include "lvgl/lvgl.h"
20 |
21 | /*********************
22 | * DEFINES
23 | *********************/
24 |
25 | /**********************
26 | * TYPEDEFS
27 | **********************/
28 |
29 | /**********************
30 | * GLOBAL PROTOTYPES
31 | **********************/
32 |
33 | /**********************
34 | * MACROS
35 | **********************/
36 |
37 |
38 | #ifdef __cplusplus
39 | } /* extern "C" */
40 | #endif
41 |
42 | #endif /*LV_PORT_FS_TEMPL_H*/
43 |
44 | #endif /*Disable/Enable content*/
45 |
--------------------------------------------------------------------------------
/PlatformIO/DIY_Signal_Generator_V1/lib/lvgl/src/porting/lv_port_indev_template.h:
--------------------------------------------------------------------------------
1 |
2 | /**
3 | * @file lv_port_indev_templ.h
4 | *
5 | */
6 |
7 | /*Copy this file as "lv_port_indev.h" and set this value to "1" to enable content*/
8 | #if 0
9 |
10 | #ifndef LV_PORT_INDEV_TEMPL_H
11 | #define LV_PORT_INDEV_TEMPL_H
12 |
13 | #ifdef __cplusplus
14 | extern "C" {
15 | #endif
16 |
17 | /*********************
18 | * INCLUDES
19 | *********************/
20 | #include "lvgl/lvgl.h"
21 |
22 | /*********************
23 | * DEFINES
24 | *********************/
25 |
26 | /**********************
27 | * TYPEDEFS
28 | **********************/
29 |
30 | /**********************
31 | * GLOBAL PROTOTYPES
32 | **********************/
33 |
34 | /**********************
35 | * MACROS
36 | **********************/
37 |
38 |
39 | #ifdef __cplusplus
40 | } /* extern "C" */
41 | #endif
42 |
43 | #endif /*LV_PORT_INDEV_TEMPL_H*/
44 |
45 | #endif /*Disable/Enable content*/
46 |
--------------------------------------------------------------------------------
/PlatformIO/DIY_Signal_Generator_V1/lib/lvgl/src/scripts/built_in_font/DejaVuSans.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/daumemo/DIY-Signal-Generator/7b449094d92bef584b805de9c50e9535e7786d8f/PlatformIO/DIY_Signal_Generator_V1/lib/lvgl/src/scripts/built_in_font/DejaVuSans.ttf
--------------------------------------------------------------------------------
/PlatformIO/DIY_Signal_Generator_V1/lib/lvgl/src/scripts/built_in_font/FontAwesome5-Solid+Brands+Regular.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/daumemo/DIY-Signal-Generator/7b449094d92bef584b805de9c50e9535e7786d8f/PlatformIO/DIY_Signal_Generator_V1/lib/lvgl/src/scripts/built_in_font/FontAwesome5-Solid+Brands+Regular.woff
--------------------------------------------------------------------------------
/PlatformIO/DIY_Signal_Generator_V1/lib/lvgl/src/scripts/built_in_font/Montserrat-Medium.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/daumemo/DIY-Signal-Generator/7b449094d92bef584b805de9c50e9535e7786d8f/PlatformIO/DIY_Signal_Generator_V1/lib/lvgl/src/scripts/built_in_font/Montserrat-Medium.ttf
--------------------------------------------------------------------------------
/PlatformIO/DIY_Signal_Generator_V1/lib/lvgl/src/scripts/built_in_font/SimSun.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/daumemo/DIY-Signal-Generator/7b449094d92bef584b805de9c50e9535e7786d8f/PlatformIO/DIY_Signal_Generator_V1/lib/lvgl/src/scripts/built_in_font/SimSun.woff
--------------------------------------------------------------------------------
/PlatformIO/DIY_Signal_Generator_V1/lib/lvgl/src/scripts/built_in_font/built_in_font_gen.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python3.6
2 |
3 | import argparse
4 | from argparse import RawTextHelpFormatter
5 | import os
6 | import sys
7 |
8 | parser = argparse.ArgumentParser(description="""Create fonts for LittelvGL including the built-in symbols. lv_font_conv needs to be installed. See https://github.com/littlevgl/lv_font_conv
9 | Example: python built_in_font_gen.py --size 16 -o lv_font_roboto_16.c --bpp 4 -r 0x20-0x7F""", formatter_class=RawTextHelpFormatter)
10 | parser.add_argument('-s', '--size',
11 | type=int,
12 | metavar = 'px',
13 | nargs='?',
14 | help='Size of the font in px')
15 | parser.add_argument('--bpp',
16 | type=int,
17 | metavar = '1,2,4',
18 | nargs='?',
19 | help='Bit per pixel')
20 | parser.add_argument('-r', '--range',
21 | nargs='+',
22 | metavar = 'start-end',
23 | default=['0x20-0x7F,0xB0,0x2022'],
24 | help='Ranges and/or characters to include. Default is 0x20-7F (ASCII). E.g. -r 0x20-0x7F, 0x200, 324')
25 | parser.add_argument('--symbols',
26 | nargs='+',
27 | metavar = 'sym',
28 | default=[''],
29 | help=u'Symbols to include. E.g. -s ÁÉŐ'.encode('utf-8'))
30 | parser.add_argument('--font',
31 | metavar = 'file',
32 | nargs='?',
33 | default='Montserrat-Medium.ttf',
34 | help='A TTF or WOFF file')
35 | parser.add_argument('-o', '--output',
36 | nargs='?',
37 | metavar='file',
38 | help='Output file name. E.g. my_font_20.c')
39 | parser.add_argument('--compressed', action='store_true',
40 | help='Compress the bitmaps')
41 | parser.add_argument('--subpx', action='store_true',
42 | help='3 times wider letters for sub pixel rendering')
43 |
44 | args = parser.parse_args()
45 |
46 | if args.compressed == False:
47 | compr = "--no-compress --no-prefilter"
48 | else:
49 | compr = ""
50 |
51 | if len(args.symbols[0]) != 0:
52 | args.symbols[0] = "--symbols " + args.symbols[0]
53 |
54 | #Built in symbols
55 | syms = "61441,61448,61451,61452,61452,61453,61457,61459,61461,61465,61468,61473,61478,61479,61480,61502,61512,61515,61516,61517,61521,61522,61523,61524,61543,61544,61550,61552,61553,61556,61559,61560,61561,61563,61587,61589,61636,61637,61639,61671,61674,61683,61724,61732,61787,61931,62016,62017,62018,62019,62020,62087,62099,62212,62189,62810,63426,63650"
56 |
57 | #Run the command (Add degree and bbullet symbol)
58 | cmd = "lv_font_conv {} --bpp {} --size {} --font {} -r {} {} --font FontAwesome5-Solid+Brands+Regular.woff -r {} --format lvgl -o {} --force-fast-kern-format".format(compr, args.bpp, args.size, args.font, args.range[0], args.symbols[0], syms, args.output)
59 | os.system(cmd)
60 |
--------------------------------------------------------------------------------
/PlatformIO/DIY_Signal_Generator_V1/lib/lvgl/src/scripts/code-format.cfg:
--------------------------------------------------------------------------------
1 | --style=kr
2 | --indent=spaces=4
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 | --recursive
23 | --suffix=none
24 | --preserve-date
25 | --formatted
26 | --exclude=lv_conf_internal.h
27 | --exclude=../src/lv_font/lv_font_montserrat_12.c
28 | --exclude=../src/lv_font/lv_font_montserrat_14.c
29 | --exclude=../src/lv_font/lv_font_montserrat_16.c
30 | --exclude=../src/lv_font/lv_font_montserrat_18.c
31 | --exclude=../src/lv_font/lv_font_montserrat_20.c
32 | --exclude=../src/lv_font/lv_font_montserrat_22.c
33 | --exclude=../src/lv_font/lv_font_montserrat_24.c
34 | --exclude=../src/lv_font/lv_font_montserrat_26.c
35 | --exclude=../src/lv_font/lv_font_montserrat_28.c
36 | --exclude=../src/lv_font/lv_font_montserrat_30.c
37 | --exclude=../src/lv_font/lv_font_montserrat_32.c
38 | --exclude=../src/lv_font/lv_font_montserrat_34.c
39 | --exclude=../src/lv_font/lv_font_montserrat_36.c
40 | --exclude=../src/lv_font/lv_font_montserrat_38.c
41 | --exclude=../src/lv_font/lv_font_montserrat_40.c
42 | --exclude=../src/lv_font/lv_font_montserrat_42.c
43 | --exclude=../src/lv_font/lv_font_montserrat_44.c
44 | --exclude=../src/lv_font/lv_font_montserrat_46.c
45 | --exclude=../src/lv_font/lv_font_montserrat_48.c
46 | --exclude=../src/lv_font/lv_font_montserrat_12_subpx.c
47 | --exclude=../src/lv_font/lv_font_montserrat_28_compressed.c
48 | --exclude=../src/lv_font/lv_font_simsun_16_cjk.c
49 | --exclude=../src/lv_font/lv_font_dejavu_16_persian_hebrew.c
50 |
51 |
--------------------------------------------------------------------------------
/PlatformIO/DIY_Signal_Generator_V1/lib/lvgl/src/scripts/code-format.sh:
--------------------------------------------------------------------------------
1 | astyle --options=code-format.cfg "../src/*.c,*.h"
2 |
--------------------------------------------------------------------------------
/PlatformIO/DIY_Signal_Generator_V1/lib/lvgl/src/scripts/cppcheck_run.sh:
--------------------------------------------------------------------------------
1 | cppcheck -j8 --template="{severity}\t{file}:{line}\t{id}: {message}" --enable=all ../src/ --output-file=cppcheck_res.txt --suppress=unusedFunction --suppress=preprocessorErrorDirective --force
2 |
3 |
--------------------------------------------------------------------------------
/PlatformIO/DIY_Signal_Generator_V1/lib/lvgl/src/scripts/infer_run.sh:
--------------------------------------------------------------------------------
1 | # https://github.com/facebook/infer
2 | #
3 | # Install:
4 | # VERSION=0.17.0; \
5 | # curl -sSL "https://github.com/facebook/infer/releases/download/v$VERSION/infer-linux64-v$VERSION.tar.xz" \
6 | # | sudo tar -C /opt -xJ && \
7 | # sudoln -s "/opt/infer-linux64-v$VERSION/bin/infer" /usr/local/bin/infer
8 |
9 |
10 | infer run -- make -j8
11 |
--------------------------------------------------------------------------------
/PlatformIO/DIY_Signal_Generator_V1/lib/lvgl/src/scripts/lv_conf_checker.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python3.6
2 |
3 | '''
4 | Generates a checker file for lv_conf.h from lv_conf_templ.h define all the not defined values
5 | '''
6 |
7 |
8 | import re
9 |
10 | fin = open("../lv_conf_template.h", "r")
11 | fout = open("../src/lv_conf_internal.h", "w")
12 |
13 |
14 | fout.write(
15 | '''/**
16 | * GENERATED FILE, DO NOT EDIT IT!
17 | * @file lv_conf_internal.h
18 | * Make sure all the defines of lv_conf.h have a default value
19 | **/
20 |
21 | #ifndef LV_CONF_INTERNAL_H
22 | #define LV_CONF_INTERNAL_H
23 | /* clang-format off */
24 |
25 | #include
26 |
27 | #if defined(LV_CONF_PATH)
28 | #define __LV_TO_STR_AUX(x) #x
29 | #define __LV_TO_STR(x) __LV_TO_STR_AUX(x)
30 | #include __LV_TO_STR(LV_CONF_PATH)
31 | #undef __LV_TO_STR_AUX
32 | #undef __LV_TO_STR
33 | #elif defined(LV_CONF_INCLUDE_SIMPLE)
34 | #include "lv_conf.h"
35 | #else
36 | #include "../../lv_conf.h"
37 | #endif
38 |
39 | '''
40 | )
41 |
42 | started = 0
43 |
44 | for i in fin.read().splitlines():
45 | if not started:
46 | if '#define LV_CONF_H' in i:
47 | started = 1
48 | continue
49 | else:
50 | continue
51 |
52 | if '/*--END OF LV_CONF_H--*/' in i: break
53 |
54 | r = re.search(r'^ *# *define ([^\s]+).*$', i)
55 |
56 | if r:
57 | line = re.sub('\(.*?\)', '', r[1], 1) #remove parentheses from macros
58 | fout.write(
59 | f'#ifndef {line}\n'
60 | f'{i}\n'
61 | '#endif\n'
62 | )
63 | elif re.search('^ *typedef .*;.*$', i):
64 | continue #ignore typedefs to avoide redeclaration
65 | else:
66 | fout.write(f'{i}\n')
67 |
68 |
69 | fout.write(
70 | '''
71 | #endif /*LV_CONF_CHECKER_H*/
72 | '''
73 | )
74 |
75 | fin.close()
76 | fout.close()
77 |
--------------------------------------------------------------------------------
/PlatformIO/DIY_Signal_Generator_V1/lib/lvgl/src/src/lv_core/lv_core.mk:
--------------------------------------------------------------------------------
1 | CSRCS += lv_group.c
2 | CSRCS += lv_indev.c
3 | CSRCS += lv_disp.c
4 | CSRCS += lv_obj.c
5 | CSRCS += lv_refr.c
6 | CSRCS += lv_style.c
7 |
8 | DEPPATH += --dep-path $(LVGL_DIR)/$(LVGL_DIR_NAME)/src/lv_core
9 | VPATH += :$(LVGL_DIR)/$(LVGL_DIR_NAME)/src/lv_core
10 |
11 | CFLAGS += "-I$(LVGL_DIR)/$(LVGL_DIR_NAME)/src/lv_core"
12 |
--------------------------------------------------------------------------------
/PlatformIO/DIY_Signal_Generator_V1/lib/lvgl/src/src/lv_core/lv_refr.h:
--------------------------------------------------------------------------------
1 | /**
2 | * @file lv_refr.h
3 | *
4 | */
5 |
6 | #ifndef LV_REFR_H
7 | #define LV_REFR_H
8 |
9 | #ifdef __cplusplus
10 | extern "C" {
11 | #endif
12 |
13 | /*********************
14 | * INCLUDES
15 | *********************/
16 | #include "lv_obj.h"
17 | #include
18 |
19 | /*********************
20 | * DEFINES
21 | *********************/
22 |
23 | #define LV_REFR_TASK_PRIO LV_TASK_PRIO_MID
24 |
25 | /**********************
26 | * TYPEDEFS
27 | **********************/
28 |
29 | /**********************
30 | * STATIC PROTOTYPES
31 | **********************/
32 |
33 | /**********************
34 | * STATIC VARIABLES
35 | **********************/
36 |
37 | /**********************
38 | * MACROS
39 | **********************/
40 |
41 | /**********************
42 | * GLOBAL FUNCTIONS
43 | **********************/
44 |
45 | /**
46 | * Initialize the screen refresh subsystem
47 | */
48 | void _lv_refr_init(void);
49 |
50 | /**
51 | * Redraw the invalidated areas now.
52 | * Normally the redrawing is periodically executed in `lv_task_handler` but a long blocking process
53 | * can prevent the call of `lv_task_handler`. In this case if the the GUI is updated in the process
54 | * (e.g. progress bar) this function can be called when the screen should be updated.
55 | * @param disp pointer to display to refresh. NULL to refresh all displays.
56 | */
57 | void lv_refr_now(lv_disp_t * disp);
58 |
59 | /**
60 | * Invalidate an area on display to redraw it
61 | * @param area_p pointer to area which should be invalidated (NULL: delete the invalidated areas)
62 | * @param disp pointer to display where the area should be invalidated (NULL can be used if there is
63 | * only one display)
64 | */
65 | void _lv_inv_area(lv_disp_t * disp, const lv_area_t * area_p);
66 |
67 | /**
68 | * Get the display which is being refreshed
69 | * @return the display being refreshed
70 | */
71 | lv_disp_t * _lv_refr_get_disp_refreshing(void);
72 |
73 | /**
74 | * Set the display which is being refreshed.
75 | * It shouldn't be used directly by the user.
76 | * It can be used to trick the drawing functions about there is an active display.
77 | * @param the display being refreshed
78 | */
79 | void _lv_refr_set_disp_refreshing(lv_disp_t * disp);
80 |
81 | /**
82 | * Called periodically to handle the refreshing
83 | * @param task pointer to the task itself
84 | */
85 | void _lv_disp_refr_task(lv_task_t * task);
86 |
87 | /**********************
88 | * STATIC FUNCTIONS
89 | **********************/
90 |
91 | #ifdef __cplusplus
92 | } /* extern "C" */
93 | #endif
94 |
95 | #endif /*LV_REFR_H*/
96 |
--------------------------------------------------------------------------------
/PlatformIO/DIY_Signal_Generator_V1/lib/lvgl/src/src/lv_draw/lv_draw.h:
--------------------------------------------------------------------------------
1 | /**
2 | * @file lv_draw.h
3 | *
4 | */
5 |
6 | #ifndef LV_DRAW_H
7 | #define LV_DRAW_H
8 |
9 | #ifdef __cplusplus
10 | extern "C" {
11 | #endif
12 |
13 | /*********************
14 | * INCLUDES
15 | *********************/
16 | #include "../lv_conf_internal.h"
17 |
18 | #include "../lv_core/lv_style.h"
19 | #include "../lv_misc/lv_txt.h"
20 | #include "lv_img_decoder.h"
21 |
22 | #include "lv_draw_rect.h"
23 | #include "lv_draw_label.h"
24 | #include "lv_draw_img.h"
25 | #include "lv_draw_line.h"
26 | #include "lv_draw_triangle.h"
27 | #include "lv_draw_arc.h"
28 | #include "lv_draw_blend.h"
29 | #include "lv_draw_mask.h"
30 |
31 | /*********************
32 | * DEFINES
33 | *********************/
34 |
35 | /**********************
36 | * TYPEDEFS
37 | **********************/
38 |
39 | /**********************
40 | * GLOBAL PROTOTYPES
41 | **********************/
42 |
43 | /**********************
44 | * GLOBAL VARIABLES
45 | **********************/
46 |
47 | /**********************
48 | * MACROS
49 | **********************/
50 |
51 | /**********************
52 | * POST INCLUDES
53 | *********************/
54 |
55 | #ifdef __cplusplus
56 | } /* extern "C" */
57 | #endif
58 |
59 | #endif /*LV_DRAW_H*/
60 |
--------------------------------------------------------------------------------
/PlatformIO/DIY_Signal_Generator_V1/lib/lvgl/src/src/lv_draw/lv_draw.mk:
--------------------------------------------------------------------------------
1 | CSRCS += lv_draw_mask.c
2 | CSRCS += lv_draw_blend.c
3 | CSRCS += lv_draw_rect.c
4 | CSRCS += lv_draw_label.c
5 | CSRCS += lv_draw_line.c
6 | CSRCS += lv_draw_img.c
7 | CSRCS += lv_draw_arc.c
8 | CSRCS += lv_draw_triangle.c
9 | CSRCS += lv_img_decoder.c
10 | CSRCS += lv_img_cache.c
11 | CSRCS += lv_img_buf.c
12 |
13 | DEPPATH += --dep-path $(LVGL_DIR)/$(LVGL_DIR_NAME)/src/lv_draw
14 | VPATH += :$(LVGL_DIR)/$(LVGL_DIR_NAME)/src/lv_draw
15 |
16 | CFLAGS += "-I$(LVGL_DIR)/$(LVGL_DIR_NAME)/src/lv_draw"
17 |
--------------------------------------------------------------------------------
/PlatformIO/DIY_Signal_Generator_V1/lib/lvgl/src/src/lv_draw/lv_draw_arc.h:
--------------------------------------------------------------------------------
1 | /**
2 | * @file lv_draw_arc.h
3 | *
4 | */
5 |
6 | #ifndef LV_DRAW_ARC_H
7 | #define LV_DRAW_ARC_H
8 |
9 | #ifdef __cplusplus
10 | extern "C" {
11 | #endif
12 |
13 | /*********************
14 | * INCLUDES
15 | *********************/
16 | #include "lv_draw_line.h"
17 |
18 | /*********************
19 | * DEFINES
20 | *********************/
21 |
22 | /**********************
23 | * TYPEDEFS
24 | **********************/
25 |
26 | /**********************
27 | * GLOBAL PROTOTYPES
28 | **********************/
29 |
30 | /**
31 | * Draw an arc. (Can draw pie too with great thickness.)
32 | * @param center_x the x coordinate of the center of the arc
33 | * @param center_y the y coordinate of the center of the arc
34 | * @param radius the radius of the arc
35 | * @param mask the arc will be drawn only in this mask
36 | * @param start_angle the start angle of the arc (0 deg on the bottom, 90 deg on the right)
37 | * @param end_angle the end angle of the arc
38 | * @param clip_area the arc will be drawn only in this area
39 | * @param dsc pointer to an initialized `lv_draw_line_dsc_t` variable
40 | */
41 | void lv_draw_arc(lv_coord_t center_x, lv_coord_t center_y, uint16_t radius, uint16_t start_angle, uint16_t end_angle,
42 | const lv_area_t * clip_area, const lv_draw_line_dsc_t * dsc);
43 |
44 | /**********************
45 | * MACROS
46 | **********************/
47 |
48 | #ifdef __cplusplus
49 | } /* extern "C" */
50 | #endif
51 |
52 | #endif /*LV_DRAW_ARC*/
53 |
--------------------------------------------------------------------------------
/PlatformIO/DIY_Signal_Generator_V1/lib/lvgl/src/src/lv_draw/lv_draw_blend.h:
--------------------------------------------------------------------------------
1 | /**
2 | * @file lv_draw_blend.h
3 | *
4 | */
5 |
6 | #ifndef LV_DRAW_BLEND_H
7 | #define LV_DRAW_BLEND_H
8 |
9 | #ifdef __cplusplus
10 | extern "C" {
11 | #endif
12 |
13 | /*********************
14 | * INCLUDES
15 | *********************/
16 | #include "../lv_misc/lv_color.h"
17 | #include "../lv_misc/lv_area.h"
18 | #include "lv_draw_mask.h"
19 |
20 | /*********************
21 | * DEFINES
22 | *********************/
23 |
24 | /**********************
25 | * TYPEDEFS
26 | **********************/
27 | enum {
28 | LV_BLEND_MODE_NORMAL,
29 | #if LV_USE_BLEND_MODES
30 | LV_BLEND_MODE_ADDITIVE,
31 | LV_BLEND_MODE_SUBTRACTIVE,
32 | #endif
33 | };
34 |
35 | typedef uint8_t lv_blend_mode_t;
36 |
37 | /**********************
38 | * GLOBAL PROTOTYPES
39 | **********************/
40 |
41 | //! @cond Doxygen_Suppress
42 | LV_ATTRIBUTE_FAST_MEM void _lv_blend_fill(const lv_area_t * clip_area, const lv_area_t * fill_area, lv_color_t color,
43 | lv_opa_t * mask, lv_draw_mask_res_t mask_res, lv_opa_t opa, lv_blend_mode_t mode);
44 |
45 |
46 | LV_ATTRIBUTE_FAST_MEM void _lv_blend_map(const lv_area_t * clip_area, const lv_area_t * map_area,
47 | const lv_color_t * map_buf,
48 | lv_opa_t * mask, lv_draw_mask_res_t mask_res, lv_opa_t opa, lv_blend_mode_t mode);
49 |
50 | //! @endcond
51 | /**********************
52 | * MACROS
53 | **********************/
54 |
55 | #ifdef __cplusplus
56 | } /* extern "C" */
57 | #endif
58 |
59 | #endif /*LV_DRAW_BLEND_H*/
60 |
--------------------------------------------------------------------------------
/PlatformIO/DIY_Signal_Generator_V1/lib/lvgl/src/src/lv_draw/lv_draw_img.h:
--------------------------------------------------------------------------------
1 | /**
2 | * @file lv_draw_img.h
3 | *
4 | */
5 |
6 | #ifndef LV_DRAW_IMG_H
7 | #define LV_DRAW_IMG_H
8 |
9 | #ifdef __cplusplus
10 | extern "C" {
11 | #endif
12 |
13 | /*********************
14 | * INCLUDES
15 | *********************/
16 | #include "lv_img_decoder.h"
17 | #include "lv_img_buf.h"
18 |
19 | /*********************
20 | * DEFINES
21 | *********************/
22 |
23 | /**********************
24 | * MACROS
25 | **********************/
26 |
27 | /**********************
28 | * TYPEDEFS
29 | **********************/
30 |
31 | typedef struct {
32 | lv_opa_t opa;
33 |
34 | uint16_t angle;
35 | lv_point_t pivot;
36 | uint16_t zoom;
37 |
38 | lv_opa_t recolor_opa;
39 | lv_color_t recolor;
40 |
41 | lv_blend_mode_t blend_mode;
42 |
43 | uint8_t antialias : 1;
44 | } lv_draw_img_dsc_t;
45 |
46 | /**********************
47 | * GLOBAL PROTOTYPES
48 | **********************/
49 |
50 | void lv_draw_img_dsc_init(lv_draw_img_dsc_t * dsc);
51 | /**
52 | * Draw an image
53 | * @param coords the coordinates of the image
54 | * @param mask the image will be drawn only in this area
55 | * @param src pointer to a lv_color_t array which contains the pixels of the image
56 | * @param dsc pointer to an initialized `lv_draw_img_dsc_t` variable
57 | */
58 | void lv_draw_img(const lv_area_t * coords, const lv_area_t * mask, const void * src, const lv_draw_img_dsc_t * dsc);
59 |
60 | /**
61 | * Get the type of an image source
62 | * @param src pointer to an image source:
63 | * - pointer to an 'lv_img_t' variable (image stored internally and compiled into the code)
64 | * - a path to a file (e.g. "S:/folder/image.bin")
65 | * - or a symbol (e.g. LV_SYMBOL_CLOSE)
66 | * @return type of the image source LV_IMG_SRC_VARIABLE/FILE/SYMBOL/UNKNOWN
67 | */
68 | lv_img_src_t lv_img_src_get_type(const void * src);
69 |
70 | /**
71 | * Get the pixel size of a color format in bits
72 | * @param cf a color format (`LV_IMG_CF_...`)
73 | * @return the pixel size in bits
74 | */
75 | uint8_t lv_img_cf_get_px_size(lv_img_cf_t cf);
76 |
77 | /**
78 | * Check if a color format is chroma keyed or not
79 | * @param cf a color format (`LV_IMG_CF_...`)
80 | * @return true: chroma keyed; false: not chroma keyed
81 | */
82 | bool lv_img_cf_is_chroma_keyed(lv_img_cf_t cf);
83 |
84 | /**
85 | * Check if a color format has alpha channel or not
86 | * @param cf a color format (`LV_IMG_CF_...`)
87 | * @return true: has alpha channel; false: doesn't have alpha channel
88 | */
89 | bool lv_img_cf_has_alpha(lv_img_cf_t cf);
90 |
91 |
92 | #ifdef __cplusplus
93 | } /* extern "C" */
94 | #endif
95 |
96 | #endif /*LV_TEMPL_H*/
97 |
--------------------------------------------------------------------------------
/PlatformIO/DIY_Signal_Generator_V1/lib/lvgl/src/src/lv_draw/lv_draw_line.h:
--------------------------------------------------------------------------------
1 | /**
2 | * @file lv_draw_line.h
3 | *
4 | */
5 |
6 | #ifndef LV_DRAW_LINE_H
7 | #define LV_DRAW_LINE_H
8 |
9 | #ifdef __cplusplus
10 | extern "C" {
11 | #endif
12 |
13 | /*********************
14 | * INCLUDES
15 | *********************/
16 | #include "../lv_core/lv_style.h"
17 |
18 | /*********************
19 | * DEFINES
20 | *********************/
21 |
22 | /**********************
23 | * TYPEDEFS
24 | **********************/
25 | typedef struct {
26 | lv_color_t color;
27 | lv_style_int_t width;
28 | lv_style_int_t dash_width;
29 | lv_style_int_t dash_gap;
30 | lv_opa_t opa;
31 | lv_blend_mode_t blend_mode : 2;
32 | uint8_t round_start : 1;
33 | uint8_t round_end : 1;
34 | uint8_t raw_end : 1; /*Do not bother with perpendicular line ending is it's not visible for any reason*/
35 | } lv_draw_line_dsc_t;
36 |
37 | /**********************
38 | * GLOBAL PROTOTYPES
39 | **********************/
40 |
41 | //! @cond Doxygen_Suppress
42 | /**
43 | * Draw a line
44 | * @param point1 first point of the line
45 | * @param point2 second point of the line
46 | * @param clip the line will be drawn only in this area
47 | * @param dsc pointer to an initialized `lv_draw_line_dsc_t` variable
48 | */
49 | LV_ATTRIBUTE_FAST_MEM void lv_draw_line(const lv_point_t * point1, const lv_point_t * point2, const lv_area_t * clip,
50 | const lv_draw_line_dsc_t * dsc);
51 |
52 | LV_ATTRIBUTE_FAST_MEM void lv_draw_line_dsc_init(lv_draw_line_dsc_t * dsc);
53 |
54 |
55 | //! @endcond
56 |
57 | /**********************
58 | * MACROS
59 | **********************/
60 |
61 | #ifdef __cplusplus
62 | } /* extern "C" */
63 | #endif
64 |
65 | #endif /*LV_DRAW_LINE_H*/
66 |
--------------------------------------------------------------------------------
/PlatformIO/DIY_Signal_Generator_V1/lib/lvgl/src/src/lv_draw/lv_draw_triangle.h:
--------------------------------------------------------------------------------
1 | /**
2 | * @file lv_draw_triangle.h
3 | *
4 | */
5 |
6 | #ifndef LV_DRAW_TRIANGLE_H
7 | #define LV_DRAW_TRIANGLE_H
8 |
9 | #ifdef __cplusplus
10 | extern "C" {
11 | #endif
12 |
13 | /*********************
14 | * INCLUDES
15 | *********************/
16 | #include "lv_draw_rect.h"
17 |
18 | /*********************
19 | * DEFINES
20 | *********************/
21 |
22 | /**********************
23 | * TYPEDEFS
24 | **********************/
25 |
26 | /**********************
27 | * GLOBAL PROTOTYPES
28 | **********************/
29 |
30 | /**
31 | * Draw a triangle
32 | * @param points pointer to an array with 3 points
33 | * @param clip_area the triangle will be drawn only in this area
34 | * @param draw_dsc pointer to an initialized `lv_draw_rect_dsc_t` variable
35 | */
36 | void lv_draw_triangle(const lv_point_t points[], const lv_area_t * clip, const lv_draw_rect_dsc_t * draw_dsc);
37 |
38 | /**
39 | * Draw a polygon. Only convex polygons are supported.
40 | * @param points an array of points
41 | * @param point_cnt number of points
42 | * @param clip_area polygon will be drawn only in this area
43 | * @param draw_dsc pointer to an initialized `lv_draw_rect_dsc_t` variable
44 | */
45 | void lv_draw_polygon(const lv_point_t points[], uint16_t point_cnt, const lv_area_t * mask,
46 | const lv_draw_rect_dsc_t * draw_dsc);
47 |
48 | /**********************
49 | * MACROS
50 | **********************/
51 |
52 | #ifdef __cplusplus
53 | } /* extern "C" */
54 | #endif
55 |
56 | #endif /*LV_DRAW_TRIANGLE_H*/
57 |
--------------------------------------------------------------------------------
/PlatformIO/DIY_Signal_Generator_V1/lib/lvgl/src/src/lv_draw/lv_img_cache.h:
--------------------------------------------------------------------------------
1 | /**
2 | * @file lv_img_cache.h
3 | *
4 | */
5 |
6 | #ifndef LV_IMG_CACHE_H
7 | #define LV_IMG_CACHE_H
8 |
9 | #ifdef __cplusplus
10 | extern "C" {
11 | #endif
12 |
13 | /*********************
14 | * INCLUDES
15 | *********************/
16 | #include "lv_img_decoder.h"
17 |
18 | /*********************
19 | * DEFINES
20 | *********************/
21 |
22 | /**********************
23 | * TYPEDEFS
24 | **********************/
25 |
26 | /**
27 | * When loading images from the network it can take a long time to download and decode the image.
28 | *
29 | * To avoid repeating this heavy load images can be cached.
30 | */
31 | typedef struct {
32 | lv_img_decoder_dsc_t dec_dsc; /**< Image information */
33 |
34 | /** Count the cache entries's life. Add `time_tio_open` to `life` when the entry is used.
35 | * Decrement all lifes by one every in every ::lv_img_cache_open.
36 | * If life == 0 the entry can be reused */
37 | int32_t life;
38 | } lv_img_cache_entry_t;
39 |
40 | /**********************
41 | * GLOBAL PROTOTYPES
42 | **********************/
43 |
44 | /**
45 | * Open an image using the image decoder interface and cache it.
46 | * The image will be left open meaning if the image decoder open callback allocated memory then it will remain.
47 | * The image is closed if a new image is opened and the new image takes its place in the cache.
48 | * @param src source of the image. Path to file or pointer to an `lv_img_dsc_t` variable
49 | * @param color The color of the image with `LV_IMG_CF_ALPHA_...`
50 | * @return pointer to the cache entry or NULL if can open the image
51 | */
52 | lv_img_cache_entry_t * _lv_img_cache_open(const void * src, lv_color_t color);
53 |
54 | /**
55 | * Set the number of images to be cached.
56 | * More cached images mean more opened image at same time which might mean more memory usage.
57 | * E.g. if 20 PNG or JPG images are open in the RAM they consume memory while opened in the cache.
58 | * @param new_entry_cnt number of image to cache
59 | */
60 | void lv_img_cache_set_size(uint16_t new_slot_num);
61 |
62 | /**
63 | * Invalidate an image source in the cache.
64 | * Useful if the image source is updated therefore it needs to be cached again.
65 | * @param src an image source path to a file or pointer to an `lv_img_dsc_t` variable.
66 | */
67 | void lv_img_cache_invalidate_src(const void * src);
68 |
69 | /**********************
70 | * MACROS
71 | **********************/
72 |
73 | #ifdef __cplusplus
74 | } /* extern "C" */
75 | #endif
76 |
77 | #endif /*LV_IMG_CACHE_H*/
78 |
--------------------------------------------------------------------------------
/PlatformIO/DIY_Signal_Generator_V1/lib/lvgl/src/src/lv_font/lv_font.c:
--------------------------------------------------------------------------------
1 | /**
2 | * @file lv_font.c
3 | *
4 | */
5 |
6 | /*********************
7 | * INCLUDES
8 | *********************/
9 |
10 | #include "lv_font.h"
11 | #include "../lv_misc/lv_utils.h"
12 | #include "../lv_misc/lv_log.h"
13 |
14 | /*********************
15 | * DEFINES
16 | *********************/
17 |
18 | /**********************
19 | * TYPEDEFS
20 | **********************/
21 |
22 | /**********************
23 | * STATIC PROTOTYPES
24 | **********************/
25 |
26 | /**********************
27 | * STATIC VARIABLES
28 | **********************/
29 |
30 | /**********************
31 | * GLOBAL PROTOTYPES
32 | **********************/
33 |
34 | /**********************
35 | * MACROS
36 | **********************/
37 |
38 | /**********************
39 | * GLOBAL FUNCTIONS
40 | **********************/
41 |
42 | /**
43 | * Return with the bitmap of a font.
44 | * @param font_p pointer to a font
45 | * @param letter an UNICODE character code
46 | * @return pointer to the bitmap of the letter
47 | */
48 | const uint8_t * lv_font_get_glyph_bitmap(const lv_font_t * font_p, uint32_t letter)
49 | {
50 | return font_p->get_glyph_bitmap(font_p, letter);
51 | }
52 |
53 | /**
54 | * Get the descriptor of a glyph
55 | * @param font_p pointer to font
56 | * @param dsc_out store the result descriptor here
57 | * @param letter an UNICODE letter code
58 | * @return true: descriptor is successfully loaded into `dsc_out`.
59 | * false: the letter was not found, no data is loaded to `dsc_out`
60 | */
61 | bool lv_font_get_glyph_dsc(const lv_font_t * font_p, lv_font_glyph_dsc_t * dsc_out, uint32_t letter,
62 | uint32_t letter_next)
63 | {
64 | return font_p->get_glyph_dsc(font_p, dsc_out, letter, letter_next);
65 | }
66 |
67 | /**
68 | * Get the width of a glyph with kerning
69 | * @param font pointer to a font
70 | * @param letter an UNICODE letter
71 | * @param letter_next the next letter after `letter`. Used for kerning
72 | * @return the width of the glyph
73 | */
74 | uint16_t lv_font_get_glyph_width(const lv_font_t * font, uint32_t letter, uint32_t letter_next)
75 | {
76 | lv_font_glyph_dsc_t g;
77 | bool ret;
78 | ret = lv_font_get_glyph_dsc(font, &g, letter, letter_next);
79 | if(ret) return g.adv_w;
80 | else return 0;
81 | }
82 |
83 | /**********************
84 | * STATIC FUNCTIONS
85 | **********************/
86 |
--------------------------------------------------------------------------------
/PlatformIO/DIY_Signal_Generator_V1/lib/lvgl/src/src/lv_font/lv_font.mk:
--------------------------------------------------------------------------------
1 | CSRCS += lv_font.c
2 | CSRCS += lv_font_fmt_txt.c
3 | CSRCS += lv_font_loader.c
4 | CSRCS += lv_font_montserrat_12.c
5 | CSRCS += lv_font_montserrat_14.c
6 | CSRCS += lv_font_montserrat_16.c
7 | CSRCS += lv_font_montserrat_18.c
8 | CSRCS += lv_font_montserrat_20.c
9 | CSRCS += lv_font_montserrat_22.c
10 | CSRCS += lv_font_montserrat_24.c
11 | CSRCS += lv_font_montserrat_26.c
12 | CSRCS += lv_font_montserrat_28.c
13 | CSRCS += lv_font_montserrat_30.c
14 | CSRCS += lv_font_montserrat_32.c
15 | CSRCS += lv_font_montserrat_34.c
16 | CSRCS += lv_font_montserrat_36.c
17 | CSRCS += lv_font_montserrat_38.c
18 | CSRCS += lv_font_montserrat_40.c
19 | CSRCS += lv_font_montserrat_42.c
20 | CSRCS += lv_font_montserrat_44.c
21 | CSRCS += lv_font_montserrat_46.c
22 | CSRCS += lv_font_montserrat_48.c
23 | CSRCS += lv_font_montserrat_12_subpx.c
24 | CSRCS += lv_font_montserrat_28_compressed.c
25 | CSRCS += lv_font_unscii_8.c
26 | CSRCS += lv_font_dejavu_16_persian_hebrew.c
27 |
28 | DEPPATH += --dep-path $(LVGL_DIR)/$(LVGL_DIR_NAME)/src/lv_font
29 | VPATH += :$(LVGL_DIR)/$(LVGL_DIR_NAME)/src/lv_font
30 |
31 | CFLAGS += "-I$(LVGL_DIR)/$(LVGL_DIR_NAME)/src/lv_font"
32 |
--------------------------------------------------------------------------------
/PlatformIO/DIY_Signal_Generator_V1/lib/lvgl/src/src/lv_font/lv_font_loader.h:
--------------------------------------------------------------------------------
1 | /**
2 | * @file lv_font_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 | #if LV_USE_FILESYSTEM
30 |
31 | lv_font_t * lv_font_load(const char * fontName);
32 | void lv_font_free(lv_font_t * font);
33 |
34 | #endif
35 |
36 | /**********************
37 | * MACROS
38 | **********************/
39 |
40 | #ifdef __cplusplus
41 | } /* extern "C" */
42 | #endif
43 |
44 | #endif /*LV_FONT_LOADER_H*/
45 |
--------------------------------------------------------------------------------
/PlatformIO/DIY_Signal_Generator_V1/lib/lvgl/src/src/lv_gpu/lv_gpu.mk:
--------------------------------------------------------------------------------
1 | CSRCS += lv_gpu_stm32_dma2d.c
2 |
3 | DEPPATH += --dep-path $(LVGL_DIR)/$(LVGL_DIR_NAME)/src/lv_gpu
4 | VPATH += :$(LVGL_DIR)/$(LVGL_DIR_NAME)/src/lv_gpu
5 |
6 | CFLAGS += "-I$(LVGL_DIR)/$(LVGL_DIR_NAME)/src/lv_gpu"
7 |
--------------------------------------------------------------------------------
/PlatformIO/DIY_Signal_Generator_V1/lib/lvgl/src/src/lv_hal/lv_hal.h:
--------------------------------------------------------------------------------
1 | /**
2 | * @file lv_hal.h
3 | *
4 | */
5 |
6 | #ifndef LV_HAL_H
7 | #define LV_HAL_H
8 |
9 | #ifdef __cplusplus
10 | extern "C" {
11 | #endif
12 |
13 | /*********************
14 | * INCLUDES
15 | *********************/
16 | #include "lv_hal_disp.h"
17 | #include "lv_hal_indev.h"
18 | #include "lv_hal_tick.h"
19 |
20 | /*********************
21 | * DEFINES
22 | *********************/
23 |
24 | /**********************
25 | * TYPEDEFS
26 | **********************/
27 |
28 | /**********************
29 | * GLOBAL PROTOTYPES
30 | **********************/
31 |
32 | /**********************
33 | * MACROS
34 | **********************/
35 |
36 | #ifdef __cplusplus
37 | } /* extern "C" */
38 | #endif
39 |
40 | #endif
41 |
--------------------------------------------------------------------------------
/PlatformIO/DIY_Signal_Generator_V1/lib/lvgl/src/src/lv_hal/lv_hal.mk:
--------------------------------------------------------------------------------
1 | CSRCS += lv_hal_disp.c
2 | CSRCS += lv_hal_indev.c
3 | CSRCS += lv_hal_tick.c
4 |
5 | DEPPATH += --dep-path $(LVGL_DIR)/$(LVGL_DIR_NAME)/src/lv_hal
6 | VPATH += :$(LVGL_DIR)/$(LVGL_DIR_NAME)/src/lv_hal
7 |
8 | CFLAGS += "-I$(LVGL_DIR)/$(LVGL_DIR_NAME)/src/lv_hal"
9 |
--------------------------------------------------------------------------------
/PlatformIO/DIY_Signal_Generator_V1/lib/lvgl/src/src/lv_hal/lv_hal_tick.c:
--------------------------------------------------------------------------------
1 | /**
2 | * @file systick.c
3 | * Provide access to the system tick with 1 millisecond resolution
4 | */
5 |
6 | /*********************
7 | * INCLUDES
8 | *********************/
9 | #include "lv_hal_tick.h"
10 | #include
11 |
12 | #if LV_TICK_CUSTOM == 1
13 | #include LV_TICK_CUSTOM_INCLUDE
14 | #endif
15 |
16 | /*********************
17 | * DEFINES
18 | *********************/
19 |
20 | /**********************
21 | * TYPEDEFS
22 | **********************/
23 |
24 | /**********************
25 | * STATIC PROTOTYPES
26 | **********************/
27 |
28 | /**********************
29 | * STATIC VARIABLES
30 | **********************/
31 | static uint32_t sys_time = 0;
32 | static volatile uint8_t tick_irq_flag;
33 |
34 | /**********************
35 | * MACROS
36 | **********************/
37 |
38 | /**********************
39 | * GLOBAL FUNCTIONS
40 | **********************/
41 |
42 | /**
43 | * You have to call this function periodically
44 | * @param tick_period the call period of this function in milliseconds
45 | */
46 | LV_ATTRIBUTE_TICK_INC void lv_tick_inc(uint32_t tick_period)
47 | {
48 | tick_irq_flag = 0;
49 | sys_time += tick_period;
50 | }
51 |
52 | /**
53 | * Get the elapsed milliseconds since start up
54 | * @return the elapsed milliseconds
55 | */
56 | uint32_t lv_tick_get(void)
57 | {
58 | #if LV_TICK_CUSTOM == 0
59 |
60 | /* If `lv_tick_inc` is called from an interrupt while `sys_time` is read
61 | * the result might be corrupted.
62 | * This loop detects if `lv_tick_inc` was called while reading `sys_time`.
63 | * If `tick_irq_flag` was cleared in `lv_tick_inc` try to read again
64 | * until `tick_irq_flag` remains `1`. */
65 | uint32_t result;
66 | do {
67 | tick_irq_flag = 1;
68 | result = sys_time;
69 | } while(!tick_irq_flag); /*Continue until see a non interrupted cycle */
70 |
71 | return result;
72 | #else
73 | return LV_TICK_CUSTOM_SYS_TIME_EXPR;
74 | #endif
75 | }
76 |
77 | /**
78 | * Get the elapsed milliseconds since a previous time stamp
79 | * @param prev_tick a previous time stamp (return value of systick_get() )
80 | * @return the elapsed milliseconds since 'prev_tick'
81 | */
82 | uint32_t lv_tick_elaps(uint32_t prev_tick)
83 | {
84 | uint32_t act_time = lv_tick_get();
85 |
86 | /*If there is no overflow in sys_time simple subtract*/
87 | if(act_time >= prev_tick) {
88 | prev_tick = act_time - prev_tick;
89 | }
90 | else {
91 | prev_tick = UINT32_MAX - prev_tick + 1;
92 | prev_tick += act_time;
93 | }
94 |
95 | return prev_tick;
96 | }
97 |
98 | /**********************
99 | * STATIC FUNCTIONS
100 | **********************/
101 |
--------------------------------------------------------------------------------
/PlatformIO/DIY_Signal_Generator_V1/lib/lvgl/src/src/lv_hal/lv_hal_tick.h:
--------------------------------------------------------------------------------
1 | /**
2 | * @file lv_hal_tick.h
3 | * Provide access to the system tick with 1 millisecond resolution
4 | */
5 |
6 | #ifndef LV_HAL_TICK_H
7 | #define LV_HAL_TICK_H
8 |
9 | #ifdef __cplusplus
10 | extern "C" {
11 | #endif
12 |
13 | /*********************
14 | * INCLUDES
15 | *********************/
16 | #include "../lv_conf_internal.h"
17 |
18 | #include
19 | #include
20 |
21 | /*********************
22 | * DEFINES
23 | *********************/
24 | #ifndef LV_ATTRIBUTE_TICK_INC
25 | #define LV_ATTRIBUTE_TICK_INC
26 | #endif
27 |
28 | /**********************
29 | * TYPEDEFS
30 | **********************/
31 |
32 | /**********************
33 | * GLOBAL PROTOTYPES
34 | **********************/
35 |
36 | //! @cond Doxygen_Suppress
37 |
38 | /**
39 | * You have to call this function periodically
40 | * @param tick_period the call period of this function in milliseconds
41 | */
42 | LV_ATTRIBUTE_TICK_INC void lv_tick_inc(uint32_t tick_period);
43 |
44 | //! @endcond
45 |
46 | /**
47 | * Get the elapsed milliseconds since start up
48 | * @return the elapsed milliseconds
49 | */
50 | uint32_t lv_tick_get(void);
51 |
52 | /**
53 | * Get the elapsed milliseconds since a previous time stamp
54 | * @param prev_tick a previous time stamp (return value of systick_get() )
55 | * @return the elapsed milliseconds since 'prev_tick'
56 | */
57 | uint32_t lv_tick_elaps(uint32_t prev_tick);
58 |
59 | /**********************
60 | * MACROS
61 | **********************/
62 |
63 | #ifdef __cplusplus
64 | } /* extern "C" */
65 | #endif
66 |
67 | #endif /*LV_HAL_TICK_H*/
68 |
--------------------------------------------------------------------------------
/PlatformIO/DIY_Signal_Generator_V1/lib/lvgl/src/src/lv_misc/lv_async.c:
--------------------------------------------------------------------------------
1 | /**
2 | * @file lv_async.c
3 | *
4 | */
5 |
6 | /*********************
7 | * INCLUDES
8 | *********************/
9 |
10 | #include "lv_async.h"
11 |
12 | /*********************
13 | * DEFINES
14 | *********************/
15 |
16 | /**********************
17 | * TYPEDEFS
18 | **********************/
19 |
20 | /**********************
21 | * STATIC PROTOTYPES
22 | **********************/
23 |
24 | static void lv_async_task_cb(lv_task_t * task);
25 |
26 | /**********************
27 | * STATIC VARIABLES
28 | **********************/
29 |
30 | /**********************
31 | * MACROS
32 | **********************/
33 |
34 | /**********************
35 | * GLOBAL FUNCTIONS
36 | **********************/
37 |
38 | lv_res_t lv_async_call(lv_async_cb_t async_xcb, void * user_data)
39 | {
40 | /*Allocate an info structure */
41 | lv_async_info_t * info = lv_mem_alloc(sizeof(lv_async_info_t));
42 |
43 | if(info == NULL)
44 | return LV_RES_INV;
45 |
46 | /* Create a new task */
47 | /* Use highest priority so that it will run before a refresh */
48 | lv_task_t * task = lv_task_create(lv_async_task_cb, 0, LV_TASK_PRIO_HIGHEST, info);
49 |
50 | if(task == NULL) {
51 | lv_mem_free(info);
52 | return LV_RES_INV;
53 | }
54 |
55 | info->cb = async_xcb;
56 | info->user_data = user_data;
57 |
58 | /* Set the task's user data */
59 | task->user_data = info;
60 | lv_task_set_repeat_count(task, 1);
61 | return LV_RES_OK;
62 | }
63 |
64 | /**********************
65 | * STATIC FUNCTIONS
66 | **********************/
67 |
68 | static void lv_async_task_cb(lv_task_t * task)
69 | {
70 | lv_async_info_t * info = (lv_async_info_t *)task->user_data;
71 |
72 | info->cb(info->user_data);
73 |
74 | lv_mem_free(info);
75 | }
76 |
--------------------------------------------------------------------------------
/PlatformIO/DIY_Signal_Generator_V1/lib/lvgl/src/src/lv_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_task.h"
18 | #include "lv_types.h"
19 |
20 | /*********************
21 | * DEFINES
22 | *********************/
23 |
24 | /**********************
25 | * TYPEDEFS
26 | **********************/
27 |
28 | /**
29 | * Type for async callback.
30 | */
31 | typedef void (*lv_async_cb_t)(void *);
32 |
33 | typedef struct _lv_async_info_t {
34 | lv_async_cb_t cb;
35 | void * user_data;
36 | } lv_async_info_t;
37 |
38 | struct _lv_obj_t;
39 |
40 | /**********************
41 | * GLOBAL PROTOTYPES
42 | **********************/
43 |
44 | /**
45 | * Call an asynchronous function the next time lv_task_handler() is run. This function is likely to return
46 | * **before** the call actually happens!
47 | * @param async_xcb a callback which is the task itself.
48 | * (the 'x' in the argument name indicates that its not a fully generic function because it not follows
49 | * the `func_name(object, callback, ...)` convention)
50 | * @param user_data custom parameter
51 | */
52 | lv_res_t lv_async_call(lv_async_cb_t async_xcb, void * user_data);
53 |
54 | /**********************
55 | * MACROS
56 | **********************/
57 |
58 | #ifdef __cplusplus
59 | } /* extern "C" */
60 | #endif
61 |
62 | #endif /*LV_TEMPL_H*/
63 |
--------------------------------------------------------------------------------
/PlatformIO/DIY_Signal_Generator_V1/lib/lvgl/src/src/lv_misc/lv_gc.c:
--------------------------------------------------------------------------------
1 | /**
2 | * @file lv_gc.c
3 | *
4 | */
5 |
6 | /*********************
7 | * INCLUDES
8 | *********************/
9 |
10 | #include "lv_gc.h"
11 | #include "string.h"
12 |
13 | #if defined(LV_GC_INCLUDE)
14 | #include LV_GC_INCLUDE
15 | #endif /* LV_ENABLE_GC */
16 |
17 | /*********************
18 | * DEFINES
19 | *********************/
20 |
21 | /**********************
22 | * TYPEDEFS
23 | **********************/
24 |
25 | /**********************
26 | * STATIC PROTOTYPES
27 | **********************/
28 |
29 | /**********************
30 | * STATIC VARIABLES
31 | **********************/
32 |
33 | #if(!defined(LV_ENABLE_GC)) || LV_ENABLE_GC == 0
34 | LV_ROOTS
35 | #endif /* LV_ENABLE_GC */
36 |
37 | /**********************
38 | * MACROS
39 | **********************/
40 |
41 | /**********************
42 | * GLOBAL FUNCTIONS
43 | **********************/
44 |
45 | void _lv_gc_clear_roots(void)
46 | {
47 | #define LV_CLEAR_ROOT(root_type, root_name) _lv_memset_00(&LV_GC_ROOT(root_name), sizeof(LV_GC_ROOT(root_name)));
48 | LV_ITERATE_ROOTS(LV_CLEAR_ROOT)
49 | }
50 |
51 | /**********************
52 | * STATIC FUNCTIONS
53 | **********************/
54 |
--------------------------------------------------------------------------------
/PlatformIO/DIY_Signal_Generator_V1/lib/lvgl/src/src/lv_misc/lv_gc.h:
--------------------------------------------------------------------------------
1 | /**
2 | * @file lv_gc.h
3 | *
4 | */
5 |
6 | #ifndef LV_GC_H
7 | #define LV_GC_H
8 |
9 | #ifdef __cplusplus
10 | extern "C" {
11 | #endif
12 |
13 | /*********************
14 | * INCLUDES
15 | *********************/
16 | #include
17 | #include
18 | #include "lv_mem.h"
19 | #include "lv_ll.h"
20 | #include "lv_task.h"
21 | #include "../lv_draw/lv_img_cache.h"
22 | #include "../lv_draw/lv_draw_mask.h"
23 |
24 | /*********************
25 | * DEFINES
26 | *********************/
27 |
28 | #define LV_ITERATE_ROOTS(f) \
29 | f(lv_ll_t, _lv_task_ll) /*Linked list to store the lv_tasks*/ \
30 | f(lv_ll_t, _lv_disp_ll) /*Linked list of screens*/ \
31 | f(lv_ll_t, _lv_indev_ll) /*Linked list of screens*/ \
32 | f(lv_ll_t, _lv_drv_ll) \
33 | f(lv_ll_t, _lv_file_ll) \
34 | f(lv_ll_t, _lv_anim_ll) \
35 | f(lv_ll_t, _lv_group_ll) \
36 | f(lv_ll_t, _lv_img_defoder_ll) \
37 | f(lv_ll_t, _lv_obj_style_trans_ll) \
38 | f(lv_img_cache_entry_t*, _lv_img_cache_array) \
39 | f(lv_task_t*, _lv_task_act) \
40 | f(lv_mem_buf_arr_t , _lv_mem_buf) \
41 | f(_lv_draw_mask_saved_arr_t , _lv_draw_mask_list) \
42 | f(void * , _lv_theme_material_styles) \
43 | f(void * , _lv_theme_template_styles) \
44 | f(void * , _lv_theme_mono_styles) \
45 | f(void * , _lv_theme_empty_styles) \
46 |
47 | #define LV_DEFINE_ROOT(root_type, root_name) root_type root_name;
48 | #define LV_ROOTS LV_ITERATE_ROOTS(LV_DEFINE_ROOT)
49 |
50 | #if LV_ENABLE_GC == 1
51 | #if LV_MEM_CUSTOM != 1
52 | #error "GC requires CUSTOM_MEM"
53 | #endif /* LV_MEM_CUSTOM */
54 | #else /* LV_ENABLE_GC */
55 | #define LV_GC_ROOT(x) x
56 | #define LV_EXTERN_ROOT(root_type, root_name) extern root_type root_name;
57 | LV_ITERATE_ROOTS(LV_EXTERN_ROOT)
58 | #endif /* LV_ENABLE_GC */
59 |
60 | /**********************
61 | * TYPEDEFS
62 | **********************/
63 |
64 | /**********************
65 | * GLOBAL PROTOTYPES
66 | **********************/
67 |
68 | void _lv_gc_clear_roots(void);
69 |
70 | /**********************
71 | * MACROS
72 | **********************/
73 |
74 | #ifdef __cplusplus
75 | } /* extern "C" */
76 | #endif
77 |
78 | #endif /*LV_GC_H*/
79 |
--------------------------------------------------------------------------------
/PlatformIO/DIY_Signal_Generator_V1/lib/lvgl/src/src/lv_misc/lv_log.c:
--------------------------------------------------------------------------------
1 | /**
2 | * @file lv_log.c
3 | *
4 | */
5 |
6 | /*********************
7 | * INCLUDES
8 | *********************/
9 | #include "lv_log.h"
10 | #if LV_USE_LOG
11 |
12 | #include
13 | #include
14 | #include "lv_printf.h"
15 |
16 | #if LV_LOG_PRINTF
17 | #include
18 | #endif
19 |
20 | /*********************
21 | * DEFINES
22 | *********************/
23 |
24 | /**********************
25 | * TYPEDEFS
26 | **********************/
27 |
28 | /**********************
29 | * STATIC PROTOTYPES
30 | **********************/
31 |
32 | /**********************
33 | * STATIC VARIABLES
34 | **********************/
35 | static lv_log_print_g_cb_t custom_print_cb;
36 |
37 | /**********************
38 | * MACROS
39 | **********************/
40 |
41 | /**********************
42 | * GLOBAL FUNCTIONS
43 | **********************/
44 |
45 | /**
46 | * Register custom print/write function to call when a log is added.
47 | * It can format its "File path", "Line number" and "Description" as required
48 | * and send the formatted log message to a console or serial port.
49 | * @param print_cb a function pointer to print a log
50 | */
51 | void lv_log_register_print_cb(lv_log_print_g_cb_t print_cb)
52 | {
53 | custom_print_cb = print_cb;
54 | }
55 |
56 |
57 | /**
58 | * Add a log
59 | * @param level the level of log. (From `lv_log_level_t` enum)
60 | * @param file name of the file when the log added
61 | * @param line line number in the source code where the log added
62 | * @param func name of the function when the log added
63 | * @param format printf-like format string
64 | * @param ... parameters for `format`
65 | */
66 | void _lv_log_add(lv_log_level_t level, const char * file, int line, const char * func, const char * format, ...)
67 | {
68 | if(level >= _LV_LOG_LEVEL_NUM) return; /*Invalid level*/
69 |
70 | if(level >= LV_LOG_LEVEL) {
71 | va_list args;
72 | va_start(args, format);
73 | char buf[256];
74 | lv_vsnprintf(buf, sizeof(buf), format, args);
75 | va_end(args);
76 |
77 | #if LV_LOG_PRINTF
78 | /*Use only the file name not the path*/
79 | size_t p;
80 | for(p = strlen(file); p > 0; p--) {
81 | if(file[p] == '/' || file[p] == '\\') {
82 | p++; /*Skip the slash*/
83 | break;
84 | }
85 | }
86 |
87 | static const char * lvl_prefix[] = {"Trace", "Info", "Warn", "Error", "User"};
88 | printf("%s: %s \t(%s #%d %s())\n", lvl_prefix[level], buf, &file[p], line, func);
89 | #else
90 | if(custom_print_cb) custom_print_cb(level, file, line, func, buf);
91 | #endif
92 | }
93 | }
94 |
95 | /**********************
96 | * STATIC FUNCTIONS
97 | **********************/
98 |
99 | #endif /*LV_USE_LOG*/
100 |
--------------------------------------------------------------------------------
/PlatformIO/DIY_Signal_Generator_V1/lib/lvgl/src/src/lv_misc/lv_misc.mk:
--------------------------------------------------------------------------------
1 | CSRCS += lv_area.c
2 | CSRCS += lv_task.c
3 | CSRCS += lv_fs.c
4 | CSRCS += lv_anim.c
5 | CSRCS += lv_mem.c
6 | CSRCS += lv_ll.c
7 | CSRCS += lv_color.c
8 | CSRCS += lv_txt.c
9 | CSRCS += lv_txt_ap.c
10 | CSRCS += lv_math.c
11 | CSRCS += lv_log.c
12 | CSRCS += lv_gc.c
13 | CSRCS += lv_utils.c
14 | CSRCS += lv_async.c
15 | CSRCS += lv_printf.c
16 | CSRCS += lv_bidi.c
17 | CSRCS += lv_debug.c
18 |
19 | DEPPATH += --dep-path $(LVGL_DIR)/$(LVGL_DIR_NAME)/src/lv_misc
20 | VPATH += :$(LVGL_DIR)/$(LVGL_DIR_NAME)/src/lv_misc
21 |
22 | CFLAGS += "-I$(LVGL_DIR)/$(LVGL_DIR_NAME)/src/lv_misc"
23 |
--------------------------------------------------------------------------------
/PlatformIO/DIY_Signal_Generator_V1/lib/lvgl/src/src/lv_misc/lv_printf.h:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////
2 | // \author (c) Marco Paland (info@paland.com)
3 | // 2014-2019, PALANDesign Hannover, Germany
4 | //
5 | // \license The MIT License (MIT)
6 | //
7 | // Permission is hereby granted, free of charge, to any person obtaining a copy
8 | // of this software and associated documentation files (the "Software"), to deal
9 | // in the Software without restriction, including without limitation the rights
10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 | // copies of the Software, and to permit persons to whom the Software is
12 | // furnished to do so, subject to the following conditions:
13 | //
14 | // The above copyright notice and this permission notice shall be included in
15 | // all copies or substantial portions of the Software.
16 | //
17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23 | // THE SOFTWARE.
24 | //
25 | // \brief Tiny printf, sprintf and snprintf implementation, optimized for speed on
26 | // embedded systems with a very limited resources.
27 | // Use this instead of bloated standard/newlib printf.
28 | // These routines are thread safe and reentrant.
29 | //
30 | ///////////////////////////////////////////////////////////////////////////////
31 |
32 | #ifndef _LV_PRINTF_H_
33 | #define _LV_PRINTF_H_
34 |
35 |
36 | #ifdef __cplusplus
37 | extern "C" {
38 | #endif
39 |
40 | #include "../lv_conf_internal.h"
41 |
42 | #if LV_SPRINTF_CUSTOM == 0
43 |
44 | #include
45 | #include
46 |
47 | /**
48 | * Tiny snprintf/vsnprintf implementation
49 | * \param buffer A pointer to the buffer where to store the formatted string
50 | * \param count The maximum number of characters to store in the buffer, including a terminating null character
51 | * \param format A string that specifies the format of the output
52 | * \param va A value identifying a variable arguments list
53 | * \return The number of characters that COULD have been written into the buffer, not counting the terminating
54 | * null character. A value equal or larger than count indicates truncation. Only when the returned value
55 | * is non-negative and less than count, the string has been completely written.
56 | */
57 | int lv_snprintf(char * buffer, size_t count, const char * format, ...);
58 | int lv_vsnprintf(char * buffer, size_t count, const char * format, va_list va);
59 |
60 | #else
61 | #include LV_SPRINTF_INCLUDE
62 | #endif
63 |
64 |
65 | #ifdef __cplusplus
66 | }
67 | #endif
68 |
69 |
70 | #endif // _PRINTF_H_
71 |
--------------------------------------------------------------------------------
/PlatformIO/DIY_Signal_Generator_V1/lib/lvgl/src/src/lv_misc/lv_templ.c:
--------------------------------------------------------------------------------
1 | /**
2 | * @file lv_templ.c
3 | *
4 | */
5 |
6 | /*********************
7 | * INCLUDES
8 | *********************/
9 |
10 | /*********************
11 | * DEFINES
12 | *********************/
13 |
14 | /**********************
15 | * TYPEDEFS
16 | **********************/
17 |
18 | /* 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 |
--------------------------------------------------------------------------------
/PlatformIO/DIY_Signal_Generator_V1/lib/lvgl/src/src/lv_misc/lv_templ.h:
--------------------------------------------------------------------------------
1 | /**
2 | * @file lv_templ.h
3 | *
4 | */
5 |
6 | #ifndef LV_TEMPL_H
7 | #define LV_TEMPL_H
8 |
9 | #ifdef __cplusplus
10 | extern "C" {
11 | #endif
12 |
13 | /*********************
14 | * INCLUDES
15 | *********************/
16 |
17 | /*********************
18 | * DEFINES
19 | *********************/
20 |
21 | /**********************
22 | * TYPEDEFS
23 | **********************/
24 |
25 | /**********************
26 | * GLOBAL PROTOTYPES
27 | **********************/
28 |
29 | /**********************
30 | * MACROS
31 | **********************/
32 |
33 | #ifdef __cplusplus
34 | } /* extern "C" */
35 | #endif
36 |
37 | #endif /*LV_TEMPL_H*/
38 |
--------------------------------------------------------------------------------
/PlatformIO/DIY_Signal_Generator_V1/lib/lvgl/src/src/lv_misc/lv_txt_ap.h:
--------------------------------------------------------------------------------
1 | /**
2 | * @file lv_txt_ap.h
3 | *
4 | */
5 |
6 | #ifndef LV_TXT_AP_H
7 | #define LV_TXT_AP_H
8 |
9 | #ifdef __cplusplus
10 | extern "C" {
11 | #endif
12 |
13 | /*********************
14 | * INCLUDES
15 | *********************/
16 | #include
17 | #include "lv_txt.h"
18 | #include "../lv_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 | typedef struct {
33 | uint8_t char_offset;
34 | uint16_t char_end_form;
35 | int8_t char_begining_form_offset;
36 | int8_t char_middle_form_offset;
37 | int8_t char_isolated_form_offset;
38 | struct {
39 | uint8_t conj_to_previous;
40 | uint8_t conj_to_next;
41 | } ap_chars_conjunction;
42 | } ap_chars_map_t;
43 |
44 | /**********************
45 | * GLOBAL PROTOTYPES
46 | **********************/
47 | uint32_t _lv_txt_ap_calc_bytes_cnt(const char * txt);
48 | void _lv_txt_ap_proc(const char * txt, char * txt_out);
49 |
50 | /**********************
51 | * MACROS
52 | **********************/
53 |
54 | #endif // LV_USE_ARABIC_PERSIAN_CHARS
55 |
56 | #ifdef __cplusplus
57 | } /* extern "C" */
58 | #endif
59 |
60 | #endif /*LV_TXT_AP_H*/
61 |
--------------------------------------------------------------------------------
/PlatformIO/DIY_Signal_Generator_V1/lib/lvgl/src/src/lv_misc/lv_types.h:
--------------------------------------------------------------------------------
1 | /**
2 | * @file lv_types.h
3 | *
4 | */
5 |
6 | #ifndef LV_TYPES_H
7 | #define LV_TYPES_H
8 |
9 | #ifdef __cplusplus
10 | extern "C" {
11 | #endif
12 |
13 | /*********************
14 | * INCLUDES
15 | *********************/
16 |
17 | /*********************
18 | * DEFINES
19 | *********************/
20 |
21 | #if __STDC_VERSION__ >= 199901L // If c99 or newer, use stdint.h to determine arch size
22 | #include
23 | #endif
24 |
25 |
26 | // If __UINTPTR_MAX__ or UINTPTR_MAX are available, use them to determine arch size
27 | #if defined(__UINTPTR_MAX__) && __UINTPTR_MAX__ > 0xFFFFFFFF
28 | #define LV_ARCH_64
29 |
30 | #elif defined(UINTPTR_MAX) && UINTPTR_MAX > 0xFFFFFFFF
31 | #define LV_ARCH_64
32 |
33 | // Otherwise use compiler-dependent means to determine arch size
34 | #elif defined(_WIN64) || defined(__x86_64__) || defined(__ppc64__) || defined (__aarch64__)
35 | #define LV_ARCH_64
36 |
37 | #endif
38 |
39 |
40 | /**********************
41 | * TYPEDEFS
42 | **********************/
43 |
44 | /**
45 | * LVGL error codes.
46 | */
47 | enum {
48 | LV_RES_INV = 0, /*Typically indicates that the object is deleted (become invalid) in the action
49 | function or an operation was failed*/
50 | LV_RES_OK, /*The object is valid (no deleted) after the action*/
51 | };
52 | typedef uint8_t lv_res_t;
53 |
54 |
55 |
56 | #if __STDC_VERSION__ >= 199901L
57 | // If c99 or newer, use the definition of uintptr_t directly from
58 | typedef uintptr_t lv_uintptr_t;
59 |
60 | #else
61 |
62 | // Otherwise, use the arch size determination
63 | #ifdef LV_ARCH_64
64 | typedef uint64_t lv_uintptr_t;
65 | #else
66 | typedef uint32_t lv_uintptr_t;
67 | #endif
68 |
69 | #endif
70 |
71 |
72 | /**********************
73 | * GLOBAL PROTOTYPES
74 | **********************/
75 |
76 | /**********************
77 | * MACROS
78 | **********************/
79 |
80 | #define LV_UNUSED(x) ((void) x)
81 |
82 | #ifdef __cplusplus
83 | } /* extern "C" */
84 | #endif
85 |
86 | #endif /*LV_TYPES_H*/
87 |
88 |
--------------------------------------------------------------------------------
/PlatformIO/DIY_Signal_Generator_V1/lib/lvgl/src/src/lv_misc/lv_utils.h:
--------------------------------------------------------------------------------
1 | /**
2 | * @file lv_utils.h
3 | *
4 | */
5 |
6 | #ifndef LV_UTILS_H
7 | #define LV_UTILS_H
8 |
9 | #ifdef __cplusplus
10 | extern "C" {
11 | #endif
12 |
13 | /*********************
14 | * INCLUDES
15 | *********************/
16 | #include
17 | #include
18 |
19 | /*********************
20 | * DEFINES
21 | *********************/
22 |
23 | /**********************
24 | * TYPEDEFS
25 | **********************/
26 |
27 | /**********************
28 | * GLOBAL PROTOTYPES
29 | **********************/
30 | /**
31 | * Convert a number to string
32 | * @param num a number
33 | * @param buf pointer to a `char` buffer. The result will be stored here (max 10 elements)
34 | * @return same as `buf` (just for convenience)
35 | */
36 | char * _lv_utils_num_to_str(int32_t num, char * buf);
37 |
38 | /** Searches base[0] to base[n - 1] for an item that matches *key.
39 | *
40 | * @note The function cmp must return negative if its first
41 | * argument (the search key) is less that its second (a table entry),
42 | * zero if equal, and positive if greater.
43 | *
44 | * @note Items in the array must be in ascending order.
45 | *
46 | * @param key Pointer to item being searched for
47 | * @param base Pointer to first element to search
48 | * @param n Number of elements
49 | * @param size Size of each element
50 | * @param cmp Pointer to comparison function (see #lv_font_codeCompare as a comparison function
51 | * example)
52 | *
53 | * @return a pointer to a matching item, or NULL if none exists.
54 | */
55 | void * _lv_utils_bsearch(const void * key, const void * base, uint32_t n, uint32_t size,
56 | int32_t (*cmp)(const void * pRef, const void * pElement));
57 |
58 | /**********************
59 | * MACROS
60 | **********************/
61 |
62 | #ifdef __cplusplus
63 | } /* extern "C" */
64 | #endif
65 |
66 | #endif
67 |
--------------------------------------------------------------------------------
/PlatformIO/DIY_Signal_Generator_V1/lib/lvgl/src/src/lv_themes/lv_theme_empty.h:
--------------------------------------------------------------------------------
1 | /**
2 | * @file lv_theme_material.h
3 | *
4 | */
5 |
6 | #ifndef LV_THEME_EMPTY_H
7 | #define LV_THEME_EMPTY_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_THEME_EMPTY
19 |
20 | /*********************
21 | * DEFINES
22 | *********************/
23 |
24 | /**********************
25 | * TYPEDEFS
26 | **********************/
27 |
28 | /**********************
29 | * GLOBAL PROTOTYPES
30 | **********************/
31 |
32 |
33 | /**
34 | * Initialize the default
35 | * @param color_primary the primary color of the theme
36 | * @param color_secondary the secondary color for the theme
37 | * @param flags ORed flags starting with `LV_THEME_DEF_FLAG_...`
38 | * @param font_small pointer to a small font
39 | * @param font_normal pointer to a normal font
40 | * @param font_subtitle pointer to a large font
41 | * @param font_title pointer to a extra large font
42 | * @return a pointer to reference this theme later
43 | */
44 | lv_theme_t * lv_theme_empty_init(lv_color_t color_primary, lv_color_t color_secondary, uint32_t flags,
45 | const lv_font_t * font_small, const lv_font_t * font_normal, const lv_font_t * font_subtitle,
46 | const lv_font_t * font_title);
47 | /**********************
48 | * MACROS
49 | **********************/
50 |
51 | #endif
52 |
53 | #ifdef __cplusplus
54 | } /* extern "C" */
55 | #endif
56 |
57 | #endif /*LV_THEME_ALIEN_H*/
58 |
--------------------------------------------------------------------------------
/PlatformIO/DIY_Signal_Generator_V1/lib/lvgl/src/src/lv_themes/lv_theme_material.h:
--------------------------------------------------------------------------------
1 | /**
2 | * @file lv_theme_material.h
3 | *
4 | */
5 |
6 | #ifndef LV_THEME_MATERIAL_H
7 | #define LV_THEME_MATERIAL_H
8 |
9 | #ifdef __cplusplus
10 | extern "C" {
11 | #endif
12 |
13 | /*********************
14 | * INCLUDES
15 | *********************/
16 | #include "../lv_conf_internal.h"
17 |
18 | #if LV_USE_THEME_MATERIAL
19 |
20 | /*********************
21 | * DEFINES
22 | *********************/
23 | typedef enum {
24 | LV_THEME_MATERIAL_FLAG_DARK = 0x01,
25 | LV_THEME_MATERIAL_FLAG_LIGHT = 0x02,
26 | LV_THEME_MATERIAL_FLAG_NO_TRANSITION = 0x10,
27 | LV_THEME_MATERIAL_FLAG_NO_FOCUS = 0x20,
28 | } lv_theme_material_flag_t;
29 |
30 | /**********************
31 | * TYPEDEFS
32 | **********************/
33 |
34 | /**********************
35 | * GLOBAL PROTOTYPES
36 | **********************/
37 |
38 | /**
39 | * Initialize the default
40 | * @param color_primary the primary color of the theme
41 | * @param color_secondary the secondary color for the theme
42 | * @param flags ORed flags starting with `LV_THEME_DEF_FLAG_...`
43 | * @param font_small pointer to a small font
44 | * @param font_normal pointer to a normal font
45 | * @param font_subtitle pointer to a large font
46 | * @param font_title pointer to a extra large font
47 | * @return a pointer to reference this theme later
48 | */
49 | lv_theme_t * lv_theme_material_init(lv_color_t color_primary, lv_color_t color_secondary, uint32_t flags,
50 | const lv_font_t * font_small, const lv_font_t * font_normal, const lv_font_t * font_subtitle,
51 | const lv_font_t * font_title);
52 | /**********************
53 | * MACROS
54 | **********************/
55 |
56 | #endif
57 |
58 | #ifdef __cplusplus
59 | } /* extern "C" */
60 | #endif
61 |
62 | #endif /*LV_THEME_MATERIAL_H*/
63 |
--------------------------------------------------------------------------------
/PlatformIO/DIY_Signal_Generator_V1/lib/lvgl/src/src/lv_themes/lv_theme_mono.h:
--------------------------------------------------------------------------------
1 | /**
2 | * @file lv_theme_mono.h
3 | *
4 | */
5 |
6 | #ifndef LV_THEME_MONO_H
7 | #define LV_THEME_MONO_H
8 |
9 | #ifdef __cplusplus
10 | extern "C" {
11 | #endif
12 |
13 | /*********************
14 | * INCLUDES
15 | *********************/
16 | #include "../lv_conf_internal.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 | /**
34 | * Initialize the mono theme.
35 | * @param color_primary the primary color of the theme
36 | * @param color_secondary the secondary color for the theme
37 | * @param flags ORed flags starting with `LV_THEME_DEF_FLAG_...`
38 | * @param font_small pointer to a small font
39 | * @param font_normal pointer to a normal font
40 | * @param font_subtitle pointer to a large font
41 | * @param font_title pointer to a extra large font
42 | * @return a pointer to reference this theme later
43 | */
44 | lv_theme_t * lv_theme_mono_init(lv_color_t color_primary, lv_color_t color_secondary, uint32_t flags,
45 | const lv_font_t * font_small, const lv_font_t * font_normal, const lv_font_t * font_subtitle,
46 | const lv_font_t * font_title);
47 | /**********************
48 | * MACROS
49 | **********************/
50 |
51 | #endif
52 |
53 | #ifdef __cplusplus
54 | } /* extern "C" */
55 | #endif
56 |
57 | #endif /*LV_THEME_TEMPLATE_H*/
58 |
--------------------------------------------------------------------------------
/PlatformIO/DIY_Signal_Generator_V1/lib/lvgl/src/src/lv_themes/lv_theme_template.h:
--------------------------------------------------------------------------------
1 | /**
2 | * @file lv_theme_template.h
3 | *
4 | */
5 |
6 | #ifndef LV_THEME_TEMPLATE_H
7 | #define LV_THEME_TEMPLATE_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_THEME_TEMPLATE
19 |
20 | /*********************
21 | * DEFINES
22 | *********************/
23 |
24 | /**********************
25 | * TYPEDEFS
26 | **********************/
27 |
28 | /**********************
29 | * GLOBAL PROTOTYPES
30 | **********************/
31 |
32 |
33 | /**
34 | * Initialize the default
35 | * @param color_primary the primary color of the theme
36 | * @param color_secondary the secondary color for the theme
37 | * @param flags ORed flags starting with `LV_THEME_DEF_FLAG_...`
38 | * @param font_small pointer to a small font
39 | * @param font_normal pointer to a normal font
40 | * @param font_subtitle pointer to a large font
41 | * @param font_title pointer to a extra large font
42 | * @return a pointer to reference this theme later
43 | */
44 | lv_theme_t * lv_theme_template_init(lv_color_t color_primary, lv_color_t color_secondary, uint32_t flags,
45 | const lv_font_t * font_small, const lv_font_t * font_normal, const lv_font_t * font_subtitle,
46 | const lv_font_t * font_title);
47 | /**********************
48 | * MACROS
49 | **********************/
50 |
51 | #endif
52 |
53 | #ifdef __cplusplus
54 | } /* extern "C" */
55 | #endif
56 |
57 | #endif /*LV_THEME_TEMPLATE_H*/
58 |
--------------------------------------------------------------------------------
/PlatformIO/DIY_Signal_Generator_V1/lib/lvgl/src/src/lv_themes/lv_themes.mk:
--------------------------------------------------------------------------------
1 | CSRCS += lv_theme.c
2 | CSRCS += lv_theme_material.c
3 | CSRCS += lv_theme_mono.c
4 | CSRCS += lv_theme_empty.c
5 | CSRCS += lv_theme_template.c
6 |
7 | DEPPATH += --dep-path $(LVGL_DIR)/$(LVGL_DIR_NAME)/src/lv_themes
8 | VPATH += :$(LVGL_DIR)/$(LVGL_DIR_NAME)/src/lv_themes
9 |
10 | CFLAGS += "-I$(LVGL_DIR)/$(LVGL_DIR_NAME)/src/lv_themes"
11 |
--------------------------------------------------------------------------------
/PlatformIO/DIY_Signal_Generator_V1/lib/lvgl/src/src/lv_widgets/lv_led.h:
--------------------------------------------------------------------------------
1 | /**
2 | * @file lv_led.h
3 | *
4 | */
5 |
6 | #ifndef LV_LED_H
7 | #define LV_LED_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_LED != 0
19 |
20 | #include "../lv_core/lv_obj.h"
21 |
22 | /*********************
23 | * DEFINES
24 | *********************/
25 |
26 | /**********************
27 | * TYPEDEFS
28 | **********************/
29 |
30 | /*Data of led*/
31 | typedef struct {
32 | /*No inherited ext.*/
33 | /*New data for this type */
34 | uint8_t bright; /*Current brightness of the LED (0..255)*/
35 | } lv_led_ext_t;
36 |
37 | /*Parts of LED*/
38 | enum {
39 | LV_LED_PART_MAIN = LV_OBJ_PART_MAIN,
40 | };
41 | typedef uint8_t lv_led_part_t;
42 |
43 | /**********************
44 | * GLOBAL PROTOTYPES
45 | **********************/
46 |
47 | /**
48 | * Create a led objects
49 | * @param par pointer to an object, it will be the parent of the new led
50 | * @param copy pointer to a led object, if not NULL then the new object will be copied from it
51 | * @return pointer to the created led
52 | */
53 | lv_obj_t * lv_led_create(lv_obj_t * par, const lv_obj_t * copy);
54 |
55 | /**
56 | * Set the brightness of a LED object
57 | * @param led pointer to a LED object
58 | * @param bright LV_LED_BRIGHT_MIN (max. dark) ... LV_LED_BRIGHT_MAX (max. light)
59 | */
60 | void lv_led_set_bright(lv_obj_t * led, uint8_t bright);
61 |
62 | /**
63 | * Light on a LED
64 | * @param led pointer to a LED object
65 | */
66 | void lv_led_on(lv_obj_t * led);
67 |
68 | /**
69 | * Light off a LED
70 | * @param led pointer to a LED object
71 | */
72 | void lv_led_off(lv_obj_t * led);
73 |
74 | /**
75 | * Toggle the state of a LED
76 | * @param led pointer to a LED object
77 | */
78 | void lv_led_toggle(lv_obj_t * led);
79 |
80 | /**
81 | * Get the brightness of a LEd object
82 | * @param led pointer to LED object
83 | * @return bright 0 (max. dark) ... 255 (max. light)
84 | */
85 | uint8_t lv_led_get_bright(const lv_obj_t * led);
86 |
87 | /**********************
88 | * MACROS
89 | **********************/
90 |
91 | #endif /*LV_USE_LED*/
92 |
93 | #ifdef __cplusplus
94 | } /* extern "C" */
95 | #endif
96 |
97 | #endif /*LV_LED_H*/
98 |
--------------------------------------------------------------------------------
/PlatformIO/DIY_Signal_Generator_V1/lib/lvgl/src/src/lv_widgets/lv_objmask.h:
--------------------------------------------------------------------------------
1 | /**
2 | * @file lv_objmask.h
3 | *
4 | */
5 |
6 | #ifndef LV_OBJMASK_H
7 | #define LV_OBJMASK_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_OBJMASK != 0
19 |
20 | #include "../lv_core/lv_obj.h"
21 | #include "../lv_widgets/lv_cont.h"
22 |
23 | /*********************
24 | * DEFINES
25 | *********************/
26 |
27 | /**********************
28 | * TYPEDEFS
29 | **********************/
30 |
31 | typedef struct {
32 | void * param;
33 | } lv_objmask_mask_t;
34 |
35 | /*Data of object mask*/
36 | typedef struct {
37 | lv_cont_ext_t cont; /*Ext. of ancestor*/
38 | /*New data for this type */
39 | lv_ll_t mask_ll; /*Store the created masks*/
40 |
41 | } lv_objmask_ext_t;
42 |
43 | /*Parts of the object*/
44 | enum {
45 | LV_OBJMASK_PART_MAIN,
46 | };
47 | typedef uint8_t lv_objmask_part_t;
48 |
49 | /**********************
50 | * GLOBAL PROTOTYPES
51 | **********************/
52 |
53 | /**
54 | * Create a object mask objects
55 | * @param par pointer to an object, it will be the parent of the new object mask
56 | * @param copy pointer to a object mask object, if not NULL then the new object will be copied from it
57 | * @return pointer to the created object mask
58 | */
59 | lv_obj_t * lv_objmask_create(lv_obj_t * par, const lv_obj_t * copy);
60 |
61 | /*======================
62 | * Add/remove functions
63 | *=====================*/
64 |
65 | /**
66 | * Add a mask
67 | * @param objmask pointer to an Object mask object
68 | * @param param an initialized mask parameter
69 | * @return pointer to the added mask
70 | */
71 | lv_objmask_mask_t * lv_objmask_add_mask(lv_obj_t * objmask, void * param);
72 |
73 | /**
74 | * Update an already created mask
75 | * @param objmask pointer to an Object mask object
76 | * @param mask pointer to created mask (returned by `lv_objmask_add_mask`)
77 | * @param param an initialized mask parameter (initialized by `lv_draw_mask_line/angle/.../_init`)
78 | */
79 | void lv_objmask_update_mask(lv_obj_t * objmask, lv_objmask_mask_t * mask, void * param);
80 |
81 | /**
82 | * Remove a mask
83 | * @param objmask pointer to an Object mask object
84 | * @param mask pointer to created mask (returned by `lv_objmask_add_mask`)
85 | * If `NULL` passed all masks will be deleted.
86 | */
87 | void lv_objmask_remove_mask(lv_obj_t * objmask, lv_objmask_mask_t * mask);
88 |
89 | /*=====================
90 | * Setter functions
91 | *====================*/
92 |
93 | /*=====================
94 | * Getter functions
95 | *====================*/
96 |
97 | /*=====================
98 | * Other functions
99 | *====================*/
100 |
101 | /**********************
102 | * MACROS
103 | **********************/
104 |
105 | #endif /*LV_USE_OBJMASK*/
106 |
107 | #ifdef __cplusplus
108 | } /* extern "C" */
109 | #endif
110 |
111 | #endif /*LV_OBJMASK_H*/
112 |
--------------------------------------------------------------------------------
/PlatformIO/DIY_Signal_Generator_V1/lib/lvgl/src/src/lv_widgets/lv_objx_templ.h:
--------------------------------------------------------------------------------
1 | /**
2 | * @file lv_templ.h
3 | *
4 | */
5 |
6 | /* TODO Remove these instructions
7 | * Search an replace: template -> object normal name with lower case (e.g. button, label etc.)
8 | * templ -> object short name with lower case(e.g. btn, label etc)
9 | * TEMPL -> object short name with upper case (e.g. BTN, LABEL etc.)
10 | *
11 | */
12 |
13 | #ifndef LV_TEMPL_H
14 | #define LV_TEMPL_H
15 |
16 | #ifdef __cplusplus
17 | extern "C" {
18 | #endif
19 |
20 | /*********************
21 | * INCLUDES
22 | *********************/
23 | #include "../lv_conf_internal.h"
24 |
25 | #if LV_USE_TEMPL != 0
26 |
27 | #include "../lv_core/lv_obj.h"
28 |
29 | /*********************
30 | * DEFINES
31 | *********************/
32 |
33 | /**********************
34 | * TYPEDEFS
35 | **********************/
36 | /*Data of template*/
37 | typedef struct {
38 | lv_ANCESTOR_ext_t ANCESTOR; /*Ext. of ancestor*/
39 | /*New data for this type */
40 | } lv_templ_ext_t;
41 |
42 | /*Styles*/
43 | enum {
44 | LV_TEMPL_STYLE_X,
45 | LV_TEMPL_STYLE_Y,
46 | };
47 | typedef uint8_t lv_templ_style_t;
48 |
49 | /**********************
50 | * GLOBAL PROTOTYPES
51 | **********************/
52 |
53 | /**
54 | * Create a template objects
55 | * @param par pointer to an object, it will be the parent of the new template
56 | * @param copy pointer to a template object, if not NULL then the new object will be copied from it
57 | * @return pointer to the created template
58 | */
59 | lv_obj_t * lv_templ_create(lv_obj_t * par, const lv_obj_t * copy);
60 |
61 | /*======================
62 | * Add/remove functions
63 | *=====================*/
64 |
65 | /*=====================
66 | * Setter functions
67 | *====================*/
68 |
69 | /**
70 | * Set a style of a template.
71 | * @param templ pointer to template object
72 | * @param type which style should be set
73 | * @param style pointer to a style
74 | */
75 | void lv_templ_set_style(lv_obj_t * templ, lv_templ_style_t type, const lv_style_t * style);
76 |
77 | /*=====================
78 | * Getter functions
79 | *====================*/
80 |
81 | /**
82 | * Get style of a template.
83 | * @param templ pointer to template object
84 | * @param type which style should be get
85 | * @return style pointer to the style
86 | */
87 | lv_style_t * lv_templ_get_style(const lv_obj_t * templ, lv_templ_style_t type);
88 |
89 | /*=====================
90 | * Other functions
91 | *====================*/
92 |
93 | /**********************
94 | * MACROS
95 | **********************/
96 |
97 | #endif /*LV_USE_TEMPL*/
98 |
99 | #ifdef __cplusplus
100 | } /* extern "C" */
101 | #endif
102 |
103 | #endif /*LV_TEMPL_H*/
104 |
--------------------------------------------------------------------------------
/PlatformIO/DIY_Signal_Generator_V1/lib/lvgl/src/src/lv_widgets/lv_widgets.mk:
--------------------------------------------------------------------------------
1 | CSRCS += lv_arc.c
2 | CSRCS += lv_bar.c
3 | CSRCS += lv_checkbox.c
4 | CSRCS += lv_cpicker.c
5 | CSRCS += lv_dropdown.c
6 | CSRCS += lv_keyboard.c
7 | CSRCS += lv_line.c
8 | CSRCS += lv_msgbox.c
9 | CSRCS += lv_spinner.c
10 | CSRCS += lv_roller.c
11 | CSRCS += lv_table.c
12 | CSRCS += lv_tabview.c
13 | CSRCS += lv_tileview.c
14 | CSRCS += lv_btn.c
15 | CSRCS += lv_calendar.c
16 | CSRCS += lv_chart.c
17 | CSRCS += lv_canvas.c
18 | CSRCS += lv_gauge.c
19 | CSRCS += lv_label.c
20 | CSRCS += lv_list.c
21 | CSRCS += lv_slider.c
22 | CSRCS += lv_textarea.c
23 | CSRCS += lv_spinbox.c
24 | CSRCS += lv_btnmatrix.c
25 | CSRCS += lv_cont.c
26 | CSRCS += lv_img.c
27 | CSRCS += lv_imgbtn.c
28 | CSRCS += lv_led.c
29 | CSRCS += lv_linemeter.c
30 | CSRCS += lv_page.c
31 | CSRCS += lv_switch.c
32 | CSRCS += lv_win.c
33 | CSRCS += lv_objmask.c
34 |
35 | DEPPATH += --dep-path $(LVGL_DIR)/$(LVGL_DIR_NAME)/src/lv_widgets
36 | VPATH += :$(LVGL_DIR)/$(LVGL_DIR_NAME)/src/lv_widgets
37 |
38 | CFLAGS += "-I$(LVGL_DIR)/$(LVGL_DIR_NAME)/src/lv_widgets"
39 |
--------------------------------------------------------------------------------
/PlatformIO/DIY_Signal_Generator_V1/lib/lvgl/src/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 |
17 | #include "../lvgl.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 | }
37 | #endif
38 |
39 | #endif /*LVGL_SRC_H*/
40 |
--------------------------------------------------------------------------------
/PlatformIO/DIY_Signal_Generator_V1/lib/lvgl/src/tests/Makefile:
--------------------------------------------------------------------------------
1 | #
2 | # Makefile
3 | #
4 | CC ?= gcc
5 | LVGL_DIR ?= ${shell pwd}/../..
6 | LVGL_DIR_NAME ?= lvgl
7 |
8 | WARNINGS = -Werror -Wall -Wextra \
9 | -Wshadow -Wundef -Wmaybe-uninitialized -Wmissing-prototypes -Wpointer-arith -Wuninitialized \
10 | -Wunreachable-code -Wreturn-type -Wmultichar -Wformat-security -Wdouble-promotion -Wclobbered -Wdeprecated \
11 | -Wempty-body -Wshift-negative-value -Wstack-usage=2048 \
12 | -Wtype-limits -Wsizeof-pointer-memaccess
13 |
14 | #-Wno-unused-value -Wno-unused-parameter
15 | OPTIMIZATION ?= -O3 -g0
16 |
17 |
18 | CFLAGS ?= -I$(LVGL_DIR)/ $(DEFINES) $(WARNINGS) $(OPTIMIZATION) -I$(LVGL_DIR) -I.
19 |
20 | LDFLAGS ?= -lpng
21 | BIN ?= demo
22 |
23 |
24 | #Collect the files to compile
25 | MAINSRC = ./lv_test_main.c
26 |
27 | include ../lvgl.mk
28 |
29 | CSRCS += lv_test_assert.c
30 | CSRCS += lv_test_core/lv_test_core.c
31 | CSRCS += lv_test_core/lv_test_obj.c
32 | CSRCS += lv_test_core/lv_test_style.c
33 |
34 | OBJEXT ?= .o
35 |
36 | AOBJS = $(ASRCS:.S=$(OBJEXT))
37 | COBJS = $(CSRCS:.c=$(OBJEXT))
38 |
39 | MAINOBJ = $(MAINSRC:.c=$(OBJEXT))
40 |
41 | SRCS = $(ASRCS) $(CSRCS) $(MAINSRC)
42 | OBJS = $(AOBJS) $(COBJS)
43 |
44 | ## MAINOBJ -> OBJFILES
45 |
46 | all: default
47 |
48 | %.o: %.c
49 | @$(CC) $(CFLAGS) -c $< -o $@
50 | @echo "CC $<"
51 |
52 | default: $(AOBJS) $(COBJS) $(MAINOBJ)
53 | $(CC) -o $(BIN) $(MAINOBJ) $(AOBJS) $(COBJS) $(LDFLAGS)
54 |
55 | clean:
56 | rm -f $(BIN) $(AOBJS) $(COBJS) $(MAINOBJ)
57 |
58 |
--------------------------------------------------------------------------------
/PlatformIO/DIY_Signal_Generator_V1/lib/lvgl/src/tests/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/daumemo/DIY-Signal-Generator/7b449094d92bef584b805de9c50e9535e7786d8f/PlatformIO/DIY_Signal_Generator_V1/lib/lvgl/src/tests/icon.png
--------------------------------------------------------------------------------
/PlatformIO/DIY_Signal_Generator_V1/lib/lvgl/src/tests/icon2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/daumemo/DIY-Signal-Generator/7b449094d92bef584b805de9c50e9535e7786d8f/PlatformIO/DIY_Signal_Generator_V1/lib/lvgl/src/tests/icon2.png
--------------------------------------------------------------------------------
/PlatformIO/DIY_Signal_Generator_V1/lib/lvgl/src/tests/lv_test_assert.h:
--------------------------------------------------------------------------------
1 | /**
2 | * @file lv_test_assert.h
3 | *
4 | */
5 |
6 | #ifndef LV_TEST_ASSERT_H
7 | #define LV_TEST_ASSERT_H
8 |
9 | #ifdef __cplusplus
10 | extern "C" {
11 | #endif
12 |
13 | /*********************
14 | * INCLUDES
15 | *********************/
16 | #include
17 | #include
18 | #include "../lvgl.h"
19 |
20 | /*********************
21 | * DEFINES
22 | *********************/
23 |
24 | /**********************
25 | * TYPEDEFS
26 | **********************/
27 |
28 | /**********************
29 | * GLOBAL PROTOTYPES
30 | **********************/
31 |
32 | void lv_test_print(const char * s, ...);
33 | void lv_test_exit(const char * s, ...);
34 | void lv_test_error(const char * s, ...);
35 | void lv_test_assert_int_eq(int32_t n1, int32_t n2, const char * s);
36 | void lv_test_assert_int_gt(int32_t n_ref, int32_t n_act, const char * s);
37 | void lv_test_assert_int_lt(int32_t n_ref, int32_t n_act, const char * s);
38 | void lv_test_assert_str_eq(const char * str1, const char * str2, const char * s);
39 | void lv_test_assert_ptr_eq(const void * p_ref, const void * p_act, const char * s);
40 | void lv_test_assert_color_eq(lv_color_t c_ref, lv_color_t c_act, const char * s);
41 | void lv_test_assert_img_eq(const char * ref_img_fn, const char * s);
42 |
43 | /**********************
44 | * MACROS
45 | **********************/
46 |
47 | #ifdef __cplusplus
48 | } /* extern "C" */
49 | #endif
50 |
51 | #endif /*LV_TEST_ASSERT_H*/
52 |
--------------------------------------------------------------------------------
/PlatformIO/DIY_Signal_Generator_V1/lib/lvgl/src/tests/lv_test_conf.h:
--------------------------------------------------------------------------------
1 | /**
2 | * @file lv_test_conf.h
3 | *
4 | */
5 |
6 | #ifndef LV_TEST_CONF_H
7 | #define LV_TEST_CONF_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 | uint32_t custom_tick_get(void);
26 | #define LV_TICK_CUSTOM_SYS_TIME_EXPR custom_tick_get()
27 |
28 | typedef int16_t lv_coord_t;
29 | typedef void * lv_disp_drv_user_data_t; /*Type of user data in the display driver*/
30 | typedef void * lv_indev_drv_user_data_t; /*Type of user data in the input device driver*/
31 | typedef void * lv_font_user_data_t;
32 | typedef void * lv_obj_user_data_t;
33 | typedef void * lv_anim_user_data_t;
34 | typedef void * lv_group_user_data_t;
35 | typedef void * lv_fs_drv_user_data_t;
36 | typedef void * lv_img_decoder_user_data_t;
37 |
38 | /**********************
39 | * GLOBAL PROTOTYPES
40 | **********************/
41 |
42 | /**********************
43 | * MACROS
44 | **********************/
45 |
46 | #ifdef __cplusplus
47 | } /* extern "C" */
48 | #endif
49 |
50 | #endif /*LV_TEST_CONF_H*/
51 |
--------------------------------------------------------------------------------
/PlatformIO/DIY_Signal_Generator_V1/lib/lvgl/src/tests/lv_test_core/lv_test_core.c:
--------------------------------------------------------------------------------
1 | /**
2 | * @file lv_test_core.c
3 | *
4 | */
5 |
6 | /*********************
7 | * INCLUDES
8 | *********************/
9 | #include "../lv_test_assert.h"
10 |
11 | #if LV_BUILD_TEST
12 | #include "lv_test_core.h"
13 | #include "lv_test_obj.h"
14 | #include "lv_test_style.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 | void lv_test_core(void)
41 | {
42 | lv_test_print("");
43 | lv_test_print("*******************");
44 | lv_test_print("Start lv_core tests");
45 | lv_test_print("*******************");
46 |
47 | lv_test_obj();
48 | lv_test_style();
49 | }
50 |
51 |
52 | /**********************
53 | * STATIC FUNCTIONS
54 | **********************/
55 | #endif
56 |
--------------------------------------------------------------------------------
/PlatformIO/DIY_Signal_Generator_V1/lib/lvgl/src/tests/lv_test_core/lv_test_core.h:
--------------------------------------------------------------------------------
1 | /**
2 | * @file lv_test_core.h
3 | *
4 | */
5 |
6 | #ifndef LV_TEST_CORE_H
7 | #define LV_TEST_CORE_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 | void lv_test_core(void);
29 |
30 | /**********************
31 | * MACROS
32 | **********************/
33 |
34 | #ifdef __cplusplus
35 | } /* extern "C" */
36 | #endif
37 |
38 | #endif /*LV_TEST_CORE_H*/
39 |
--------------------------------------------------------------------------------
/PlatformIO/DIY_Signal_Generator_V1/lib/lvgl/src/tests/lv_test_core/lv_test_obj.c:
--------------------------------------------------------------------------------
1 | /**
2 | * @file lv_test_obj.c
3 | *
4 | */
5 |
6 | /*********************
7 | * INCLUDES
8 | *********************/
9 | #include "../../lvgl.h"
10 | #include "../lv_test_assert.h"
11 | #include "lv_test_obj.h"
12 |
13 | #if LV_BUILD_TEST
14 |
15 | /*********************
16 | * DEFINES
17 | *********************/
18 |
19 | /**********************
20 | * TYPEDEFS
21 | **********************/
22 |
23 | /**********************
24 | * STATIC PROTOTYPES
25 | **********************/
26 | static void create_delete_change_parent(void);
27 |
28 | /**********************
29 | * STATIC VARIABLES
30 | **********************/
31 |
32 | /**********************
33 | * MACROS
34 | **********************/
35 |
36 | /**********************
37 | * GLOBAL FUNCTIONS
38 | **********************/
39 |
40 | void lv_test_obj(void)
41 | {
42 | lv_test_print("");
43 | lv_test_print("==================");
44 | lv_test_print("Start lv_obj tests");
45 | lv_test_print("==================");
46 |
47 | create_delete_change_parent();
48 | }
49 |
50 |
51 | /**********************
52 | * STATIC FUNCTIONS
53 | **********************/
54 |
55 | static void create_delete_change_parent(void)
56 | {
57 |
58 | lv_test_print("");
59 | lv_test_print("Create, delete, change parent of a simple object:");
60 | lv_test_print("-------------------------------------------------");
61 |
62 |
63 | lv_test_print("Create an object on the default screen");
64 | lv_test_assert_int_eq(0, lv_obj_count_children(lv_scr_act()), "Screen's children count before creation");
65 |
66 | lv_obj_t * obj = lv_obj_create(lv_scr_act(), NULL);
67 | lv_test_assert_int_eq(1, lv_obj_count_children(lv_scr_act()), "Screen's children count after creation");
68 | lv_test_assert_int_eq(0, lv_obj_count_children(obj), "New object's children count after creation");
69 |
70 | lv_test_print("Delete the created object");
71 | lv_obj_del(obj);
72 | obj = NULL;
73 | lv_test_assert_int_eq(0, lv_obj_count_children(lv_scr_act()), "Screen's children count after delete");
74 |
75 | lv_test_print("Create two objects");
76 | lv_obj_t * obj_parent = lv_obj_create(lv_scr_act(), NULL);
77 | lv_obj_t * obj_child = lv_obj_create(lv_scr_act(), NULL);
78 | lv_test_assert_int_eq(2, lv_obj_count_children(lv_scr_act()), "Screen's children count after creation");
79 |
80 | lv_test_print("Change the parent of the second object to the first");
81 | lv_obj_set_parent(obj_child, obj_parent);
82 | lv_test_assert_int_eq(1, lv_obj_count_children(lv_scr_act()), "Screen's children count after parent change");
83 | lv_test_assert_int_eq(1, lv_obj_count_children(obj_parent), "Parent object's children count after parent change");
84 | lv_test_assert_int_eq(0, lv_obj_count_children(obj_child), "Child object's children count after parent change");
85 |
86 | lv_test_print("Remove the parent object");
87 | lv_obj_del(obj_parent);
88 | lv_test_assert_int_eq(0, lv_obj_count_children(lv_scr_act()), "Screen's children count after delete");
89 | }
90 | #endif
91 |
--------------------------------------------------------------------------------
/PlatformIO/DIY_Signal_Generator_V1/lib/lvgl/src/tests/lv_test_core/lv_test_obj.h:
--------------------------------------------------------------------------------
1 | /**
2 | * @file lv_test_obj.h
3 | *
4 | */
5 |
6 | #ifndef LV_TEST_OBJ_H
7 | #define LV_TEST_OBJ_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 | void lv_test_obj(void);
29 |
30 | /**********************
31 | * MACROS
32 | **********************/
33 |
34 | #ifdef __cplusplus
35 | } /* extern "C" */
36 | #endif
37 |
38 | #endif /*LV_TEST_OBJ_H*/
39 |
--------------------------------------------------------------------------------
/PlatformIO/DIY_Signal_Generator_V1/lib/lvgl/src/tests/lv_test_core/lv_test_style.h:
--------------------------------------------------------------------------------
1 | /**
2 | * @file lv_test_style.h
3 | *
4 | */
5 |
6 | #ifndef LV_TEST_STYLE_H
7 | #define LV_TEST_STYLE_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 | void lv_test_style(void);
29 |
30 | /**********************
31 | * MACROS
32 | **********************/
33 |
34 | #ifdef __cplusplus
35 | } /* extern "C" */
36 | #endif
37 |
38 | #endif /*LV_TEST_STYLE_H*/
39 |
--------------------------------------------------------------------------------
/PlatformIO/DIY_Signal_Generator_V1/lib/lvgl/src/tests/lv_test_main.c:
--------------------------------------------------------------------------------
1 | #include "../lvgl.h"
2 | #include
3 | #include
4 | #include
5 | #include "lv_test_core/lv_test_core.h"
6 |
7 | #if LV_BUILD_TEST
8 |
9 | static void hal_init(void);
10 | static void dummy_flush_cb(lv_disp_drv_t * disp_drv, const lv_area_t * area, lv_color_t * color_p);
11 |
12 | int main(void)
13 | {
14 | printf("Call lv_init...\n");
15 | lv_init();
16 |
17 | hal_init();
18 |
19 | lv_test_core();
20 |
21 | printf("Exit with success!\n");
22 | return 0;
23 | }
24 |
25 |
26 | static void hal_init(void)
27 | {
28 | static lv_disp_buf_t disp_buf;
29 | lv_color_t * disp_buf1 = (lv_color_t *)malloc(LV_HOR_RES * LV_VER_RES * sizeof(lv_color_t));
30 |
31 | lv_disp_buf_init(&disp_buf, disp_buf1, NULL, LV_HOR_RES* LV_VER_RES);
32 |
33 | lv_disp_drv_t disp_drv;
34 | lv_disp_drv_init(&disp_drv);
35 | disp_drv.buffer = &disp_buf;
36 | disp_drv.flush_cb = dummy_flush_cb;
37 | lv_disp_drv_register(&disp_drv);
38 | }
39 |
40 |
41 | static void dummy_flush_cb(lv_disp_drv_t * disp_drv, const lv_area_t * area, lv_color_t * color_p)
42 | {
43 | LV_UNUSED(area);
44 | LV_UNUSED(color_p);
45 | lv_disp_flush_ready(disp_drv);
46 | }
47 |
48 | uint32_t custom_tick_get(void)
49 | {
50 | static uint64_t start_ms = 0;
51 | if(start_ms == 0) {
52 | struct timeval tv_start;
53 | gettimeofday(&tv_start, NULL);
54 | start_ms = (tv_start.tv_sec * 1000000 + tv_start.tv_usec) / 1000;
55 | }
56 |
57 | struct timeval tv_now;
58 | gettimeofday(&tv_now, NULL);
59 | uint64_t now_ms;
60 | now_ms = (tv_now.tv_sec * 1000000 + tv_now.tv_usec) / 1000;
61 |
62 | uint32_t time_ms = now_ms - start_ms;
63 | return time_ms;
64 | }
65 |
66 | #endif
67 |
68 |
--------------------------------------------------------------------------------
/PlatformIO/DIY_Signal_Generator_V1/lib/lvgl/src/tests/lv_test_objx/lv_test_cont.c:
--------------------------------------------------------------------------------
1 | /**
2 | * @file lv_test_cont.c
3 | *
4 | */
5 |
6 | /*********************
7 | * INCLUDES
8 | *********************/
9 | #include "../../lvgl.h"
10 | #include "../lv_test_assert.h"
11 |
12 | #if LV_BUILD_TEST
13 |
14 |
15 | /*********************
16 | * DEFINES
17 | *********************/
18 |
19 | /**********************
20 | * TYPEDEFS
21 | **********************/
22 |
23 | /**********************
24 | * STATIC PROTOTYPES
25 | **********************/
26 | static void create_copy(void);
27 |
28 | /**********************
29 | * STATIC VARIABLES
30 | **********************/
31 |
32 | /**********************
33 | * MACROS
34 | **********************/
35 |
36 | /**********************
37 | * GLOBAL FUNCTIONS
38 | **********************/
39 |
40 | void lv_test_cont(void)
41 | {
42 | lv_test_print("");
43 | lv_test_print("===================");
44 | lv_test_print("Start lv_cont tests");
45 | lv_test_print("===================");
46 |
47 | create_copy();
48 | }
49 |
50 |
51 | /**********************
52 | * STATIC FUNCTIONS
53 | **********************/
54 |
55 | static void create_copy(void)
56 | {
57 | lv_test_print("");
58 | lv_test_print("Create and copy a container");
59 | lv_test_print("---------------------------");
60 |
61 | lv_test_print("Create a container");
62 | lv_test_assert_int_eq(0, lv_obj_count_children(lv_scr_act()), "Screen's children count before creation");
63 |
64 | lv_obj_t * obj = lv_cont_create(lv_scr_act(), NULL);
65 | lv_test_assert_int_eq(1, lv_obj_count_children(lv_scr_act()), "Screen's children count after creation");
66 |
67 | lv_test_print("Test the default values");
68 | lv_test_assert_int_eq(LV_FIT_NONE, lv_cont_get_fit_left(obj), "Default left fit");
69 | lv_test_assert_int_eq(LV_FIT_NONE, lv_cont_get_fit_right(obj), "Default right fit");
70 | lv_test_assert_int_eq(LV_FIT_NONE, lv_cont_get_fit_top(obj), "Default top fit");
71 | lv_test_assert_int_eq(LV_FIT_NONE, lv_cont_get_fit_bottom(obj), "Default bottom fit");
72 | lv_test_assert_int_eq(LV_LAYOUT_OFF, lv_cont_get_layout(obj), "Default layout");
73 |
74 | lv_test_print("Delete the container");
75 | lv_obj_del(obj);
76 | obj = NULL;
77 | lv_test_assert_int_eq(0, lv_obj_count_children(lv_scr_act()), "Screen's children count after delete");
78 |
79 | }
80 | #endif
81 |
--------------------------------------------------------------------------------
/PlatformIO/DIY_Signal_Generator_V1/lib/lvgl/src/tests/lv_test_objx/lv_test_cont.h:
--------------------------------------------------------------------------------
1 | /**
2 | * @file lv_test_obj.h
3 | *
4 | */
5 |
6 | #ifndef LV_TEST_CONT_H
7 | #define LV_TEST_CONT_H
8 |
9 | #ifdef __cplusplus
10 | extern "C" {
11 | #endif
12 |
13 | /*********************
14 | * INCLUDES
15 | *********************/
16 |
17 | /*********************
18 | * DEFINES
19 | *********************/
20 |
21 | /**********************
22 | * TYPEDEFS
23 | **********************/
24 |
25 | /**********************
26 | * GLOBAL PROTOTYPES
27 | **********************/
28 | void lv_test_cont(void);
29 |
30 | /**********************
31 | * MACROS
32 | **********************/
33 |
34 | #ifdef __cplusplus
35 | } /* extern "C" */
36 | #endif
37 |
38 | #endif /*LV_TEST_CONT_H*/
39 |
--------------------------------------------------------------------------------
/PlatformIO/DIY_Signal_Generator_V1/lib/lvgl/src/tests/lv_test_ref_imgs/lv_test_obj_1_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/daumemo/DIY-Signal-Generator/7b449094d92bef584b805de9c50e9535e7786d8f/PlatformIO/DIY_Signal_Generator_V1/lib/lvgl/src/tests/lv_test_ref_imgs/lv_test_obj_1_1.png
--------------------------------------------------------------------------------
/PlatformIO/DIY_Signal_Generator_V1/lib/touch_drv/touch_drv.cpp:
--------------------------------------------------------------------------------
1 | #include "touch_drv.h"
2 | #include "Wire.h"
3 |
4 | int getTouchInterruptPinValue()
5 | {
6 | return digitalRead(TOUCH_INT_PIN);
7 | }
8 |
9 | int readTouchReg(int reg)
10 | {
11 | int data = 0;
12 | Wire.beginTransmission(TOUCH_I2C_ADD);
13 | Wire.write(reg);
14 | Wire.endTransmission();
15 | Wire.requestFrom(TOUCH_I2C_ADD, 1);
16 | if (Wire.available())
17 | {
18 | data = Wire.read();
19 | }
20 | return data;
21 | }
22 |
23 | int getTouchPointX()
24 | {
25 | int XL = 0;
26 | int XH = 0;
27 |
28 | XH = readTouchReg(TOUCH_REG_XH);
29 | XL = readTouchReg(TOUCH_REG_XL);
30 |
31 | return ((XH & 0x0F) << 8) | XL;
32 | }
33 |
34 | int getTouchPointY()
35 | {
36 | int YL = 0;
37 | int YH = 0;
38 |
39 | YH = readTouchReg(TOUCH_REG_YH);
40 | YL = readTouchReg(TOUCH_REG_YL);
41 |
42 | return ((YH & 0x0F) << 8) | YL;
43 | }
44 |
45 | void touchInit()
46 | {
47 | Wire.begin(15, 0);
48 | Wire.setClock(40000);
49 | pinMode(35, INPUT);
50 | }
51 |
--------------------------------------------------------------------------------
/PlatformIO/DIY_Signal_Generator_V1/lib/touch_drv/touch_drv.h:
--------------------------------------------------------------------------------
1 | #ifndef TOUCH_DRV_H
2 | #define TOUCH_DRV_H
3 |
4 | #define TOUCH_I2C_ADD 0x38
5 | #define TOUCH_REG_XL 0x04
6 | #define TOUCH_REG_XH 0x03
7 | #define TOUCH_REG_YL 0x06
8 | #define TOUCH_REG_YH 0x05
9 | #define TOUCH_INT_PIN 35
10 |
11 | int getTouchInterruptPinValue();
12 | int readTouchReg(int reg);
13 | int getTouchPointX();
14 | int getTouchPointY();
15 | void touchInit();
16 |
17 | #endif
--------------------------------------------------------------------------------
/PlatformIO/DIY_Signal_Generator_V1/platformio.ini:
--------------------------------------------------------------------------------
1 | ; PlatformIO Project Configuration File
2 | ;
3 | ; Build options: build flags, source filter
4 | ; Upload options: custom upload port, speed and extra flags
5 | ; Library options: dependencies, extra library storages
6 | ; Advanced options: extra scripting
7 | ;
8 | ; Please visit documentation for the other options and examples
9 | ; https://docs.platformio.org/page/projectconf.html
10 |
11 | [env:esp32dev]
12 | platform = espressif32
13 | board = esp32dev
14 | framework = arduino
15 | ;upload_port = 192.168.0.116
16 | ;upload_protocol = espota
17 |
--------------------------------------------------------------------------------
/PlatformIO/DIY_Signal_Generator_V1/src/main.cpp:
--------------------------------------------------------------------------------
1 | /************************************************************************************
2 | *
3 | * This is an example code used to test R61529 based LCD with FT6236 touch controller
4 | * connected to an ESP32 MCU through parallel(8080) interface. This code uses eSPI
5 | * library
6 | *
7 | *
8 | * Note: Although you will find some files that contains R61581 in it, but be aware
9 | * that those are modified files from original eSPI library to support R61529 ICs
10 | * (Some or all code was changed in those header files).
11 | *
12 | * LCD Connection to the ESP32:
13 | *
14 | * D0 -> GPIO 16
15 | * D1 -> GPIO 17
16 | * D2 -> GPIO 18
17 | * D3 -> GPIO 19
18 | * D4 -> GPIO 21
19 | * D5 -> GPIO 22
20 | * D6 -> GPIO 23
21 | * D7 -> GPIO 25
22 | *
23 | * CSX -> GPIO 33
24 | * DCX -> GPIO 26
25 | * RSX -> GPIO 32
26 | * WRX -> GPIO 27
27 | *
28 | * TOUCH IC connection to the ESP32:
29 | *
30 | * SDA -> GPIO 15
31 | * SCL -> GPIO 14->0
32 | * INT -> GPIO 35
33 | * RST -> GPIO 32 (connected together with the LCD reset pin)
34 | *
35 | *************************************************************************************/
36 |
37 |
38 | #include
39 |
40 | #include "../lib/TFT_eSPI/TFT_eSPI.h"
41 | #include "Wire.h"
42 |
43 | #include
44 | #include
45 | #include
46 | #include "ota.h"
47 | #include
48 | #include
49 | #include
50 | #include
51 |
52 | #include
53 |
54 | #include "../lib/AD9833/ad9833.h"
55 | #include "bq24295.h"
56 | #include "../lib/lvgl/src/lvgl.h"
57 |
58 | #include "../lib/lcd_interface/lcd_interface.h"
59 | #include "../lib/touch_drv/touch_drv.h"
60 | #include "../lib/generator/generator.h"
61 | #include "../lib/device/device.h"
62 |
63 |
64 | uint64_t battMeasureTimer = 0;
65 | int battUpdateTimer = 0;
66 |
67 |
68 | void setup()
69 | {
70 |
71 | Device.LoadSettings();
72 |
73 | if(Device.IsApOn() || Device.IsWiFiOn()){
74 | OtaSetup();
75 | }
76 |
77 | BQ24295_IC charger(15, 0, 100000);
78 |
79 | charger.setI2cWatchdogTimer(0);
80 | charger.setFastChargeCurrent(0b010000);
81 | charger.setPreChargeCurrent(0b0001);
82 | charger.setFastChargeTimer(0);
83 | charger.setBoostVoltage(0b1000);
84 | charger.enableOTG(false);
85 |
86 |
87 | touchInit();
88 | Wire.beginTransmission(0x38);
89 | Wire.write(0xA4);
90 | Wire.write(0x00); //turn on interrupt
91 | Wire.endTransmission();
92 |
93 |
94 | interface_init(); //initialise lcd interface: eSPI and lvgl
95 |
96 | Device.MeasureBattery();
97 | interface_update_battery();
98 |
99 | }
100 |
101 | void loop()
102 | {
103 |
104 | OtaHandleRequests();
105 |
106 | Device.ServerHandlesClient();
107 | lv_task_handler(); /* let the GUI do its work */
108 |
109 | delay(1);
110 | battMeasureTimer++;
111 | if(battMeasureTimer > 1000){
112 | battMeasureTimer = 0;
113 | Device.MeasureBattery();
114 | if(battUpdateTimer > 5){
115 | battUpdateTimer = 0;
116 | interface_update_battery();
117 | }
118 | else {
119 | battUpdateTimer++;
120 | }
121 | }
122 | }
123 |
124 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # DIY-Signal-Generator
2 |
3 | 
4 |
5 | A device, used for generating electrical signals. More infromation: https://daumemo.com/finished-diy-portable-wi-fi-function-generator-part-17
6 |
7 | Repository includes all files: firmware code, schematics, PCB files.
8 | STL files for the enclosure can be found here: https://www.thingiverse.com/thing:4596954
9 |
10 | Device's specification:
11 | - 3.5 inch IPS LCD with capacitive touch panel
12 | - 2200 mAh Li-Po battery
13 | - ESP-32 MCU
14 | - AD9833 for sine and triangle waveform generation (up to 25 MHz)
15 | - Square wave and PWM generated by the MCU (up to 5 MHz)
16 | - The device can be controlled through LCD or WEB interface
17 | - For WEB control, the device can connect to a Wi-Fi or it can create its own Wi-Fi Access Point
18 | - Output signal’s offset range: -8V … +8V
19 | - Output signal’s amplitude range: 0 … 9V (sine, triangle), 0 … 5.5V (square). PWM output: 3V.
20 | - Battery charging time: <2 hours
21 | - Working time (Wi-Fi on, output relay ON, maximum LCD brightness): around 6 hours
22 | - USB Type C port for charging, 2 SMA ports for signal output, 1 ON/OFF switch, LED charging indicator
--------------------------------------------------------------------------------