├── .clang-format
├── .codespell_ignore
├── .devcontainer
├── bashrc_addons_add.sh
├── ecad-mcad
│ ├── .bashrc_devcontainer_addons
│ ├── Dockerfile
│ └── devcontainer.json
├── esp-idf
│ ├── .bashrc_devcontainer_addons
│ ├── .vscode
│ │ ├── c_cpp_properties.json
│ │ ├── launch.json
│ │ ├── settings.json
│ │ └── tasks.json
│ ├── Dockerfile
│ └── devcontainer.json
└── puya
│ ├── .bashrc_devcontainer_addons
│ ├── .vscode
│ ├── c_cpp_properties.json
│ ├── launch.json
│ ├── settings.json
│ └── tasks.json
│ ├── Dockerfile
│ └── devcontainer.json
├── .gitattributes
├── .github
└── workflows
│ ├── deploy_flap_generator.yml
│ ├── ecad_mcad_ci.yml
│ └── update_container.yml
├── .gitignore
├── .gitmodules
├── LICENCE.md
├── README.md
├── ci-script-formatting.sh
├── docs
├── BOM-unspecified.md
├── README_old.md
├── architecture.md
├── chain_com.md
├── controller.md
├── devcontainers.md
├── images
│ ├── OpenFlap.gif
│ ├── chain_comm.drawio
│ ├── example_read_all.png
│ ├── example_write_all.png
│ ├── example_write_seq.png
│ ├── flap_dimensions.svg
│ ├── module_cad.png
│ ├── ratchet_notch.png
│ ├── read_all_dynamic.png
│ ├── read_all_static.png
│ ├── signalpath.drawio.png
│ ├── signalpath.png
│ ├── write_all_dynamic.png
│ ├── write_all_static.png
│ └── write_seq.png
├── module.md
└── wiring.md
├── hardware
├── ci-script-flaps.sh
├── ci-script-kibot.sh
├── controller
│ ├── controller-3D_blender_top.png
│ ├── controller-bottom.png
│ ├── controller-ibom.html
│ ├── controller-schematic.pdf
│ ├── controller-top.png
│ └── src
│ │ ├── controller.kibot.yaml
│ │ ├── controller.kicad_pcb
│ │ ├── controller.kicad_pro
│ │ ├── controller.kicad_sch
│ │ ├── fp-lib-table
│ │ └── sym-lib-table
├── module
│ ├── encoder_wheel
│ │ ├── encoder_wheel_48-bottom.png
│ │ ├── encoder_wheel_48-top.png
│ │ └── src
│ │ │ ├── encoder_pattern_48.svg
│ │ │ ├── encoder_wheel_48.kibot.yaml
│ │ │ ├── encoder_wheel_48.kicad_pcb
│ │ │ ├── encoder_wheel_48.kicad_pro
│ │ │ ├── encoder_wheel_48.kicad_sch
│ │ │ └── fp-lib-table
│ ├── flaps
│ │ ├── README.md
│ │ ├── browser_based_flap_generator
│ │ │ ├── defaultFlapSet.json
│ │ │ ├── flap_gen.js
│ │ │ ├── gerbolyzer_template.svg
│ │ │ ├── index.html
│ │ │ ├── scripts.js
│ │ │ ├── style.css
│ │ │ └── test
│ │ │ │ └── browser_based_flap_generator_test.py
│ │ ├── flaps_to_3d.py
│ │ └── flaps_to_pcb.sh
│ └── side_panel
│ │ ├── side_panel-3D_blender_top.png
│ │ ├── side_panel-bottom.png
│ │ ├── side_panel-ibom.html
│ │ ├── side_panel-schematic.pdf
│ │ ├── side_panel-top.png
│ │ └── src
│ │ ├── fp-lib-table
│ │ ├── side_panel.kibot.yaml
│ │ ├── side_panel.kicad_pcb
│ │ ├── side_panel.kicad_pro
│ │ ├── side_panel.kicad_sch
│ │ └── sym-lib-table
├── resources
│ ├── 694106106102.stp
│ ├── 694106106102.wrl
│ ├── Attribution.md
│ ├── BoxHeader.pretty
│ │ ├── 2x03 Box Header 1.27.kicad_mod
│ │ └── 2x05 Box Header 1.27.kicad_mod
│ ├── EncoderPattern.pretty
│ │ ├── OpenFlapEncoderPattern48_1.4mm.kicad_mod
│ │ ├── OpenFlapEncoderPattern48_1.6mm.kicad_mod
│ │ ├── OpenFlapEncoderPattern48_1.8mm.kicad_mod
│ │ ├── OpenFlapEncoderPattern48_2.0mm.kicad_mod
│ │ ├── OpenFlapEncoderPattern48_2.2mm.kicad_mod
│ │ └── OpenFlapEncoderPattern48_Inc_2.5mm.kicad_mod
│ ├── GA12-N20.pretty
│ │ └── GA12-N20 Motor Vertical.kicad_mod
│ ├── GA12-N20.stp
│ ├── HLE-108-02-L-DV-BE-TR.stp
│ ├── IDC_1.27mm_2x3.stp
│ ├── IDC_1.27mm_2x5.stp
│ ├── L9110S.bak
│ ├── L9110S.kicad_sym
│ ├── OLED_0.91_128x32.stp
│ ├── Puya.bak
│ ├── Puya.kicad_sym
│ ├── RS0102Y.kicad_sym
│ └── ToolingHole.pretty
│ │ └── TOOLING_HOLE.kicad_mod
└── top_connector
│ ├── src
│ ├── top_connector.kibot.yaml
│ ├── top_connector.kicad_pcb
│ ├── top_connector.kicad_pro
│ └── top_connector.kicad_sch
│ ├── top_connector-3D_blender_top.png
│ ├── top_connector-bottom.png
│ ├── top_connector-ibom.html
│ ├── top_connector-schematic.pdf
│ └── top_connector-top.png
├── mechanical
├── ci-script-freecad.sh
├── export_stl.py
└── openflap_cad_model.FCStd
├── mkdocs.yml
└── software
├── common
└── chain_comm_abi
│ ├── CMakeLists.txt
│ ├── chain_comm_abi.c
│ ├── chain_comm_api.md
│ └── include
│ └── chain_comm_abi.h
├── controller
├── CMakeLists.txt
├── README.md
├── bld_util.py
├── ci-script-esp.sh
├── components
│ ├── chain_comm
│ │ ├── CMakeLists.txt
│ │ ├── chain_comm_esp.c
│ │ ├── include
│ │ │ ├── chain_comm_common.h
│ │ │ ├── chain_comm_esp.h
│ │ │ └── chain_comm_msg.h
│ │ └── test
│ │ │ ├── CMakeLists.txt
│ │ │ ├── pytest_chain_comm.py
│ │ │ ├── sdkconfig.qemu
│ │ │ ├── sdkconfig.target
│ │ │ ├── test.c
│ │ │ └── test_partition_table.csv
│ ├── chain_comm_abi
│ │ └── CMakeLists.txt
│ ├── controller_ota
│ │ ├── CMakeLists.txt
│ │ ├── controller_ota.c
│ │ ├── include
│ │ │ └── controller_ota.h
│ │ └── test
│ │ │ ├── CMakeLists.txt
│ │ │ ├── pytest_controller_ota.py
│ │ │ ├── sdkconfig.qemu
│ │ │ ├── sdkconfig.target
│ │ │ ├── test.c
│ │ │ ├── test.html
│ │ │ └── test_partition_table.csv
│ ├── display
│ │ ├── CMakeLists.txt
│ │ ├── display.c
│ │ ├── include
│ │ │ └── display.h
│ │ └── test
│ │ │ ├── CMakeLists.txt
│ │ │ ├── pytest_display.py
│ │ │ ├── sdkconfig.qemu
│ │ │ ├── sdkconfig.target
│ │ │ ├── test.c
│ │ │ └── test_partition_table.csv
│ ├── module
│ │ ├── CMakeLists.txt
│ │ ├── include
│ │ │ ├── module.h
│ │ │ ├── module_common.h
│ │ │ └── module_property.h
│ │ ├── module.c
│ │ ├── module_property.c
│ │ └── test
│ │ │ ├── CMakeLists.txt
│ │ │ ├── pytest_module.py
│ │ │ ├── sdkconfig.qemu
│ │ │ ├── sdkconfig.target
│ │ │ ├── test.c
│ │ │ └── test_partition_table.csv
│ ├── module_api
│ │ ├── CMakeLists.txt
│ │ ├── include
│ │ │ ├── module_api.h
│ │ │ ├── module_api_endpoints.h
│ │ │ └── module_api_firmware_endpoints.h
│ │ ├── module_api.c
│ │ ├── module_api_endpoints.c
│ │ ├── module_api_firmware_endpoints.c
│ │ └── test
│ │ │ ├── CMakeLists.txt
│ │ │ ├── pytest_module_api.py
│ │ │ ├── sdkconfig.qemu
│ │ │ ├── sdkconfig.target
│ │ │ ├── test.c
│ │ │ └── test_partition_table.csv
│ ├── networking
│ │ ├── CMakeLists.txt
│ │ ├── idf_component.yml
│ │ ├── include
│ │ │ ├── networking.h
│ │ │ ├── networking_config.h
│ │ │ └── networking_default_config.h.in
│ │ ├── networking.c
│ │ └── test
│ │ │ ├── CMakeLists.txt
│ │ │ ├── pytest_networking.py
│ │ │ ├── sdkconfig.qemu
│ │ │ ├── sdkconfig.target
│ │ │ ├── test.c
│ │ │ └── test_partition_table.csv
│ ├── oled_disp
│ │ ├── CMakeLists.txt
│ │ ├── include
│ │ │ └── oled_disp.h
│ │ ├── oled_disp.c
│ │ └── test
│ │ │ ├── CMakeLists.txt
│ │ │ ├── pytest_oled_disp.py
│ │ │ ├── sdkconfig.qemu
│ │ │ ├── sdkconfig.target
│ │ │ ├── test.c
│ │ │ └── test_partition_table.csv
│ ├── property_handler
│ │ ├── CMakeLists.txt
│ │ ├── include
│ │ │ ├── firmware_update_property.h
│ │ │ ├── property_handler.h
│ │ │ ├── property_handler_command.h
│ │ │ └── property_handler_common.h
│ │ ├── property_handler.c
│ │ ├── property_handlers
│ │ │ ├── character_property.c
│ │ │ ├── character_set_property.c
│ │ │ ├── color_property.c
│ │ │ ├── command_property.c
│ │ │ ├── firmware_update_property.c
│ │ │ ├── firmware_version_property.c
│ │ │ ├── minimum_rotation_property.c
│ │ │ ├── module_info_property.c
│ │ │ ├── motion_property.c
│ │ │ ├── offset_property.c
│ │ │ └── property_handler_common.c
│ │ └── test
│ │ │ ├── CMakeLists.txt
│ │ │ ├── pytest_property_handler.py
│ │ │ ├── sdkconfig.qemu
│ │ │ ├── sdkconfig.target
│ │ │ ├── test.c
│ │ │ └── test_partition_table.csv
│ └── webserver
│ │ ├── CMakeLists.txt
│ │ ├── assets
│ │ ├── favicon.svg
│ │ ├── index.html
│ │ ├── script.js
│ │ └── style.css
│ │ ├── include
│ │ ├── webserver.h
│ │ ├── webserver_api.h
│ │ └── webserver_common.h
│ │ ├── test
│ │ ├── CMakeLists.txt
│ │ ├── pytest_webserver.py
│ │ ├── sdkconfig.qemu
│ │ ├── sdkconfig.target
│ │ ├── test.c
│ │ └── test_partition_table.csv
│ │ ├── webserver.c
│ │ └── webserver_api.c
├── conftest.py
├── dependencies.lock
├── main
│ ├── CMakeLists.txt
│ ├── include
│ │ └── utils.h
│ ├── main.c
│ └── utils.c
├── partition_table.csv
├── pytest.ini
├── sdkconfig
├── sdkconfig.old
├── sdkconfig.qemu
└── sdkconfig.target
├── controller_old
├── CMakeLists.txt
├── README.md
├── components
│ └── openflap_common
│ │ └── CMakeLists.txt
├── dependencies.lock
├── logcat.sh
├── main
│ ├── CMakeLists.txt
│ ├── HttpApi
│ │ ├── HttpApi.c
│ │ └── include
│ │ │ └── HttpApi.h
│ ├── OpenFlapModel
│ │ ├── Model.c
│ │ └── include
│ │ │ └── Model.h
│ ├── UartApi
│ │ ├── UartApi.c
│ │ └── include
│ │ │ └── UartApi.h
│ ├── board_io.c
│ ├── flap_firmware.c
│ ├── flap_http_server.c
│ ├── flap_mdns.c
│ ├── flap_nvs.c
│ ├── flap_socket_server.c
│ ├── flap_uart.c
│ ├── flap_wifi.c
│ ├── html
│ │ ├── favicon.svg
│ │ ├── index.html
│ │ ├── script.js
│ │ └── style.css
│ ├── idf_component.yml
│ ├── include
│ │ ├── board_io.h
│ │ ├── flap_firmware.h
│ │ ├── flap_http_server.h
│ │ ├── flap_mdns.h
│ │ ├── flap_nvs.h
│ │ ├── flap_socket_server.h
│ │ ├── flap_uart.h
│ │ └── flap_wifi.h
│ └── main.c
├── managed_components
│ └── espressif__mdns
│ │ ├── .component_hash
│ │ ├── .cz.yaml
│ │ ├── CHANGELOG.md
│ │ ├── CMakeLists.txt
│ │ ├── Kconfig
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── examples
│ │ └── query_advertise
│ │ │ ├── CMakeLists.txt
│ │ │ ├── README.md
│ │ │ ├── main
│ │ │ ├── CMakeLists.txt
│ │ │ ├── Kconfig.projbuild
│ │ │ ├── idf_component.yml
│ │ │ └── mdns_example_main.c
│ │ │ ├── pytest_mdns.py
│ │ │ ├── sdkconfig.ci.eth_custom_netif
│ │ │ ├── sdkconfig.ci.eth_def
│ │ │ ├── sdkconfig.ci.eth_no_ipv4
│ │ │ ├── sdkconfig.ci.eth_no_ipv6
│ │ │ └── sdkconfig.ci.eth_socket
│ │ ├── idf_component.yml
│ │ ├── include
│ │ ├── mdns.h
│ │ └── mdns_console.h
│ │ ├── mdns.c
│ │ ├── mdns_console.c
│ │ ├── mdns_networking_lwip.c
│ │ ├── mdns_networking_socket.c
│ │ ├── private_include
│ │ ├── mdns_networking.h
│ │ └── mdns_private.h
│ │ └── tests
│ │ ├── host_test
│ │ ├── CMakeLists.txt
│ │ ├── README.md
│ │ ├── components
│ │ │ └── esp_netif_linux
│ │ │ │ ├── CMakeLists.txt
│ │ │ │ ├── Kconfig
│ │ │ │ ├── esp_netif_linux.c
│ │ │ │ └── include
│ │ │ │ ├── esp_wifi_types.h
│ │ │ │ └── machine
│ │ │ │ └── endian.h
│ │ ├── dnsfixture.py
│ │ ├── main
│ │ │ ├── CMakeLists.txt
│ │ │ ├── Kconfig.projbuild
│ │ │ ├── idf_component.yml
│ │ │ └── main.c
│ │ ├── pytest_mdns.py
│ │ ├── sdkconfig.ci.app
│ │ ├── sdkconfig.ci.console
│ │ ├── sdkconfig.ci.target
│ │ └── sdkconfig.defaults
│ │ ├── test_afl_fuzz_host
│ │ ├── CMakeLists.txt
│ │ ├── Makefile
│ │ ├── README.md
│ │ ├── esp32_mock.c
│ │ ├── esp32_mock.h
│ │ ├── esp_attr.h
│ │ ├── esp_netif_mock.c
│ │ ├── in
│ │ │ ├── file2.bin
│ │ │ ├── minif_4a_txt.bin
│ │ │ ├── minif_aaaa.bin
│ │ │ ├── minif_any.bin
│ │ │ ├── minif_disc.bin
│ │ │ ├── minif_ptr.bin
│ │ │ ├── minif_query.bin
│ │ │ ├── minif_query2.bin
│ │ │ ├── sub_fritz_m.bin
│ │ │ ├── telnet_ptr.bin
│ │ │ ├── test-14.bin
│ │ │ ├── test-15.bin
│ │ │ ├── test-16.bin
│ │ │ ├── test-28.bin
│ │ │ ├── test-29.bin
│ │ │ ├── test-31.bin
│ │ │ ├── test-53.bin
│ │ │ ├── test-56.bin
│ │ │ ├── test-63.bin
│ │ │ ├── test-83.bin
│ │ │ ├── test-88.bin
│ │ │ ├── test-89.bin
│ │ │ ├── test-95.bin
│ │ │ └── test-96.bin
│ │ ├── input_packets.txt
│ │ ├── mdns_di.h
│ │ ├── mdns_mock.h
│ │ ├── sdkconfig.h
│ │ └── test.c
│ │ ├── test_apps
│ │ ├── CMakeLists.txt
│ │ ├── README.md
│ │ ├── main
│ │ │ ├── CMakeLists.txt
│ │ │ ├── Kconfig.projbuild
│ │ │ ├── idf_component.yml
│ │ │ ├── main.c
│ │ │ └── mdns_test.c
│ │ ├── pytest_mdns_app.py
│ │ ├── sdkconfig.ci
│ │ └── sdkconfig.defaults
│ │ └── unit_test
│ │ ├── CMakeLists.txt
│ │ ├── main
│ │ ├── CMakeLists.txt
│ │ └── test_mdns.c
│ │ ├── pytest_app_mdns.py
│ │ ├── sdkconfig.ci
│ │ └── sdkconfig.defaults
├── partition_table.csv
├── reffCnt
├── sdkconfig
├── sdkconfig.old
└── update.sh
└── module
├── CMakeLists.txt
├── Puya.PY32F0xx_DFP.1.1.7.pack
├── README.md
├── app
├── CMakeLists.txt
├── inc
│ ├── chain_comm.h
│ ├── openflap.h
│ ├── platform.h
│ ├── property_handlers.h
│ ├── py32f0xx_hal_conf.h
│ └── py32f0xx_it.h
├── linker_script_app.ld
└── src
│ ├── chain_comm.c
│ ├── checksum.c
│ ├── default_config.c
│ ├── main.c
│ ├── openflap.c
│ ├── property_handlers.c
│ ├── py32f0xx_hal_msp.c
│ └── py32f0xx_it.c
├── btl
├── CMakeLists.txt
├── inc
│ ├── memory_map.h
│ ├── py32f0xx_hal_conf.h
│ └── py32f0xx_it.h
├── linker_script_btl.ld
└── src
│ ├── bootloader.c
│ ├── py32f0xx_hal_msp.c
│ └── py32f0xx_it.c
├── lib
├── CMakeLists.txt
├── config
│ ├── CMakeLists.txt
│ ├── config.c
│ └── inc
│ │ └── config.h
├── debug_io
│ ├── CMakeLists.txt
│ ├── debug_io.c
│ ├── debug_io_rtt.c
│ └── inc
│ │ ├── SEGGER_RTT_Conf.h
│ │ └── debug_io.h
├── flash
│ ├── CMakeLists.txt
│ ├── flash.c
│ └── inc
│ │ └── flash.h
├── puya_libs
│ ├── BSP
│ │ ├── Inc
│ │ │ ├── py32f0xx_bsp_clock.h
│ │ │ ├── py32f0xx_bsp_led.h
│ │ │ └── py32f0xx_bsp_printf.h
│ │ └── Src
│ │ │ ├── py32f0xx_bsp_clock.c
│ │ │ ├── py32f0xx_bsp_led.c
│ │ │ └── py32f0xx_bsp_printf.c
│ ├── BSP_LL
│ │ ├── Inc
│ │ │ ├── py32f0xx_bsp_clock.h
│ │ │ ├── py32f0xx_bsp_led.h
│ │ │ └── py32f0xx_bsp_printf.h
│ │ └── Src
│ │ │ ├── py32f0xx_bsp_clock.c
│ │ │ ├── py32f0xx_bsp_led.c
│ │ │ └── py32f0xx_bsp_printf.c
│ ├── CMSIS
│ │ ├── Core
│ │ │ └── Include
│ │ │ │ ├── cachel1_armv7.h
│ │ │ │ ├── cmsis_armcc.h
│ │ │ │ ├── cmsis_armclang.h
│ │ │ │ ├── cmsis_armclang_ltm.h
│ │ │ │ ├── cmsis_compiler.h
│ │ │ │ ├── cmsis_gcc.h
│ │ │ │ ├── cmsis_iccarm.h
│ │ │ │ ├── cmsis_version.h
│ │ │ │ ├── core_armv81mml.h
│ │ │ │ ├── core_armv8mbl.h
│ │ │ │ ├── core_armv8mml.h
│ │ │ │ ├── core_cm0.h
│ │ │ │ ├── core_cm0plus.h
│ │ │ │ ├── core_cm1.h
│ │ │ │ ├── core_cm23.h
│ │ │ │ ├── core_cm3.h
│ │ │ │ ├── core_cm33.h
│ │ │ │ ├── core_cm35p.h
│ │ │ │ ├── core_cm4.h
│ │ │ │ ├── core_cm55.h
│ │ │ │ ├── core_cm7.h
│ │ │ │ ├── core_cm85.h
│ │ │ │ ├── core_sc000.h
│ │ │ │ ├── core_sc300.h
│ │ │ │ ├── core_starmc1.h
│ │ │ │ ├── mpu_armv7.h
│ │ │ │ ├── mpu_armv8.h
│ │ │ │ ├── pac_armv81.h
│ │ │ │ ├── pmu_armv8.h
│ │ │ │ └── tz_context.h
│ │ ├── DSP
│ │ │ ├── ComputeLibrary
│ │ │ │ ├── Include
│ │ │ │ │ └── NEMath.h
│ │ │ │ ├── LICENSE.txt
│ │ │ │ ├── README.md
│ │ │ │ └── Source
│ │ │ │ │ └── arm_cl_tables.c
│ │ │ ├── Include
│ │ │ │ ├── arm_common_tables.h
│ │ │ │ ├── arm_common_tables_f16.h
│ │ │ │ ├── arm_const_structs.h
│ │ │ │ ├── arm_const_structs_f16.h
│ │ │ │ ├── arm_helium_utils.h
│ │ │ │ ├── arm_math.h
│ │ │ │ ├── arm_math_f16.h
│ │ │ │ ├── arm_math_memory.h
│ │ │ │ ├── arm_math_types.h
│ │ │ │ ├── arm_math_types_f16.h
│ │ │ │ ├── arm_mve_tables.h
│ │ │ │ ├── arm_mve_tables_f16.h
│ │ │ │ ├── arm_vec_math.h
│ │ │ │ ├── arm_vec_math_f16.h
│ │ │ │ └── dsp
│ │ │ │ │ ├── basic_math_functions.h
│ │ │ │ │ ├── basic_math_functions_f16.h
│ │ │ │ │ ├── bayes_functions.h
│ │ │ │ │ ├── bayes_functions_f16.h
│ │ │ │ │ ├── complex_math_functions.h
│ │ │ │ │ ├── complex_math_functions_f16.h
│ │ │ │ │ ├── controller_functions.h
│ │ │ │ │ ├── controller_functions_f16.h
│ │ │ │ │ ├── distance_functions.h
│ │ │ │ │ ├── distance_functions_f16.h
│ │ │ │ │ ├── fast_math_functions.h
│ │ │ │ │ ├── fast_math_functions_f16.h
│ │ │ │ │ ├── filtering_functions.h
│ │ │ │ │ ├── filtering_functions_f16.h
│ │ │ │ │ ├── interpolation_functions.h
│ │ │ │ │ ├── interpolation_functions_f16.h
│ │ │ │ │ ├── matrix_functions.h
│ │ │ │ │ ├── matrix_functions_f16.h
│ │ │ │ │ ├── none.h
│ │ │ │ │ ├── quaternion_math_functions.h
│ │ │ │ │ ├── statistics_functions.h
│ │ │ │ │ ├── statistics_functions_f16.h
│ │ │ │ │ ├── support_functions.h
│ │ │ │ │ ├── support_functions_f16.h
│ │ │ │ │ ├── svm_defines.h
│ │ │ │ │ ├── svm_functions.h
│ │ │ │ │ ├── svm_functions_f16.h
│ │ │ │ │ ├── transform_functions.h
│ │ │ │ │ ├── transform_functions_f16.h
│ │ │ │ │ └── utils.h
│ │ │ ├── PrivateInclude
│ │ │ │ ├── arm_sorting.h
│ │ │ │ ├── arm_vec_fft.h
│ │ │ │ └── arm_vec_filtering.h
│ │ │ └── Source
│ │ │ │ ├── BasicMathFunctions
│ │ │ │ ├── BasicMathFunctions.c
│ │ │ │ ├── BasicMathFunctionsF16.c
│ │ │ │ ├── CMakeLists.txt
│ │ │ │ ├── arm_abs_f16.c
│ │ │ │ ├── arm_abs_f32.c
│ │ │ │ ├── arm_abs_f64.c
│ │ │ │ ├── arm_abs_q15.c
│ │ │ │ ├── arm_abs_q31.c
│ │ │ │ ├── arm_abs_q7.c
│ │ │ │ ├── arm_add_f16.c
│ │ │ │ ├── arm_add_f32.c
│ │ │ │ ├── arm_add_f64.c
│ │ │ │ ├── arm_add_q15.c
│ │ │ │ ├── arm_add_q31.c
│ │ │ │ ├── arm_add_q7.c
│ │ │ │ ├── arm_and_u16.c
│ │ │ │ ├── arm_and_u32.c
│ │ │ │ ├── arm_and_u8.c
│ │ │ │ ├── arm_clip_f16.c
│ │ │ │ ├── arm_clip_f32.c
│ │ │ │ ├── arm_clip_q15.c
│ │ │ │ ├── arm_clip_q31.c
│ │ │ │ ├── arm_clip_q7.c
│ │ │ │ ├── arm_dot_prod_f16.c
│ │ │ │ ├── arm_dot_prod_f32.c
│ │ │ │ ├── arm_dot_prod_f64.c
│ │ │ │ ├── arm_dot_prod_q15.c
│ │ │ │ ├── arm_dot_prod_q31.c
│ │ │ │ ├── arm_dot_prod_q7.c
│ │ │ │ ├── arm_mult_f16.c
│ │ │ │ ├── arm_mult_f32.c
│ │ │ │ ├── arm_mult_f64.c
│ │ │ │ ├── arm_mult_q15.c
│ │ │ │ ├── arm_mult_q31.c
│ │ │ │ ├── arm_mult_q7.c
│ │ │ │ ├── arm_negate_f16.c
│ │ │ │ ├── arm_negate_f32.c
│ │ │ │ ├── arm_negate_f64.c
│ │ │ │ ├── arm_negate_q15.c
│ │ │ │ ├── arm_negate_q31.c
│ │ │ │ ├── arm_negate_q7.c
│ │ │ │ ├── arm_not_u16.c
│ │ │ │ ├── arm_not_u32.c
│ │ │ │ ├── arm_not_u8.c
│ │ │ │ ├── arm_offset_f16.c
│ │ │ │ ├── arm_offset_f32.c
│ │ │ │ ├── arm_offset_f64.c
│ │ │ │ ├── arm_offset_q15.c
│ │ │ │ ├── arm_offset_q31.c
│ │ │ │ ├── arm_offset_q7.c
│ │ │ │ ├── arm_or_u16.c
│ │ │ │ ├── arm_or_u32.c
│ │ │ │ ├── arm_or_u8.c
│ │ │ │ ├── arm_scale_f16.c
│ │ │ │ ├── arm_scale_f32.c
│ │ │ │ ├── arm_scale_f64.c
│ │ │ │ ├── arm_scale_q15.c
│ │ │ │ ├── arm_scale_q31.c
│ │ │ │ ├── arm_scale_q7.c
│ │ │ │ ├── arm_shift_q15.c
│ │ │ │ ├── arm_shift_q31.c
│ │ │ │ ├── arm_shift_q7.c
│ │ │ │ ├── arm_sub_f16.c
│ │ │ │ ├── arm_sub_f32.c
│ │ │ │ ├── arm_sub_f64.c
│ │ │ │ ├── arm_sub_q15.c
│ │ │ │ ├── arm_sub_q31.c
│ │ │ │ ├── arm_sub_q7.c
│ │ │ │ ├── arm_xor_u16.c
│ │ │ │ ├── arm_xor_u32.c
│ │ │ │ └── arm_xor_u8.c
│ │ │ │ ├── BayesFunctions
│ │ │ │ ├── BayesFunctions.c
│ │ │ │ ├── BayesFunctionsF16.c
│ │ │ │ ├── CMakeLists.txt
│ │ │ │ ├── arm_gaussian_naive_bayes_predict_f16.c
│ │ │ │ └── arm_gaussian_naive_bayes_predict_f32.c
│ │ │ │ ├── CMakeLists.txt
│ │ │ │ ├── CommonTables
│ │ │ │ ├── CMakeLists.txt
│ │ │ │ ├── CommonTables.c
│ │ │ │ ├── CommonTablesF16.c
│ │ │ │ ├── arm_common_tables.c
│ │ │ │ ├── arm_common_tables_f16.c
│ │ │ │ ├── arm_const_structs.c
│ │ │ │ ├── arm_const_structs_f16.c
│ │ │ │ ├── arm_mve_tables.c
│ │ │ │ └── arm_mve_tables_f16.c
│ │ │ │ ├── ComplexMathFunctions
│ │ │ │ ├── CMakeLists.txt
│ │ │ │ ├── ComplexMathFunctions.c
│ │ │ │ ├── ComplexMathFunctionsF16.c
│ │ │ │ ├── arm_cmplx_conj_f16.c
│ │ │ │ ├── arm_cmplx_conj_f32.c
│ │ │ │ ├── arm_cmplx_conj_q15.c
│ │ │ │ ├── arm_cmplx_conj_q31.c
│ │ │ │ ├── arm_cmplx_dot_prod_f16.c
│ │ │ │ ├── arm_cmplx_dot_prod_f32.c
│ │ │ │ ├── arm_cmplx_dot_prod_q15.c
│ │ │ │ ├── arm_cmplx_dot_prod_q31.c
│ │ │ │ ├── arm_cmplx_mag_f16.c
│ │ │ │ ├── arm_cmplx_mag_f32.c
│ │ │ │ ├── arm_cmplx_mag_f64.c
│ │ │ │ ├── arm_cmplx_mag_fast_q15.c
│ │ │ │ ├── arm_cmplx_mag_q15.c
│ │ │ │ ├── arm_cmplx_mag_q31.c
│ │ │ │ ├── arm_cmplx_mag_squared_f16.c
│ │ │ │ ├── arm_cmplx_mag_squared_f32.c
│ │ │ │ ├── arm_cmplx_mag_squared_f64.c
│ │ │ │ ├── arm_cmplx_mag_squared_q15.c
│ │ │ │ ├── arm_cmplx_mag_squared_q31.c
│ │ │ │ ├── arm_cmplx_mult_cmplx_f16.c
│ │ │ │ ├── arm_cmplx_mult_cmplx_f32.c
│ │ │ │ ├── arm_cmplx_mult_cmplx_f64.c
│ │ │ │ ├── arm_cmplx_mult_cmplx_q15.c
│ │ │ │ ├── arm_cmplx_mult_cmplx_q31.c
│ │ │ │ ├── arm_cmplx_mult_real_f16.c
│ │ │ │ ├── arm_cmplx_mult_real_f32.c
│ │ │ │ ├── arm_cmplx_mult_real_q15.c
│ │ │ │ └── arm_cmplx_mult_real_q31.c
│ │ │ │ ├── ControllerFunctions
│ │ │ │ ├── CMakeLists.txt
│ │ │ │ ├── ControllerFunctions.c
│ │ │ │ ├── arm_pid_init_f32.c
│ │ │ │ ├── arm_pid_init_q15.c
│ │ │ │ ├── arm_pid_init_q31.c
│ │ │ │ ├── arm_pid_reset_f32.c
│ │ │ │ ├── arm_pid_reset_q15.c
│ │ │ │ ├── arm_pid_reset_q31.c
│ │ │ │ ├── arm_sin_cos_f32.c
│ │ │ │ └── arm_sin_cos_q31.c
│ │ │ │ ├── DistanceFunctions
│ │ │ │ ├── CMakeLists.txt
│ │ │ │ ├── DistanceFunctions.c
│ │ │ │ ├── DistanceFunctionsF16.c
│ │ │ │ ├── arm_boolean_distance.c
│ │ │ │ ├── arm_boolean_distance_template.h
│ │ │ │ ├── arm_braycurtis_distance_f16.c
│ │ │ │ ├── arm_braycurtis_distance_f32.c
│ │ │ │ ├── arm_canberra_distance_f16.c
│ │ │ │ ├── arm_canberra_distance_f32.c
│ │ │ │ ├── arm_chebyshev_distance_f16.c
│ │ │ │ ├── arm_chebyshev_distance_f32.c
│ │ │ │ ├── arm_chebyshev_distance_f64.c
│ │ │ │ ├── arm_cityblock_distance_f16.c
│ │ │ │ ├── arm_cityblock_distance_f32.c
│ │ │ │ ├── arm_cityblock_distance_f64.c
│ │ │ │ ├── arm_correlation_distance_f16.c
│ │ │ │ ├── arm_correlation_distance_f32.c
│ │ │ │ ├── arm_cosine_distance_f16.c
│ │ │ │ ├── arm_cosine_distance_f32.c
│ │ │ │ ├── arm_cosine_distance_f64.c
│ │ │ │ ├── arm_dice_distance.c
│ │ │ │ ├── arm_euclidean_distance_f16.c
│ │ │ │ ├── arm_euclidean_distance_f32.c
│ │ │ │ ├── arm_euclidean_distance_f64.c
│ │ │ │ ├── arm_hamming_distance.c
│ │ │ │ ├── arm_jaccard_distance.c
│ │ │ │ ├── arm_jensenshannon_distance_f16.c
│ │ │ │ ├── arm_jensenshannon_distance_f32.c
│ │ │ │ ├── arm_kulsinski_distance.c
│ │ │ │ ├── arm_minkowski_distance_f16.c
│ │ │ │ ├── arm_minkowski_distance_f32.c
│ │ │ │ ├── arm_rogerstanimoto_distance.c
│ │ │ │ ├── arm_russellrao_distance.c
│ │ │ │ ├── arm_sokalmichener_distance.c
│ │ │ │ ├── arm_sokalsneath_distance.c
│ │ │ │ └── arm_yule_distance.c
│ │ │ │ ├── FastMathFunctions
│ │ │ │ ├── CMakeLists.txt
│ │ │ │ ├── FastMathFunctions.c
│ │ │ │ ├── FastMathFunctionsF16.c
│ │ │ │ ├── arm_atan2_f16.c
│ │ │ │ ├── arm_atan2_f32.c
│ │ │ │ ├── arm_atan2_q15.c
│ │ │ │ ├── arm_atan2_q31.c
│ │ │ │ ├── arm_cos_f32.c
│ │ │ │ ├── arm_cos_q15.c
│ │ │ │ ├── arm_cos_q31.c
│ │ │ │ ├── arm_divide_q15.c
│ │ │ │ ├── arm_divide_q31.c
│ │ │ │ ├── arm_sin_f32.c
│ │ │ │ ├── arm_sin_q15.c
│ │ │ │ ├── arm_sin_q31.c
│ │ │ │ ├── arm_sqrt_q15.c
│ │ │ │ ├── arm_sqrt_q31.c
│ │ │ │ ├── arm_vexp_f16.c
│ │ │ │ ├── arm_vexp_f32.c
│ │ │ │ ├── arm_vexp_f64.c
│ │ │ │ ├── arm_vinverse_f16.c
│ │ │ │ ├── arm_vlog_f16.c
│ │ │ │ ├── arm_vlog_f32.c
│ │ │ │ ├── arm_vlog_f64.c
│ │ │ │ ├── arm_vlog_q15.c
│ │ │ │ └── arm_vlog_q31.c
│ │ │ │ ├── FilteringFunctions
│ │ │ │ ├── CMakeLists.txt
│ │ │ │ ├── FilteringFunctions.c
│ │ │ │ ├── FilteringFunctionsF16.c
│ │ │ │ ├── arm_biquad_cascade_df1_32x64_init_q31.c
│ │ │ │ ├── arm_biquad_cascade_df1_32x64_q31.c
│ │ │ │ ├── arm_biquad_cascade_df1_f16.c
│ │ │ │ ├── arm_biquad_cascade_df1_f32.c
│ │ │ │ ├── arm_biquad_cascade_df1_fast_q15.c
│ │ │ │ ├── arm_biquad_cascade_df1_fast_q31.c
│ │ │ │ ├── arm_biquad_cascade_df1_init_f16.c
│ │ │ │ ├── arm_biquad_cascade_df1_init_f32.c
│ │ │ │ ├── arm_biquad_cascade_df1_init_q15.c
│ │ │ │ ├── arm_biquad_cascade_df1_init_q31.c
│ │ │ │ ├── arm_biquad_cascade_df1_q15.c
│ │ │ │ ├── arm_biquad_cascade_df1_q31.c
│ │ │ │ ├── arm_biquad_cascade_df2T_f16.c
│ │ │ │ ├── arm_biquad_cascade_df2T_f32.c
│ │ │ │ ├── arm_biquad_cascade_df2T_f64.c
│ │ │ │ ├── arm_biquad_cascade_df2T_init_f16.c
│ │ │ │ ├── arm_biquad_cascade_df2T_init_f32.c
│ │ │ │ ├── arm_biquad_cascade_df2T_init_f64.c
│ │ │ │ ├── arm_biquad_cascade_stereo_df2T_f16.c
│ │ │ │ ├── arm_biquad_cascade_stereo_df2T_f32.c
│ │ │ │ ├── arm_biquad_cascade_stereo_df2T_init_f16.c
│ │ │ │ ├── arm_biquad_cascade_stereo_df2T_init_f32.c
│ │ │ │ ├── arm_conv_f32.c
│ │ │ │ ├── arm_conv_fast_opt_q15.c
│ │ │ │ ├── arm_conv_fast_q15.c
│ │ │ │ ├── arm_conv_fast_q31.c
│ │ │ │ ├── arm_conv_opt_q15.c
│ │ │ │ ├── arm_conv_opt_q7.c
│ │ │ │ ├── arm_conv_partial_f32.c
│ │ │ │ ├── arm_conv_partial_fast_opt_q15.c
│ │ │ │ ├── arm_conv_partial_fast_q15.c
│ │ │ │ ├── arm_conv_partial_fast_q31.c
│ │ │ │ ├── arm_conv_partial_opt_q15.c
│ │ │ │ ├── arm_conv_partial_opt_q7.c
│ │ │ │ ├── arm_conv_partial_q15.c
│ │ │ │ ├── arm_conv_partial_q31.c
│ │ │ │ ├── arm_conv_partial_q7.c
│ │ │ │ ├── arm_conv_q15.c
│ │ │ │ ├── arm_conv_q31.c
│ │ │ │ ├── arm_conv_q7.c
│ │ │ │ ├── arm_correlate_f16.c
│ │ │ │ ├── arm_correlate_f32.c
│ │ │ │ ├── arm_correlate_f64.c
│ │ │ │ ├── arm_correlate_fast_opt_q15.c
│ │ │ │ ├── arm_correlate_fast_q15.c
│ │ │ │ ├── arm_correlate_fast_q31.c
│ │ │ │ ├── arm_correlate_opt_q15.c
│ │ │ │ ├── arm_correlate_opt_q7.c
│ │ │ │ ├── arm_correlate_q15.c
│ │ │ │ ├── arm_correlate_q31.c
│ │ │ │ ├── arm_correlate_q7.c
│ │ │ │ ├── arm_fir_decimate_f32.c
│ │ │ │ ├── arm_fir_decimate_fast_q15.c
│ │ │ │ ├── arm_fir_decimate_fast_q31.c
│ │ │ │ ├── arm_fir_decimate_init_f32.c
│ │ │ │ ├── arm_fir_decimate_init_q15.c
│ │ │ │ ├── arm_fir_decimate_init_q31.c
│ │ │ │ ├── arm_fir_decimate_q15.c
│ │ │ │ ├── arm_fir_decimate_q31.c
│ │ │ │ ├── arm_fir_f16.c
│ │ │ │ ├── arm_fir_f32.c
│ │ │ │ ├── arm_fir_f64.c
│ │ │ │ ├── arm_fir_fast_q15.c
│ │ │ │ ├── arm_fir_fast_q31.c
│ │ │ │ ├── arm_fir_init_f16.c
│ │ │ │ ├── arm_fir_init_f32.c
│ │ │ │ ├── arm_fir_init_f64.c
│ │ │ │ ├── arm_fir_init_q15.c
│ │ │ │ ├── arm_fir_init_q31.c
│ │ │ │ ├── arm_fir_init_q7.c
│ │ │ │ ├── arm_fir_interpolate_f32.c
│ │ │ │ ├── arm_fir_interpolate_init_f32.c
│ │ │ │ ├── arm_fir_interpolate_init_q15.c
│ │ │ │ ├── arm_fir_interpolate_init_q31.c
│ │ │ │ ├── arm_fir_interpolate_q15.c
│ │ │ │ ├── arm_fir_interpolate_q31.c
│ │ │ │ ├── arm_fir_lattice_f32.c
│ │ │ │ ├── arm_fir_lattice_init_f32.c
│ │ │ │ ├── arm_fir_lattice_init_q15.c
│ │ │ │ ├── arm_fir_lattice_init_q31.c
│ │ │ │ ├── arm_fir_lattice_q15.c
│ │ │ │ ├── arm_fir_lattice_q31.c
│ │ │ │ ├── arm_fir_q15.c
│ │ │ │ ├── arm_fir_q31.c
│ │ │ │ ├── arm_fir_q7.c
│ │ │ │ ├── arm_fir_sparse_f32.c
│ │ │ │ ├── arm_fir_sparse_init_f32.c
│ │ │ │ ├── arm_fir_sparse_init_q15.c
│ │ │ │ ├── arm_fir_sparse_init_q31.c
│ │ │ │ ├── arm_fir_sparse_init_q7.c
│ │ │ │ ├── arm_fir_sparse_q15.c
│ │ │ │ ├── arm_fir_sparse_q31.c
│ │ │ │ ├── arm_fir_sparse_q7.c
│ │ │ │ ├── arm_iir_lattice_f32.c
│ │ │ │ ├── arm_iir_lattice_init_f32.c
│ │ │ │ ├── arm_iir_lattice_init_q15.c
│ │ │ │ ├── arm_iir_lattice_init_q31.c
│ │ │ │ ├── arm_iir_lattice_q15.c
│ │ │ │ ├── arm_iir_lattice_q31.c
│ │ │ │ ├── arm_levinson_durbin_f16.c
│ │ │ │ ├── arm_levinson_durbin_f32.c
│ │ │ │ ├── arm_levinson_durbin_q31.c
│ │ │ │ ├── arm_lms_f32.c
│ │ │ │ ├── arm_lms_init_f32.c
│ │ │ │ ├── arm_lms_init_q15.c
│ │ │ │ ├── arm_lms_init_q31.c
│ │ │ │ ├── arm_lms_norm_f32.c
│ │ │ │ ├── arm_lms_norm_init_f32.c
│ │ │ │ ├── arm_lms_norm_init_q15.c
│ │ │ │ ├── arm_lms_norm_init_q31.c
│ │ │ │ ├── arm_lms_norm_q15.c
│ │ │ │ ├── arm_lms_norm_q31.c
│ │ │ │ ├── arm_lms_q15.c
│ │ │ │ └── arm_lms_q31.c
│ │ │ │ ├── InterpolationFunctions
│ │ │ │ ├── CMakeLists.txt
│ │ │ │ ├── InterpolationFunctions.c
│ │ │ │ ├── InterpolationFunctionsF16.c
│ │ │ │ ├── arm_bilinear_interp_f16.c
│ │ │ │ ├── arm_bilinear_interp_f32.c
│ │ │ │ ├── arm_bilinear_interp_q15.c
│ │ │ │ ├── arm_bilinear_interp_q31.c
│ │ │ │ ├── arm_bilinear_interp_q7.c
│ │ │ │ ├── arm_linear_interp_f16.c
│ │ │ │ ├── arm_linear_interp_f32.c
│ │ │ │ ├── arm_linear_interp_q15.c
│ │ │ │ ├── arm_linear_interp_q31.c
│ │ │ │ ├── arm_linear_interp_q7.c
│ │ │ │ ├── arm_spline_interp_f32.c
│ │ │ │ └── arm_spline_interp_init_f32.c
│ │ │ │ ├── MatrixFunctions
│ │ │ │ ├── CMakeLists.txt
│ │ │ │ ├── MatrixFunctions.c
│ │ │ │ ├── MatrixFunctionsF16.c
│ │ │ │ ├── arm_mat_add_f16.c
│ │ │ │ ├── arm_mat_add_f32.c
│ │ │ │ ├── arm_mat_add_q15.c
│ │ │ │ ├── arm_mat_add_q31.c
│ │ │ │ ├── arm_mat_cholesky_f16.c
│ │ │ │ ├── arm_mat_cholesky_f32.c
│ │ │ │ ├── arm_mat_cholesky_f64.c
│ │ │ │ ├── arm_mat_cmplx_mult_f16.c
│ │ │ │ ├── arm_mat_cmplx_mult_f32.c
│ │ │ │ ├── arm_mat_cmplx_mult_q15.c
│ │ │ │ ├── arm_mat_cmplx_mult_q31.c
│ │ │ │ ├── arm_mat_cmplx_trans_f16.c
│ │ │ │ ├── arm_mat_cmplx_trans_f32.c
│ │ │ │ ├── arm_mat_cmplx_trans_q15.c
│ │ │ │ ├── arm_mat_cmplx_trans_q31.c
│ │ │ │ ├── arm_mat_init_f16.c
│ │ │ │ ├── arm_mat_init_f32.c
│ │ │ │ ├── arm_mat_init_q15.c
│ │ │ │ ├── arm_mat_init_q31.c
│ │ │ │ ├── arm_mat_inverse_f16.c
│ │ │ │ ├── arm_mat_inverse_f32.c
│ │ │ │ ├── arm_mat_inverse_f64.c
│ │ │ │ ├── arm_mat_ldlt_f32.c
│ │ │ │ ├── arm_mat_ldlt_f64.c
│ │ │ │ ├── arm_mat_mult_f16.c
│ │ │ │ ├── arm_mat_mult_f32.c
│ │ │ │ ├── arm_mat_mult_f64.c
│ │ │ │ ├── arm_mat_mult_fast_q15.c
│ │ │ │ ├── arm_mat_mult_fast_q31.c
│ │ │ │ ├── arm_mat_mult_opt_q31.c
│ │ │ │ ├── arm_mat_mult_q15.c
│ │ │ │ ├── arm_mat_mult_q31.c
│ │ │ │ ├── arm_mat_mult_q7.c
│ │ │ │ ├── arm_mat_scale_f16.c
│ │ │ │ ├── arm_mat_scale_f32.c
│ │ │ │ ├── arm_mat_scale_q15.c
│ │ │ │ ├── arm_mat_scale_q31.c
│ │ │ │ ├── arm_mat_solve_lower_triangular_f16.c
│ │ │ │ ├── arm_mat_solve_lower_triangular_f32.c
│ │ │ │ ├── arm_mat_solve_lower_triangular_f64.c
│ │ │ │ ├── arm_mat_solve_upper_triangular_f16.c
│ │ │ │ ├── arm_mat_solve_upper_triangular_f32.c
│ │ │ │ ├── arm_mat_solve_upper_triangular_f64.c
│ │ │ │ ├── arm_mat_sub_f16.c
│ │ │ │ ├── arm_mat_sub_f32.c
│ │ │ │ ├── arm_mat_sub_f64.c
│ │ │ │ ├── arm_mat_sub_q15.c
│ │ │ │ ├── arm_mat_sub_q31.c
│ │ │ │ ├── arm_mat_trans_f16.c
│ │ │ │ ├── arm_mat_trans_f32.c
│ │ │ │ ├── arm_mat_trans_f64.c
│ │ │ │ ├── arm_mat_trans_q15.c
│ │ │ │ ├── arm_mat_trans_q31.c
│ │ │ │ ├── arm_mat_trans_q7.c
│ │ │ │ ├── arm_mat_vec_mult_f16.c
│ │ │ │ ├── arm_mat_vec_mult_f32.c
│ │ │ │ ├── arm_mat_vec_mult_q15.c
│ │ │ │ ├── arm_mat_vec_mult_q31.c
│ │ │ │ └── arm_mat_vec_mult_q7.c
│ │ │ │ ├── QuaternionMathFunctions
│ │ │ │ ├── CMakeLists.txt
│ │ │ │ ├── QuaternionMathFunctions.c
│ │ │ │ ├── arm_quaternion2rotation_f32.c
│ │ │ │ ├── arm_quaternion_conjugate_f32.c
│ │ │ │ ├── arm_quaternion_inverse_f32.c
│ │ │ │ ├── arm_quaternion_norm_f32.c
│ │ │ │ ├── arm_quaternion_normalize_f32.c
│ │ │ │ ├── arm_quaternion_product_f32.c
│ │ │ │ ├── arm_quaternion_product_single_f32.c
│ │ │ │ └── arm_rotation2quaternion_f32.c
│ │ │ │ ├── SVMFunctions
│ │ │ │ ├── CMakeLists.txt
│ │ │ │ ├── SVMFunctions.c
│ │ │ │ ├── SVMFunctionsF16.c
│ │ │ │ ├── arm_svm_linear_init_f16.c
│ │ │ │ ├── arm_svm_linear_init_f32.c
│ │ │ │ ├── arm_svm_linear_predict_f16.c
│ │ │ │ ├── arm_svm_linear_predict_f32.c
│ │ │ │ ├── arm_svm_polynomial_init_f16.c
│ │ │ │ ├── arm_svm_polynomial_init_f32.c
│ │ │ │ ├── arm_svm_polynomial_predict_f16.c
│ │ │ │ ├── arm_svm_polynomial_predict_f32.c
│ │ │ │ ├── arm_svm_rbf_init_f16.c
│ │ │ │ ├── arm_svm_rbf_init_f32.c
│ │ │ │ ├── arm_svm_rbf_predict_f16.c
│ │ │ │ ├── arm_svm_rbf_predict_f32.c
│ │ │ │ ├── arm_svm_sigmoid_init_f16.c
│ │ │ │ ├── arm_svm_sigmoid_init_f32.c
│ │ │ │ ├── arm_svm_sigmoid_predict_f16.c
│ │ │ │ └── arm_svm_sigmoid_predict_f32.c
│ │ │ │ ├── StatisticsFunctions
│ │ │ │ ├── CMakeLists.txt
│ │ │ │ ├── StatisticsFunctions.c
│ │ │ │ ├── StatisticsFunctionsF16.c
│ │ │ │ ├── arm_absmax_f16.c
│ │ │ │ ├── arm_absmax_f32.c
│ │ │ │ ├── arm_absmax_f64.c
│ │ │ │ ├── arm_absmax_no_idx_f16.c
│ │ │ │ ├── arm_absmax_no_idx_f32.c
│ │ │ │ ├── arm_absmax_no_idx_f64.c
│ │ │ │ ├── arm_absmax_no_idx_q15.c
│ │ │ │ ├── arm_absmax_no_idx_q31.c
│ │ │ │ ├── arm_absmax_no_idx_q7.c
│ │ │ │ ├── arm_absmax_q15.c
│ │ │ │ ├── arm_absmax_q31.c
│ │ │ │ ├── arm_absmax_q7.c
│ │ │ │ ├── arm_absmin_f16.c
│ │ │ │ ├── arm_absmin_f32.c
│ │ │ │ ├── arm_absmin_f64.c
│ │ │ │ ├── arm_absmin_no_idx_f16.c
│ │ │ │ ├── arm_absmin_no_idx_f32.c
│ │ │ │ ├── arm_absmin_no_idx_f64.c
│ │ │ │ ├── arm_absmin_no_idx_q15.c
│ │ │ │ ├── arm_absmin_no_idx_q31.c
│ │ │ │ ├── arm_absmin_no_idx_q7.c
│ │ │ │ ├── arm_absmin_q15.c
│ │ │ │ ├── arm_absmin_q31.c
│ │ │ │ ├── arm_absmin_q7.c
│ │ │ │ ├── arm_entropy_f16.c
│ │ │ │ ├── arm_entropy_f32.c
│ │ │ │ ├── arm_entropy_f64.c
│ │ │ │ ├── arm_kullback_leibler_f16.c
│ │ │ │ ├── arm_kullback_leibler_f32.c
│ │ │ │ ├── arm_kullback_leibler_f64.c
│ │ │ │ ├── arm_logsumexp_dot_prod_f16.c
│ │ │ │ ├── arm_logsumexp_dot_prod_f32.c
│ │ │ │ ├── arm_logsumexp_f16.c
│ │ │ │ ├── arm_logsumexp_f32.c
│ │ │ │ ├── arm_max_f16.c
│ │ │ │ ├── arm_max_f32.c
│ │ │ │ ├── arm_max_f64.c
│ │ │ │ ├── arm_max_no_idx_f16.c
│ │ │ │ ├── arm_max_no_idx_f32.c
│ │ │ │ ├── arm_max_no_idx_f64.c
│ │ │ │ ├── arm_max_no_idx_q15.c
│ │ │ │ ├── arm_max_no_idx_q31.c
│ │ │ │ ├── arm_max_no_idx_q7.c
│ │ │ │ ├── arm_max_q15.c
│ │ │ │ ├── arm_max_q31.c
│ │ │ │ ├── arm_max_q7.c
│ │ │ │ ├── arm_mean_f16.c
│ │ │ │ ├── arm_mean_f32.c
│ │ │ │ ├── arm_mean_f64.c
│ │ │ │ ├── arm_mean_q15.c
│ │ │ │ ├── arm_mean_q31.c
│ │ │ │ ├── arm_mean_q7.c
│ │ │ │ ├── arm_min_f16.c
│ │ │ │ ├── arm_min_f32.c
│ │ │ │ ├── arm_min_f64.c
│ │ │ │ ├── arm_min_no_idx_f16.c
│ │ │ │ ├── arm_min_no_idx_f32.c
│ │ │ │ ├── arm_min_no_idx_f64.c
│ │ │ │ ├── arm_min_no_idx_q15.c
│ │ │ │ ├── arm_min_no_idx_q31.c
│ │ │ │ ├── arm_min_no_idx_q7.c
│ │ │ │ ├── arm_min_q15.c
│ │ │ │ ├── arm_min_q31.c
│ │ │ │ ├── arm_min_q7.c
│ │ │ │ ├── arm_mse_f16.c
│ │ │ │ ├── arm_mse_f32.c
│ │ │ │ ├── arm_mse_f64.c
│ │ │ │ ├── arm_mse_q15.c
│ │ │ │ ├── arm_mse_q31.c
│ │ │ │ ├── arm_mse_q7.c
│ │ │ │ ├── arm_power_f16.c
│ │ │ │ ├── arm_power_f32.c
│ │ │ │ ├── arm_power_f64.c
│ │ │ │ ├── arm_power_q15.c
│ │ │ │ ├── arm_power_q31.c
│ │ │ │ ├── arm_power_q7.c
│ │ │ │ ├── arm_rms_f16.c
│ │ │ │ ├── arm_rms_f32.c
│ │ │ │ ├── arm_rms_q15.c
│ │ │ │ ├── arm_rms_q31.c
│ │ │ │ ├── arm_std_f16.c
│ │ │ │ ├── arm_std_f32.c
│ │ │ │ ├── arm_std_f64.c
│ │ │ │ ├── arm_std_q15.c
│ │ │ │ ├── arm_std_q31.c
│ │ │ │ ├── arm_var_f16.c
│ │ │ │ ├── arm_var_f32.c
│ │ │ │ ├── arm_var_f64.c
│ │ │ │ ├── arm_var_q15.c
│ │ │ │ └── arm_var_q31.c
│ │ │ │ ├── SupportFunctions
│ │ │ │ ├── CMakeLists.txt
│ │ │ │ ├── SupportFunctions.c
│ │ │ │ ├── SupportFunctionsF16.c
│ │ │ │ ├── arm_barycenter_f16.c
│ │ │ │ ├── arm_barycenter_f32.c
│ │ │ │ ├── arm_bitonic_sort_f32.c
│ │ │ │ ├── arm_bubble_sort_f32.c
│ │ │ │ ├── arm_copy_f16.c
│ │ │ │ ├── arm_copy_f32.c
│ │ │ │ ├── arm_copy_f64.c
│ │ │ │ ├── arm_copy_q15.c
│ │ │ │ ├── arm_copy_q31.c
│ │ │ │ ├── arm_copy_q7.c
│ │ │ │ ├── arm_f16_to_float.c
│ │ │ │ ├── arm_f16_to_q15.c
│ │ │ │ ├── arm_fill_f16.c
│ │ │ │ ├── arm_fill_f32.c
│ │ │ │ ├── arm_fill_f64.c
│ │ │ │ ├── arm_fill_q15.c
│ │ │ │ ├── arm_fill_q31.c
│ │ │ │ ├── arm_fill_q7.c
│ │ │ │ ├── arm_float_to_f16.c
│ │ │ │ ├── arm_float_to_q15.c
│ │ │ │ ├── arm_float_to_q31.c
│ │ │ │ ├── arm_float_to_q7.c
│ │ │ │ ├── arm_heap_sort_f32.c
│ │ │ │ ├── arm_insertion_sort_f32.c
│ │ │ │ ├── arm_merge_sort_f32.c
│ │ │ │ ├── arm_merge_sort_init_f32.c
│ │ │ │ ├── arm_q15_to_f16.c
│ │ │ │ ├── arm_q15_to_float.c
│ │ │ │ ├── arm_q15_to_q31.c
│ │ │ │ ├── arm_q15_to_q7.c
│ │ │ │ ├── arm_q31_to_float.c
│ │ │ │ ├── arm_q31_to_q15.c
│ │ │ │ ├── arm_q31_to_q7.c
│ │ │ │ ├── arm_q7_to_float.c
│ │ │ │ ├── arm_q7_to_q15.c
│ │ │ │ ├── arm_q7_to_q31.c
│ │ │ │ ├── arm_quick_sort_f32.c
│ │ │ │ ├── arm_selection_sort_f32.c
│ │ │ │ ├── arm_sort_f32.c
│ │ │ │ ├── arm_sort_init_f32.c
│ │ │ │ ├── arm_weighted_sum_f16.c
│ │ │ │ └── arm_weighted_sum_f32.c
│ │ │ │ ├── TransformFunctions
│ │ │ │ ├── CMakeLists.txt
│ │ │ │ ├── TransformFunctions.c
│ │ │ │ ├── TransformFunctionsF16.c
│ │ │ │ ├── arm_bitreversal.c
│ │ │ │ ├── arm_bitreversal2.S
│ │ │ │ ├── arm_bitreversal2.c
│ │ │ │ ├── arm_bitreversal_f16.c
│ │ │ │ ├── arm_cfft_f16.c
│ │ │ │ ├── arm_cfft_f32.c
│ │ │ │ ├── arm_cfft_f64.c
│ │ │ │ ├── arm_cfft_init_f16.c
│ │ │ │ ├── arm_cfft_init_f32.c
│ │ │ │ ├── arm_cfft_init_f64.c
│ │ │ │ ├── arm_cfft_init_q15.c
│ │ │ │ ├── arm_cfft_init_q31.c
│ │ │ │ ├── arm_cfft_q15.c
│ │ │ │ ├── arm_cfft_q31.c
│ │ │ │ ├── arm_cfft_radix2_f16.c
│ │ │ │ ├── arm_cfft_radix2_f32.c
│ │ │ │ ├── arm_cfft_radix2_init_f16.c
│ │ │ │ ├── arm_cfft_radix2_init_f32.c
│ │ │ │ ├── arm_cfft_radix2_init_q15.c
│ │ │ │ ├── arm_cfft_radix2_init_q31.c
│ │ │ │ ├── arm_cfft_radix2_q15.c
│ │ │ │ ├── arm_cfft_radix2_q31.c
│ │ │ │ ├── arm_cfft_radix4_f16.c
│ │ │ │ ├── arm_cfft_radix4_f32.c
│ │ │ │ ├── arm_cfft_radix4_init_f16.c
│ │ │ │ ├── arm_cfft_radix4_init_f32.c
│ │ │ │ ├── arm_cfft_radix4_init_q15.c
│ │ │ │ ├── arm_cfft_radix4_init_q31.c
│ │ │ │ ├── arm_cfft_radix4_q15.c
│ │ │ │ ├── arm_cfft_radix4_q31.c
│ │ │ │ ├── arm_cfft_radix8_f16.c
│ │ │ │ ├── arm_cfft_radix8_f32.c
│ │ │ │ ├── arm_dct4_f32.c
│ │ │ │ ├── arm_dct4_init_f32.c
│ │ │ │ ├── arm_dct4_init_q15.c
│ │ │ │ ├── arm_dct4_init_q31.c
│ │ │ │ ├── arm_dct4_q15.c
│ │ │ │ ├── arm_dct4_q31.c
│ │ │ │ ├── arm_mfcc_f16.c
│ │ │ │ ├── arm_mfcc_f32.c
│ │ │ │ ├── arm_mfcc_init_f16.c
│ │ │ │ ├── arm_mfcc_init_f32.c
│ │ │ │ ├── arm_mfcc_init_q15.c
│ │ │ │ ├── arm_mfcc_init_q31.c
│ │ │ │ ├── arm_mfcc_q15.c
│ │ │ │ ├── arm_mfcc_q31.c
│ │ │ │ ├── arm_rfft_f32.c
│ │ │ │ ├── arm_rfft_fast_f16.c
│ │ │ │ ├── arm_rfft_fast_f32.c
│ │ │ │ ├── arm_rfft_fast_f64.c
│ │ │ │ ├── arm_rfft_fast_init_f16.c
│ │ │ │ ├── arm_rfft_fast_init_f32.c
│ │ │ │ ├── arm_rfft_fast_init_f64.c
│ │ │ │ ├── arm_rfft_init_f32.c
│ │ │ │ ├── arm_rfft_init_q15.c
│ │ │ │ ├── arm_rfft_init_q31.c
│ │ │ │ ├── arm_rfft_q15.c
│ │ │ │ └── arm_rfft_q31.c
│ │ │ │ ├── configDsp.cmake
│ │ │ │ ├── fft.cmake
│ │ │ │ └── interpol.cmake
│ │ ├── Device
│ │ │ └── PY32F0xx
│ │ │ │ ├── Include
│ │ │ │ ├── py32f002ax5.h
│ │ │ │ ├── py32f002x5.h
│ │ │ │ ├── py32f003.h
│ │ │ │ ├── py32f003x4.h
│ │ │ │ ├── py32f003x6.h
│ │ │ │ ├── py32f003x8.h
│ │ │ │ ├── py32f003xx.h
│ │ │ │ ├── py32f030.h
│ │ │ │ ├── py32f030x3.h
│ │ │ │ ├── py32f030x4.h
│ │ │ │ ├── py32f030x6.h
│ │ │ │ ├── py32f030x7.h
│ │ │ │ ├── py32f030x8.h
│ │ │ │ ├── py32f030xx.h
│ │ │ │ ├── py32f072xB.h
│ │ │ │ ├── py32f0xx.h
│ │ │ │ ├── system_py32f003xx.h
│ │ │ │ ├── system_py32f030xx.h
│ │ │ │ ├── system_py32f072xx.h
│ │ │ │ └── system_py32f0xx.h
│ │ │ │ └── Source
│ │ │ │ ├── arm
│ │ │ │ ├── startup_py32f002ax5.s
│ │ │ │ ├── startup_py32f002x5.s
│ │ │ │ ├── startup_py32f003x4.s
│ │ │ │ ├── startup_py32f003x6.s
│ │ │ │ ├── startup_py32f003x8.s
│ │ │ │ ├── startup_py32f030x3.s
│ │ │ │ ├── startup_py32f030x4.s
│ │ │ │ ├── startup_py32f030x6.s
│ │ │ │ ├── startup_py32f030x7.s
│ │ │ │ ├── startup_py32f030x8.s
│ │ │ │ └── startup_py32f072xB.s
│ │ │ │ ├── gcc
│ │ │ │ ├── startup_py32f002a.s
│ │ │ │ ├── startup_py32f003.s
│ │ │ │ ├── startup_py32f030.s
│ │ │ │ └── startup_py32f072.s
│ │ │ │ ├── iar
│ │ │ │ ├── startup_py32f002axx.s
│ │ │ │ ├── startup_py32f003xx.s
│ │ │ │ └── startup_py32f030xx.s
│ │ │ │ └── system_py32f0xx.c
│ │ └── RTOS
│ │ │ └── Template
│ │ │ └── cmsis_os.h
│ ├── CMakeLists.txt
│ ├── EPaper
│ │ ├── EPD_Config_Template.h
│ │ ├── Examples
│ │ │ ├── EPD_1in02_test.c
│ │ │ ├── EPD_1in54_V2_test.c
│ │ │ ├── EPD_1in54_test.c
│ │ │ ├── EPD_1in54b_V2_test.c
│ │ │ ├── EPD_1in54b_test.c
│ │ │ ├── EPD_1in54c_test.c
│ │ │ ├── EPD_1in64g_test.c
│ │ │ ├── EPD_2in13_V2_test.c
│ │ │ ├── EPD_2in13_V3_test.c
│ │ │ ├── EPD_2in13_test.c
│ │ │ ├── EPD_2in13b_V3_test.c
│ │ │ ├── EPD_2in13b_V4_test.c
│ │ │ ├── EPD_2in13bc_test.c
│ │ │ ├── EPD_2in13d_test.c
│ │ │ ├── EPD_2in36g_test.c
│ │ │ ├── EPD_2in66_test.c
│ │ │ ├── EPD_2in66b_test.c
│ │ │ ├── EPD_2in7_V2_test.c
│ │ │ ├── EPD_2in7_test.c
│ │ │ ├── EPD_2in7b_V2_test.c
│ │ │ ├── EPD_2in7b_test.c
│ │ │ ├── EPD_2in9_V2_test.c
│ │ │ ├── EPD_2in9_test.c
│ │ │ ├── EPD_2in9b_V3_test.c
│ │ │ ├── EPD_2in9bc_test.c
│ │ │ ├── EPD_2in9d_test.c
│ │ │ ├── EPD_3in0g_test.c
│ │ │ ├── EPD_3in52_test.c
│ │ │ ├── EPD_3in7_test.c
│ │ │ ├── EPD_4in01f_test.c
│ │ │ ├── EPD_4in2_test.c
│ │ │ ├── EPD_4in2b_V2_test.c
│ │ │ ├── EPD_4in2bc_test.c
│ │ │ ├── EPD_4in37g_test.c
│ │ │ ├── EPD_5in65f_test.c
│ │ │ ├── EPD_5in83_V2_test.c
│ │ │ ├── EPD_5in83_test.c
│ │ │ ├── EPD_5in83b_V2_test.c
│ │ │ ├── EPD_5in83bc_test.c
│ │ │ ├── EPD_7in3f_test.c
│ │ │ ├── EPD_7in3g_test.c
│ │ │ ├── EPD_7in5_HD_test.c
│ │ │ ├── EPD_7in5_V2_test.c
│ │ │ ├── EPD_7in5_test.c
│ │ │ ├── EPD_7in5b_HD_test.c
│ │ │ ├── EPD_7in5b_V2_test.c
│ │ │ ├── EPD_7in5bc_test.c
│ │ │ ├── EPD_Test.h
│ │ │ ├── EPD_TestImage.c
│ │ │ ├── EPD_TestImage.h
│ │ │ └── EPD_TestImage2.c
│ │ ├── Fonts
│ │ │ ├── font12.c
│ │ │ ├── font12cn.c
│ │ │ ├── font16.c
│ │ │ ├── font20.c
│ │ │ ├── font24.c
│ │ │ ├── font24cn.c
│ │ │ ├── font8.c
│ │ │ └── fonts.h
│ │ ├── GUI
│ │ │ ├── GUI_Paint.c
│ │ │ └── GUI_Paint.h
│ │ └── Lib
│ │ │ ├── EPD_1in02d.c
│ │ │ ├── EPD_1in02d.h
│ │ │ ├── EPD_1in54.c
│ │ │ ├── EPD_1in54.h
│ │ │ ├── EPD_1in54_V2.c
│ │ │ ├── EPD_1in54_V2.h
│ │ │ ├── EPD_1in54b.c
│ │ │ ├── EPD_1in54b.h
│ │ │ ├── EPD_1in54b_V2.c
│ │ │ ├── EPD_1in54b_V2.h
│ │ │ ├── EPD_1in54c.c
│ │ │ ├── EPD_1in54c.h
│ │ │ ├── EPD_1in64g.c
│ │ │ ├── EPD_1in64g.h
│ │ │ ├── EPD_2in13.c
│ │ │ ├── EPD_2in13.h
│ │ │ ├── EPD_2in13_V2.c
│ │ │ ├── EPD_2in13_V2.h
│ │ │ ├── EPD_2in13_V3.c
│ │ │ ├── EPD_2in13_V3.h
│ │ │ ├── EPD_2in13b_V3.c
│ │ │ ├── EPD_2in13b_V3.h
│ │ │ ├── EPD_2in13b_V4.c
│ │ │ ├── EPD_2in13b_V4.h
│ │ │ ├── EPD_2in13bc.c
│ │ │ ├── EPD_2in13bc.h
│ │ │ ├── EPD_2in13d.c
│ │ │ ├── EPD_2in13d.h
│ │ │ ├── EPD_2in36g.c
│ │ │ ├── EPD_2in36g.h
│ │ │ ├── EPD_2in66.c
│ │ │ ├── EPD_2in66.h
│ │ │ ├── EPD_2in66b.c
│ │ │ ├── EPD_2in66b.h
│ │ │ ├── EPD_2in7.c
│ │ │ ├── EPD_2in7.h
│ │ │ ├── EPD_2in7_V2.c
│ │ │ ├── EPD_2in7_V2.h
│ │ │ ├── EPD_2in7b.c
│ │ │ ├── EPD_2in7b.h
│ │ │ ├── EPD_2in7b_V2.c
│ │ │ ├── EPD_2in7b_V2.h
│ │ │ ├── EPD_2in9.c
│ │ │ ├── EPD_2in9.h
│ │ │ ├── EPD_2in9_V2.c
│ │ │ ├── EPD_2in9_V2.h
│ │ │ ├── EPD_2in9b_V3.c
│ │ │ ├── EPD_2in9b_V3.h
│ │ │ ├── EPD_2in9bc.c
│ │ │ ├── EPD_2in9bc.h
│ │ │ ├── EPD_2in9d.c
│ │ │ ├── EPD_2in9d.h
│ │ │ ├── EPD_3in0g.c
│ │ │ ├── EPD_3in0g.h
│ │ │ ├── EPD_3in52.c
│ │ │ ├── EPD_3in52.h
│ │ │ ├── EPD_3in7.c
│ │ │ ├── EPD_3in7.h
│ │ │ ├── EPD_4in01f.c
│ │ │ ├── EPD_4in01f.h
│ │ │ ├── EPD_4in2.c
│ │ │ ├── EPD_4in2.h
│ │ │ ├── EPD_4in2b_V2.c
│ │ │ ├── EPD_4in2b_V2.h
│ │ │ ├── EPD_4in2bc.c
│ │ │ ├── EPD_4in2bc.h
│ │ │ ├── EPD_4in37g.c
│ │ │ ├── EPD_4in37g.h
│ │ │ ├── EPD_5in65f.c
│ │ │ ├── EPD_5in65f.h
│ │ │ ├── EPD_5in83.c
│ │ │ ├── EPD_5in83.h
│ │ │ ├── EPD_5in83_V2.c
│ │ │ ├── EPD_5in83_V2.h
│ │ │ ├── EPD_5in83b_V2.c
│ │ │ ├── EPD_5in83b_V2.h
│ │ │ ├── EPD_5in83bc.c
│ │ │ ├── EPD_5in83bc.h
│ │ │ ├── EPD_7in3f.c
│ │ │ ├── EPD_7in3f.h
│ │ │ ├── EPD_7in3g.c
│ │ │ ├── EPD_7in3g.h
│ │ │ ├── EPD_7in5.c
│ │ │ ├── EPD_7in5.h
│ │ │ ├── EPD_7in5_HD.c
│ │ │ ├── EPD_7in5_HD.h
│ │ │ ├── EPD_7in5_V2.c
│ │ │ ├── EPD_7in5_V2.h
│ │ │ ├── EPD_7in5b_HD.c
│ │ │ ├── EPD_7in5b_HD.h
│ │ │ ├── EPD_7in5b_V2.c
│ │ │ ├── EPD_7in5b_V2.h
│ │ │ ├── EPD_7in5bc.c
│ │ │ ├── EPD_7in5bc.h
│ │ │ ├── EPD_Common.c
│ │ │ └── EPD_Common.h
│ ├── FreeRTOS
│ │ ├── CMakeLists.txt
│ │ ├── GitHub-FreeRTOS-Kernel-Home.url
│ │ ├── History.txt
│ │ ├── LICENSE.md
│ │ ├── Quick_Start_Guide.url
│ │ ├── README.md
│ │ ├── croutine.c
│ │ ├── event_groups.c
│ │ ├── include
│ │ │ ├── FreeRTOS.h
│ │ │ ├── StackMacros.h
│ │ │ ├── atomic.h
│ │ │ ├── croutine.h
│ │ │ ├── deprecated_definitions.h
│ │ │ ├── event_groups.h
│ │ │ ├── list.h
│ │ │ ├── message_buffer.h
│ │ │ ├── mpu_prototypes.h
│ │ │ ├── mpu_wrappers.h
│ │ │ ├── portable.h
│ │ │ ├── projdefs.h
│ │ │ ├── queue.h
│ │ │ ├── semphr.h
│ │ │ ├── stack_macros.h
│ │ │ ├── stdint.readme
│ │ │ ├── stream_buffer.h
│ │ │ ├── task.h
│ │ │ └── timers.h
│ │ ├── list.c
│ │ ├── manifest.yml
│ │ ├── portable
│ │ │ ├── GCC
│ │ │ │ └── ARM_CM0
│ │ │ │ │ ├── port.c
│ │ │ │ │ └── portmacro.h
│ │ │ └── MemMang
│ │ │ │ ├── ReadMe.url
│ │ │ │ ├── heap_1.c
│ │ │ │ ├── heap_2.c
│ │ │ │ ├── heap_3.c
│ │ │ │ ├── heap_4.c
│ │ │ │ └── heap_5.c
│ │ ├── queue.c
│ │ ├── sbom.spdx
│ │ ├── stream_buffer.c
│ │ ├── tasks.c
│ │ └── timers.c
│ ├── LDScripts
│ │ ├── PY32F002ax5.ld
│ │ ├── PY32F003x6.ld
│ │ ├── PY32F003x8.ld
│ │ ├── PY32F030x6.ld
│ │ └── PY32F030x8.ld
│ ├── PY32F0xx_HAL_Driver
│ │ ├── Inc
│ │ │ ├── py32f0xx_hal.h
│ │ │ ├── py32f0xx_hal_adc.h
│ │ │ ├── py32f0xx_hal_adc_ex.h
│ │ │ ├── py32f0xx_hal_comp.h
│ │ │ ├── py32f0xx_hal_cortex.h
│ │ │ ├── py32f0xx_hal_crc.h
│ │ │ ├── py32f0xx_hal_def.h
│ │ │ ├── py32f0xx_hal_dma.h
│ │ │ ├── py32f0xx_hal_dma_ex.h
│ │ │ ├── py32f0xx_hal_exti.h
│ │ │ ├── py32f0xx_hal_flash.h
│ │ │ ├── py32f0xx_hal_flash_ex.h
│ │ │ ├── py32f0xx_hal_gpio.h
│ │ │ ├── py32f0xx_hal_gpio_ex.h
│ │ │ ├── py32f0xx_hal_i2c.h
│ │ │ ├── py32f0xx_hal_irda.h
│ │ │ ├── py32f0xx_hal_iwdg.h
│ │ │ ├── py32f0xx_hal_led.h
│ │ │ ├── py32f0xx_hal_lptim.h
│ │ │ ├── py32f0xx_hal_pwr.h
│ │ │ ├── py32f0xx_hal_rcc.h
│ │ │ ├── py32f0xx_hal_rcc_ex.h
│ │ │ ├── py32f0xx_hal_rtc.h
│ │ │ ├── py32f0xx_hal_rtc_ex.h
│ │ │ ├── py32f0xx_hal_spi.h
│ │ │ ├── py32f0xx_hal_tim.h
│ │ │ ├── py32f0xx_hal_tim_ex.h
│ │ │ ├── py32f0xx_hal_uart.h
│ │ │ ├── py32f0xx_hal_usart.h
│ │ │ └── py32f0xx_hal_wwdg.h
│ │ └── Src
│ │ │ ├── py32f0xx_hal.c
│ │ │ ├── py32f0xx_hal_adc.c
│ │ │ ├── py32f0xx_hal_adc_ex.c
│ │ │ ├── py32f0xx_hal_comp.c
│ │ │ ├── py32f0xx_hal_cortex.c
│ │ │ ├── py32f0xx_hal_crc.c
│ │ │ ├── py32f0xx_hal_dma.c
│ │ │ ├── py32f0xx_hal_exti.c
│ │ │ ├── py32f0xx_hal_flash.c
│ │ │ ├── py32f0xx_hal_gpio.c
│ │ │ ├── py32f0xx_hal_i2c.c
│ │ │ ├── py32f0xx_hal_irda.c
│ │ │ ├── py32f0xx_hal_iwdg.c
│ │ │ ├── py32f0xx_hal_led.c
│ │ │ ├── py32f0xx_hal_lptim.c
│ │ │ ├── py32f0xx_hal_pwr.c
│ │ │ ├── py32f0xx_hal_rcc.c
│ │ │ ├── py32f0xx_hal_rcc_ex.c
│ │ │ ├── py32f0xx_hal_rtc.c
│ │ │ ├── py32f0xx_hal_rtc_ex.c
│ │ │ ├── py32f0xx_hal_spi.c
│ │ │ ├── py32f0xx_hal_tim.c
│ │ │ ├── py32f0xx_hal_tim_ex.c
│ │ │ ├── py32f0xx_hal_uart.c
│ │ │ ├── py32f0xx_hal_usart.c
│ │ │ └── py32f0xx_hal_wwdg.c
│ └── PY32F0xx_LL_Driver
│ │ ├── Inc
│ │ ├── py32f0xx_ll_adc.h
│ │ ├── py32f0xx_ll_bus.h
│ │ ├── py32f0xx_ll_comp.h
│ │ ├── py32f0xx_ll_cortex.h
│ │ ├── py32f0xx_ll_crc.h
│ │ ├── py32f0xx_ll_dma.h
│ │ ├── py32f0xx_ll_exti.h
│ │ ├── py32f0xx_ll_flash.h
│ │ ├── py32f0xx_ll_gpio.h
│ │ ├── py32f0xx_ll_i2c.h
│ │ ├── py32f0xx_ll_iwdg.h
│ │ ├── py32f0xx_ll_led.h
│ │ ├── py32f0xx_ll_lptim.h
│ │ ├── py32f0xx_ll_pwr.h
│ │ ├── py32f0xx_ll_rcc.h
│ │ ├── py32f0xx_ll_rtc.h
│ │ ├── py32f0xx_ll_spi.h
│ │ ├── py32f0xx_ll_system.h
│ │ ├── py32f0xx_ll_tim.h
│ │ ├── py32f0xx_ll_usart.h
│ │ ├── py32f0xx_ll_utils.h
│ │ └── py32f0xx_ll_wwdg.h
│ │ └── Src
│ │ ├── py32f0xx_ll_adc.c
│ │ ├── py32f0xx_ll_comp.c
│ │ ├── py32f0xx_ll_crc.c
│ │ ├── py32f0xx_ll_dma.c
│ │ ├── py32f0xx_ll_exti.c
│ │ ├── py32f0xx_ll_flash.c
│ │ ├── py32f0xx_ll_gpio.c
│ │ ├── py32f0xx_ll_i2c.c
│ │ ├── py32f0xx_ll_led.c
│ │ ├── py32f0xx_ll_lptim.c
│ │ ├── py32f0xx_ll_pwr.c
│ │ ├── py32f0xx_ll_rcc.c
│ │ ├── py32f0xx_ll_rtc.c
│ │ ├── py32f0xx_ll_spi.c
│ │ ├── py32f0xx_ll_tim.c
│ │ ├── py32f0xx_ll_usart.c
│ │ └── py32f0xx_ll_utils.c
├── rbuff
│ ├── CMakeLists.txt
│ ├── inc
│ │ └── rbuff.h
│ └── rbuff.c
└── uart_driver
│ ├── CMakeLists.txt
│ ├── inc
│ └── uart_driver.h
│ └── uart_driver.c
├── memory_map.ld
├── puya_toolchain.cmake
├── py32f003xx.svd
├── pyocd
└── pyocd.in
└── rtt_adc_plotter.py
/.clang-format:
--------------------------------------------------------------------------------
1 | Standard: Cpp11
2 | BasedOnStyle: LLVM
3 | AllowShortFunctionsOnASingleLine: None
4 | IndentWidth: 4
5 | UseTab: Never
6 | Language: Cpp
7 | ColumnLimit: 120
8 | BreakBeforeBraces: Linux
9 | IndentCaseLabels: true
10 | AlignConsecutiveMacros: true
11 | AlignConsecutiveAssignments: true
12 | LineEnding: LF
13 | InsertBraces: true
14 | SpaceAfterCStyleCast: false
15 | SpaceAfterLogicalNot: false
16 | SpaceAfterTemplateKeyword: false
17 | SpaceBeforeAssignmentOperators: true
18 | SpaceBeforeCpp11BracedList: true
19 | SpaceBeforeCtorInitializerColon: true
20 | SpaceBeforeInheritanceColon: true
21 | SpaceBeforeParens: ControlStatements
22 | SpaceBeforeRangeBasedForLoopColon: true
23 | SpaceInEmptyBlock: false
24 | SpaceInEmptyParentheses: false
25 | SpacesBeforeTrailingComments: 1
26 | SpacesInAngles: false
27 | SpacesInConditionalStatement: false
28 | SpacesInContainerLiterals: false
29 | SpacesInCStyleCastParentheses: false
30 | SpacesInParentheses: false
31 | SpacesInSquareBrackets: false
32 | SpaceBeforeSquareBrackets: false
--------------------------------------------------------------------------------
/.codespell_ignore:
--------------------------------------------------------------------------------
1 | inout
--------------------------------------------------------------------------------
/.devcontainer/bashrc_addons_add.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | # Define the line to be added
4 | line_to_add='[ -f $HOME/.bashrc_devcontainer_addons ] && . $HOME/.bashrc_devcontainer_addons'
5 |
6 | # Check if .bashrc exists and is writable
7 | if [ ! -f "$HOME/.bashrc" ] || [ ! -w "$HOME/.bashrc" ]; then
8 | exit 0
9 | fi
10 | # Check if the line is already in .bashrc
11 | if ! grep -Fxq "$line_to_add" "$HOME/.bashrc"; then
12 | # If not, add the line to .bashrc
13 | echo "" >> "$HOME/.bashrc"
14 | echo "# Load bashrc devcontainer addons" >> "$HOME/.bashrc"
15 | echo "$line_to_add" >> "$HOME/.bashrc"
16 | fi
--------------------------------------------------------------------------------
/.devcontainer/ecad-mcad/.bashrc_devcontainer_addons:
--------------------------------------------------------------------------------
1 | figlet -f 3d.flf Open Flap
2 | echo "🤖 KiCad & FreeCAD automation docker 🤖"
--------------------------------------------------------------------------------
/.devcontainer/ecad-mcad/devcontainer.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "OpenFlap: ecad-mcad",
3 | "build": {
4 | "dockerfile": "Dockerfile",
5 | "context": "."
6 | },
7 | "remoteUser": "openflap",
8 | "containerUser": "openflap",
9 | "runArgs": [
10 | "--privileged",
11 | "--hostname=ecad-mcad",
12 | "--name=openflap_ecad_mcad"
13 | ],
14 | "mounts": [
15 | "source=${localEnv:HOME}/.bashrc,target=/home/openflap/.bashrc,type=bind,consistency=cached",
16 | ],
17 | "postStartCommand": "/workspaces/OpenFlap/.devcontainer/bashrc_addons_add.sh",
18 | "customizations": {
19 | "vscode": {
20 | "extensions": [
21 | "ms-vscode.live-server",
22 | "ms-python.black-formatter"
23 | ]
24 | }
25 | },
26 | }
--------------------------------------------------------------------------------
/.devcontainer/esp-idf/.bashrc_devcontainer_addons:
--------------------------------------------------------------------------------
1 | figlet -f 3d.flf Open Flap
2 | echo -n "Setting up ESP-IDF environment ... "
3 | source /opt/esp/idf/export.sh > /dev/null 2>&1
4 | echo "done!"
--------------------------------------------------------------------------------
/.devcontainer/esp-idf/.vscode/c_cpp_properties.json:
--------------------------------------------------------------------------------
1 | {
2 | "configurations": [
3 | {
4 | "name": "Linux",
5 | "includePath": [
6 | "${config:idf.espIdfPath}/components/**",
7 | "${workspaceFolder}/**"
8 | ],
9 | "defines": [],
10 | "cStandard": "c17",
11 | "cppStandard": "gnu++17",
12 | "intelliSenseMode": "linux-gcc-x64",
13 | "compilerPath": "${config:idf.toolsPath}/tools/xtensa-esp-elf/esp-13.2.0_20240530/xtensa-esp-elf/bin/xtensa-esp32-elf-gcc"
14 | }
15 | ],
16 | "version": 4
17 | }
18 |
--------------------------------------------------------------------------------
/.devcontainer/puya/.bashrc_devcontainer_addons:
--------------------------------------------------------------------------------
1 | figlet -f 3d.flf Open Flap
2 | export PATH="/home/${USER}/.vscode-server/extensions/ms-vscode.cpptools-1.22.9-linux-x64/LLVM/bin/:$PATH"
3 | echo "Puya developmnet environment"
--------------------------------------------------------------------------------
/.devcontainer/puya/.vscode/c_cpp_properties.json:
--------------------------------------------------------------------------------
1 | {
2 | "configurations": [
3 | {
4 | "name": "Linux",
5 | "includePath": [
6 | "${default}",
7 | "${workspaceFolder}/software/common/**",
8 | "${workspaceFolder}/software/module/**",
9 | ],
10 | "defines": [],
11 | "compilerPath": "/usr/bin/gcc",
12 | "cStandard": "c17",
13 | "cppStandard": "gnu++17",
14 | "intelliSenseMode": "linux-gcc-x64"
15 | }
16 | ],
17 | "version": 4
18 | }
--------------------------------------------------------------------------------
/.devcontainer/puya/.vscode/settings.json:
--------------------------------------------------------------------------------
1 | {
2 | "actionButtons": {
3 | "commands": [
4 | {
5 | "name": "⚙️ Configure",
6 | "command": "cmake --toolchain ${workspaceFolder}/software/module/puya_toolchain.cmake -S ${workspaceFolder}/software/module/ -B ${workspaceFolder}/build/module -Wno-dev",
7 | "terminalName": "bash"
8 | },
9 | {
10 | "name": "🔨 Build",
11 | "command": "cmake --build ${workspaceFolder}/build/module",
12 | "terminalName": "bash",
13 | },
14 | {
15 | "name": "⚡ Flash All",
16 | "command": "cmake --build ${workspaceFolder}/build/module --target flash_target",
17 | "terminalName": "bash"
18 | },
19 | {
20 | "name": "⚡ Flash App",
21 | "command": "cmake --build ${workspaceFolder}/build/module --target flash_app",
22 | "terminalName": "bash"
23 | },
24 | {
25 | "name": "👀 Rtt",
26 | "command": "cmake --build ${workspaceFolder}/build/module --target rtt",
27 | "terminalName": "bash"
28 | }
29 | ]
30 | },
31 | "cortex-debug.variableUseNaturalFormat": true,
32 | "C_Cpp.default.includePath": [
33 | "{workspaceFolder}/software/module/**",
34 | ],
35 | "cSpell.words": [
36 | "openflap"
37 | ],
38 | }
--------------------------------------------------------------------------------
/.devcontainer/puya/.vscode/tasks.json:
--------------------------------------------------------------------------------
1 | {
2 | "version": "2.0.0",
3 | "tasks": [
4 | {
5 | "label": "build",
6 | "type": "shell",
7 | "command": "cmake --build build/module",
8 | "group": {
9 | "kind": "build",
10 | "isDefault": true
11 | },
12 | "problemMatcher": []
13 | },
14 | ]
15 | }
--------------------------------------------------------------------------------
/.devcontainer/puya/devcontainer.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "OpenFlap: Puya",
3 | "build": {
4 | "dockerfile": "Dockerfile",
5 | "context": "."
6 | },
7 | "remoteUser": "openflap",
8 | "containerUser": "openflap",
9 | "extensions": [
10 | "ms-vscode.cmake-tools",
11 | "ms-vscode.cpptools",
12 | "ms-vscode.vscode-serial-monitor",
13 | "streetsidesoftware.code-spell-checker",
14 | "marus25.cortex-debug",
15 | "jkearins.action-buttons-ext",
16 | ],
17 | "runArgs": [
18 | "--privileged",
19 | "--hostname=puya",
20 | "--name=openflap_puya"
21 | ],
22 | "mounts": [
23 | "source=${localEnv:HOME}/.bashrc,target=/home/openflap/.bashrc,type=bind,consistency=cached",
24 | "source=/dev,target=/dev,type=bind,consistency=cached",
25 | "source=/run/udev,target=/run/udev,type=bind,consistency=cached",
26 | "source=/etc/udev/rules.d,target=/etc/udev/rules.d,type=bind,consistency=cached",
27 | "source=${localWorkspaceFolder}/.devcontainer/puya/.vscode,target=${containerWorkspaceFolder}/.vscode,type=bind,consistency=cached",
28 | ],
29 | "postStartCommand": "/workspaces/OpenFlap/.devcontainer/bashrc_addons_add.sh"
30 | }
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | *.FCStd filter=lfs diff=lfs merge=lfs -text
2 | *.stp filter=lfs diff=lfs merge=lfs -text
3 | *.wrl filter=lfs diff=lfs merge=lfs -text
4 | *.png filter=lfs diff=lfs merge=lfs -text
--------------------------------------------------------------------------------
/.github/workflows/deploy_flap_generator.yml:
--------------------------------------------------------------------------------
1 | name: Deploy Flap Generator As Github Page
2 |
3 | on:
4 | # Runs on pull_requests targeting the default branch
5 | pull_request:
6 | branches:
7 | - main
8 | paths:
9 | - hardware/module/flaps/**
10 |
11 | # Allows you to run this workflow manually from the Actions tab
12 | workflow_dispatch:
13 |
14 | # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
15 | permissions:
16 | contents: read
17 | pages: write
18 | id-token: write
19 |
20 | # Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
21 | # However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
22 | concurrency:
23 | group: "pages"
24 | cancel-in-progress: false
25 |
26 | jobs:
27 | # Single deploy job since we're just deploying
28 | deploy:
29 | environment:
30 | name: github-pages
31 | url: ${{ steps.deployment.outputs.page_url }}
32 | runs-on: ubuntu-latest
33 | steps:
34 | - name: Checkout
35 | uses: actions/checkout@v4
36 |
37 | - name: Setup Pages
38 | uses: actions/configure-pages@v5
39 |
40 | - name: Upload artifact
41 | uses: actions/upload-pages-artifact@v3
42 | with:
43 | path: 'hardware/module/flaps/browser_based_flap_generator/'
44 |
45 | - name: Deploy to GitHub Pages
46 | id: deployment
47 | uses: actions/deploy-pages@v4
48 |
--------------------------------------------------------------------------------
/.github/workflows/update_container.yml:
--------------------------------------------------------------------------------
1 | name: Build and Push Container
2 |
3 | on:
4 | workflow_call:
5 | inputs:
6 | container:
7 | description: 'The directory containing the Dockerfile, e.g.: ecad-mcad'
8 | required: true
9 | type: string
10 | tag:
11 | description: 'The tag of the image to build and push'
12 | required: true
13 | type: string
14 |
15 | jobs:
16 | update_container_image:
17 | runs-on: ubuntu-latest
18 |
19 | steps:
20 | - name: Checkout repository
21 | uses: actions/checkout@v4
22 | with:
23 | lfs: 'true'
24 |
25 | - uses: dorny/paths-filter@v3
26 | id: changes
27 | with:
28 | filters: |
29 | container:
30 | - '.devcontainer/${{ inputs.container }}/**'
31 |
32 | - name: Login to GitHub Container Registry
33 | if: steps.changes.outputs.container == 'true'
34 | uses: docker/login-action@v3
35 | with:
36 | registry: ghcr.io
37 | username: ${{ github.repository_owner }}
38 | password: ${{ secrets.GITHUB_TOKEN }}
39 |
40 | - name: Build and push Docker image
41 | if: steps.changes.outputs.container == 'true'
42 | uses: devcontainers/ci@v0.3
43 | with:
44 | configFile: .devcontainer/ecad-mcad/devcontainer.json
45 | imageName: ghcr.io/toonvaneyck/${{ inputs.container }}
46 | cacheFrom: ghcr.io/toonvaneyck/${{ inputs.container }}
47 | push: always
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | /.vscode
2 | !/.devcontainer/*/.vscode/*
3 | build
4 | software/controller/managed_components/*
5 | __pycache__
6 | ##############################################
7 | ## Kicad files ##
8 | ##############################################
9 | # Temporary files
10 | *.000
11 | *.bak
12 | *.bck
13 | *.kicad_pcb-bak
14 | *.kicad_sch-bak
15 | *.kicad_pro-bak
16 | *-backups
17 | *.kicad_prl
18 | *~
19 | _autosave-*
20 | *.tmp
21 | *-save.pro
22 | *-save.kicad_pcb
23 | fp-info-cache
24 | **/hardware/**/src/*.xml
25 |
26 | # Netlist files (exported from Eeschema)
27 | *.net
28 |
29 | # Autorouter files (exported from Pcbnew)
30 | *.dsn
31 | *.ses
32 |
33 | # KiBot files
34 | *drc.html
35 | *erc.html
36 | *.lck
37 | *kibom.ini
38 | **/hardware/**/*.filter
39 |
40 | ##############################################
41 | ## FreeCAD files ##
42 | ##############################################
43 | *.FCBak
44 |
45 | ##############################################
46 | ## ESP IDF ##
47 | ##############################################
48 | __pycache__
49 | networking_default_config.h
50 |
--------------------------------------------------------------------------------
/.gitmodules:
--------------------------------------------------------------------------------
1 | [submodule "software/controller/components/u8g2"]
2 | path = software/controller/components/u8g2
3 | url = git@github.com:olikraus/u8g2.git
4 | ignore = dirty
5 | [submodule "software/controller/components/u8g2-hal-esp-idf"]
6 | path = software/controller/components/u8g2-hal-esp-idf
7 | url = git@github.com:mkfrey/u8g2-hal-esp-idf.git
8 | ignore = dirty
9 |
--------------------------------------------------------------------------------
/LICENCE.md:
--------------------------------------------------------------------------------
1 | [OpenFlap](https://github.com/ToonVanEyck/OpenFlap) by Toon Van Eyck is licensed under [CC BY-NC 4.0](https://creativecommons.org/licenses/by-nc/4.0/?ref=chooser-v1).
2 |
3 |
4 |
5 |
6 | You are free to:
7 |
8 | - Copy, modify, and distribute the design for personal, educational, or non-commercial purposes.
9 | - Use the hardware design as part of a service offering (e.g., installing, renting or maintaining systems for clients).
10 |
11 | However, you may not:
12 |
13 | - Sell the hardware or it's derivatives as standalone products.
14 | - Commercially distribute the design or it's components for direct monetary gain.
15 |
16 | For clarification or to request exceptions, please contact [Toon Van Eyck](mailto:toonvanecyk@gmail.com).
--------------------------------------------------------------------------------
/docs/BOM-unspecified.md:
--------------------------------------------------------------------------------
1 | List of miscellaneous components required for the project. This file will be cleaned up and organized later.
2 |
3 | ## Module:
4 | - [60 RPM 12V GA12-N20 DC Gear Motor](http://aliexpress.com/item/33022320164.html)
5 | - [3mm motor coupler](https://aliexpress.com/item/4000342135388.html)
6 | - [M2.6 x 8mm screws](https://aliexpress.com/item/1005003094076706.html)
7 |
8 | ## Top Connector:
9 | - [2x8 Female 2.54mm Low Profile Bottom Entry Header Socket](https://aliexpress.com/item/3256803077112247.html)
10 | - [2x8 2.54mm idc Connector](https://aliexpress.com/item/2255801071215566.html)
11 | - [16 PIN Ribbon Cable](https://aliexpress.com/item/2251832811689611.html)
12 |
13 | ## Controller:
14 | - [Optional OLED Display](https://aliexpress.com/item/2251832607894397.html)
15 | - [2x3 & 2x5 1.27mm idc Socket](https://aliexpress.com/item/3256805806476804.html)
16 |
17 | ## Programmers:
18 | - ESP-PROG
19 | - SWD Programmer
--------------------------------------------------------------------------------
/docs/architecture.md:
--------------------------------------------------------------------------------
1 | # Architecture
2 |
3 | The OpenFlap system can be divided into 3 main components:
4 |
5 | - The **OpenFlap Controller**.
6 | - The **OpenFlap Module**.
7 | - The **OpenFlap Top Connector**.
8 |
9 | To build an OpenFlap display, you need at least one OpenFlap Controller, A Top Connector for each column of modules and one or more OpenFlap Modules.
10 |
11 | This chapter describes how these 3 components works and communicate.
--------------------------------------------------------------------------------
/docs/controller.md:
--------------------------------------------------------------------------------
1 | # OpenFlap Controller
2 |
3 | The controller is based around the espresif ESP32 microcontroller. The ESP32 is a low-cost, microcontroller with integrated WiFi and Bluetooth capabilities. This makes it ideal for the OpenFlap project.
4 |
5 | The controller is responsible for managing and communicating with the modules over UART, as well presenting a web interface and API to the user.
6 |
7 | The controller features an optional OLED, RGB LED and 2 buttons for user interaction. None of these currently serve a purpose in the system, but they can be used for debugging and future features.
8 |
9 | 
10 |
11 | ## Additional Resources
12 |
13 | - [Schematic](../hardware/controller/controller-schematic.pdf)
14 | - [Interactive BOM](../hardware/controller/controller-ibom.html)
--------------------------------------------------------------------------------
/docs/devcontainers.md:
--------------------------------------------------------------------------------
1 | # Running devcontainers without vscode
2 |
3 | Install the devcontainer CLI from [here](https://github.com/devcontainers/cli).
4 |
5 | From the top-level directory, run this to build/run the image:
6 |
7 | ```shell
8 | devcontainer up --workspace-folder . --config .devcontainer//devcontainer.json
9 | ```
10 |
11 | For example, to start the ecad-mcad container:
12 |
13 | ```shell
14 | devcontainer up --workspace-folder . --config .devcontainer/ecad-mcad/devcontainer.json
15 | ```
16 |
17 | To jump into the container, you can run:
18 |
19 | ```shell
20 | docker exec -it openflap_ecad_mcad /bin/bash
21 | ```
22 |
--------------------------------------------------------------------------------
/docs/images/OpenFlap.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ToonVanEyck/OpenFlap/2a6ee2e930fada76f2bf324681605e607edf05d6/docs/images/OpenFlap.gif
--------------------------------------------------------------------------------
/docs/images/example_read_all.png:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:0b63f7d8ca4c90df299dc8480e063ea7a8bb123fce6f734453f375d93f0285e1
3 | size 98230
4 |
--------------------------------------------------------------------------------
/docs/images/example_write_all.png:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:ff322b8e2c15d5dca4c12b3270f27cce998c28ee9139f59446ae9e69e079f94a
3 | size 78091
4 |
--------------------------------------------------------------------------------
/docs/images/example_write_seq.png:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:62bcf03c0e04230ff7c77057e39332925b0340ad1eedf81864f105321ada46d2
3 | size 61404
4 |
--------------------------------------------------------------------------------
/docs/images/module_cad.png:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:98d5c073f5cc222456fef18760d11a6630d2337d74dfb8e9e78706c467034223
3 | size 102561
4 |
--------------------------------------------------------------------------------
/docs/images/ratchet_notch.png:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:f93ebb6a3fe72331e5a201a258312bf289f523e86108c77051619170ff101d2b
3 | size 37316
4 |
--------------------------------------------------------------------------------
/docs/images/read_all_dynamic.png:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:85e3ee414e09064ecc344b33826f598020aed42d14fa0b1b643729d5d1463640
3 | size 159032
4 |
--------------------------------------------------------------------------------
/docs/images/read_all_static.png:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:e72e0fb691f6797388355d50d25abee7129736bdb1cf0ce91f15c21b68611bcd
3 | size 179777
4 |
--------------------------------------------------------------------------------
/docs/images/signalpath.drawio.png:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:6d74522bf403ec8a2cbde2ee8a20a788e876bd946b48aa211f522371337e14a3
3 | size 94864
4 |
--------------------------------------------------------------------------------
/docs/images/signalpath.png:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:40411d15522e675d878d0725517ff876b75d4c1b7ca0b45895d11005443091fc
3 | size 91578
4 |
--------------------------------------------------------------------------------
/docs/images/write_all_dynamic.png:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:41da18f45a27c188150f48853c9472f5a33aba5e11ad2f3962864d533f922e60
3 | size 165902
4 |
--------------------------------------------------------------------------------
/docs/images/write_all_static.png:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:6202af10c571b06c52f6c7d0a4a3d69aaf7e2f78553edb555cc0609244f588e2
3 | size 157732
4 |
--------------------------------------------------------------------------------
/docs/images/write_seq.png:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:7434176accff26cf0af9b26a357d3f7f8af228b13180670568be7a62ea07e4be
3 | size 144063
4 |
--------------------------------------------------------------------------------
/docs/wiring.md:
--------------------------------------------------------------------------------
1 | ## Wiring, signaling and power distribution
2 |
3 | The system is wired by connecting the top connectors together with a ribbon cable. The first top connector is connected to the OpenFlap Controller. The OpenFlap Modules can be stacked on top of each other and connected to a top connector.
4 |
5 | The top connectors and modules a equipped with a sensor witch allows them to detect if they are connected to another module or top connector. This allows the system to determine the size of the display and simplifies the wiring process.
6 |
7 | The image below show the signal path from the OpenFlap Controller through the OpenFlap Modules and back:
8 |
9 | 
10 |
11 | The controller can be provided with 12V DC power through a barrel jack. This 12V is passed on to the top connectors and modules through the ribbon cable. The top connectors have a voltage regulator that converts the 12V to 5V. This 5V supply is shared by all the modules connected below the top connector.
12 |
13 | The maximum number of modules that can be connected to a single top connector is *T.B.D.*. This is due to the current limitations of the voltage regulator on the top connector.
14 |
15 | The maximum number of modules in the entire system is *T.B.D.*. This is due to the current limitations of the PCB traces and the ribbon cable.
--------------------------------------------------------------------------------
/hardware/ci-script-flaps.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | # Parse options
4 | generate_gerber=false
5 | generate_stl=false
6 | while [[ "$#" -gt 0 ]]; do
7 | case $1 in
8 | --pcb)
9 | generate_gerber=true
10 | ;;
11 | --3d)
12 | generate_stl=true
13 | ;;
14 | *)
15 | echo "Invalid option: $1" >&2
16 | echo "Usage: $0 [--pcb] [--3d]"
17 | exit 1
18 | ;;
19 | esac
20 | shift
21 | done
22 |
23 | # Check if the script is being run in the correct container or in GitHub Actions.
24 | if [ "$(hostname)" != "ecad-mcad" ] && [ -z "$GITHUB_ACTIONS" ]; then
25 | echo -e "\e[31mError: This script is meant to be ran in the ecad-mcad container.\e[0m"
26 | exit 1
27 | fi
28 |
29 | BASE_DIR=$(git rev-parse --show-toplevel)
30 | SOURCE_DIR=${BASE_DIR}/hardware/module/flaps
31 | BUILD_DIR=${BASE_DIR}/build/flaps
32 | BUILD_DIR_3D=${BUILD_DIR}/3d
33 | BUILD_DIR_PCB=${BUILD_DIR}/pcb
34 |
35 | # Try generating the flaps
36 | mkdir -p ${BUILD_DIR_3D}
37 | mkdir -p ${BUILD_DIR_PCB}
38 | rm -rf ${BUILD_DIR_3D}/*
39 | rm -rf ${BUILD_DIR_PCB}/*
40 | echo -e "\033[1;36mGenerating Flaps\033[0m"
41 | echo -e "\033[96mGenerate .zip with browser based flap generator\033[0m"
42 | python3 ${SOURCE_DIR}/browser_based_flap_generator/test/browser_based_flap_generator_test.py ${SOURCE_DIR}/browser_based_flap_generator/index.html ${BUILD_DIR}
43 |
44 | if [ "$generate_gerber" = true ]; then
45 | echo -e "\033[96mConvert .zip with gerbolyze\033[0m"
46 | ${SOURCE_DIR}/flaps_to_pcb.sh ${BUILD_DIR}/flaps.zip ${BUILD_DIR_PCB}
47 | fi
48 |
49 | if [ "$generate_stl" = true ]; then
50 | echo -e "\033[96mConvert .zip with FreeCAD\033[0m"
51 | ${SOURCE_DIR}/flaps_to_3d.py ${BUILD_DIR}/flaps.zip ${BUILD_DIR_3D}
52 | fi
--------------------------------------------------------------------------------
/hardware/controller/controller-3D_blender_top.png:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:d49e47eaad196a50b2cd56951f2a821c3a15355f3a5e23ef04153aab50f20e41
3 | size 594526
4 |
--------------------------------------------------------------------------------
/hardware/controller/controller-bottom.png:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:5511333b4777a75c5f064b366200b0963df4030428c69ad36664d5d3fe77ae49
3 | size 84553
4 |
--------------------------------------------------------------------------------
/hardware/controller/controller-schematic.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ToonVanEyck/OpenFlap/2a6ee2e930fada76f2bf324681605e607edf05d6/hardware/controller/controller-schematic.pdf
--------------------------------------------------------------------------------
/hardware/controller/controller-top.png:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:033fbd1f473a9433b664d1af87d46972655ff9a797bfb2ca8621f834fee0244e
3 | size 107494
4 |
--------------------------------------------------------------------------------
/hardware/controller/src/fp-lib-table:
--------------------------------------------------------------------------------
1 | (fp_lib_table
2 | (version 7)
3 | (lib (name "BoxHeader")(type "KiCad")(uri "${KIPRJMOD}/../../resources/BoxHeader.pretty")(options "")(descr ""))
4 | )
5 |
--------------------------------------------------------------------------------
/hardware/controller/src/sym-lib-table:
--------------------------------------------------------------------------------
1 | (sym_lib_table
2 | (version 7)
3 | (lib (name "RS0102Y")(type "KiCad")(uri "${KIPRJMOD}/../../resources/RS0102Y.kicad_sym")(options "")(descr ""))
4 | )
5 |
--------------------------------------------------------------------------------
/hardware/module/encoder_wheel/encoder_wheel_48-bottom.png:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:1a4103ac558ba901408638934171d8fce86e4ccf6fcc990672d04a397f9811e2
3 | size 109146
4 |
--------------------------------------------------------------------------------
/hardware/module/encoder_wheel/encoder_wheel_48-top.png:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:2ef34a9d0809471985ee36ede66ab0912cfd706e585445c3d5acf49af68e8ea0
3 | size 109569
4 |
--------------------------------------------------------------------------------
/hardware/module/encoder_wheel/src/encoder_wheel_48.kicad_sch:
--------------------------------------------------------------------------------
1 | (kicad_sch
2 | (version 20231120)
3 | (generator "eeschema")
4 | (generator_version "8.0")
5 | (uuid "f6bb8ba5-02d0-493b-b07c-4b4eba7fe04e")
6 | (paper "A4" portrait)
7 | (title_block
8 | (title "Encoder Wheel 48")
9 | (date "${DATE}")
10 | (rev "3.0.1")
11 | (company "OpenFlap")
12 | (comment 1 "${GIT_TAG}")
13 | (comment 2 "Repo: github.com/ToonVanEyck/OpenFlap")
14 | (comment 3 "Designer: Toon Van Eyck")
15 | )
16 | (lib_symbols)
17 | (text "Nothing to see here..."
18 | (exclude_from_sim no)
19 | (at 109.728 122.428 0)
20 | (effects
21 | (font
22 | (size 5.08 5.08)
23 | )
24 | )
25 | (uuid "7fcb52bc-630c-4e26-aa1b-904edf933b63")
26 | )
27 | (sheet_instances
28 | (path "/"
29 | (page "1")
30 | )
31 | )
32 | )
33 |
--------------------------------------------------------------------------------
/hardware/module/encoder_wheel/src/fp-lib-table:
--------------------------------------------------------------------------------
1 | (fp_lib_table
2 | (version 7)
3 | (lib (name "EncoderPattern")(type "KiCad")(uri "${KIPRJMOD}/../../../resources/EncoderPattern.pretty")(options "")(descr ""))
4 | )
5 |
--------------------------------------------------------------------------------
/hardware/module/flaps/browser_based_flap_generator/style.css:
--------------------------------------------------------------------------------
1 | html,
2 | body {
3 | height: 100%;
4 | }
5 |
6 | .flapCanvas {
7 | background-size: 30px 30px;
8 | background-image: radial-gradient(circle, var(--bs-border-color-translucent) 1px, rgba(0, 0, 0, 0) 1px);
9 | }
10 |
11 | .icon-large::before {
12 | height: 1.3rem;
13 | vertical-align: baseline;
14 | }
15 |
16 | .formGrow-2 {
17 | flex-grow: 2 !important;
18 | }
19 |
20 | .formGrow-3 {
21 | flex-grow: 3 !important;
22 | }
--------------------------------------------------------------------------------
/hardware/module/flaps/flaps_to_pcb.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | # Function to display help message
4 | show_help() {
5 | echo "Usage: $0 input_zip output_dir"
6 | echo
7 | echo "Arguments:"
8 | echo " input_zip Path to the input .zip file containing flap SVG files."
9 | echo " output_dir Directory where the output flap gerber files will be saved."
10 | echo
11 | echo "Options:"
12 | echo " -h, --help Show this help message and exit"
13 | }
14 |
15 | # Check for --help or -h option
16 | if [[ "$1" == "--help" || "$1" == "-h" ]]; then
17 | show_help
18 | exit 0
19 | fi
20 |
21 | # Check for the correct number of arguments
22 | if [[ $# -ne 2 ]]; then
23 | echo "Error: Incorrect number of arguments"
24 | show_help
25 | exit 1
26 | fi
27 |
28 | input_zip="$1"
29 | output_dir="$2"
30 |
31 | # Unzip the input file
32 | unzip -o "$input_zip" -d /tmp/flaps
33 |
34 | # Loop through each .svg file in the temp directory
35 | for svg_file in /tmp/flaps/*.svg; do
36 | # Get the filename without extension
37 | filename=$(basename "$svg_file" .svg)
38 |
39 | # Call gerbolyze convert command
40 | echo -e "\033[94mGerbolyze $svg_file\033[0m"
41 | gerbolyze convert -n altium "$svg_file" "$output_dir/$filename.zip"
42 | done
43 |
44 | # Remove the temporary directory
45 | rm -rf /tmp/flaps
--------------------------------------------------------------------------------
/hardware/module/side_panel/side_panel-3D_blender_top.png:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:37be994cc7d38a2d10c1e63f94fbb05a16e6f5840b69d9d19a03836d33eb8fa5
3 | size 334286
4 |
--------------------------------------------------------------------------------
/hardware/module/side_panel/side_panel-bottom.png:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:a01d061bb7489ec14e72da454fc8039beda760a75e0f210023030ea24e90b1fa
3 | size 144378
4 |
--------------------------------------------------------------------------------
/hardware/module/side_panel/side_panel-schematic.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ToonVanEyck/OpenFlap/2a6ee2e930fada76f2bf324681605e607edf05d6/hardware/module/side_panel/side_panel-schematic.pdf
--------------------------------------------------------------------------------
/hardware/module/side_panel/side_panel-top.png:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:7aedd9f2bacc9c2aa7c47f432756431900a661fb80cbce9191d3f5463e198ea2
3 | size 172136
4 |
--------------------------------------------------------------------------------
/hardware/module/side_panel/src/fp-lib-table:
--------------------------------------------------------------------------------
1 | (fp_lib_table
2 | (version 7)
3 | (lib (name "GA12-N20")(type "KiCad")(uri "${KIPRJMOD}/../../../resources/GA12-N20.pretty")(options "")(descr ""))
4 | (lib (name "EncoderPattern")(type "KiCad")(uri "${KIPRJMOD}/../../../resources/EncoderPattern.pretty")(options "")(descr ""))
5 | (lib (name "ToolingHole")(type "KiCad")(uri "${KIPRJMOD}/../../../resources/ToolingHole.pretty")(options "")(descr ""))
6 | )
7 |
--------------------------------------------------------------------------------
/hardware/module/side_panel/src/sym-lib-table:
--------------------------------------------------------------------------------
1 | (sym_lib_table
2 | (version 7)
3 | (lib (name "puya")(type "KiCad")(uri "${KIPRJMOD}/../../../resources/Puya.kicad_sym")(options "")(descr ""))
4 | (lib (name "L9110S")(type "KiCad")(uri "${KIPRJMOD}/../../../resources/L9110S.kicad_sym")(options "")(descr ""))
5 | )
6 |
--------------------------------------------------------------------------------
/hardware/resources/694106106102.stp:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:e2c7a8dd2f5119992720d250602a742491afdc71be247ee4dcc3b1f40fea5aa4
3 | size 610780
4 |
--------------------------------------------------------------------------------
/hardware/resources/694106106102.wrl:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:7dad1c840cf2bcaaf6653358deb36e9ac15930d9a656588e2c6f9f50d364a454
3 | size 454737
4 |
--------------------------------------------------------------------------------
/hardware/resources/Attribution.md:
--------------------------------------------------------------------------------
1 | Source files for the 3D models used in the hardware design.
2 | Sources may not be the original creators of the models, but the files were found on the following websites.
3 |
4 | | File | Source |
5 | | ---- | ------ |
6 | |[694106106102.stp (and .wrl)](694106106102.stp) | [INTI-CMNB on github](https://github.com/INTI-CMNB/kibot_variants_arduprog/tree/master/3D) |
7 | |[GA12-N20.stp](GA12-N20.stp) | [vip1990-1 on grabcad](https://grabcad.com/library/ga12-n20-motor-1) |
8 | |[HLE-108-02-L-DV-BE-TR.stp](HLE-108-02-L-DV-BE-TR.stp) | [samtec](https://www.samtec.com/products/hle-108-02-l-dv-be-tr) |
9 | |[IDC_1.27mm_2x3.stp](IDC_1.27mm_2x3.stp) | [bakatrouble-1 on grabcad](https://grabcad.com/library/idc-box-header-1-27mm-1) |
10 | |[IDC_1.27mm_2x5.stp](IDC_1.27mm_2x5.stp) | [bakatrouble-1 on grabcad](https://grabcad.com/library/idc-box-header-1-27mm-1) |
11 | |[OLED_0.91_128x32.stp](OLED_0.91_128x32.stp) | [stilet.fox-1 on grabcad](https://grabcad.com/library/oled-0-91-128x32-1) |
12 |
--------------------------------------------------------------------------------
/hardware/resources/GA12-N20.stp:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:3610846e24e7e0a75890711fb89dc9f5979c7e8fcfe54462f0afd410aab8434e
3 | size 3889162
4 |
--------------------------------------------------------------------------------
/hardware/resources/HLE-108-02-L-DV-BE-TR.stp:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:dcee25247584f5c467b0fef8b491119dc31d8f96096dd9b10eb082a7b865ba0a
3 | size 852272
4 |
--------------------------------------------------------------------------------
/hardware/resources/IDC_1.27mm_2x3.stp:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:7c0f34658c1488cd794b70ee0b485cf5e9e7e30d14d6fc6f659aaf5924d2540d
3 | size 158940
4 |
--------------------------------------------------------------------------------
/hardware/resources/IDC_1.27mm_2x5.stp:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:874ec51549ec925f9902a3e7a05cce0b35c4257f59991b0bcee2d515d84a4bea
3 | size 268520
4 |
--------------------------------------------------------------------------------
/hardware/resources/L9110S.bak:
--------------------------------------------------------------------------------
1 | (kicad_symbol_lib
2 | (version 20231120)
3 | (generator "kicad_symbol_editor")
4 | (generator_version "8.0")
5 | )
6 |
--------------------------------------------------------------------------------
/hardware/resources/OLED_0.91_128x32.stp:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:57dca111b548e9dc8f5b73bcc4f66f5a2858e89cce30f2d189e75c0399acf34b
3 | size 839995
4 |
--------------------------------------------------------------------------------
/hardware/top_connector/top_connector-3D_blender_top.png:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:3c1e81a33e6ed4dc6cec592c888d04f3d3264cf40360b11890837e8bc8d2d4ab
3 | size 541919
4 |
--------------------------------------------------------------------------------
/hardware/top_connector/top_connector-bottom.png:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:826fc5cb2d0b624bd29c0834471ed4491e614e7c1b7d21975a4fe8b76b54c187
3 | size 62496
4 |
--------------------------------------------------------------------------------
/hardware/top_connector/top_connector-schematic.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ToonVanEyck/OpenFlap/2a6ee2e930fada76f2bf324681605e607edf05d6/hardware/top_connector/top_connector-schematic.pdf
--------------------------------------------------------------------------------
/hardware/top_connector/top_connector-top.png:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:12073f296f5d9775f5416ad6d2606a2209636117f66761c589d9d3b1e62556ee
3 | size 63467
4 |
--------------------------------------------------------------------------------
/mechanical/ci-script-freecad.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | # Parse arguments
4 | dry_run=""
5 | if [[ "$1" == "--dry-run" ]]; then
6 | dry_run="--dry-run"
7 | fi
8 |
9 | # Check if the script is being run in the correct container or in GitHub Actions.
10 | if [ "$(hostname)" != "ecad-mcad" ] && [ -z "$GITHUB_ACTIONS" ]; then
11 | echo -e "\e[31mError: This script is meant to be ran in the ecad-mcad container.\e[0m"
12 | exit 1
13 | fi
14 |
15 | BASE_DIR=$(git rev-parse --show-toplevel)
16 | SOURCE_DIR=${BASE_DIR}/mechanical
17 | BUILD_DIR=${BASE_DIR}/build/mechanical
18 |
19 | # Declare FreeCAD model
20 | model="$SOURCE_DIR/openflap_cad_model.FCStd"
21 |
22 | # Declare bodies
23 | bodies=("shell" "core" "short_hub" "long_hub" "flap_assembly_tool" "flap_assembly_guide" "french_cleat_mount")
24 |
25 | # Run the export python script
26 | $SOURCE_DIR/export_stl.py ${model} ${bodies[@]} --output-dir $BUILD_DIR ${dry_run}
--------------------------------------------------------------------------------
/mechanical/openflap_cad_model.FCStd:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:54100e54b39d3ee1b0e7e49d7680326e3505a20664c890de64812ba5eebb51b4
3 | size 7800873
4 |
--------------------------------------------------------------------------------
/mkdocs.yml:
--------------------------------------------------------------------------------
1 | site_name: OpenFlap
2 | repo_url: https://github.com/ToonVanEyck/OpenFlap
3 |
4 | theme:
5 | name: material
6 | palette:
7 | # Palette toggle for dark mode
8 | - media: "(prefers-color-scheme: dark)"
9 | scheme: slate
10 | toggle:
11 | icon: material/brightness-4
12 | name: Switch to light mode
13 | # Palette toggle for light mode
14 | - media: "(prefers-color-scheme: light)"
15 | scheme: default
16 | toggle:
17 | icon: material/brightness-7
18 | name: Switch to dark mode
19 | features:
20 | - navigation.footer
21 |
22 | docs_dir: .
23 |
24 | exclude_docs: |
25 | software/
26 | mechanical/
27 | docs/README_old.md
28 |
29 | plugins:
30 | - search
31 | - same-dir
32 | - glightbox
33 |
34 | markdown_extensions:
35 | - attr_list
36 | - admonition
37 |
38 | nav:
39 | - Home: README.md
40 | - Technical:
41 | - Overview: docs/architecture.md
42 | - Controller: docs/controller.md
43 | - Module: docs/module.md
44 | - Wiring: docs/wiring.md
45 | - Communication: docs/chain_com.md
46 | - Licence: LICENCE.md
47 |
--------------------------------------------------------------------------------
/software/common/chain_comm_abi/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | cmake_minimum_required (VERSION 3.16.3 FATAL_ERROR)
2 | project(chain_comm_abi LANGUAGES C CXX)
3 | set (CMAKE_C_STANDARD 11)
4 |
5 | add_library(${PROJECT_NAME} STATIC chain_comm_abi.c)
6 |
7 | target_include_directories(${PROJECT_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include)
--------------------------------------------------------------------------------
/software/common/chain_comm_abi/chain_comm_api.md:
--------------------------------------------------------------------------------
1 | # Chain Communication API
2 |
3 | The cain communication is the communication interface between a controller and a daisy chained string of OpenFlap modules.
4 |
5 | The protocol uses UART as the data link layer. The UART is configured to 115200 baud, 8 data bits, 1 stop bit and no parity.
6 |
7 | ## Message Format
8 |
9 | ### Header
10 |
11 | Each communication start with a header. The header is only 1 byte and communicates the intent of the message.
12 |
13 | The two most significant bits of the header byte indicate the action. The remaining 6 bits indicate the property on which the action will be taken.
14 |
15 | #### Actions
16 |
17 | | Bits | Action | Description |
18 | |------|------------------|---------------------------------------------------------|
19 | | 00 | do nothing | Do nothing. |
20 | | 01 | read all | Read the property from all modules. |
21 | | 10 | write sequential | Write a different value to the property of all modules. |
22 | | 11 | write all | Write the same value to the property of all modules. |
23 |
24 | #### Properties
25 |
26 |
--------------------------------------------------------------------------------
/software/controller/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | # For more information about build system see
2 | # https://docs.espressif.com/projects/esp-idf/en/latest/api-guides/build-system.html
3 | # The following five lines of boilerplate have to be in your project's
4 | # CMakeLists in this exact order for cmake to work correctly
5 | cmake_minimum_required(VERSION 3.16)
6 |
7 | include($ENV{IDF_PATH}/tools/cmake/project.cmake)
8 | project(openflap-controller)
9 |
--------------------------------------------------------------------------------
/software/controller/README.md:
--------------------------------------------------------------------------------
1 | # Testing commands
2 |
3 | Building all tests:
4 | ```
5 | python software/controller/build_test.py -s software/controller/ -b build/controller/
6 | ```
7 |
8 | Running all tests with pytest:
9 | ```
10 | pytest software/controller/ --build-dir build/controller/ -m esp32
11 | ```
12 |
13 | curl --header "Content-Type: application/json" POST --data '[{"module": 0,"character_set": [" ", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "€", "$", "!", "?", ".", ",", ":", "/", "@", "#", "&"],"character": "5","calibration": {"offset": 0}}]' http://openflap.local/api/module
14 |
15 |
16 | curl --header "Content-Type: application/json" http://openflap.local/api/module
17 |
18 | curl --header "Content-Type: application/json" POST --data '[{"module": 0,"character_set": ["Y", "O", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "€", "$", "!", "?", ".", ",", ":", "/", "@", "#", "&"]}]' http://openflap.local/api/module
19 |
20 | curl -T build/module/bin/OpenFlap_Module_App.bin http://openflap.local/api/module/firmware
--------------------------------------------------------------------------------
/software/controller/components/chain_comm/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | idf_component_register(
2 | SRCS
3 | "chain_comm_esp.c"
4 | INCLUDE_DIRS
5 | "include"
6 | REQUIRES
7 | chain_comm_abi esp_driver_uart display module property_handler
8 | )
9 |
10 | # target_compile_definitions(${COMPONENT_TARGET} PUBLIC "CHAIN_COMM_DEBUG=1")
--------------------------------------------------------------------------------
/software/controller/components/chain_comm/include/chain_comm_common.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "chain_comm_abi.h"
4 | #include "display.h"
5 | #include "freertos/FreeRTOS.h"
6 | #include "freertos/task.h"
7 |
8 | typedef struct {
9 | display_t *display; /**< Display context. */
10 | TaskHandle_t task; /**< Task handle. */
11 | } chain_comm_ctx_t;
--------------------------------------------------------------------------------
/software/controller/components/chain_comm/include/chain_comm_msg.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "chain_comm_common.h"
4 |
5 | // /**
6 | // * \brief Prepare a read all message.
7 | // *
8 | // * \param[in] msg The message to prepare.
9 | // * \param[in] property The property to read.
10 | // */
11 | // void chain_comm_msg_init_read_all(chain_comm_msg_t *msg, property_id_t property);
12 |
13 | // /**
14 | // * \brief Prepare a write sequential message.
15 | // *
16 | // * \param[in] msg The message to prepare.
17 | // * \param[in] property The property to write.
18 | // */
19 | // void chain_comm_msg_init_write_seq(chain_comm_msg_t *msg, property_id_t property);
20 |
21 | // /**
22 | // * \brief Prepare a write all message.
23 | // * \param[in] msg The message to prepare.
24 | // * \param[in] property The property to write.
25 | // */
26 | // void chain_comm_msg_init_write_all(chain_comm_msg_t *msg, property_id_t property);
27 |
28 | // /**
29 | // * \brief Add data to the message.
30 | // *
31 | // * \param[in] msg The message to add data to.
32 | // * \param[in] byte The byte to add.
33 | // */
34 | // void chain_comm_msg_data_add(chain_comm_msg_t *msg, uint8_t byte);
35 |
36 | // /**
37 | // * \brief Initialize the chain communication message.
38 | // *
39 | // * \param[in] msg The message to initialize.
40 | // */
41 | // void chain_comm_msg_init(chain_comm_msg_t *msg);
--------------------------------------------------------------------------------
/software/controller/components/chain_comm/test/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | idf_component_register(SRCS "test.c"
2 | INCLUDE_DIRS .
3 | PRIV_REQUIRES unity test_utils module display chain_comm)
--------------------------------------------------------------------------------
/software/controller/components/chain_comm/test/pytest_chain_comm.py:
--------------------------------------------------------------------------------
1 | import pytest
2 | from pytest_embedded_idf.dut import IdfDut
3 |
--------------------------------------------------------------------------------
/software/controller/components/chain_comm/test/test_partition_table.csv:
--------------------------------------------------------------------------------
1 | # Name, Type, SubType, Offset, Size, Flags
2 | nvs, data, nvs, 0x009000, 16K,
3 | otadata, data, ota, , 8K,
4 | phy_init, data, phy, , 4K,
5 | ota_0, app, ota_0, , 4M,
6 | ota_1, app, ota_1, , 4M,
7 | flash_test, data, fat, , 100K
--------------------------------------------------------------------------------
/software/controller/components/chain_comm_abi/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | set(CHAIN_COMM_ABI_SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR}/../../../common/chain_comm_abi)
2 |
3 | idf_component_register(
4 | SRCS ${CHAIN_COMM_ABI_SOURCE_DIR}/chain_comm_abi.c
5 | INCLUDE_DIRS ${CHAIN_COMM_ABI_SOURCE_DIR}/include
6 | )
7 |
--------------------------------------------------------------------------------
/software/controller/components/controller_ota/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | idf_component_register(
2 | SRCS
3 | "controller_ota.c"
4 | INCLUDE_DIRS
5 | "include"
6 | REQUIRES
7 | webserver app_update)
8 |
--------------------------------------------------------------------------------
/software/controller/components/controller_ota/include/controller_ota.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "esp_err.h"
4 | #include "esp_ota_ops.h"
5 | #include "webserver.h"
6 |
7 | typedef struct {
8 | const esp_partition_t *update_partition; /**< Update partition. */
9 | esp_ota_handle_t update_handle; /**< Update handle. */
10 | } controller_ota_ctx_t;
11 |
12 | /**
13 | * \brief Initialize OTA for the controller.
14 | *
15 | * \param[in] ctx The OTA context.
16 | * \param[in] webserver_ctx The webserver context.
17 | *
18 | * \return esp_err_t
19 | */
20 | esp_err_t controller_ota_init(controller_ota_ctx_t *ctx, webserver_ctx_t *webserver_ctx);
21 |
22 | //---------------------------------------------------------------------------------------------------------------------
23 |
24 | /**
25 | * \brief Verify the firmware.
26 | *
27 | * \param[in] startup_success Indicate that the application was able to correctly start up. If the application was
28 | * updated and pending for verification, setting this to false will trigger a rollback.
29 | *
30 | * \return esp_err_t
31 | */
32 | esp_err_t controller_ota_verify_firmware(bool startup_success);
--------------------------------------------------------------------------------
/software/controller/components/controller_ota/test/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | idf_component_register(SRCS "test.c"
2 | INCLUDE_DIRS .
3 | PRIV_REQUIRES unity test_utils controller_ota webserver networking app_update)
--------------------------------------------------------------------------------
/software/controller/components/controller_ota/test/test.c:
--------------------------------------------------------------------------------
1 | #include "controller_ota.h"
2 | #include "esp_err.h"
3 | #include "esp_log.h"
4 | #include "esp_system.h"
5 | #include "memory_checks.h"
6 | #include "networking.h"
7 | #include "unity.h"
8 | #include "webserver.h"
9 |
10 | #define TAG "CONTROLLER_OTA_TEST"
11 |
12 | /* Test Command:
13 | curl -T build/controller/openflap-controller.bin http://openflap.local/api/controller/firmware
14 | */
15 |
16 | TEST_CASE("Test controller OTA post handler", "[controller_ota][qemu]")
17 | {
18 | /* Configure Ethernet for testing on qemu. */
19 | networking_config_t config = NETWORKING_DEFAULT_CONFIG;
20 | networking_setup(&config);
21 | TEST_ASSERT_EQUAL(networking_wait_for_connection(10000), ESP_OK);
22 |
23 | webserver_ctx_t webserver_ctx;
24 | TEST_ASSERT_EQUAL(webserver_init(&webserver_ctx), ESP_OK);
25 | TEST_ASSERT_EQUAL(controller_ota_init(&webserver_ctx), ESP_OK);
26 |
27 | ESP_LOGI(TAG, "Webserver started");
28 |
29 | char dummy[16] = {0};
30 | unity_gets(dummy, sizeof(dummy));
31 |
32 | ESP_LOGI(TAG, "Webserver stopped");
33 |
34 | test_utils_record_free_mem();
35 | }
--------------------------------------------------------------------------------
/software/controller/components/controller_ota/test/test_partition_table.csv:
--------------------------------------------------------------------------------
1 | # Name, Type, SubType, Offset, Size, Flags
2 | nvs, data, nvs, 0x009000, 16K,
3 | otadata, data, ota, , 8K,
4 | phy_init, data, phy, , 4K,
5 | ota_0, app, ota_0, , 4M,
6 | ota_1, app, ota_1, , 4M,
7 | flash_test, data, fat, , 100K
--------------------------------------------------------------------------------
/software/controller/components/display/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | idf_component_register(
2 | SRCS
3 | "display.c"
4 | INCLUDE_DIRS
5 | "include"
6 | REQUIRES
7 | property_handler webserver module property_handler
8 | )
9 |
--------------------------------------------------------------------------------
/software/controller/components/display/test/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | idf_component_register(SRCS "test.c"
2 | INCLUDE_DIRS .
3 | PRIV_REQUIRES unity test_utils display module)
--------------------------------------------------------------------------------
/software/controller/components/display/test/test.c:
--------------------------------------------------------------------------------
1 | #include "display.h"
2 | #include "esp_err.h"
3 | #include "esp_system.h"
4 | #include "memory_checks.h"
5 | #include "unity.h"
6 |
7 | #define TAG "DISPLAY_TEST"
8 |
9 | TEST_CASE("Test display_init display_destroy", "[display][qemu][target]")
10 | {
11 | display_t display;
12 | TEST_ASSERT_EQUAL(ESP_OK, display_init(&display));
13 | TEST_ASSERT_NOT_NULL(display.event_handle);
14 | TEST_ASSERT_EQUAL(ESP_OK, display_destroy(&display));
15 | TEST_ASSERT_NULL(display.event_handle);
16 | }
17 |
18 | TEST_CASE("Test display_init display_destroy: ok", "[display][qemu][target]")
19 | {
20 | display_t display;
21 | TEST_ASSERT_EQUAL(ESP_OK, display_init(&display));
22 | TEST_ASSERT_NOT_NULL(display.event_handle);
23 |
24 | TEST_ASSERT_EQUAL(ESP_OK, display_resize(&display, 10));
25 |
26 | uint16_t module_count = display_size_get(&display);
27 | for (uint16_t i = 0; i < module_count; i++) {
28 | module_t *module = display_module_get(&display, i);
29 | module->character_set = character_set_new(48);
30 | module->firmware_version = firmware_version_new(18);
31 | module->firmware_update = firmware_update_new();
32 | }
33 |
34 | /* Shrink Display. */
35 | TEST_ASSERT_EQUAL(ESP_OK, display_resize(&display, 5));
36 |
37 | /* Grow Display. */
38 | TEST_ASSERT_EQUAL(ESP_OK, display_resize(&display, 10));
39 |
40 | TEST_ASSERT_EQUAL(ESP_OK, display_destroy(&display));
41 | TEST_ASSERT_NULL(display.event_handle);
42 | }
--------------------------------------------------------------------------------
/software/controller/components/display/test/test_partition_table.csv:
--------------------------------------------------------------------------------
1 | # Name, Type, SubType, Offset, Size, Flags
2 | nvs, data, nvs, 0x009000, 16K,
3 | otadata, data, ota, , 8K,
4 | phy_init, data, phy, , 4K,
5 | ota_0, app, ota_0, , 4M,
6 | ota_1, app, ota_1, , 4M,
7 | flash_test, data, fat, , 100K
--------------------------------------------------------------------------------
/software/controller/components/module/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | idf_component_register(
2 | SRCS
3 | "module_property.c"
4 | "module.c"
5 | INCLUDE_DIRS
6 | "include"
7 | REQUIRES
8 | webserver chain_comm_abi
9 | )
10 |
--------------------------------------------------------------------------------
/software/controller/components/module/include/module.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "module_property.h"
4 |
5 | /**
6 | * \brief Get the index of a character in the modules character set.
7 | *
8 | * \param[in] module The module to get the character index from.
9 | * \param[out] index The index of the character in the character set.
10 | * \param[in] character The character to get the index of, this is a 4 byte array to support UTF-8.
11 | *
12 | * \return ESP_OK if the index of the character has been found.
13 | */
14 | esp_err_t module_character_set_index_of_character(module_t *module, uint8_t *index, const char *character);
15 |
16 | /**
17 | * \brief Create a new module.
18 | *
19 | * \return A new module.
20 | */
21 | module_t *module_new(void);
22 |
23 | /**
24 | * \brief Destroy a module.
25 | *
26 | * \param[in] module The module to destroy.
27 | */
28 | void module_free(module_t *module);
--------------------------------------------------------------------------------
/software/controller/components/module/module.c:
--------------------------------------------------------------------------------
1 | #include "module.h"
2 | #include "esp_check.h"
3 |
4 | #include
5 |
6 | #define TAG "MODULE"
7 |
8 | esp_err_t module_character_set_index_of_character(module_t *module, uint8_t *index, const char *character)
9 | {
10 | ESP_RETURN_ON_FALSE(index != NULL, ESP_ERR_INVALID_ARG, TAG, "Index is NULL");
11 | ESP_RETURN_ON_FALSE(module != NULL, ESP_ERR_INVALID_ARG, TAG, "Module is NULL");
12 | ESP_RETURN_ON_FALSE(module->character_set->size > 0, ESP_ERR_INVALID_ARG, TAG, "Character set size is 0");
13 | ESP_RETURN_ON_FALSE(module->character_set->data != NULL, ESP_ERR_INVALID_ARG, TAG, "Character set is NULL");
14 |
15 | for (int i = 0; i < module->character_set->size; i++) {
16 | if (strncmp(character, (const char *)&module->character_set->data[i * 4], 4) == 0) {
17 | *index = i;
18 | return ESP_OK;
19 | }
20 | }
21 |
22 | return ESP_FAIL;
23 | }
24 |
25 | module_t *module_new(void)
26 | {
27 | module_t *module = malloc(sizeof(module_t));
28 | if (module == NULL) {
29 | ESP_LOGE(TAG, "Failed to allocate memory for module");
30 | return NULL;
31 | }
32 |
33 | memset(module, 0, sizeof(module_t));
34 |
35 | return module;
36 | }
37 |
38 | void module_free(module_t *module)
39 | {
40 | if (module == NULL) {
41 | return;
42 | }
43 |
44 | /* Free all properties. */
45 | firmware_version_free(module->firmware_version);
46 | firmware_update_free(module->firmware_update);
47 | character_set_free(module->character_set);
48 |
49 | free(module);
50 | }
--------------------------------------------------------------------------------
/software/controller/components/module/test/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | idf_component_register(SRCS "test.c"
2 | INCLUDE_DIRS .
3 | PRIV_REQUIRES unity test_utils module networking)
--------------------------------------------------------------------------------
/software/controller/components/module/test/pytest_module.py:
--------------------------------------------------------------------------------
1 | import pytest
2 | from pytest_embedded_idf.dut import IdfDut
3 |
4 |
5 | @pytest.mark.esp32
6 | @pytest.mark.qemu
7 | @pytest.mark.parametrize("config", ["qemu"], indirect=True)
8 | def test_module_unity_on_qemu(dut: IdfDut) -> None:
9 | dut.run_all_single_board_cases(group="module", reset=True)
10 |
--------------------------------------------------------------------------------
/software/controller/components/module/test/test.c:
--------------------------------------------------------------------------------
1 | #include "esp_err.h"
2 | #include "esp_system.h"
3 | #include "memory_checks.h"
4 | #include "module.h"
5 | #include "networking.h"
6 | #include "unity.h"
7 | #include "webserver.h"
8 |
9 | #define TAG "MODULE_TEST"
10 |
11 | /* TODO mock the property handlers? */
12 |
13 | TEST_CASE("Test module_character_set_index_of_character", "[module][qemu]")
14 | {
15 |
16 | module_t module = {
17 | .character_set = character_set_new(3),
18 | };
19 | memcmp(module.character_set->data, (uint8_t *)((char *) {"A\0\0\0B\0\0\0€\0"}), 12);
20 |
21 | uint8_t index;
22 | esp_err_t err;
23 | err = module_character_set_index_of_character(&module, &index, "A");
24 | TEST_ASSERT_EQUAL(ESP_OK, err);
25 | TEST_ASSERT_EQUAL(0, index);
26 | err = module_character_set_index_of_character(&module, &index, "€");
27 | TEST_ASSERT_EQUAL(ESP_OK, err);
28 | TEST_ASSERT_EQUAL(2, index);
29 | err = module_character_set_index_of_character(&module, &index, "!");
30 | TEST_ASSERT_EQUAL(ESP_FAIL, err);
31 | }
--------------------------------------------------------------------------------
/software/controller/components/module/test/test_partition_table.csv:
--------------------------------------------------------------------------------
1 | # Name, Type, SubType, Offset, Size, Flags
2 | nvs, data, nvs, 0x009000, 16K,
3 | otadata, data, ota, , 8K,
4 | phy_init, data, phy, , 4K,
5 | ota_0, app, ota_0, , 4M,
6 | ota_1, app, ota_1, , 4M,
7 | flash_test, data, fat, , 100K
--------------------------------------------------------------------------------
/software/controller/components/module_api/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | idf_component_register(
2 | SRCS
3 | "module_api.c"
4 | "module_api_endpoints.c"
5 | "module_api_firmware_endpoints.c"
6 | INCLUDE_DIRS
7 | "include"
8 | REQUIRES
9 | property_handler webserver module display
10 | )
11 |
--------------------------------------------------------------------------------
/software/controller/components/module_api/include/module_api.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "display.h"
4 | #include "esp_err.h"
5 | #include "module.h"
6 | #include "webserver.h"
7 |
8 | /**
9 | * \brief Initialize the module HTTP API.
10 | *
11 | * \param[in] webserver_ctx The webserver context.
12 | * \param[in] display The display witch contains the modules we want to control.
13 | */
14 | esp_err_t module_api_init(webserver_ctx_t *webserver_ctx, display_t *display);
--------------------------------------------------------------------------------
/software/controller/components/module_api/include/module_api_endpoints.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "esp_err.h"
4 | #include "esp_http_server.h"
5 |
6 | esp_err_t module_api_get_handler(httpd_req_t *req);
7 | esp_err_t module_api_post_handler(httpd_req_t *req);
--------------------------------------------------------------------------------
/software/controller/components/module_api/include/module_api_firmware_endpoints.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "esp_err.h"
4 | #include "esp_http_server.h"
5 |
6 | esp_err_t module_api_firmware_handler(httpd_req_t *req);
--------------------------------------------------------------------------------
/software/controller/components/module_api/module_api.c:
--------------------------------------------------------------------------------
1 | #include "module_api.h"
2 | #include "esp_check.h"
3 | #include "esp_log.h"
4 | #include "module_api_endpoints.h"
5 | #include "module_api_firmware_endpoints.h"
6 |
7 | #define TAG "module_api"
8 |
9 | #define MODULE_API_URI "/module" /**< module endpoint. */
10 | #define MODULE_FIRMWARE_API_URI "/module/firmware" /**< module firmware endpoint. */
11 |
12 | //---------------------------------------------------------------------------------------------------------------------
13 |
14 | esp_err_t module_api_init(webserver_ctx_t *webserver_ctx, display_t *display)
15 | {
16 | ESP_RETURN_ON_FALSE(display != NULL, ESP_ERR_INVALID_ARG, TAG, "Display is NULL");
17 |
18 | webserver_api_method_handlers_t module_api_handlers = {
19 | .get_handler = module_api_get_handler,
20 | .post_handler = module_api_post_handler,
21 | };
22 |
23 | ESP_RETURN_ON_ERROR(webserver_api_endpoint_add(webserver_ctx, MODULE_API_URI, &module_api_handlers, true, display),
24 | TAG, "Failed to add GET handler for %s", MODULE_API_URI);
25 |
26 | /* Create the api endpoints. */
27 | webserver_api_method_handlers_t module_api_firmware_handlers = {
28 | .put_handler = module_api_firmware_handler,
29 | };
30 |
31 | ESP_RETURN_ON_ERROR(webserver_api_endpoint_add(webserver_ctx, MODULE_FIRMWARE_API_URI,
32 | &module_api_firmware_handlers, true, display),
33 | TAG, "Failed to add endpoint for %s", MODULE_FIRMWARE_API_URI);
34 |
35 | return ESP_OK;
36 | }
37 |
--------------------------------------------------------------------------------
/software/controller/components/module_api/test/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | idf_component_register(SRCS "test.c"
2 | INCLUDE_DIRS .
3 | PRIV_REQUIRES unity test_utils module_api module display networking)
--------------------------------------------------------------------------------
/software/controller/components/module_api/test/test.c:
--------------------------------------------------------------------------------
1 | #include "cJSON.h"
2 | #include "display.h"
3 | #include "esp_err.h"
4 | #include "esp_system.h"
5 | #include "memory_checks.h"
6 | #include "module.h"
7 | #include "module_api.h"
8 | #include "networking.h"
9 | #include "properties.h"
10 | #include "unity.h"
11 | #include "webserver.h"
12 |
13 | #define TAG "module_api_TEST"
14 |
15 | TEST_CASE("Test module http API post handler", "[module_api][qemu]")
16 | {
17 | /* Configure Ethernet for testing on qemu. */
18 | networking_config_t config = NETWORKING_DEFAULT_CONFIG;
19 | networking_setup(&config);
20 | TEST_ASSERT_EQUAL(networking_wait_for_connection(10000), ESP_OK);
21 |
22 | webserver_ctx_t webserver_ctx;
23 | TEST_ASSERT_EQUAL(webserver_init(&webserver_ctx), ESP_OK);
24 |
25 | display_t display;
26 | TEST_ASSERT_EQUAL(display_init(&display), ESP_OK);
27 | TEST_ASSERT_EQUAL(module_api_init(&webserver_ctx, &display), ESP_OK);
28 |
29 | ESP_LOGI(TAG, "Webserver started");
30 |
31 | /* Wait for pytest to send a character. */
32 | char dummy[16] = {0};
33 | unity_gets(dummy, sizeof(dummy));
34 | /* Continue */
35 |
36 | ESP_LOGI(TAG, "Webserver stopped");
37 |
38 | test_utils_record_free_mem();
39 | }
--------------------------------------------------------------------------------
/software/controller/components/module_api/test/test_partition_table.csv:
--------------------------------------------------------------------------------
1 | # Name, Type, SubType, Offset, Size, Flags
2 | nvs, data, nvs, 0x009000, 16K,
3 | otadata, data, ota, , 8K,
4 | phy_init, data, phy, , 4K,
5 | ota_0, app, ota_0, , 4M,
6 | ota_1, app, ota_1, , 4M,
7 | flash_test, data, fat, , 100K
--------------------------------------------------------------------------------
/software/controller/components/networking/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | # Get the environment variables
2 | set(NETWORKING_DEFAULT_STA_SSID $ENV{OPENFLAP_DEFAULT_SSID})
3 | set(NETWORKING_DEFAULT_STA_PASS $ENV{OPENFLAP_DEFAULT_PASS})
4 |
5 | # Provide default values if the environment variables are not set
6 | if(NOT NETWORKING_DEFAULT_STA_SSID)
7 | set(NETWORKING_DEFAULT_STA_SSID "default_ssid")
8 | endif()
9 |
10 | if(NOT NETWORKING_DEFAULT_STA_PASS)
11 | set(NETWORKING_DEFAULT_STA_PASS "default_password")
12 | endif()
13 |
14 | set(INPUT_FILE "This file is configured by CMake. Do not edit it manually.")
15 |
16 | # Configure the networking_default_config.h.in file
17 | configure_file(
18 | "${CMAKE_CURRENT_LIST_DIR}/include/networking_default_config.h.in"
19 | "${CMAKE_CURRENT_LIST_DIR}/include/networking_default_config.h"
20 | @ONLY
21 | )
22 |
23 | idf_component_register(
24 | SRCS "networking.c"
25 | INCLUDE_DIRS "include"
26 | PRIV_REQUIRES esp_eth esp_wifi nvs_flash
27 | )
28 |
29 | # Check if QEMU is defined and add the define to the compiler flags
30 | if(QEMU)
31 | target_compile_definitions(${COMPONENT_TARGET} PUBLIC "QEMU=1")
32 | endif()
--------------------------------------------------------------------------------
/software/controller/components/networking/idf_component.yml:
--------------------------------------------------------------------------------
1 | ## IDF Component Manager Manifest File
2 | dependencies:
3 | espressif/mdns: "=1.5.2"
4 | ## Required IDF version
5 | idf:
6 | version: "=5.3.1"
7 | # # Put list of dependencies here
8 | # # For components maintained by Espressif:
9 | # component: "~1.0.0"
10 | # # For 3rd party components:
11 | # username/component: ">=1.0.0,<2.0.0"
12 | # username2/component2:
13 | # version: "~1.0.0"
14 | # # For transient dependencies `public` flag can be set.
15 | # # `public` flag doesn't have an effect dependencies of the `main` component.
16 | # # All dependencies of `main` are public by default.
17 | # public: true
18 |
--------------------------------------------------------------------------------
/software/controller/components/networking/include/networking.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file networking.h
3 | *
4 | * The networking component adds support for connecting the system to a network over wifi or ethernet.
5 | * WiFi can be used to join a network as a client or host a network as an access point.
6 | * Ethernet can be used when connecting in a qemu environment.
7 | */
8 |
9 | #pragma once
10 |
11 | #include "networking_config.h"
12 | #include "networking_default_config.h"
13 |
14 | /**
15 | * \brief Setup networking.
16 | *
17 | * \param[in] config Configuration for the network.
18 | */
19 | esp_err_t networking_setup(const networking_config_t *config);
20 |
21 | /**
22 | * \brief Wait for a connection to be established.
23 | *
24 | * \param[in] timeout_ms Timeout in milliseconds.
25 | *
26 | * \retval ESP_OK if a connection was established
27 | * \retval ESP_ERR_TIMEOUT if the timeout was reached.
28 | * \retval ESP_FAIL if the connection failed.
29 | */
30 | esp_err_t networking_wait_for_connection(uint32_t timeout_ms);
--------------------------------------------------------------------------------
/software/controller/components/networking/include/networking_config.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file networking_config.h
3 | *
4 | * Configuration structure used by the networking component.
5 | */
6 |
7 | #pragma once
8 |
9 | #include
10 | #include
11 | #include
12 |
13 | /**
14 | * Network configuration structure.
15 | */
16 | typedef struct {
17 | struct {
18 | struct {
19 | bool enable; /**< Enable wifi station mode. */
20 | char *ssid; /**< SSID of the network to connect to. */
21 | char *password; /**< Password of the network to connect to. */
22 | } station; /**< Config for wifi station mode. */
23 | struct {
24 | bool enable; /**< Enable wifi access point mode. */
25 | char *ssid; /**< SSID of the network to host. */
26 | char *password; /**< Password of the network to host. */
27 | } access_point; /**< Config for wifi access_point mode. */
28 | } wifi; /**< Config for wifi. */
29 | struct {
30 | bool enable; /**< Enable ethernet mode. */
31 | } ethernet; /**< Config for ethernet. */
32 | struct {
33 | bool enable; /**< Enable mDNS. */
34 | char *hostname; /**< Hostname to use for mDNS. */
35 | } mdns; /**< Config for mDNS. */
36 | } networking_config_t;
37 |
--------------------------------------------------------------------------------
/software/controller/components/networking/test/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | idf_component_register(SRCS "test.c"
2 | INCLUDE_DIRS .
3 | PRIV_REQUIRES unity test_utils networking)
--------------------------------------------------------------------------------
/software/controller/components/networking/test/pytest_networking.py:
--------------------------------------------------------------------------------
1 | import pytest
2 | from pytest_embedded_idf.dut import IdfDut
3 |
4 |
5 | def run_unity_tests_qemu(dut: IdfDut) -> None:
6 | """
7 | This function iterates through the test menu of the DUT and runs tests that belong to the 'qemu' group.
8 | After each test, it performs a hard reset on the DUT and waits for a short period.
9 | This function is used to replace `dut.run_all_single_board_cases(group='qemu',reset=True)`, which does not work because it does not have the delay.
10 | Args:
11 | dut (IdfDut): The Device Under Test, which contains the test menu and methods to run tests and reset the device.
12 | Returns:
13 | None
14 | """
15 | for test in dut.test_menu:
16 | if "qemu" in test.groups:
17 | # Run the test
18 | dut.run_single_board_case(test.name, timeout=10)
19 | # This kind of flushes the output of the test so that the next test only starts when the reset is done.
20 | dut._get_ready(timeout=3)
21 | # Reset the board
22 | dut.hard_reset()
23 |
24 |
25 | @pytest.mark.esp32
26 | @pytest.mark.qemu
27 | @pytest.mark.parametrize("config", ["qemu"], indirect=True)
28 | def test_networking_unity_on_qemu(dut: IdfDut) -> None:
29 | run_unity_tests_qemu(dut)
30 |
31 |
32 | @pytest.mark.esp32
33 | @pytest.mark.target
34 | @pytest.mark.parametrize("config", ["target"], indirect=True)
35 | def test_networking_unity_on_esp(dut: IdfDut) -> None:
36 | dut.run_all_single_board_cases(group="target", reset=True)
37 |
--------------------------------------------------------------------------------
/software/controller/components/networking/test/test.c:
--------------------------------------------------------------------------------
1 | #include "esp_err.h"
2 | #include "esp_system.h"
3 | #include "memory_checks.h"
4 | #include "networking.h"
5 | #include "unity.h"
6 |
7 | TEST_CASE("test default networking", "[networking][qemu][target]")
8 | {
9 | networking_config_t config = NETWORKING_DEFAULT_CONFIG;
10 | TEST_ASSERT_EQUAL(ESP_OK, networking_setup(&config));
11 | TEST_ASSERT_EQUAL(ESP_OK, networking_wait_for_connection(5000));
12 | test_utils_record_free_mem();
13 | }
14 |
--------------------------------------------------------------------------------
/software/controller/components/networking/test/test_partition_table.csv:
--------------------------------------------------------------------------------
1 | # Name, Type, SubType, Offset, Size, Flags
2 | nvs, data, nvs, 0x009000, 16K,
3 | otadata, data, ota, , 8K,
4 | phy_init, data, phy, , 4K,
5 | ota_0, app, ota_0, , 4M,
6 | ota_1, app, ota_1, , 4M,
7 | flash_test, data, fat, , 100K
--------------------------------------------------------------------------------
/software/controller/components/oled_disp/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | idf_component_register(
2 | SRCS "oled_disp.c"
3 | INCLUDE_DIRS "include"
4 | PRIV_REQUIRES u8g2 esp_driver_gpio u8g2-hal-esp-idf
5 | # esp_lcd esp_driver_i2c
6 | )
7 |
8 | # Check if QEMU is defined and add the define to the compiler flags
9 | if(QEMU)
10 | target_compile_definitions(${COMPONENT_TARGET} PUBLIC "QEMU=1")
11 | endif()
--------------------------------------------------------------------------------
/software/controller/components/oled_disp/test/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | idf_component_register(SRCS "test.c"
2 | INCLUDE_DIRS .
3 | PRIV_REQUIRES unity test_utils u8g2 esp_driver_gpio u8g2-hal-esp-idf oled_disp networking)
--------------------------------------------------------------------------------
/software/controller/components/oled_disp/test/pytest_oled_disp.py:
--------------------------------------------------------------------------------
1 | import pytest
2 | from pytest_embedded_idf.dut import IdfDut
3 |
4 | # @pytest.mark.esp32
5 | # @pytest.mark.qemu
6 | # @pytest.mark.parametrize("config", ["qemu"], indirect=True)
7 | # def test_module_api_on_qemu(dut: IdfDut) -> None:
8 | # test_module_api(dut, "qemu")
9 |
10 |
11 | # @pytest.mark.esp32
12 | # @pytest.mark.target
13 | # @pytest.mark.parametrize("config", ["target"], indirect=True)
14 | # def test_module_api_on_target(dut: IdfDut) -> None:
15 | # test_module_api(dut, "target")
16 |
--------------------------------------------------------------------------------
/software/controller/components/oled_disp/test/test_partition_table.csv:
--------------------------------------------------------------------------------
1 | # Name, Type, SubType, Offset, Size, Flags
2 | nvs, data, nvs, 0x009000, 16K,
3 | otadata, data, ota, , 8K,
4 | phy_init, data, phy, , 4K,
5 | ota_0, app, ota_0, , 4M,
6 | ota_1, app, ota_1, , 4M,
7 | flash_test, data, fat, , 100K
--------------------------------------------------------------------------------
/software/controller/components/property_handler/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | idf_component_register(
2 | SRCS
3 | "property_handler.c"
4 | "property_handlers/offset_property.c"
5 | "property_handlers/character_property.c"
6 | "property_handlers/character_set_property.c"
7 | "property_handlers/command_property.c"
8 | "property_handlers/module_info_property.c"
9 | "property_handlers/firmware_version_property.c"
10 | "property_handlers/firmware_update_property.c"
11 | "property_handlers/minimum_rotation_property.c"
12 | "property_handlers/color_property.c"
13 | "property_handlers/motion_property.c"
14 | INCLUDE_DIRS "include"
15 | REQUIRES json chain_comm_abi module)
16 |
17 |
--------------------------------------------------------------------------------
/software/controller/components/property_handler/include/firmware_update_property.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "module.h"
4 |
5 | esp_err_t firmware_update_property_set(module_t *module, uint16_t index, const uint8_t *data);
6 |
--------------------------------------------------------------------------------
/software/controller/components/property_handler/include/property_handler.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "property_handler_common.h"
4 |
5 | const property_handler_t *property_handler_get_by_id(property_id_t id);
6 |
--------------------------------------------------------------------------------
/software/controller/components/property_handler/include/property_handler_command.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "esp_err.h"
4 | #include "module.h"
5 |
6 | /**
7 | * \brief Set the command property of a module.
8 | *
9 | * \param[in] module The module to set the property of.
10 | * \param[in] command The command to set.
11 | *
12 | * \return esp_err_t
13 | */
14 | esp_err_t property_handler_command_set(module_t *module, command_property_t command);
--------------------------------------------------------------------------------
/software/controller/components/property_handler/include/property_handler_common.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include
4 | #include
5 | #include
6 |
7 | #include "cJSON.h"
8 | #include "chain_comm_abi.h"
9 | #include "esp_err.h"
10 | #include "esp_log.h"
11 | #include "module.h"
12 |
13 | typedef esp_err_t (*property_handler_from_json_handler_cb)(module_t *module, const cJSON *json);
14 | typedef esp_err_t (*property_handler_to_json_handler_cb)(cJSON **json, const module_t *module);
15 | typedef esp_err_t (*property_handler_from_binary_handler_cb)(module_t *module, const uint8_t *bin, uint16_t bin_size);
16 | typedef esp_err_t (*property_handler_to_binary_handler_cb)(uint8_t **bin, uint16_t *bin_size, const module_t *module);
17 | typedef bool (*property_handler_compare_cb)(const module_t *module_a, const module_t *module_b);
18 |
19 | typedef struct {
20 | property_id_t id; /**< Used as key in binary. */
21 | property_handler_from_json_handler_cb from_json;
22 | property_handler_to_json_handler_cb to_json;
23 | property_handler_from_binary_handler_cb from_binary;
24 | property_handler_to_binary_handler_cb to_binary;
25 | property_handler_compare_cb compare;
26 | } property_handler_t;
27 |
--------------------------------------------------------------------------------
/software/controller/components/property_handler/property_handler.c:
--------------------------------------------------------------------------------
1 | #include "property_handler.h"
2 | #include
3 |
4 | extern const property_handler_t PROPERTY_HANDLER_OFFSET;
5 | extern const property_handler_t PROPERTY_HANDLER_CHARACTER;
6 | extern const property_handler_t PROPERTY_HANDLER_CHARACTER_SET;
7 | extern const property_handler_t PROPERTY_HANDLER_COMMAND;
8 | extern const property_handler_t PROPERTY_HANDLER_MODULE_INFO;
9 | extern const property_handler_t PROPERTY_HANDLER_FIRMWARE_VERSION;
10 | extern const property_handler_t PROPERTY_HANDLER_FIRMWARE_UPDATE;
11 | extern const property_handler_t PROPERTY_HANDLER_MINIMUM_ROTATION;
12 | extern const property_handler_t PROPERTY_HANDLER_COLOR;
13 | extern const property_handler_t PROPERTY_HANDLER_MOTION;
14 |
15 | const property_handler_t *property_handler_get_by_id(property_id_t id)
16 | {
17 | static const property_handler_t *PROPERTY_HANDLERS[] = {
18 | &PROPERTY_HANDLER_OFFSET, &PROPERTY_HANDLER_CHARACTER, &PROPERTY_HANDLER_CHARACTER_SET,
19 | &PROPERTY_HANDLER_COMMAND, &PROPERTY_HANDLER_MODULE_INFO, &PROPERTY_HANDLER_FIRMWARE_VERSION,
20 | &PROPERTY_HANDLER_FIRMWARE_UPDATE, &PROPERTY_HANDLER_MINIMUM_ROTATION, &PROPERTY_HANDLER_COLOR,
21 | &PROPERTY_HANDLER_MOTION,
22 | };
23 |
24 | for (size_t i = 0; i < sizeof(PROPERTY_HANDLERS) / sizeof(PROPERTY_HANDLERS[0]); i++) {
25 | if (PROPERTY_HANDLERS[i]->id == id) {
26 | return PROPERTY_HANDLERS[i];
27 | }
28 | }
29 | return NULL; // Not found
30 | }
--------------------------------------------------------------------------------
/software/controller/components/property_handler/property_handlers/property_handler_common.c:
--------------------------------------------------------------------------------
1 | #include "property_handler_common.h"
2 |
3 | void *property_unique_to_shared(void *unique_property, const module_t *module_list, const size_t module_list_size,
4 | property_handler_compare_cb compare)
5 | {
6 | assert(unique_property != NULL);
7 | assert(module_list != NULL);
8 | assert(module_list_size > 0);
9 | assert(compare != NULL);
10 |
11 | for (size_t i = 0; i < module_list_size; i++) {
12 | if (compare(unique_property, &module_list[i])) {
13 | return &module_list[i];
14 | }
15 | }
16 |
17 | return NULL;
18 | }
--------------------------------------------------------------------------------
/software/controller/components/property_handler/test/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | idf_component_register(SRCS "test.c"
2 | INCLUDE_DIRS .
3 | PRIV_REQUIRES unity test_utils property_handler module chain_comm_abi)
--------------------------------------------------------------------------------
/software/controller/components/property_handler/test/pytest_property_handler.py:
--------------------------------------------------------------------------------
1 | import pytest
2 | from pytest_embedded_idf.dut import IdfDut
3 |
4 |
5 | @pytest.mark.esp32
6 | @pytest.mark.qemu
7 | @pytest.mark.parametrize("config", ["qemu"], indirect=True)
8 | def test_properties_unity_on_qemu(dut: IdfDut) -> None:
9 | dut.run_all_single_board_cases(group="qemu", reset=True)
10 |
--------------------------------------------------------------------------------
/software/controller/components/property_handler/test/test_partition_table.csv:
--------------------------------------------------------------------------------
1 | # Name, Type, SubType, Offset, Size, Flags
2 | nvs, data, nvs, 0x009000, 16K,
3 | otadata, data, ota, , 8K,
4 | phy_init, data, phy, , 4K,
5 | ota_0, app, ota_0, , 4M,
6 | ota_1, app, ota_1, , 4M,
7 | flash_test, data, fat, , 100K
--------------------------------------------------------------------------------
/software/controller/components/webserver/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | idf_component_register(
2 | SRCS
3 | "webserver.c"
4 | "webserver_api.c"
5 | INCLUDE_DIRS
6 | "include"
7 | EMBED_FILES
8 | "assets/index.html"
9 | "assets/style.css"
10 | "assets/script.js"
11 | "assets/favicon.svg"
12 | REQUIRES
13 | esp_http_server
14 | )
15 |
--------------------------------------------------------------------------------
/software/controller/components/webserver/include/webserver.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "esp_err.h"
4 | #include "webserver_api.h"
5 | #include "webserver_common.h"
6 |
7 | extern const uint8_t index_start[] asm("_binary_index_html_start");
8 | extern const uint8_t index_end[] asm("_binary_index_html_end");
9 | extern const uint8_t style_start[] asm("_binary_style_css_start");
10 | extern const uint8_t style_end[] asm("_binary_style_css_end");
11 | extern const uint8_t favicon_start[] asm("_binary_favicon_svg_start");
12 | extern const uint8_t favicon_end[] asm("_binary_favicon_svg_end");
13 | extern const uint8_t script_start[] asm("_binary_script_js_start");
14 | extern const uint8_t script_end[] asm("_binary_script_js_end");
15 |
16 | /**
17 | * \brief Initialize the webserver
18 | *
19 | * Initialize the webserver with the default configuration. Currently only one webserver is supported and it will be
20 | * started on port 80.
21 | *
22 | * \param[out] webserver_ctx_t Pointer to the webserver context
23 | *
24 | * \return esp_err_t
25 | */
26 | esp_err_t webserver_init(webserver_ctx_t *webserver_ctx);
--------------------------------------------------------------------------------
/software/controller/components/webserver/include/webserver_common.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "esp_http_server.h"
4 |
5 | /**
6 | * \brief Context of the webserver
7 | */
8 | typedef struct {
9 | httpd_handle_t server; /**< Handle to the HTTP server */
10 | } webserver_ctx_t;
11 |
--------------------------------------------------------------------------------
/software/controller/components/webserver/test/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | idf_component_register(SRCS "test.c"
2 | INCLUDE_DIRS .
3 | PRIV_REQUIRES unity test_utils webserver networking)
--------------------------------------------------------------------------------
/software/controller/components/webserver/test/test_partition_table.csv:
--------------------------------------------------------------------------------
1 | # Name, Type, SubType, Offset, Size, Flags
2 | nvs, data, nvs, 0x009000, 16K,
3 | otadata, data, ota, , 8K,
4 | phy_init, data, phy, , 4K,
5 | ota_0, app, ota_0, , 4M,
6 | ota_1, app, ota_1, , 4M,
7 | flash_test, data, fat, , 100K
--------------------------------------------------------------------------------
/software/controller/dependencies.lock:
--------------------------------------------------------------------------------
1 | dependencies:
2 | espressif/mdns:
3 | component_hash: 4e21149422be01c24d4b1d4dec64fa07d136d8c5d234e931f3ebf375cbde51a0
4 | dependencies:
5 | - name: idf
6 | require: private
7 | version: '>=5.0'
8 | source:
9 | registry_url: https://components.espressif.com/
10 | type: service
11 | version: 1.5.2
12 | idf:
13 | source:
14 | type: idf
15 | version: 5.3.1
16 | direct_dependencies:
17 | - espressif/mdns
18 | - idf
19 | manifest_hash: f8a3fc4bda2900315f13933fa1e2b2779f529ab4d2263bf2d8955150eda4008f
20 | target: esp32
21 | version: 2.0.0
22 |
--------------------------------------------------------------------------------
/software/controller/main/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | idf_component_register(
2 | SRCS
3 | "main.c"
4 | "utils.c"
5 | INCLUDE_DIRS
6 | "include"
7 | )
8 |
9 | # Check if QEMU is defined and add the define to the compiler flags
10 | if(QEMU)
11 | add_definitions(-DQEMU=1)
12 | endif()
--------------------------------------------------------------------------------
/software/controller/main/include/utils.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include
4 |
5 | /**
6 | * Extracts the major, minor and patch version numbers from a version string.
7 | *
8 | * \param[in] version_str The version string to extract the version numbers from.
9 | * \param[out] major The major version number.
10 | * \param[out] minor The minor version number.
11 | * \param[out] patch The patch version number.
12 | */
13 | void util_extract_version(const char *version_str, uint8_t *major, uint8_t *minor, uint8_t *patch);
--------------------------------------------------------------------------------
/software/controller/main/utils.c:
--------------------------------------------------------------------------------
1 | #include "utils.h"
2 | #include "esp_log.h"
3 |
4 | #include
5 | #include
6 |
7 | #define TAG "UTILS"
8 |
9 | void util_extract_version(const char *version_str, uint8_t *major, uint8_t *minor, uint8_t *patch)
10 | {
11 | char version_copy[32];
12 | strncpy(version_copy, version_str, sizeof(version_copy) - 1);
13 | version_copy[sizeof(version_copy) - 1] = '\0';
14 |
15 | char *token = strtok(version_copy, "v.-");
16 | if (token != NULL) {
17 | *major = atoi(token);
18 | token = strtok(NULL, "v.-");
19 | if (token != NULL) {
20 | *minor = atoi(token);
21 | token = strtok(NULL, "v.-");
22 | if (token != NULL) {
23 | *patch = atoi(token);
24 | } else {
25 | ESP_LOGE(TAG, "Failed to extract patch version");
26 | }
27 | } else {
28 | ESP_LOGE(TAG, "Failed to extract minor version");
29 | }
30 | } else {
31 | ESP_LOGE(TAG, "Failed to extract major version");
32 | }
33 | }
--------------------------------------------------------------------------------
/software/controller/partition_table.csv:
--------------------------------------------------------------------------------
1 | # Name, Type, SubType, Offset, Size, Flags
2 | nvs, data, nvs, 0x009000, 0x4000,
3 | otadata, data, ota, 0x00d000, 0x2000,
4 | phy_init, data, phy, 0x00f000, 0x1000,
5 | ota_0, app, ota_0, 0x010000, 0x180000,
6 | ota_1, app, ota_1, 0x190000, 0x180000,
--------------------------------------------------------------------------------
/software/controller/pytest.ini:
--------------------------------------------------------------------------------
1 | [pytest]
2 | # only the files with prefix `test_` would be recognized as pytest test scripts.
3 | python_files = pytest_*.py
4 |
5 | # additional options for pytest
6 | addopts =
7 | --target esp32
8 | -s
9 | --tb short
10 |
11 | filterwarnings =
12 | ignore::FutureWarning
13 |
14 | # log related
15 | log_cli = True
16 | log_cli_level = INFO
17 | log_cli_format = %(asctime)s %(levelname)s %(message)s
18 | log_cli_date_format = %Y-%m-%d %H:%M:%S
19 |
20 | # junit related
21 | junit_family = xunit1
22 | junit_logging = stdout
23 | junit_log_passing_tests = False
24 |
25 | markers =
26 | qemu: mark a test to run on the qemu target
27 | target: mark a test to run on the esp32 target
--------------------------------------------------------------------------------
/software/controller_old/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | # For more information about build system see
2 | # https://docs.espressif.com/projects/esp-idf/en/latest/api-guides/build-system.html
3 | # The following five lines of boilerplate have to be in your project's
4 | # CMakeLists in this exact order for cmake to work correctly
5 | cmake_minimum_required(VERSION 3.5)
6 |
7 | include($ENV{IDF_PATH}/tools/cmake/project.cmake)
8 | include_directories("${CMAKE_SOURCE_DIR}/../common/include")
9 |
10 | project(split-flap-controller)
11 |
--------------------------------------------------------------------------------
/software/controller_old/README.md:
--------------------------------------------------------------------------------
1 | Open Flap Controller
2 | ====================
3 |
4 | The open flap controller is based on the esp32-wroom module. The module is programmed with the esp-idf. More information about the working with esp-idf can be found [here](https://www.espressif.com/en/products/sdks/esp-idf).
5 |
6 | Debug Over TCP Socket:
7 | ----------------------
8 | The controller exposes tcp socket on port ```1234```, a client connecting to this port will receive debug information about the operation of the controller.
9 | Connect to the port using:
10 | ```
11 | nc openflap.local 1234
12 | ```
13 | Or using the ```logcat.sh``` script:
14 | ```
15 | ./logcat.sh
16 | ```
17 |
18 | Over-The-Air Firmware Update:
19 | -----------------------------
20 | A new ```.bin``` file can be uploaded through the controller hosted webpage. Alternatively, the ```update.sh``` script can be used. This script use the latest binary from the build directory.
21 |
22 | ```
23 | ./update.sh
24 | ```
25 |
26 |
27 | generate single nvs image:
28 | --------------------------
29 | Set according values in ```nvs_data.csv```
30 | ```
31 | ${IDF_PATH}/components/nvs_flash/nvs_partition_generator/nvs_partition_gen.py generate --outdir build nvs_data.csv nvs.bin 0x4000
32 | ```
33 |
34 | flash nvs partition images and firmware:
35 | ----------------------------------------
36 | ```
37 | esptool.py -p /dev/ttyUSB0 -b 460800 --before=default_reset --after=hard_reset write_flash --flash_mode dio --flash_freq 40m --flash_size 4MB 0x1000 build/bootloader/bootloader.bin 0x10000 build/split-flap-controller.bin 0x8000 build/partition_table/partition-table.bin 0xd000 build/ota_data_initial.bin 0x9000 build/nvs.bin
38 | ```
39 |
--------------------------------------------------------------------------------
/software/controller_old/components/openflap_common/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | set(CHAIN_COMM_ABI_SOURCE_DIR ${CMAKE_SOURCE_DIR}/../common/chain_comm_abi)
2 |
3 | MESSAGE(STATUS ${CHAIN_COMM_ABI_SOURCE_DIR})
4 | idf_component_register(
5 | SRCS ${CHAIN_COMM_ABI_SOURCE_DIR}/src/chain_comm_abi.c
6 | INCLUDE_DIRS ${CHAIN_COMM_ABI_SOURCE_DIR}/inc
7 | )
8 |
--------------------------------------------------------------------------------
/software/controller_old/dependencies.lock:
--------------------------------------------------------------------------------
1 | dependencies:
2 | espressif/mdns:
3 | component_hash: af6306fe65d637a3683d1cf671508fcedd6b05f9ca029a8815abeab64001fb8d
4 | dependencies:
5 | - name: idf
6 | require: private
7 | version: '>=5.0'
8 | source:
9 | registry_url: https://components.espressif.com/
10 | type: service
11 | version: 1.4.0
12 | idf:
13 | source:
14 | type: idf
15 | version: 5.3.1
16 | direct_dependencies:
17 | - espressif/mdns
18 | - idf
19 | manifest_hash: 69960afeafe2dccf72a3560edca69cd2bd34f025d29348ce6bae4c28305be45e
20 | target: esp32
21 | version: 2.0.0
22 |
--------------------------------------------------------------------------------
/software/controller_old/logcat.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | nc openflap.local 1234
--------------------------------------------------------------------------------
/software/controller_old/main/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | set(srcs
2 | "${COMPONENT_DIR}/main.c"
3 | "${COMPONENT_DIR}/flap_nvs.c"
4 | "${COMPONENT_DIR}/flap_wifi.c"
5 | "${COMPONENT_DIR}/flap_http_server.c"
6 | "${COMPONENT_DIR}/flap_mdns.c"
7 | "${COMPONENT_DIR}/flap_firmware.c"
8 | "${COMPONENT_DIR}/flap_socket_server.c"
9 | "${COMPONENT_DIR}/flap_uart.c"
10 | "${COMPONENT_DIR}/board_io.c"
11 | "${COMPONENT_DIR}/HttpApi/HttpApi.c"
12 | "${COMPONENT_DIR}/UartApi/UartApi.c"
13 | "${COMPONENT_DIR}/OpenFlapModel/Model.c"
14 | )
15 |
16 | set(inc_dir
17 | "${COMPONENT_DIR}/include"
18 | "${COMPONENT_DIR}/HttpApi/include"
19 | "${COMPONENT_DIR}/UartApi/include"
20 | "${COMPONENT_DIR}/OpenFlapModel/include"
21 | )
22 |
23 | set(embed_bin
24 | "${COMPONENT_DIR}/html/index.html"
25 | "${COMPONENT_DIR}/html/style.css"
26 | "${COMPONENT_DIR}/html/script.js"
27 | "${COMPONENT_DIR}/html/favicon.svg"
28 | )
29 |
30 | idf_component_register(
31 | SRCS "${srcs}"
32 | INCLUDE_DIRS "${inc_dir}"
33 | EMBED_FILES "${embed_bin}"
34 | # EMBED_TXTFILES "${embed_txt}"
35 | )
--------------------------------------------------------------------------------
/software/controller_old/main/HttpApi/include/HttpApi.h:
--------------------------------------------------------------------------------
1 | #ifndef API_H
2 | #define API_H
3 |
4 | #include
5 | #include
6 | #include
7 | #include
8 |
9 | #include "cJSON.h"
10 | #include "esp_http_server.h"
11 | #include "esp_log.h"
12 | #include "freertos/FreeRTOS.h"
13 | #include "freertos/task.h"
14 |
15 | #include "Model.h"
16 | #include "UartApi.h"
17 |
18 | #define MAX_HTTP_BODY_SIZE 2048
19 |
20 | #define LARGE_REQUEST_GUARD(_req) \
21 | if (_req->content_len > MAX_HTTP_BODY_SIZE) { \
22 | httpd_resp_set_status(_req, "413 Payload Too Large"); \
23 | httpd_resp_send(_req, NULL, 0); \
24 | return ESP_OK; \
25 | }
26 |
27 | void http_moduleEndpointInit();
28 |
29 | #endif
--------------------------------------------------------------------------------
/software/controller_old/main/UartApi/include/UartApi.h:
--------------------------------------------------------------------------------
1 | #ifndef UART_API_H
2 | #define UART_API_H
3 |
4 | #include
5 | #include
6 | #include
7 | #include
8 | #include
9 |
10 | #include "freertos/FreeRTOS.h"
11 | #include "freertos/task.h"
12 |
13 | #include "esp_log.h"
14 |
15 | #include "flap_uart.h"
16 | #include "chain_comm_abi.h"
17 |
18 | void uart_api_init();
19 |
20 | #endif
--------------------------------------------------------------------------------
/software/controller_old/main/flap_mdns.c:
--------------------------------------------------------------------------------
1 | #include "flap_mdns.h"
2 |
3 | static const char *TAG = "[MDNS]";
4 |
5 | void flap_mdns_init(char* hostname)
6 | {
7 | ESP_ERROR_CHECK(mdns_init());
8 | ESP_LOGI(TAG, "mdns hostname set to: [%s]", hostname);
9 | ESP_ERROR_CHECK(mdns_hostname_set(hostname));
10 | mdns_service_add(NULL, "_http", "_tcp", 80, NULL, 0);
11 |
12 | char *delegated_hostname;
13 | if (-1 == asprintf(&delegated_hostname, "%s-delegated", hostname)) abort();
14 |
15 | mdns_ip_addr_t addr4, addr6;
16 | esp_netif_str_to_ip4("10.0.0.1", &addr4.addr.u_addr.ip4);
17 | addr4.addr.type = ESP_IPADDR_TYPE_V4;
18 | esp_netif_str_to_ip6("fd11:22::1", &addr6.addr.u_addr.ip6);
19 | addr6.addr.type = ESP_IPADDR_TYPE_V6;
20 | addr4.next = &addr6;
21 | addr6.next = NULL;
22 | ESP_ERROR_CHECK( mdns_delegate_hostname_add(delegated_hostname, &addr4) );
23 | ESP_ERROR_CHECK( mdns_service_add_for_host(NULL, "_http", "_tcp", delegated_hostname, 80, NULL, 0) );
24 | free(delegated_hostname);
25 | }
--------------------------------------------------------------------------------
/software/controller_old/main/idf_component.yml:
--------------------------------------------------------------------------------
1 | ## IDF Component Manager Manifest File
2 | dependencies:
3 | espressif/mdns: ">=1.4.0"
4 | ## Required IDF version
5 | idf:
6 | version: ">=5.2.0"
7 | # # Put list of dependencies here
8 | # # For components maintained by Espressif:
9 | # component: "~1.0.0"
10 | # # For 3rd party components:
11 | # username/component: ">=1.0.0,<2.0.0"
12 | # username2/component2:
13 | # version: "~1.0.0"
14 | # # For transient dependencies `public` flag can be set.
15 | # # `public` flag doesn't have an effect dependencies of the `main` component.
16 | # # All dependencies of `main` are public by default.
17 | # public: true
18 |
--------------------------------------------------------------------------------
/software/controller_old/main/include/board_io.h:
--------------------------------------------------------------------------------
1 | #ifndef BOARD_IO_H
2 | #define BOARD_IO_H
3 |
4 | #include "driver/gpio.h"
5 | #include "driver/ledc.h"
6 |
7 | #define FLAP_ENABLE_PIN GPIO_NUM_2
8 | #define MODE_BTN_PIN GPIO_NUM_33
9 |
10 | #define LEDC_HS_TIMER LEDC_TIMER_0
11 | #define LEDC_HS_MODE LEDC_LOW_SPEED_MODE
12 | #define LEDC_RED_GPIO GPIO_NUM_32
13 | #define LEDC_RED_CHANNEL LEDC_CHANNEL_0
14 | #define LEDC_GREEN_GPIO GPIO_NUM_12
15 | #define LEDC_GREEN_CHANNEL LEDC_CHANNEL_1
16 | #define LEDC_BLUE_GPIO GPIO_NUM_14
17 | #define LEDC_BLUE_CHANNEL LEDC_CHANNEL_2
18 | #define LEDC_RGB_CH_NUM (3)
19 | #define LEDC_RGB_DUTY (4000)
20 | #define LEDC_RGB_FADE_TIME (3000)
21 |
22 | void board_io_init();
23 |
24 | void setLed(uint8_t red, uint8_t green, uint8_t blue);
25 |
26 | #endif
--------------------------------------------------------------------------------
/software/controller_old/main/include/flap_firmware.h:
--------------------------------------------------------------------------------
1 | #ifndef FIRMWARE_H
2 | #define FIRMWARE_H
3 |
4 | #include
5 | #include
6 | #include
7 |
8 | #include "esp_wifi.h"
9 | #include "esp_ota_ops.h"
10 | #include "esp_system.h"
11 | #include "esp_log.h"
12 | #include "flap_uart.h"
13 |
14 | #include "Model.h"
15 |
16 | void flap_verify_controller_firmware();
17 | void flap_controller_firmware_update(char *data,size_t data_len,size_t data_offset,size_t total_data_len);
18 | void flap_module_firmware_update(char *data,size_t data_len,size_t data_offset,size_t total_data_len);
19 | #endif
--------------------------------------------------------------------------------
/software/controller_old/main/include/flap_mdns.h:
--------------------------------------------------------------------------------
1 | #ifndef FLAP_MDNS_H
2 | #define FLAP_MDNS_H
3 |
4 | #include "esp_system.h"
5 | #include "esp_log.h"
6 | #include "mdns.h"
7 |
8 | void flap_mdns_init(char* hostname);
9 |
10 | #endif
--------------------------------------------------------------------------------
/software/controller_old/main/include/flap_nvs.h:
--------------------------------------------------------------------------------
1 | #ifndef FLAP_NVS_H
2 | #define FLAP_NVS_H
3 |
4 | #include "esp_log.h"
5 | #include "esp_system.h"
6 | #include "esp_err.h"
7 |
8 | #include "nvs_flash.h"
9 | #include "nvs.h"
10 |
11 | esp_err_t nvs_init();
12 | esp_err_t flap_nvs_erase_key(char *field_key);
13 | esp_err_t flap_nvs_get_string(char *field_key, char **field_value);
14 | esp_err_t flap_nvs_set_string(char *field_key, char *field_value);
15 |
16 | #endif
--------------------------------------------------------------------------------
/software/controller_old/main/include/flap_socket_server.h:
--------------------------------------------------------------------------------
1 | #ifndef FLAP_SOCKET_SERVER_H
2 | #define FLAP_SOCKET_SERVER_H
3 |
4 |
5 | #include
6 | #include
7 | #include "freertos/FreeRTOS.h"
8 | #include "freertos/task.h"
9 | #include "esp_system.h"
10 | #include "esp_wifi.h"
11 | #include "esp_event.h"
12 | #include "esp_log.h"
13 | #include "nvs_flash.h"
14 | #include "esp_netif.h"
15 |
16 | #include
17 | #include "lwip/err.h"
18 | #include "lwip/sockets.h"
19 | #include "lwip/sys.h"
20 | #include
21 |
22 |
23 | #define PORT 1234
24 | #define KEEPALIVE_IDLE 5
25 | #define KEEPALIVE_INTERVAL 5
26 | #define KEEPALIVE_COUNT 3
27 |
28 | void flap_init_socket_server(void);
29 |
30 | #endif
--------------------------------------------------------------------------------
/software/controller_old/main/include/flap_wifi.h:
--------------------------------------------------------------------------------
1 | #ifndef FLAP_WIFI_H
2 | #define FLAP_WIFI_H
3 |
4 | #include
5 | #include "freertos/FreeRTOS.h"
6 | #include "freertos/task.h"
7 | #include "freertos/event_groups.h"
8 | #include "esp_system.h"
9 | #include "esp_wifi.h"
10 | #include "esp_event.h"
11 | #include "esp_log.h"
12 | #include "esp_mac.h"
13 | #include "flap_mdns.h"
14 |
15 | void flap_wifi_init_apsta(char* sta_ssid, char* sta_pwd, char* ap_ssid, char* ap_pwd);
16 |
17 | #endif
--------------------------------------------------------------------------------
/software/controller_old/managed_components/espressif__mdns/.component_hash:
--------------------------------------------------------------------------------
1 | af6306fe65d637a3683d1cf671508fcedd6b05f9ca029a8815abeab64001fb8d
--------------------------------------------------------------------------------
/software/controller_old/managed_components/espressif__mdns/.cz.yaml:
--------------------------------------------------------------------------------
1 | ---
2 | commitizen:
3 | bump_message: 'bump(mdns): $current_version -> $new_version'
4 | pre_bump_hooks: python ../../ci/changelog.py mdns
5 | tag_format: mdns-v$version
6 | version: 1.4.0
7 | version_files:
8 | - idf_component.yml
9 |
--------------------------------------------------------------------------------
/software/controller_old/managed_components/espressif__mdns/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | if(CONFIG_MDNS_NETWORKING_SOCKET)
2 | set(MDNS_NETWORKING "mdns_networking_socket.c")
3 | else()
4 | set(MDNS_NETWORKING "mdns_networking_lwip.c")
5 | endif()
6 |
7 | if(CONFIG_MDNS_ENABLE_CONSOLE_CLI)
8 | set(MDNS_CONSOLE "mdns_console.c")
9 | else()
10 | set(MDNS_CONSOLE "")
11 | endif()
12 |
13 | idf_build_get_property(target IDF_TARGET)
14 | if(${target} STREQUAL "linux")
15 | set(dependencies esp_netif_linux esp_event)
16 | set(private_dependencies esp_timer console esp_system)
17 | set(srcs "mdns.c" ${MDNS_NETWORKING} ${MDNS_CONSOLE})
18 | else()
19 | set(dependencies lwip console esp_netif)
20 | set(private_dependencies esp_timer esp_wifi)
21 | set(srcs "mdns.c" ${MDNS_NETWORKING} ${MDNS_CONSOLE})
22 | endif()
23 |
24 | idf_component_register(
25 | SRCS ${srcs}
26 | INCLUDE_DIRS "include"
27 | PRIV_INCLUDE_DIRS "private_include"
28 | REQUIRES ${dependencies}
29 | PRIV_REQUIRES ${private_dependencies})
30 |
31 | if(${target} STREQUAL "linux")
32 | target_link_libraries(${COMPONENT_LIB} PRIVATE "-lbsd")
33 | endif()
34 |
35 |
36 | if(CONFIG_ETH_ENABLED)
37 | idf_component_optional_requires(PRIVATE esp_eth)
38 | endif()
39 |
--------------------------------------------------------------------------------
/software/controller_old/managed_components/espressif__mdns/README.md:
--------------------------------------------------------------------------------
1 | # mDNS Service
2 |
3 | [](https://components.espressif.com/components/espressif/mdns)
4 |
5 | mDNS is a multicast UDP service that is used to provide local network service and host discovery.
6 |
7 | ## Examples
8 |
9 | Get started with example test [Example](https://github.com/espressif/esp-protocols/tree/master/components/mdns/examples):
10 |
11 | ## Documentation
12 |
13 | * View the full [documentation(English)](https://docs.espressif.com/projects/esp-protocols/mdns/docs/latest/en/index.html)
14 | * View the full [documentation(Chinese)](https://docs.espressif.com/projects/esp-protocols/mdns/docs/latest/zh_CN/index.html)
15 |
--------------------------------------------------------------------------------
/software/controller_old/managed_components/espressif__mdns/examples/query_advertise/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | # The following lines of boilerplate have to be in your project's CMakeLists
2 | # in this exact order for cmake to work correctly
3 | cmake_minimum_required(VERSION 3.5)
4 |
5 | include($ENV{IDF_PATH}/tools/cmake/project.cmake)
6 | project(query_advertise)
7 |
--------------------------------------------------------------------------------
/software/controller_old/managed_components/espressif__mdns/examples/query_advertise/main/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | idf_component_register(SRCS "mdns_example_main.c"
2 | INCLUDE_DIRS ".")
3 |
--------------------------------------------------------------------------------
/software/controller_old/managed_components/espressif__mdns/examples/query_advertise/main/idf_component.yml:
--------------------------------------------------------------------------------
1 | dependencies:
2 | ## Required IDF version
3 | idf: ">=5.0"
4 | espressif/mdns:
5 | version: "^1.0.0"
6 | override_path: "../../../"
7 | protocol_examples_common:
8 | path: ${IDF_PATH}/examples/common_components/protocol_examples_common
9 |
--------------------------------------------------------------------------------
/software/controller_old/managed_components/espressif__mdns/examples/query_advertise/sdkconfig.ci.eth_custom_netif:
--------------------------------------------------------------------------------
1 | CONFIG_IDF_TARGET="esp32"
2 | CONFIG_MDNS_RESOLVE_TEST_SERVICES=y
3 | CONFIG_MDNS_ADD_MAC_TO_HOSTNAME=y
4 | CONFIG_MDNS_PUBLISH_DELEGATE_HOST=y
5 | CONFIG_MDNS_PREDEF_NETIF_STA=n
6 | CONFIG_MDNS_PREDEF_NETIF_AP=n
7 | CONFIG_MDNS_PREDEF_NETIF_ETH=n
8 | CONFIG_MDNS_ADD_CUSTOM_NETIF=y
9 | CONFIG_MDNS_RESPOND_REVERSE_QUERIES=y
10 | CONFIG_LWIP_DNS_SUPPORT_MDNS_QUERIES=y
11 | CONFIG_EXAMPLE_CONNECT_ETHERNET=y
12 | CONFIG_EXAMPLE_CONNECT_WIFI=n
13 | CONFIG_EXAMPLE_USE_INTERNAL_ETHERNET=y
14 | CONFIG_EXAMPLE_ETH_PHY_IP101=y
15 | CONFIG_EXAMPLE_ETH_MDC_GPIO=23
16 | CONFIG_EXAMPLE_ETH_MDIO_GPIO=18
17 | CONFIG_EXAMPLE_ETH_PHY_RST_GPIO=5
18 | CONFIG_EXAMPLE_ETH_PHY_ADDR=1
19 | CONFIG_EXAMPLE_CONNECT_IPV6=y
20 | CONFIG_MDNS_BUTTON_GPIO=32
21 |
--------------------------------------------------------------------------------
/software/controller_old/managed_components/espressif__mdns/examples/query_advertise/sdkconfig.ci.eth_def:
--------------------------------------------------------------------------------
1 | CONFIG_IDF_TARGET="esp32"
2 | CONFIG_MDNS_RESOLVE_TEST_SERVICES=y
3 | CONFIG_MDNS_ADD_MAC_TO_HOSTNAME=y
4 | CONFIG_MDNS_PUBLISH_DELEGATE_HOST=y
5 | CONFIG_LWIP_DNS_SUPPORT_MDNS_QUERIES=y
6 | CONFIG_EXAMPLE_CONNECT_ETHERNET=y
7 | CONFIG_EXAMPLE_CONNECT_WIFI=n
8 | CONFIG_EXAMPLE_USE_INTERNAL_ETHERNET=y
9 | CONFIG_EXAMPLE_ETH_PHY_IP101=y
10 | CONFIG_EXAMPLE_ETH_MDC_GPIO=23
11 | CONFIG_EXAMPLE_ETH_MDIO_GPIO=18
12 | CONFIG_EXAMPLE_ETH_PHY_RST_GPIO=5
13 | CONFIG_EXAMPLE_ETH_PHY_ADDR=1
14 | CONFIG_EXAMPLE_CONNECT_IPV6=y
15 | CONFIG_MDNS_BUTTON_GPIO=32
16 |
--------------------------------------------------------------------------------
/software/controller_old/managed_components/espressif__mdns/examples/query_advertise/sdkconfig.ci.eth_no_ipv4:
--------------------------------------------------------------------------------
1 | CONFIG_IDF_TARGET="esp32"
2 | CONFIG_MDNS_RESOLVE_TEST_SERVICES=y
3 | CONFIG_MDNS_ADD_MAC_TO_HOSTNAME=y
4 | CONFIG_MDNS_PUBLISH_DELEGATE_HOST=y
5 | CONFIG_LWIP_DNS_SUPPORT_MDNS_QUERIES=y
6 | CONFIG_LWIP_IPV4=n
7 | CONFIG_EXAMPLE_CONNECT_ETHERNET=y
8 | CONFIG_EXAMPLE_CONNECT_WIFI=n
9 | CONFIG_EXAMPLE_USE_INTERNAL_ETHERNET=y
10 | CONFIG_EXAMPLE_ETH_PHY_IP101=y
11 | CONFIG_EXAMPLE_ETH_MDC_GPIO=23
12 | CONFIG_EXAMPLE_ETH_MDIO_GPIO=18
13 | CONFIG_EXAMPLE_ETH_PHY_RST_GPIO=5
14 | CONFIG_EXAMPLE_ETH_PHY_ADDR=1
15 | CONFIG_MDNS_BUTTON_GPIO=32
16 |
--------------------------------------------------------------------------------
/software/controller_old/managed_components/espressif__mdns/examples/query_advertise/sdkconfig.ci.eth_no_ipv6:
--------------------------------------------------------------------------------
1 | CONFIG_IDF_TARGET="esp32"
2 | CONFIG_MDNS_RESOLVE_TEST_SERVICES=y
3 | CONFIG_MDNS_ADD_MAC_TO_HOSTNAME=y
4 | CONFIG_MDNS_PUBLISH_DELEGATE_HOST=y
5 | CONFIG_LWIP_DNS_SUPPORT_MDNS_QUERIES=y
6 | CONFIG_LWIP_IPV6=n
7 | CONFIG_EXAMPLE_CONNECT_IPV6=n
8 | CONFIG_EXAMPLE_CONNECT_ETHERNET=y
9 | CONFIG_EXAMPLE_CONNECT_WIFI=n
10 | CONFIG_EXAMPLE_USE_INTERNAL_ETHERNET=y
11 | CONFIG_EXAMPLE_ETH_PHY_IP101=y
12 | CONFIG_EXAMPLE_ETH_MDC_GPIO=23
13 | CONFIG_EXAMPLE_ETH_MDIO_GPIO=18
14 | CONFIG_EXAMPLE_ETH_PHY_RST_GPIO=5
15 | CONFIG_EXAMPLE_ETH_PHY_ADDR=1
16 | CONFIG_MDNS_BUTTON_GPIO=32
17 |
--------------------------------------------------------------------------------
/software/controller_old/managed_components/espressif__mdns/examples/query_advertise/sdkconfig.ci.eth_socket:
--------------------------------------------------------------------------------
1 | CONFIG_IDF_TARGET="esp32"
2 | CONFIG_MDNS_RESOLVE_TEST_SERVICES=y
3 | CONFIG_MDNS_ADD_MAC_TO_HOSTNAME=y
4 | CONFIG_MDNS_PUBLISH_DELEGATE_HOST=y
5 | CONFIG_MDNS_NETWORKING_SOCKET=y
6 | CONFIG_LWIP_DNS_SUPPORT_MDNS_QUERIES=y
7 | CONFIG_EXAMPLE_CONNECT_ETHERNET=y
8 | CONFIG_EXAMPLE_CONNECT_WIFI=n
9 | CONFIG_EXAMPLE_USE_INTERNAL_ETHERNET=y
10 | CONFIG_EXAMPLE_ETH_PHY_IP101=y
11 | CONFIG_EXAMPLE_ETH_MDC_GPIO=23
12 | CONFIG_EXAMPLE_ETH_MDIO_GPIO=18
13 | CONFIG_EXAMPLE_ETH_PHY_RST_GPIO=5
14 | CONFIG_EXAMPLE_ETH_PHY_ADDR=1
15 | CONFIG_EXAMPLE_CONNECT_IPV6=y
16 | CONFIG_MDNS_BUTTON_GPIO=32
17 |
--------------------------------------------------------------------------------
/software/controller_old/managed_components/espressif__mdns/idf_component.yml:
--------------------------------------------------------------------------------
1 | dependencies:
2 | idf:
3 | version: '>=5.0'
4 | description: mDNS
5 | repository: git://github.com/espressif/esp-protocols.git
6 | repository_info:
7 | commit_sha: 73c48307a367565f69e724df8641f8cbac45251d
8 | path: components/mdns
9 | url: https://github.com/espressif/esp-protocols/tree/master/components/mdns
10 | version: 1.4.0
11 |
--------------------------------------------------------------------------------
/software/controller_old/managed_components/espressif__mdns/include/mdns_console.h:
--------------------------------------------------------------------------------
1 | /*
2 | * SPDX-FileCopyrightText: 2015-2022 Espressif Systems (Shanghai) CO LTD
3 | *
4 | * SPDX-License-Identifier: Apache-2.0
5 | */
6 | #ifndef _MDNS_CONSOLE_H_
7 | #define _MDNS_CONSOLE_H_
8 |
9 | /**
10 | * @brief Register MDNS functions with the console component
11 | */
12 | void mdns_console_register(void);
13 |
14 | #endif /* _MDNS_CONSOLE_H_ */
15 |
--------------------------------------------------------------------------------
/software/controller_old/managed_components/espressif__mdns/private_include/mdns_networking.h:
--------------------------------------------------------------------------------
1 | /*
2 | * SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
3 | *
4 | * SPDX-License-Identifier: Apache-2.0
5 | */
6 | #ifndef ESP_MDNS_NETWORKING_H_
7 | #define ESP_MDNS_NETWORKING_H_
8 |
9 | /*
10 | * MDNS Server Networking -- private include
11 | *
12 | */
13 | #include "mdns.h"
14 | #include "mdns_private.h"
15 |
16 |
17 | /**
18 | * @brief Queue RX packet action
19 | */
20 | esp_err_t _mdns_send_rx_action(mdns_rx_packet_t *packet);
21 |
22 | bool mdns_is_netif_ready(mdns_if_t tcpip_if, mdns_ip_protocol_t ip_protocol);
23 |
24 | /**
25 | * @brief Start PCB
26 | */
27 | esp_err_t _mdns_pcb_init(mdns_if_t tcpip_if, mdns_ip_protocol_t ip_protocol);
28 |
29 | /**
30 | * @brief Stop PCB
31 | */
32 | esp_err_t _mdns_pcb_deinit(mdns_if_t tcpip_if, mdns_ip_protocol_t ip_protocol);
33 |
34 | /**
35 | * @brief send packet over UDP
36 | *
37 | * @param server The server
38 | * @param data byte array containing the packet data
39 | * @param len length of the packet data
40 | *
41 | * @return length of sent packet or 0 on error
42 | */
43 | size_t _mdns_udp_pcb_write(mdns_if_t tcpip_if, mdns_ip_protocol_t ip_protocol, const esp_ip_addr_t *ip, uint16_t port, uint8_t *data, size_t len);
44 |
45 | /**
46 | * @brief Gets data pointer to the mDNS packet
47 | */
48 | void *_mdns_get_packet_data(mdns_rx_packet_t *packet);
49 |
50 | /**
51 | * @brief Gets data length of c
52 | */
53 | size_t _mdns_get_packet_len(mdns_rx_packet_t *packet);
54 |
55 | /**
56 | * @brief Free the mDNS packet
57 | */
58 | void _mdns_packet_free(mdns_rx_packet_t *packet);
59 |
60 | #endif /* ESP_MDNS_NETWORKING_H_ */
61 |
--------------------------------------------------------------------------------
/software/controller_old/managed_components/espressif__mdns/tests/host_test/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | cmake_minimum_required(VERSION 3.5)
2 |
3 |
4 | include($ENV{IDF_PATH}/tools/cmake/project.cmake)
5 | if(${IDF_TARGET} STREQUAL "linux")
6 | set(EXTRA_COMPONENT_DIRS "../../../../common_components/linux_compat")
7 | set(COMPONENTS main)
8 | endif()
9 |
10 | project(mdns_host)
11 |
12 | # Enable sanitizers only without console (we'd see some leaks on argtable when console exits)
13 | if(NOT CONFIG_TEST_CONSOLE AND CONFIG_IDF_TARGET_LINUX)
14 | idf_component_get_property(mdns mdns COMPONENT_LIB)
15 | target_link_options(${mdns} INTERFACE -fsanitize=address -fsanitize=undefined)
16 | endif()
17 |
--------------------------------------------------------------------------------
/software/controller_old/managed_components/espressif__mdns/tests/host_test/README.md:
--------------------------------------------------------------------------------
1 | # Setup dummy network interfaces
2 |
3 | Note: Set two addresses so we could use one as source and another as destination
4 | ```
5 | sudo ip link add eth2 type dummy
6 | sudo ip addr add 192.168.1.200/24 dev eth2
7 | sudo ip addr add 192.168.1.201/24 dev eth2
8 | sudo ip link set eth2 up
9 | sudo ifconfig eth2 multicast
10 | ```
11 |
12 | # Dig on a specified interface
13 |
14 | ```
15 | dig +short -b 192.168.1.200 -p 5353 @224.0.0.251 myesp.local
16 | ```
17 |
18 | or a reverse query:
19 | ```
20 | dig +short -b 192.168.2.200 -p 5353 @224.0.0.251 -x 192.168.1.200
21 | ```
22 |
23 | # Run avahi to browse services
24 |
25 | Avahi needs the netif to have the "multicast" flag set
26 |
27 | ```bash
28 | david@david-comp:~/esp/idf (feature/mdns_networking_socket)$ avahi-browse -a -r -p
29 | +;eth2;IPv6;myesp-service2;Web Site;local
30 | +;eth2;IPv4;myesp-service2;Web Site;local
31 | =;eth2;IPv6;myesp-service2;Web Site;local;myesp.local;192.168.1.200;80;"board=esp32" "u=user" "p=password"
32 | =;eth2;IPv4;myesp-service2;Web Site;local;myesp.local;192.168.1.200;80;"board=esp32" "u=user" "p=password"
33 | ```
34 |
--------------------------------------------------------------------------------
/software/controller_old/managed_components/espressif__mdns/tests/host_test/components/esp_netif_linux/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | idf_build_get_property(idf_target IDF_TARGET)
2 | if(${IDF_TARGET} STREQUAL "linux")
3 | idf_component_register(SRCS esp_netif_linux.c
4 | INCLUDE_DIRS include $ENV{IDF_PATH}/components/esp_netif/include
5 | REQUIRES esp_event)
6 | else()
7 | idf_component_register()
8 | endif()
9 |
--------------------------------------------------------------------------------
/software/controller_old/managed_components/espressif__mdns/tests/host_test/components/esp_netif_linux/Kconfig:
--------------------------------------------------------------------------------
1 | menu "LWIP-MOCK-CONFIG"
2 |
3 | config LWIP_IPV6
4 | bool "Enable IPv6"
5 | default y
6 | help
7 | Enable/disable IPv6
8 |
9 | config LWIP_IPV4
10 | bool "Enable IPv4"
11 | default y
12 | help
13 | Enable/disable IPv4
14 |
15 | endmenu
16 |
--------------------------------------------------------------------------------
/software/controller_old/managed_components/espressif__mdns/tests/host_test/components/esp_netif_linux/include/esp_wifi_types.h:
--------------------------------------------------------------------------------
1 | /*
2 | * SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD
3 | *
4 | * SPDX-License-Identifier: Apache-2.0
5 | */
6 | #pragma once
7 | #include "esp_event.h"
8 |
--------------------------------------------------------------------------------
/software/controller_old/managed_components/espressif__mdns/tests/host_test/components/esp_netif_linux/include/machine/endian.h:
--------------------------------------------------------------------------------
1 | /*
2 | * SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD
3 | *
4 | * SPDX-License-Identifier: Apache-2.0
5 | */
6 | #pragma once
7 |
8 | #include_next "endian.h"
9 |
--------------------------------------------------------------------------------
/software/controller_old/managed_components/espressif__mdns/tests/host_test/main/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | idf_component_register(SRCS "main.c"
2 | INCLUDE_DIRS
3 | "."
4 | REQUIRES mdns console nvs_flash)
5 |
--------------------------------------------------------------------------------
/software/controller_old/managed_components/espressif__mdns/tests/host_test/main/Kconfig.projbuild:
--------------------------------------------------------------------------------
1 | menu "Test Configuration"
2 |
3 | config TEST_HOSTNAME
4 | string "mDNS Hostname"
5 | default "esp32-mdns"
6 | help
7 | mDNS Hostname for example to use
8 |
9 | config TEST_NETIF_NAME
10 | string "Network interface name"
11 | default "eth2"
12 | help
13 | Name/ID if the network interface on which we run the mDNS host test
14 |
15 | config TEST_CONSOLE
16 | bool "Start console"
17 | default n
18 | help
19 | Test uses esp_console for interactive testing.
20 |
21 | endmenu
22 |
--------------------------------------------------------------------------------
/software/controller_old/managed_components/espressif__mdns/tests/host_test/main/idf_component.yml:
--------------------------------------------------------------------------------
1 | dependencies:
2 | idf: ">=5.0"
3 | espressif/mdns:
4 | version: "^1.0.0"
5 | override_path: "../../.."
6 | protocol_examples_common:
7 | path: ${IDF_PATH}/examples/common_components/protocol_examples_common
8 |
--------------------------------------------------------------------------------
/software/controller_old/managed_components/espressif__mdns/tests/host_test/sdkconfig.ci.app:
--------------------------------------------------------------------------------
1 | CONFIG_IDF_TARGET="linux"
2 | CONFIG_TEST_HOSTNAME="myesp"
3 | CONFIG_MDNS_ENABLE_DEBUG_PRINTS=y
4 | CONFIG_MDNS_RESPOND_REVERSE_QUERIES=y
5 |
--------------------------------------------------------------------------------
/software/controller_old/managed_components/espressif__mdns/tests/host_test/sdkconfig.ci.console:
--------------------------------------------------------------------------------
1 | CONFIG_IDF_TARGET="linux"
2 | CONFIG_ESP_EVENT_POST_FROM_ISR=n
3 | CONFIG_MDNS_ENABLE_CONSOLE_CLI=y
4 | CONFIG_TEST_CONSOLE=y
5 |
--------------------------------------------------------------------------------
/software/controller_old/managed_components/espressif__mdns/tests/host_test/sdkconfig.ci.target:
--------------------------------------------------------------------------------
1 | CONFIG_IDF_TARGET="esp32"
2 |
--------------------------------------------------------------------------------
/software/controller_old/managed_components/espressif__mdns/tests/host_test/sdkconfig.defaults:
--------------------------------------------------------------------------------
1 | CONFIG_TEST_NETIF_NAME="eth0"
2 | CONFIG_ESP_EVENT_POST_FROM_ISR=n
3 | CONFIG_MDNS_NETWORKING_SOCKET=y
4 | CONFIG_MDNS_SKIP_SUPPRESSING_OWN_QUERIES=y
5 | CONFIG_MDNS_PREDEF_NETIF_STA=n
6 | CONFIG_MDNS_PREDEF_NETIF_AP=n
7 |
--------------------------------------------------------------------------------
/software/controller_old/managed_components/espressif__mdns/tests/test_afl_fuzz_host/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | # The following four lines of boilerplate have to be in your project's CMakeLists
2 | # in this exact order for cmake to work correctly
3 | cmake_minimum_required(VERSION 3.5)
4 |
5 | include($ENV{IDF_PATH}/tools/cmake/project.cmake)
6 |
7 | project(fuzz_test_update)
8 |
--------------------------------------------------------------------------------
/software/controller_old/managed_components/espressif__mdns/tests/test_afl_fuzz_host/esp_attr.h:
--------------------------------------------------------------------------------
1 | /*
2 | * SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD
3 | *
4 | * SPDX-License-Identifier: Unlicense OR CC0-1.0
5 | */
6 | #pragma once
7 | #define IRAM_ATTR
8 | #define FLAG_ATTR(TYPE)
9 | #define QUEUE_H
10 | #define __ARCH_CC_H__
11 | #define __XTENSA_API_H__
12 | #define SSIZE_MAX INT_MAX
13 | #define LWIP_HDR_IP6_ADDR_H
14 | #define LWIP_HDR_IP4_ADDR_H
15 |
--------------------------------------------------------------------------------
/software/controller_old/managed_components/espressif__mdns/tests/test_afl_fuzz_host/esp_netif_mock.c:
--------------------------------------------------------------------------------
1 | /*
2 | * SPDX-FileCopyrightText: 2020-2022 Espressif Systems (Shanghai) CO LTD
3 | *
4 | * SPDX-License-Identifier: Apache-2.0
5 | */
6 |
7 | #include
8 | #include
9 | #include
10 | #include
11 | #include
12 | #include "esp32_mock.h"
13 |
14 | typedef struct esp_netif_s esp_netif_t;
15 | typedef struct esp_netif_ip_info esp_netif_ip_info_t;
16 | typedef struct esp_netif_dhcp_status esp_netif_dhcp_status_t;
17 |
18 |
19 | const char *IP_EVENT = "IP_EVENT";
20 |
21 |
22 | esp_err_t esp_netif_add_to_list(esp_netif_t *netif)
23 | {
24 | return ESP_OK;
25 | }
26 |
27 | esp_err_t esp_netif_remove_from_list(esp_netif_t *netif)
28 | {
29 | return ESP_ERR_NOT_FOUND;
30 | }
31 |
32 | esp_netif_t *esp_netif_next(esp_netif_t *netif)
33 | {
34 | return NULL;
35 | }
36 |
37 | esp_netif_t *esp_netif_next_unsafe(esp_netif_t *netif)
38 | {
39 | return NULL;
40 | }
41 |
42 | esp_netif_t *esp_netif_get_handle_from_ifkey(const char *if_key)
43 | {
44 | return NULL;
45 | }
46 |
47 | esp_err_t esp_netif_get_ip_info(esp_netif_t *esp_netif, esp_netif_ip_info_t *ip_info)
48 | {
49 | return ESP_ERR_NOT_SUPPORTED;
50 | }
51 |
52 | esp_err_t esp_netif_dhcpc_get_status(esp_netif_t *esp_netif, esp_netif_dhcp_status_t *status)
53 | {
54 | return ESP_ERR_NOT_SUPPORTED;
55 | }
56 |
--------------------------------------------------------------------------------
/software/controller_old/managed_components/espressif__mdns/tests/test_afl_fuzz_host/in/file2.bin:
--------------------------------------------------------------------------------
1 | minifritzlocal
--------------------------------------------------------------------------------
/software/controller_old/managed_components/espressif__mdns/tests/test_afl_fuzz_host/in/minif_4a_txt.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ToonVanEyck/OpenFlap/2a6ee2e930fada76f2bf324681605e607edf05d6/software/controller_old/managed_components/espressif__mdns/tests/test_afl_fuzz_host/in/minif_4a_txt.bin
--------------------------------------------------------------------------------
/software/controller_old/managed_components/espressif__mdns/tests/test_afl_fuzz_host/in/minif_aaaa.bin:
--------------------------------------------------------------------------------
1 | minifritzlocal
--------------------------------------------------------------------------------
/software/controller_old/managed_components/espressif__mdns/tests/test_afl_fuzz_host/in/minif_any.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ToonVanEyck/OpenFlap/2a6ee2e930fada76f2bf324681605e607edf05d6/software/controller_old/managed_components/espressif__mdns/tests/test_afl_fuzz_host/in/minif_any.bin
--------------------------------------------------------------------------------
/software/controller_old/managed_components/espressif__mdns/tests/test_afl_fuzz_host/in/minif_disc.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ToonVanEyck/OpenFlap/2a6ee2e930fada76f2bf324681605e607edf05d6/software/controller_old/managed_components/espressif__mdns/tests/test_afl_fuzz_host/in/minif_disc.bin
--------------------------------------------------------------------------------
/software/controller_old/managed_components/espressif__mdns/tests/test_afl_fuzz_host/in/minif_ptr.bin:
--------------------------------------------------------------------------------
1 | _telnet_tcplocal
--------------------------------------------------------------------------------
/software/controller_old/managed_components/espressif__mdns/tests/test_afl_fuzz_host/in/minif_query.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ToonVanEyck/OpenFlap/2a6ee2e930fada76f2bf324681605e607edf05d6/software/controller_old/managed_components/espressif__mdns/tests/test_afl_fuzz_host/in/minif_query.bin
--------------------------------------------------------------------------------
/software/controller_old/managed_components/espressif__mdns/tests/test_afl_fuzz_host/in/minif_query2.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ToonVanEyck/OpenFlap/2a6ee2e930fada76f2bf324681605e607edf05d6/software/controller_old/managed_components/espressif__mdns/tests/test_afl_fuzz_host/in/minif_query2.bin
--------------------------------------------------------------------------------
/software/controller_old/managed_components/espressif__mdns/tests/test_afl_fuzz_host/in/sub_fritz_m.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ToonVanEyck/OpenFlap/2a6ee2e930fada76f2bf324681605e607edf05d6/software/controller_old/managed_components/espressif__mdns/tests/test_afl_fuzz_host/in/sub_fritz_m.bin
--------------------------------------------------------------------------------
/software/controller_old/managed_components/espressif__mdns/tests/test_afl_fuzz_host/in/telnet_ptr.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ToonVanEyck/OpenFlap/2a6ee2e930fada76f2bf324681605e607edf05d6/software/controller_old/managed_components/espressif__mdns/tests/test_afl_fuzz_host/in/telnet_ptr.bin
--------------------------------------------------------------------------------
/software/controller_old/managed_components/espressif__mdns/tests/test_afl_fuzz_host/in/test-14.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ToonVanEyck/OpenFlap/2a6ee2e930fada76f2bf324681605e607edf05d6/software/controller_old/managed_components/espressif__mdns/tests/test_afl_fuzz_host/in/test-14.bin
--------------------------------------------------------------------------------
/software/controller_old/managed_components/espressif__mdns/tests/test_afl_fuzz_host/in/test-15.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ToonVanEyck/OpenFlap/2a6ee2e930fada76f2bf324681605e607edf05d6/software/controller_old/managed_components/espressif__mdns/tests/test_afl_fuzz_host/in/test-15.bin
--------------------------------------------------------------------------------
/software/controller_old/managed_components/espressif__mdns/tests/test_afl_fuzz_host/in/test-16.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ToonVanEyck/OpenFlap/2a6ee2e930fada76f2bf324681605e607edf05d6/software/controller_old/managed_components/espressif__mdns/tests/test_afl_fuzz_host/in/test-16.bin
--------------------------------------------------------------------------------
/software/controller_old/managed_components/espressif__mdns/tests/test_afl_fuzz_host/in/test-28.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ToonVanEyck/OpenFlap/2a6ee2e930fada76f2bf324681605e607edf05d6/software/controller_old/managed_components/espressif__mdns/tests/test_afl_fuzz_host/in/test-28.bin
--------------------------------------------------------------------------------
/software/controller_old/managed_components/espressif__mdns/tests/test_afl_fuzz_host/in/test-29.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ToonVanEyck/OpenFlap/2a6ee2e930fada76f2bf324681605e607edf05d6/software/controller_old/managed_components/espressif__mdns/tests/test_afl_fuzz_host/in/test-29.bin
--------------------------------------------------------------------------------
/software/controller_old/managed_components/espressif__mdns/tests/test_afl_fuzz_host/in/test-31.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ToonVanEyck/OpenFlap/2a6ee2e930fada76f2bf324681605e607edf05d6/software/controller_old/managed_components/espressif__mdns/tests/test_afl_fuzz_host/in/test-31.bin
--------------------------------------------------------------------------------
/software/controller_old/managed_components/espressif__mdns/tests/test_afl_fuzz_host/in/test-53.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ToonVanEyck/OpenFlap/2a6ee2e930fada76f2bf324681605e607edf05d6/software/controller_old/managed_components/espressif__mdns/tests/test_afl_fuzz_host/in/test-53.bin
--------------------------------------------------------------------------------
/software/controller_old/managed_components/espressif__mdns/tests/test_afl_fuzz_host/in/test-56.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ToonVanEyck/OpenFlap/2a6ee2e930fada76f2bf324681605e607edf05d6/software/controller_old/managed_components/espressif__mdns/tests/test_afl_fuzz_host/in/test-56.bin
--------------------------------------------------------------------------------
/software/controller_old/managed_components/espressif__mdns/tests/test_afl_fuzz_host/in/test-63.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ToonVanEyck/OpenFlap/2a6ee2e930fada76f2bf324681605e607edf05d6/software/controller_old/managed_components/espressif__mdns/tests/test_afl_fuzz_host/in/test-63.bin
--------------------------------------------------------------------------------
/software/controller_old/managed_components/espressif__mdns/tests/test_afl_fuzz_host/in/test-83.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ToonVanEyck/OpenFlap/2a6ee2e930fada76f2bf324681605e607edf05d6/software/controller_old/managed_components/espressif__mdns/tests/test_afl_fuzz_host/in/test-83.bin
--------------------------------------------------------------------------------
/software/controller_old/managed_components/espressif__mdns/tests/test_afl_fuzz_host/in/test-88.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ToonVanEyck/OpenFlap/2a6ee2e930fada76f2bf324681605e607edf05d6/software/controller_old/managed_components/espressif__mdns/tests/test_afl_fuzz_host/in/test-88.bin
--------------------------------------------------------------------------------
/software/controller_old/managed_components/espressif__mdns/tests/test_afl_fuzz_host/in/test-89.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ToonVanEyck/OpenFlap/2a6ee2e930fada76f2bf324681605e607edf05d6/software/controller_old/managed_components/espressif__mdns/tests/test_afl_fuzz_host/in/test-89.bin
--------------------------------------------------------------------------------
/software/controller_old/managed_components/espressif__mdns/tests/test_afl_fuzz_host/in/test-95.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ToonVanEyck/OpenFlap/2a6ee2e930fada76f2bf324681605e607edf05d6/software/controller_old/managed_components/espressif__mdns/tests/test_afl_fuzz_host/in/test-95.bin
--------------------------------------------------------------------------------
/software/controller_old/managed_components/espressif__mdns/tests/test_afl_fuzz_host/in/test-96.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ToonVanEyck/OpenFlap/2a6ee2e930fada76f2bf324681605e607edf05d6/software/controller_old/managed_components/espressif__mdns/tests/test_afl_fuzz_host/in/test-96.bin
--------------------------------------------------------------------------------
/software/controller_old/managed_components/espressif__mdns/tests/test_afl_fuzz_host/mdns_mock.h:
--------------------------------------------------------------------------------
1 | /*
2 | * SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
3 | *
4 | * SPDX-License-Identifier: Unlicense OR CC0-1.0
5 | */
6 | #pragma once
7 | #include "esp32_mock.h"
8 | #include "mdns.h"
9 | #include "mdns_private.h"
10 |
11 |
12 | static inline void *_mdns_get_packet_data(mdns_rx_packet_t *packet)
13 | {
14 | return packet->pb->payload;
15 | }
16 |
17 | static inline size_t _mdns_get_packet_len(mdns_rx_packet_t *packet)
18 | {
19 | return packet->pb->len;
20 | }
21 |
22 | static inline void _mdns_packet_free(mdns_rx_packet_t *packet)
23 | {
24 | free(packet->pb);
25 | free(packet);
26 | }
27 |
28 | static inline bool mdns_is_netif_ready(mdns_if_t tcpip_if, mdns_ip_protocol_t ip_protocol)
29 | {
30 | return true;
31 | }
32 |
--------------------------------------------------------------------------------
/software/controller_old/managed_components/espressif__mdns/tests/test_apps/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | # The following four lines of boilerplate have to be in your project's CMakeLists
2 | # in this exact order for cmake to work correctly
3 | cmake_minimum_required(VERSION 3.5)
4 |
5 | include($ENV{IDF_PATH}/tools/cmake/project.cmake)
6 |
7 | project(mdns_test_app)
8 |
--------------------------------------------------------------------------------
/software/controller_old/managed_components/espressif__mdns/tests/test_apps/main/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | idf_component_register(SRCS "main.c" "mdns_test.c"
2 | INCLUDE_DIRS ".")
3 |
--------------------------------------------------------------------------------
/software/controller_old/managed_components/espressif__mdns/tests/test_apps/main/Kconfig.projbuild:
--------------------------------------------------------------------------------
1 | menu "Example Configuration"
2 |
3 | config TEST_MDNS_HOSTNAME
4 | string "mDNS Hostname"
5 | default "esp32-mdns"
6 | help
7 | mDNS Hostname for example to use
8 |
9 | config TEST_MDNS_INSTANCE
10 | string "mDNS Instance Name"
11 | default "ESP32 with mDNS"
12 | help
13 | mDNS Instance Name for example to use
14 |
15 | config TEST_MDNS_PUBLISH_DELEGATE_HOST
16 | bool "Publish a delegated host"
17 | help
18 | Enable publishing a delegated host other than ESP32.
19 | The example will also add a mock service for this host.
20 |
21 | config TEST_MDNS_ADD_MAC_TO_HOSTNAME
22 | bool "Add mac suffix to hostname"
23 | default n
24 | help
25 | If enabled, a portion of MAC address is added to the hostname, this is used
26 | for evaluation of tests in CI
27 | config MDNS_ADD_MAC_TO_HOSTNAME
28 | bool "Add mac suffix to hostname"
29 | default n
30 | help
31 | If enabled, a portion of MAC address is added to the hostname, this is used
32 | for evaluation of tests in CI
33 | config MDNS_PUBLISH_DELEGATE_HOST
34 | bool "Publish a delegated host"
35 | help
36 | Enable publishing a delegated host other than ESP32.
37 | The example will also add a mock service for this host.
38 |
39 |
40 | endmenu
41 |
--------------------------------------------------------------------------------
/software/controller_old/managed_components/espressif__mdns/tests/test_apps/main/idf_component.yml:
--------------------------------------------------------------------------------
1 | dependencies:
2 | ## Required IDF version
3 | idf: ">=5.0"
4 | espressif/mdns:
5 | version: "^1.0.0"
6 | override_path: "../../../"
7 | protocol_examples_common:
8 | path: ${IDF_PATH}/examples/common_components/protocol_examples_common
9 |
--------------------------------------------------------------------------------
/software/controller_old/managed_components/espressif__mdns/tests/test_apps/sdkconfig.ci:
--------------------------------------------------------------------------------
1 | CONFIG_IDF_TARGET="esp32"
2 | CONFIG_MDNS_ADD_MAC_TO_HOSTNAME=y
3 | CONFIG_MDNS_PUBLISH_DELEGATE_HOST=y
4 | CONFIG_LWIP_DNS_SUPPORT_MDNS_QUERIES=y
5 | CONFIG_EXAMPLE_CONNECT_ETHERNET=y
6 | CONFIG_EXAMPLE_CONNECT_WIFI=n
7 | CONFIG_EXAMPLE_USE_INTERNAL_ETHERNET=y
8 | CONFIG_EXAMPLE_ETH_PHY_IP101=y
9 | CONFIG_EXAMPLE_ETH_MDC_GPIO=23
10 | CONFIG_EXAMPLE_ETH_MDIO_GPIO=18
11 | CONFIG_EXAMPLE_ETH_PHY_RST_GPIO=5
12 | CONFIG_EXAMPLE_ETH_PHY_ADDR=1
13 | CONFIG_EXAMPLE_CONNECT_IPV6=y
14 |
--------------------------------------------------------------------------------
/software/controller_old/managed_components/espressif__mdns/tests/test_apps/sdkconfig.defaults:
--------------------------------------------------------------------------------
1 | CONFIG_TEST_MDNS_ADD_MAC_TO_HOSTNAME=y
2 | CONFIG_TEST_MDNS_PUBLISH_DELEGATE_HOST=y
3 |
--------------------------------------------------------------------------------
/software/controller_old/managed_components/espressif__mdns/tests/unit_test/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | # This is the project CMakeLists.txt file for the test subproject
2 | cmake_minimum_required(VERSION 3.16)
3 |
4 | set(EXTRA_COMPONENT_DIRS ../.. "$ENV{IDF_PATH}/tools/unit-test-app/components")
5 |
6 | include($ENV{IDF_PATH}/tools/cmake/project.cmake)
7 | project(mdns_test)
8 |
--------------------------------------------------------------------------------
/software/controller_old/managed_components/espressif__mdns/tests/unit_test/main/CMakeLists.txt:
--------------------------------------------------------------------------------
1 |
2 | idf_component_register(SRCS "test_mdns.c"
3 | REQUIRES test_utils
4 | INCLUDE_DIRS "."
5 | PRIV_REQUIRES unity mdns)
6 |
--------------------------------------------------------------------------------
/software/controller_old/managed_components/espressif__mdns/tests/unit_test/pytest_app_mdns.py:
--------------------------------------------------------------------------------
1 | # SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
2 | # SPDX-License-Identifier: Apache-2.0
3 |
4 | from pytest_embedded import Dut
5 |
6 |
7 | def test_mdns(dut: Dut) -> None:
8 | dut.expect_unity_test_output()
9 |
--------------------------------------------------------------------------------
/software/controller_old/managed_components/espressif__mdns/tests/unit_test/sdkconfig.ci:
--------------------------------------------------------------------------------
1 | CONFIG_IDF_TARGET="esp32"
2 | CONFIG_UNITY_ENABLE_FIXTURE=y
3 | CONFIG_UNITY_ENABLE_IDF_TEST_RUNNER=n
4 |
--------------------------------------------------------------------------------
/software/controller_old/managed_components/espressif__mdns/tests/unit_test/sdkconfig.defaults:
--------------------------------------------------------------------------------
1 | CONFIG_UNITY_ENABLE_FIXTURE=y
2 | CONFIG_UNITY_ENABLE_IDF_TEST_RUNNER=n
3 |
--------------------------------------------------------------------------------
/software/controller_old/partition_table.csv:
--------------------------------------------------------------------------------
1 | # Name, Type, SubType, Offset, Size, Flags
2 | nvs, data, nvs, 0x009000, 0x4000,
3 | otadata, data, ota, 0x00d000, 0x2000,
4 | phy_init, data, phy, 0x00f000, 0x1000,
5 | ota_0, app, ota_0, 0x010000, 0x180000,
6 | ota_1, app, ota_1, 0x190000, 0x180000,
--------------------------------------------------------------------------------
/software/controller_old/reffCnt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ToonVanEyck/OpenFlap/2a6ee2e930fada76f2bf324681605e607edf05d6/software/controller_old/reffCnt
--------------------------------------------------------------------------------
/software/controller_old/update.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | curl -s -F 'controller_firmware=@build/split-flap-controller.bin' openflap.local/firmware >> /dev/null
--------------------------------------------------------------------------------
/software/module/Puya.PY32F0xx_DFP.1.1.7.pack:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ToonVanEyck/OpenFlap/2a6ee2e930fada76f2bf324681605e607edf05d6/software/module/Puya.PY32F0xx_DFP.1.1.7.pack
--------------------------------------------------------------------------------
/software/module/README.md:
--------------------------------------------------------------------------------
1 | # Puya Playground
2 |
3 | This is a VS-Code devcontainer based development environment for the Puya PY32 family of ARM Cortex M0 microcontrollers. It's based on [IOsetting's work](https://github.com/IOsetting/py32f0-template) but it has been wrapped in a devcontainer and I changed the build system to CMake.
4 |
5 | I have tested this setup with [this devkit from aliexpress](https://nl.aliexpress.com/item/1005004959178538.html).
6 |
7 | ## Getting Started
8 |
9 | Connect the devkit as shown in the image below.
10 |
11 | 
12 |
13 | Start the development container
14 |
15 | In the development container verify that the debug probe is connected:
16 | ```
17 | vscode ➜ /workspace/build $ pyocd list
18 | # Probe/Board Unique ID Target
19 | ------------------------------------------------------------------------------------------------
20 | 0 ARM DAPLink CMSIS-DAP 070000003233d72f083932363836374da5a5a5a597969908 ✖︎ stm32f103rb
21 | NUCLEO-F103RB
22 | ```
23 |
24 | ## Building
25 | ```
26 | mkdir build
27 | cd build
28 | cmake -DCMAKE_TOOLCHAIN_FILE=puya_toolchain.cmake ..
29 | make
30 | make flash
31 | ```
32 |
33 | ## Debugging
34 | A `launch.json` file is configured to use the debug capabilities of VS-Code
--------------------------------------------------------------------------------
/software/module/app/inc/property_handlers.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "openflap.h"
4 |
5 | /** Initialize property handlers. */
6 | void property_handlers_init(openflap_ctx_t *ctx);
7 |
8 | /** Store the configuration inb flash. */
9 | void propertyHandlersConfigWrite(void);
--------------------------------------------------------------------------------
/software/module/app/src/checksum.c:
--------------------------------------------------------------------------------
1 | #include
2 |
3 | /* Hardcoded checksum, will be replaced by a post build command. */
4 | const uint32_t __attribute__((section(".checksum"))) checksum = 0xdeadbeef;
5 |
--------------------------------------------------------------------------------
/software/module/app/src/default_config.c:
--------------------------------------------------------------------------------
1 | #include "config.h"
2 |
3 | #define SYMBOL_€ (0x00ac82e2) // € symbol
4 |
5 | #define IR_OFFSET (75)
6 |
7 | #ifdef SET_DEFAULT_CONFIG
8 | /* When SET_DEFAULT_CONFIG is not defined, the default configuration will not be included in the final binary. */
9 | const openflap_config_t __attribute__((section(".config"))) config = {
10 | .encoder_offset = 0,
11 | .ir_threshold = {300 - IR_OFFSET, 300 + IR_OFFSET},
12 | .base_speed = 0,
13 | .symbol_set =
14 | {
15 | (uint32_t)' ', (uint32_t)'A', (uint32_t)'B', (uint32_t)'C', (uint32_t)'D', (uint32_t)'E', (uint32_t)'F',
16 | (uint32_t)'G', (uint32_t)'H', (uint32_t)'I', (uint32_t)'J', (uint32_t)'K', (uint32_t)'L', (uint32_t)'M',
17 | (uint32_t)'N', (uint32_t)'O', (uint32_t)'P', (uint32_t)'Q', (uint32_t)'R', (uint32_t)'S', (uint32_t)'T',
18 | (uint32_t)'U', (uint32_t)'V', (uint32_t)'W', (uint32_t)'X', (uint32_t)'Y', (uint32_t)'Z', (uint32_t)'0',
19 | (uint32_t)'1', (uint32_t)'2', (uint32_t)'3', (uint32_t)'4', (uint32_t)'5', (uint32_t)'6', (uint32_t)'7',
20 | (uint32_t)'8', (uint32_t)'9', SYMBOL_€, (uint32_t)'$', (uint32_t)'!', (uint32_t)'?', (uint32_t)'.',
21 | (uint32_t)',', (uint32_t)':', (uint32_t)'/', (uint32_t)'@', (uint32_t)'#', (uint32_t)'&',
22 | },
23 | .ota_completed = false,
24 | .minimum_rotation = 1,
25 | .color = {0xFFFFFF, 0x000000}, // White on black
26 | .motion = {70, 150, 5, 10},
27 | };
28 | #endif
--------------------------------------------------------------------------------
/software/module/btl/CMakeLists.txt:
--------------------------------------------------------------------------------
1 |
2 | add_executable(${Btl}
3 | src/py32f0xx_it.c
4 | src/py32f0xx_hal_msp.c
5 | src/bootloader.c
6 | )
7 |
8 | target_link_libraries(${Btl} PUBLIC config flash)
9 | target_link_libraries(${Btl} PUBLIC $)
10 | target_include_directories(${Btl} PRIVATE $)
11 |
12 | set_target_properties(${Btl} PROPERTIES LINK_FLAGS "-T ${CMAKE_CURRENT_SOURCE_DIR}/linker_script_btl.ld")
13 |
14 | add_custom_command(TARGET ${Btl}
15 | POST_BUILD
16 | WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
17 | COMMENT "Generating hex file"
18 | COMMAND ${CMAKE_OBJCOPY} ARGS -O ihex ${Btl}.elf ${Btl}.hex
19 | )
--------------------------------------------------------------------------------
/software/module/btl/inc/memory_map.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #include
3 |
4 | extern uint32_t __FLASH_BOOT_START__;
5 | extern uint32_t __FLASH_BOOT_SIZE__;
6 | extern uint32_t __FLASH_APP_START__;
7 | extern uint32_t __FLASH_APP_SIZE__;
8 | extern uint32_t __FLASH_CS_START__;
9 | extern uint32_t __FLASH_CS_SIZE__;
10 | extern uint32_t __FLASH_NVS_START__;
11 | extern uint32_t __FLASH_NVS_SIZE__;
12 |
13 | #define APP_SIZE (((uint32_t) & __FLASH_APP_SIZE__) + ((uint32_t) & __FLASH_CS_SIZE__))
14 | #define APP_START_PTR ((uint32_t *)&__FLASH_APP_START__)
15 | #define APP_START_ADDR ((uint32_t) & __FLASH_APP_START__)
16 |
17 | #define APP_N_START_PTR(n) (APP_START_PTR + ((n) * APP_SIZE / 4))
18 | #define MAIN_APP (0)
19 | #define NEW_APP (1)
20 |
21 | #define NVS_SIZE (((uint32_t) & __FLASH_NVS_SIZE__) + ((uint32_t) & __FLASH_CS_SIZE__))
22 | #define NVS_START_PTR ((uint32_t *)&__FLASH_NVS_START__)
23 | #define NVS_START_ADDR ((uint32_t) & __FLASH_NVS_START__)
--------------------------------------------------------------------------------
/software/module/lib/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | add_subdirectory(puya_libs)
2 | add_subdirectory(debug_io)
3 | add_subdirectory(flash)
4 | add_subdirectory(config)
5 | add_subdirectory(rbuff)
6 | add_subdirectory(uart_driver)
--------------------------------------------------------------------------------
/software/module/lib/config/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | project(config)
2 | add_library(${PROJECT_NAME} STATIC config.c)
3 | target_include_directories(${PROJECT_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/inc)
4 | target_link_libraries(${PROJECT_NAME} PRIVATE flash debug_io)
--------------------------------------------------------------------------------
/software/module/lib/config/config.c:
--------------------------------------------------------------------------------
1 | #include "config.h"
2 | #include "debug_io.h"
3 | #include "flash.h"
4 | #include "memory_map.h"
5 |
6 | void configLoad(openflap_config_t *config)
7 | {
8 | flashRead(NVS_START_ADDR, (uint8_t *)config, sizeof(openflap_config_t));
9 | }
10 |
11 | void configStore(openflap_config_t *config)
12 | {
13 | flashWrite(NVS_START_ADDR, (uint8_t *)config, sizeof(openflap_config_t));
14 | }
15 |
16 | void configPrint(openflap_config_t *config)
17 | {
18 | uint8_t d = 25;
19 | debug_io_log_info("Config:\n");
20 | HAL_Delay(d);
21 | debug_io_log_info("Encoder offset: %d\n", config->encoder_offset);
22 | HAL_Delay(d);
23 | debug_io_log_info("IR limits:\n");
24 | HAL_Delay(d);
25 | for (int i = 0; i < SENS_CNT; i++) {
26 | debug_io_log_info("IR thresholds: %d %d\n", config->ir_threshold.lower, config->ir_threshold.upper);
27 | HAL_Delay(d);
28 | }
29 | debug_io_log_info("Base speed: %d\n", config->base_speed);
30 | HAL_Delay(d);
31 | debug_io_log_info("Symbol set:\n");
32 | HAL_Delay(d);
33 | for (int i = 0; i < SYMBOL_CNT; i++) {
34 | debug_io_log_info("%s ", &config->symbol_set[i]);
35 | HAL_Delay(d);
36 | }
37 | debug_io_log_info("Minimum rotation: %d\n", config->minimum_rotation);
38 | HAL_Delay(d);
39 | debug_io_log_info("Foreground Color: %d\n", config->color.foreground);
40 | HAL_Delay(d);
41 | debug_io_log_info("Background Color: %d\n", config->color.background);
42 | HAL_Delay(d);
43 | debug_io_log_info("Motion config: %d %d %d %d\n", config->motion.min_pwm, config->motion.max_pwm,
44 | config->motion.min_ramp_distance, config->motion.max_ramp_distance);
45 | HAL_Delay(d);
46 | debug_io_log_info("\n");
47 | }
--------------------------------------------------------------------------------
/software/module/lib/debug_io/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | project(debug_io)
2 |
3 | add_library(${PROJECT_NAME} STATIC debug_io_rtt.c)
4 |
5 | if(DEBUG_IO_RTT_BACKEND)
6 | # Get RTT from github.
7 | include(FetchContent)
8 | FetchContent_Declare(
9 | jlink_rtt
10 | GIT_REPOSITORY https://github.com/jmacheta/jlink_rtt-cmake
11 | GIT_TAG main
12 | )
13 | FetchContent_MakeAvailable(jlink_rtt)
14 | target_include_directories(jlink_rtt PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/inc) # Use custom RTT config.
15 | target_link_libraries(${PROJECT_NAME} PRIVATE jlink_rtt)
16 | add_definitions(-DRTT_BACKEND)
17 | endif()
18 |
19 | target_include_directories(${PROJECT_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/inc)
--------------------------------------------------------------------------------
/software/module/lib/debug_io/debug_io.c:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ToonVanEyck/OpenFlap/2a6ee2e930fada76f2bf324681605e607edf05d6/software/module/lib/debug_io/debug_io.c
--------------------------------------------------------------------------------
/software/module/lib/flash/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | project(flash)
2 | add_library(${PROJECT_NAME} STATIC flash.c)
3 | target_include_directories(${PROJECT_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/inc)
4 | target_link_libraries(${PROJECT_NAME} PUBLIC $)
5 | target_include_directories(${PROJECT_NAME} PUBLIC $)
--------------------------------------------------------------------------------
/software/module/lib/flash/inc/flash.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "py32f0xx_hal.h"
4 | #include
5 |
6 | typedef struct flashPage_t {
7 | uint32_t b32[FLASH_PAGE_SIZE / 4];
8 | } flashPage_t;
9 |
10 | /** Read from flash memory. */
11 | void flashRead(uint32_t address, uint8_t *data, uint32_t size);
12 |
13 | /** Write to flash memory. */
14 | void flashWrite(uint32_t address, uint8_t *data, uint32_t size);
--------------------------------------------------------------------------------
/software/module/lib/puya_libs/BSP/Inc/py32f0xx_bsp_clock.h:
--------------------------------------------------------------------------------
1 | /**
2 | ******************************************************************************
3 | * @file py32f0xx_bsp_clock.h
4 | ******************************************************************************
5 | */
6 |
7 | /* Define to prevent recursive inclusion -------------------------------------*/
8 | #ifndef PY32F0XX_BSP_CLOCK_H
9 | #define PY32F0XX_BSP_CLOCK_H
10 |
11 | #ifdef __cplusplus
12 | extern "C" {
13 | #endif
14 |
15 | /* Includes ------------------------------------------------------------------*/
16 |
17 | #include "py32f0xx_hal.h"
18 | #include "py32f0xx_hal_rcc.h"
19 |
20 | HAL_StatusTypeDef BSP_HSI_24MHzClockConfig(void);
21 | HAL_StatusTypeDef BSP_HSE_ClockConfig(void);
22 |
23 | #if defined(RCC_PLL_SUPPORT)
24 | HAL_StatusTypeDef BSP_HSI_PLL_48MHzClockConfig(void);
25 | HAL_StatusTypeDef BSP_HSI_PLL_32MHzClockConfig(void);
26 | HAL_StatusTypeDef BSP_HSE_PLL_ClockConfig(void);
27 | #endif
28 |
29 |
30 | #ifdef __cplusplus
31 | }
32 | #endif
33 |
34 | #endif /* PY32F0XX_BSP_CLOCK_H */
35 |
--------------------------------------------------------------------------------
/software/module/lib/puya_libs/BSP/Inc/py32f0xx_bsp_led.h:
--------------------------------------------------------------------------------
1 | /**
2 | ******************************************************************************
3 | * @file py32f0xx_bsp_led.h
4 | * @author MCU Application Team
5 | * @brief
6 | ******************************************************************************
7 | */
8 |
9 | /* Define to prevent recursive inclusion -------------------------------------*/
10 | #ifndef PY32F0XX_BSP_LED_H
11 | #define PY32F0XX_BSP_LED_H
12 |
13 | #ifdef __cplusplus
14 | extern "C" {
15 | #endif
16 |
17 | /* Includes ------------------------------------------------------------------*/
18 |
19 | #include "py32f0xx_hal.h"
20 |
21 |
22 | typedef enum
23 | {
24 | LED3 = 0,
25 | LED_GREEN = LED3
26 | } Led_TypeDef;
27 |
28 | #define LEDn 1
29 |
30 | #define LED3_PIN GPIO_PIN_5
31 | #define LED3_GPIO_PORT GPIOB
32 | #define LED3_GPIO_CLK_ENABLE() __HAL_RCC_GPIOB_CLK_ENABLE()
33 | #define LED3_GPIO_CLK_DISABLE() __HAL_RCC_GPIOB_CLK_DISABLE()
34 |
35 | #define LEDx_GPIO_CLK_ENABLE(__INDEX__) do {LED3_GPIO_CLK_ENABLE(); } while(0U)
36 | #define LEDx_GPIO_CLK_DISABLE(__INDEX__) LED3_GPIO_CLK_DISABLE()
37 |
38 |
39 | void BSP_LED_Init(Led_TypeDef Led);
40 | void BSP_LED_DeInit(Led_TypeDef Led);
41 | void BSP_LED_On(Led_TypeDef Led);
42 | void BSP_LED_Off(Led_TypeDef Led);
43 | void BSP_LED_Toggle(Led_TypeDef Led);
44 |
45 |
46 | #ifdef __cplusplus
47 | }
48 | #endif
49 |
50 | #endif /* PY32F0XX_BSP_LED_H */
51 |
--------------------------------------------------------------------------------
/software/module/lib/puya_libs/BSP_LL/Inc/py32f0xx_bsp_clock.h:
--------------------------------------------------------------------------------
1 | /**
2 | ******************************************************************************
3 | * @file py32f0xx_bsp_clock.h
4 | ******************************************************************************
5 | */
6 |
7 | /* Define to prevent recursive inclusion -------------------------------------*/
8 | #ifndef PY32F003_BSP_CLOCK_H
9 | #define PY32F003_BSP_CLOCK_H
10 |
11 | #ifdef __cplusplus
12 | extern "C" {
13 | #endif
14 |
15 | #include "py32f0xx_ll_rcc.h"
16 | #include "py32f0xx_ll_bus.h"
17 | #include "py32f0xx_ll_system.h"
18 | #include "py32f0xx_ll_exti.h"
19 | #include "py32f0xx_ll_cortex.h"
20 | #include "py32f0xx_ll_utils.h"
21 | #include "py32f0xx_ll_pwr.h"
22 | #include "py32f0xx_ll_dma.h"
23 | #include "py32f0xx_ll_gpio.h"
24 | #include "py32f0xx_ll_usart.h"
25 |
26 | void BSP_RCC_HSI_24MConfig(void);
27 | void BSP_RCC_HSI_8MConfig(void);
28 | void BSP_RCC_HSE_Config(void);
29 |
30 | #if defined(RCC_PLL_SUPPORT)
31 | void BSP_RCC_HSI_PLL48MConfig(void);
32 | void BSP_RCC_HSE_PLLConfig(void);
33 | #endif
34 |
35 | #ifdef __cplusplus
36 | }
37 | #endif
38 |
39 | #endif /* PY32F003_BSP_CLOCK_H */
40 |
--------------------------------------------------------------------------------
/software/module/lib/puya_libs/CMSIS/DSP/ComputeLibrary/LICENSE.txt:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2017-2019 ARM Software
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 |
--------------------------------------------------------------------------------
/software/module/lib/puya_libs/CMSIS/DSP/ComputeLibrary/README.md:
--------------------------------------------------------------------------------
1 | README
2 | ======
3 |
4 | This folder is containing two files imported, and slightly modified, from the ComputeLibrary:
5 |
6 | NEMath.h and arm_cl_tables.c
7 |
8 | In the original compute library, there are instead two other files:
9 |
10 | NEMath.h and NEMath.inl
11 |
12 | NEMath.inl is included from NEMath.h whereas in this CMSIS DSP implementation, there is no NEMath.inl and its content is copied into NEMath.h
13 |
14 | The tables contained in NEMath.inl have been moved to arm_cl_tables.c and finally the files are in C for the CMSIS DSP library and in C++ in the original Compute Library.
15 |
16 | Otherwise, the features and implementations are the same : a few optimized Neon functions.
17 |
18 | The license covering those files is different : It is a MIT license.
19 | Other parts of the CMSIS-DSP are covered with an Apache-2.0 license.
20 |
--------------------------------------------------------------------------------
/software/module/lib/puya_libs/CMSIS/DSP/Include/dsp/controller_functions_f16.h:
--------------------------------------------------------------------------------
1 | /******************************************************************************
2 | * @file controller_functions_f16.h
3 | * @brief Public header file for CMSIS DSP Library
4 | * @version V1.10.0
5 | * @date 08 July 2021
6 | * Target Processor: Cortex-M and Cortex-A cores
7 | ******************************************************************************/
8 | /*
9 | * Copyright (c) 2010-2020 Arm Limited or its affiliates. All rights reserved.
10 | *
11 | * SPDX-License-Identifier: Apache-2.0
12 | *
13 | * Licensed under the Apache License, Version 2.0 (the License); you may
14 | * not use this file except in compliance with the License.
15 | * You may obtain a copy of the License at
16 | *
17 | * www.apache.org/licenses/LICENSE-2.0
18 | *
19 | * Unless required by applicable law or agreed to in writing, software
20 | * distributed under the License is distributed on an AS IS BASIS, WITHOUT
21 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
22 | * See the License for the specific language governing permissions and
23 | * limitations under the License.
24 | */
25 |
26 |
27 | #ifndef _CONTROLLER_FUNCTIONS_F16_H_
28 | #define _CONTROLLER_FUNCTIONS_F16_H_
29 |
30 | #ifdef __cplusplus
31 | extern "C"
32 | {
33 | #endif
34 |
35 | #if defined(ARM_FLOAT16_SUPPORTED)
36 | #endif /*defined(ARM_FLOAT16_SUPPORTED)*/
37 | #ifdef __cplusplus
38 | }
39 | #endif
40 |
41 | #endif /* ifndef _CONTROLLER_FUNCTIONS_F16_H_ */
42 |
--------------------------------------------------------------------------------
/software/module/lib/puya_libs/CMSIS/DSP/Include/dsp/svm_defines.h:
--------------------------------------------------------------------------------
1 | /******************************************************************************
2 | * @file svm_defines.h
3 | * @brief Public header file for CMSIS DSP Library
4 | * @version V1.10.0
5 | * @date 08 July 2021
6 | *
7 | * Target Processor: Cortex-M and Cortex-A cores
8 | ******************************************************************************/
9 | /*
10 | * Copyright (c) 2010-2020 Arm Limited or its affiliates. All rights reserved.
11 | *
12 | * SPDX-License-Identifier: Apache-2.0
13 | *
14 | * Licensed under the Apache License, Version 2.0 (the License); you may
15 | * not use this file except in compliance with the License.
16 | * You may obtain a copy of the License at
17 | *
18 | * www.apache.org/licenses/LICENSE-2.0
19 | *
20 | * Unless required by applicable law or agreed to in writing, software
21 | * distributed under the License is distributed on an AS IS BASIS, WITHOUT
22 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
23 | * See the License for the specific language governing permissions and
24 | * limitations under the License.
25 | */
26 |
27 |
28 | #ifndef _SVM_DEFINES_H_
29 | #define _SVM_DEFINES_H_
30 |
31 | /**
32 | * @brief Struct for specifying SVM Kernel
33 | */
34 | typedef enum
35 | {
36 | ARM_ML_KERNEL_LINEAR = 0,
37 | /**< Linear kernel */
38 | ARM_ML_KERNEL_POLYNOMIAL = 1,
39 | /**< Polynomial kernel */
40 | ARM_ML_KERNEL_RBF = 2,
41 | /**< Radial Basis Function kernel */
42 | ARM_ML_KERNEL_SIGMOID = 3
43 | /**< Sigmoid kernel */
44 | } arm_ml_kernel_type;
45 |
46 | #endif
47 |
--------------------------------------------------------------------------------
/software/module/lib/puya_libs/CMSIS/DSP/Source/BasicMathFunctions/BasicMathFunctionsF16.c:
--------------------------------------------------------------------------------
1 | /* ----------------------------------------------------------------------
2 | * Project: CMSIS DSP Library
3 | * Title: BasicMathFunctionsF16.c
4 | * Description: Combination of all basic math function f16 source files.
5 | *
6 | * $Date: 20. April 2020
7 | * $Revision: V1.1.0
8 | *
9 | * Target Processor: Cortex-M cores
10 | * -------------------------------------------------------------------- */
11 | /*
12 | * Copyright (C) 2019-2020 ARM Limited or its affiliates. All rights reserved.
13 | *
14 | * SPDX-License-Identifier: Apache-2.0
15 | *
16 | * Licensed under the Apache License, Version 2.0 (the License); you may
17 | * not use this file except in compliance with the License.
18 | * You may obtain a copy of the License at
19 | *
20 | * www.apache.org/licenses/LICENSE-2.0
21 | *
22 | * Unless required by applicable law or agreed to in writing, software
23 | * distributed under the License is distributed on an AS IS BASIS, WITHOUT
24 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
25 | * See the License for the specific language governing permissions and
26 | * limitations under the License.
27 | */
28 |
29 | #include "arm_abs_f16.c"
30 | #include "arm_add_f16.c"
31 | #include "arm_dot_prod_f16.c"
32 | #include "arm_mult_f16.c"
33 | #include "arm_negate_f16.c"
34 | #include "arm_offset_f16.c"
35 | #include "arm_scale_f16.c"
36 | #include "arm_sub_f16.c"
37 | #include "arm_clip_f16.c"
38 |
--------------------------------------------------------------------------------
/software/module/lib/puya_libs/CMSIS/DSP/Source/BasicMathFunctions/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | cmake_minimum_required (VERSION 3.14)
2 |
3 | project(CMSISDSPBasicMath)
4 |
5 | include(configLib)
6 | include(configDsp)
7 |
8 | file(GLOB SRCF64 "./*_f64.c")
9 | file(GLOB SRCF32 "./*_f32.c")
10 | file(GLOB SRCF16 "./*_f16.c")
11 | file(GLOB SRCQ31 "./*_q31.c")
12 | file(GLOB SRCQ15 "./*_q15.c")
13 | file(GLOB SRCQ7 "./*_q7.c")
14 |
15 | file(GLOB SRCU32 "./*_u32.c")
16 | file(GLOB SRCU16 "./*_u16.c")
17 | file(GLOB SRCU8 "./*_u8.c")
18 |
19 | add_library(CMSISDSPBasicMath STATIC ${SRCF64})
20 | target_sources(CMSISDSPBasicMath PRIVATE ${SRCF32})
21 |
22 | if ((NOT ARMAC5) AND (NOT DISABLEFLOAT16))
23 | target_sources(CMSISDSPBasicMath PRIVATE ${SRCF16})
24 | endif()
25 |
26 | target_sources(CMSISDSPBasicMath PRIVATE ${SRCQ31})
27 | target_sources(CMSISDSPBasicMath PRIVATE ${SRCQ15})
28 | target_sources(CMSISDSPBasicMath PRIVATE ${SRCQ7})
29 |
30 | target_sources(CMSISDSPBasicMath PRIVATE ${SRCU32})
31 | target_sources(CMSISDSPBasicMath PRIVATE ${SRCU16})
32 | target_sources(CMSISDSPBasicMath PRIVATE ${SRCU8})
33 |
34 | configLib(CMSISDSPBasicMath ${ROOT})
35 | configDsp(CMSISDSPBasicMath ${ROOT})
36 |
37 | ### Includes
38 | target_include_directories(CMSISDSPBasicMath PUBLIC "${DSP}/Include")
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/software/module/lib/puya_libs/CMSIS/DSP/Source/BayesFunctions/BayesFunctions.c:
--------------------------------------------------------------------------------
1 | /* ----------------------------------------------------------------------
2 | * Project: CMSIS DSP Library
3 | * Title: BayesFunctions.c
4 | * Description: Combination of all bayes function source files.
5 | *
6 | * $Date: 16. March 2020
7 | * $Revision: V1.0.0
8 | *
9 | * Target Processor: Cortex-M cores
10 | * -------------------------------------------------------------------- */
11 | /*
12 | * Copyright (C) 2020 ARM Limited or its affiliates. All rights reserved.
13 | *
14 | * SPDX-License-Identifier: Apache-2.0
15 | *
16 | * Licensed under the Apache License, Version 2.0 (the License); you may
17 | * not use this file except in compliance with the License.
18 | * You may obtain a copy of the License at
19 | *
20 | * www.apache.org/licenses/LICENSE-2.0
21 | *
22 | * Unless required by applicable law or agreed to in writing, software
23 | * distributed under the License is distributed on an AS IS BASIS, WITHOUT
24 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
25 | * See the License for the specific language governing permissions and
26 | * limitations under the License.
27 | */
28 |
29 | #include "arm_gaussian_naive_bayes_predict_f32.c"
30 |
--------------------------------------------------------------------------------
/software/module/lib/puya_libs/CMSIS/DSP/Source/BayesFunctions/BayesFunctionsF16.c:
--------------------------------------------------------------------------------
1 | /* ----------------------------------------------------------------------
2 | * Project: CMSIS DSP Library
3 | * Title: BayesFunctions.c
4 | * Description: Combination of all bayes function f16 source files.
5 | *
6 | *
7 | * Target Processor: Cortex-M cores
8 | * -------------------------------------------------------------------- */
9 | /*
10 | * Copyright (C) 2020 ARM Limited or its affiliates. All rights reserved.
11 | *
12 | * SPDX-License-Identifier: Apache-2.0
13 | *
14 | * Licensed under the Apache License, Version 2.0 (the License); you may
15 | * not use this file except in compliance with the License.
16 | * You may obtain a copy of the License at
17 | *
18 | * www.apache.org/licenses/LICENSE-2.0
19 | *
20 | * Unless required by applicable law or agreed to in writing, software
21 | * distributed under the License is distributed on an AS IS BASIS, WITHOUT
22 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
23 | * See the License for the specific language governing permissions and
24 | * limitations under the License.
25 | */
26 |
27 | #include "arm_gaussian_naive_bayes_predict_f16.c"
28 |
--------------------------------------------------------------------------------
/software/module/lib/puya_libs/CMSIS/DSP/Source/BayesFunctions/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | cmake_minimum_required (VERSION 3.14)
2 |
3 | project(CMSISDSPBayes)
4 |
5 | include(configLib)
6 | include(configDsp)
7 |
8 | file(GLOB SRC "./*_*.c")
9 |
10 | add_library(CMSISDSPBayes STATIC)
11 |
12 | target_sources(CMSISDSPBayes PRIVATE arm_gaussian_naive_bayes_predict_f32.c)
13 |
14 | configLib(CMSISDSPBayes ${ROOT})
15 | configDsp(CMSISDSPBayes ${ROOT})
16 |
17 | ### Includes
18 | target_include_directories(CMSISDSPBayes PUBLIC "${DSP}/Include")
19 |
20 | if ((NOT ARMAC5) AND (NOT DISABLEFLOAT16))
21 | target_sources(CMSISDSPBayes PRIVATE arm_gaussian_naive_bayes_predict_f16.c)
22 | endif()
23 |
24 |
--------------------------------------------------------------------------------
/software/module/lib/puya_libs/CMSIS/DSP/Source/CommonTables/CommonTables.c:
--------------------------------------------------------------------------------
1 | /* ----------------------------------------------------------------------
2 | * Project: CMSIS DSP Library
3 | * Title: CommonTables.c
4 | * Description: Combination of all common table source files.
5 | *
6 | * $Date: 08. January 2020
7 | * $Revision: V1.1.0
8 | *
9 | * Target Processor: Cortex-M cores
10 | * -------------------------------------------------------------------- */
11 | /*
12 | * Copyright (C) 2019-2020 ARM Limited or its affiliates. All rights reserved.
13 | *
14 | * SPDX-License-Identifier: Apache-2.0
15 | *
16 | * Licensed under the Apache License, Version 2.0 (the License); you may
17 | * not use this file except in compliance with the License.
18 | * You may obtain a copy of the License at
19 | *
20 | * www.apache.org/licenses/LICENSE-2.0
21 | *
22 | * Unless required by applicable law or agreed to in writing, software
23 | * distributed under the License is distributed on an AS IS BASIS, WITHOUT
24 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
25 | * See the License for the specific language governing permissions and
26 | * limitations under the License.
27 | */
28 |
29 | #include "arm_common_tables.c"
30 | #include "arm_const_structs.c"
31 | #include "arm_mve_tables.c"
32 |
--------------------------------------------------------------------------------
/software/module/lib/puya_libs/CMSIS/DSP/Source/CommonTables/CommonTablesF16.c:
--------------------------------------------------------------------------------
1 | /* ----------------------------------------------------------------------
2 | * Project: CMSIS DSP Library
3 | * Title: CommonTables.c
4 | * Description: Combination of all common table source files.
5 | *
6 | * $Date: 08. January 2020
7 | * $Revision: V1.1.0
8 | *
9 | * Target Processor: Cortex-M cores
10 | * -------------------------------------------------------------------- */
11 | /*
12 | * Copyright (C) 2019-2020 ARM Limited or its affiliates. All rights reserved.
13 | *
14 | * SPDX-License-Identifier: Apache-2.0
15 | *
16 | * Licensed under the Apache License, Version 2.0 (the License); you may
17 | * not use this file except in compliance with the License.
18 | * You may obtain a copy of the License at
19 | *
20 | * www.apache.org/licenses/LICENSE-2.0
21 | *
22 | * Unless required by applicable law or agreed to in writing, software
23 | * distributed under the License is distributed on an AS IS BASIS, WITHOUT
24 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
25 | * See the License for the specific language governing permissions and
26 | * limitations under the License.
27 | */
28 |
29 | #include "arm_common_tables_f16.c"
30 | #include "arm_const_structs_f16.c"
31 | #include "arm_mve_tables_f16.c"
32 |
--------------------------------------------------------------------------------
/software/module/lib/puya_libs/CMSIS/DSP/Source/ComplexMathFunctions/ComplexMathFunctionsF16.c:
--------------------------------------------------------------------------------
1 | /* ----------------------------------------------------------------------
2 | * Project: CMSIS DSP Library
3 | * Title: CompexMathFunctionsF16.c
4 | * Description: Combination of all complex math function f16 source files.
5 | *
6 | *
7 | * Target Processor: Cortex-M cores
8 | * -------------------------------------------------------------------- */
9 | /*
10 | * Copyright (C) 2020 ARM Limited or its affiliates. All rights reserved.
11 | *
12 | * SPDX-License-Identifier: Apache-2.0
13 | *
14 | * Licensed under the Apache License, Version 2.0 (the License); you may
15 | * not use this file except in compliance with the License.
16 | * You may obtain a copy of the License at
17 | *
18 | * www.apache.org/licenses/LICENSE-2.0
19 | *
20 | * Unless required by applicable law or agreed to in writing, software
21 | * distributed under the License is distributed on an AS IS BASIS, WITHOUT
22 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
23 | * See the License for the specific language governing permissions and
24 | * limitations under the License.
25 | */
26 |
27 | #include "arm_cmplx_conj_f16.c"
28 | #include "arm_cmplx_dot_prod_f16.c"
29 | #include "arm_cmplx_mag_f16.c"
30 | #include "arm_cmplx_mag_squared_f16.c"
31 | #include "arm_cmplx_mult_cmplx_f16.c"
32 | #include "arm_cmplx_mult_real_f16.c"
33 |
--------------------------------------------------------------------------------
/software/module/lib/puya_libs/CMSIS/DSP/Source/ControllerFunctions/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | cmake_minimum_required (VERSION 3.14)
2 |
3 | project(CMSISDSPController)
4 |
5 | include(configLib)
6 | include(configDsp)
7 |
8 | add_library(CMSISDSPController STATIC)
9 |
10 | configLib(CMSISDSPController ${ROOT})
11 | configDsp(CMSISDSPController ${ROOT})
12 |
13 | include(interpol)
14 | interpol(CMSISDSPController)
15 |
16 | if (CONFIGTABLE AND ALLFAST)
17 | target_compile_definitions(CMSISDSPController PUBLIC ARM_ALL_FAST_TABLES)
18 | endif()
19 |
20 | target_sources(CMSISDSPController PRIVATE arm_pid_init_f32.c)
21 | target_sources(CMSISDSPController PRIVATE arm_pid_init_q15.c)
22 | target_sources(CMSISDSPController PRIVATE arm_pid_init_q31.c)
23 | target_sources(CMSISDSPController PRIVATE arm_pid_reset_f32.c)
24 | target_sources(CMSISDSPController PRIVATE arm_pid_reset_q15.c)
25 | target_sources(CMSISDSPController PRIVATE arm_pid_reset_q31.c)
26 |
27 | if (NOT CONFIGTABLE OR ALLFAST OR ARM_SIN_COS_F32)
28 | target_sources(CMSISDSPController PRIVATE arm_sin_cos_f32.c)
29 | endif()
30 |
31 | if (NOT CONFIGTABLE OR ALLFAST OR ARM_SIN_COS_Q31)
32 | target_sources(CMSISDSPController PRIVATE arm_sin_cos_q31.c)
33 | endif()
34 |
35 |
36 |
37 | ### Includes
38 | target_include_directories(CMSISDSPController PUBLIC "${DSP}/Include")
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/software/module/lib/puya_libs/CMSIS/DSP/Source/ControllerFunctions/ControllerFunctions.c:
--------------------------------------------------------------------------------
1 | /* ----------------------------------------------------------------------
2 | * Project: CMSIS DSP Library
3 | * Title: ControllerFunctions.c
4 | * Description: Combination of all controller function source files.
5 | *
6 | * $Date: 18. March 2019
7 | * $Revision: V1.0.0
8 | *
9 | * Target Processor: Cortex-M cores
10 | * -------------------------------------------------------------------- */
11 | /*
12 | * Copyright (C) 2019 ARM Limited or its affiliates. All rights reserved.
13 | *
14 | * SPDX-License-Identifier: Apache-2.0
15 | *
16 | * Licensed under the Apache License, Version 2.0 (the License); you may
17 | * not use this file except in compliance with the License.
18 | * You may obtain a copy of the License at
19 | *
20 | * www.apache.org/licenses/LICENSE-2.0
21 | *
22 | * Unless required by applicable law or agreed to in writing, software
23 | * distributed under the License is distributed on an AS IS BASIS, WITHOUT
24 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
25 | * See the License for the specific language governing permissions and
26 | * limitations under the License.
27 | */
28 |
29 | #include "arm_pid_init_f32.c"
30 | #include "arm_pid_init_q15.c"
31 | #include "arm_pid_init_q31.c"
32 | #include "arm_pid_reset_f32.c"
33 | #include "arm_pid_reset_q15.c"
34 | #include "arm_pid_reset_q31.c"
35 |
36 | #if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_FAST_ALLOW_TABLES)
37 |
38 | #if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FAST_TABLES) || defined(ARM_TABLE_SIN_F32)
39 | #include "arm_sin_cos_f32.c"
40 | #endif
41 |
42 | #if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FAST_TABLES) || defined(ARM_TABLE_SIN_Q31)
43 | #include "arm_sin_cos_q31.c"
44 | #endif
45 |
46 | #endif
47 |
--------------------------------------------------------------------------------
/software/module/lib/puya_libs/CMSIS/DSP/Source/DistanceFunctions/DistanceFunctionsF16.c:
--------------------------------------------------------------------------------
1 | /* ----------------------------------------------------------------------
2 | * Project: CMSIS DSP Library
3 | * Title: DistanceFunctions.c
4 | * Description: Combination of all distance function f16 source files.
5 | *
6 | *
7 | * Target Processor: Cortex-M cores
8 | * -------------------------------------------------------------------- */
9 | /*
10 | * Copyright (C) 2020 ARM Limited or its affiliates. All rights reserved.
11 | *
12 | * SPDX-License-Identifier: Apache-2.0
13 | *
14 | * Licensed under the Apache License, Version 2.0 (the License); you may
15 | * not use this file except in compliance with the License.
16 | * You may obtain a copy of the License at
17 | *
18 | * www.apache.org/licenses/LICENSE-2.0
19 | *
20 | * Unless required by applicable law or agreed to in writing, software
21 | * distributed under the License is distributed on an AS IS BASIS, WITHOUT
22 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
23 | * See the License for the specific language governing permissions and
24 | * limitations under the License.
25 | */
26 |
27 | #include "arm_braycurtis_distance_f16.c"
28 | #include "arm_canberra_distance_f16.c"
29 | #include "arm_chebyshev_distance_f16.c"
30 | #include "arm_cityblock_distance_f16.c"
31 | #include "arm_correlation_distance_f16.c"
32 | #include "arm_cosine_distance_f16.c"
33 | #include "arm_euclidean_distance_f16.c"
34 | #include "arm_jensenshannon_distance_f16.c"
35 | #include "arm_minkowski_distance_f16.c"
36 |
37 |
--------------------------------------------------------------------------------
/software/module/lib/puya_libs/CMSIS/DSP/Source/FastMathFunctions/FastMathFunctionsF16.c:
--------------------------------------------------------------------------------
1 | /* ----------------------------------------------------------------------
2 | * Project: CMSIS DSP Library
3 | * Title: FastMathFunctions.c
4 | * Description: Combination of all fast math function source files.
5 | *
6 | * $Date: 16. March 2020
7 | * $Revision: V1.1.0
8 | *
9 | * Target Processor: Cortex-M cores
10 | * -------------------------------------------------------------------- */
11 | /*
12 | * Copyright (C) 2019-2020 ARM Limited or its affiliates. All rights reserved.
13 | *
14 | * SPDX-License-Identifier: Apache-2.0
15 | *
16 | * Licensed under the Apache License, Version 2.0 (the License); you may
17 | * not use this file except in compliance with the License.
18 | * You may obtain a copy of the License at
19 | *
20 | * www.apache.org/licenses/LICENSE-2.0
21 | *
22 | * Unless required by applicable law or agreed to in writing, software
23 | * distributed under the License is distributed on an AS IS BASIS, WITHOUT
24 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
25 | * See the License for the specific language governing permissions and
26 | * limitations under the License.
27 | */
28 |
29 | #include "arm_vexp_f16.c"
30 | #include "arm_vlog_f16.c"
31 | #include "arm_vinverse_f16.c"
32 | #include "arm_atan2_f16.c"
33 |
--------------------------------------------------------------------------------
/software/module/lib/puya_libs/CMSIS/DSP/Source/FastMathFunctions/arm_vexp_f64.c:
--------------------------------------------------------------------------------
1 | /* ----------------------------------------------------------------------
2 | * Project: CMSIS DSP Library
3 | * Title: arm_vlog_f64.c
4 | * Description: Fast vectorized log
5 | *
6 | * $Date: 13 September 2021
7 | * $Revision: V1.10.0
8 | *
9 | * Target Processor: Cortex-M and Cortex-A cores
10 | * -------------------------------------------------------------------- */
11 | /*
12 | * Copyright (C) 2010-2021 ARM Limited or its affiliates. All rights reserved.
13 | *
14 | * SPDX-License-Identifier: Apache-2.0
15 | *
16 | * Licensed under the Apache License, Version 2.0 (the License); you may
17 | * not use this file except in compliance with the License.
18 | * You may obtain a copy of the License at
19 | *
20 | * www.apache.org/licenses/LICENSE-2.0
21 | *
22 | * Unless required by applicable law or agreed to in writing, software
23 | * distributed under the License is distributed on an AS IS BASIS, WITHOUT
24 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
25 | * See the License for the specific language governing permissions and
26 | * limitations under the License.
27 | */
28 |
29 | #include "dsp/fast_math_functions.h"
30 | #include "arm_common_tables.h"
31 |
32 | void arm_vexp_f64(
33 | const float64_t * pSrc,
34 | float64_t * pDst,
35 | uint32_t blockSize)
36 | {
37 | uint32_t blkCnt;
38 |
39 | blkCnt = blockSize;
40 |
41 | while (blkCnt > 0U)
42 | {
43 | /* C = log(A) */
44 |
45 | /* Calculate log and store result in destination buffer. */
46 | *pDst++ = exp(*pSrc++);
47 |
48 | /* Decrement loop counter */
49 | blkCnt--;
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/software/module/lib/puya_libs/CMSIS/DSP/Source/FastMathFunctions/arm_vlog_f64.c:
--------------------------------------------------------------------------------
1 | /* ----------------------------------------------------------------------
2 | * Project: CMSIS DSP Library
3 | * Title: arm_vlog_f64.c
4 | * Description: Fast vectorized log
5 | *
6 | * $Date: 13 September 2021
7 | * $Revision: V1.10.0
8 | *
9 | * Target Processor: Cortex-M and Cortex-A cores
10 | * -------------------------------------------------------------------- */
11 | /*
12 | * Copyright (C) 2010-2021 ARM Limited or its affiliates. All rights reserved.
13 | *
14 | * SPDX-License-Identifier: Apache-2.0
15 | *
16 | * Licensed under the Apache License, Version 2.0 (the License); you may
17 | * not use this file except in compliance with the License.
18 | * You may obtain a copy of the License at
19 | *
20 | * www.apache.org/licenses/LICENSE-2.0
21 | *
22 | * Unless required by applicable law or agreed to in writing, software
23 | * distributed under the License is distributed on an AS IS BASIS, WITHOUT
24 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
25 | * See the License for the specific language governing permissions and
26 | * limitations under the License.
27 | */
28 |
29 | #include "dsp/fast_math_functions.h"
30 | #include "arm_common_tables.h"
31 |
32 | void arm_vlog_f64(
33 | const float64_t * pSrc,
34 | float64_t * pDst,
35 | uint32_t blockSize)
36 | {
37 | uint32_t blkCnt;
38 |
39 | blkCnt = blockSize;
40 |
41 | while (blkCnt > 0U)
42 | {
43 | /* C = log(A) */
44 |
45 | /* Calculate log and store result in destination buffer. */
46 | *pDst++ = log(*pSrc++);
47 |
48 | /* Decrement loop counter */
49 | blkCnt--;
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/software/module/lib/puya_libs/CMSIS/DSP/Source/FilteringFunctions/FilteringFunctionsF16.c:
--------------------------------------------------------------------------------
1 | /* ----------------------------------------------------------------------
2 | * Project: CMSIS DSP Library
3 | * Title: FilteringFunctions.c
4 | * Description: Combination of all filtering function f16 source files.
5 | *
6 | *
7 | * Target Processor: Cortex-M cores
8 | * -------------------------------------------------------------------- */
9 | /*
10 | * Copyright (C) 2020 ARM Limited or its affiliates. All rights reserved.
11 | *
12 | * SPDX-License-Identifier: Apache-2.0
13 | *
14 | * Licensed under the Apache License, Version 2.0 (the License); you may
15 | * not use this file except in compliance with the License.
16 | * You may obtain a copy of the License at
17 | *
18 | * www.apache.org/licenses/LICENSE-2.0
19 | *
20 | * Unless required by applicable law or agreed to in writing, software
21 | * distributed under the License is distributed on an AS IS BASIS, WITHOUT
22 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
23 | * See the License for the specific language governing permissions and
24 | * limitations under the License.
25 | */
26 |
27 | #include "arm_fir_f16.c"
28 | #include "arm_fir_init_f16.c"
29 | #include "arm_biquad_cascade_df1_f16.c"
30 | #include "arm_biquad_cascade_df1_init_f16.c"
31 | #include "arm_biquad_cascade_df2T_f16.c"
32 | #include "arm_biquad_cascade_df2T_init_f16.c"
33 | #include "arm_biquad_cascade_stereo_df2T_f16.c"
34 | #include "arm_biquad_cascade_stereo_df2T_init_f16.c"
35 | #include "arm_correlate_f16.c"
36 | #include "arm_levinson_durbin_f16.c"
37 |
--------------------------------------------------------------------------------
/software/module/lib/puya_libs/CMSIS/DSP/Source/InterpolationFunctions/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | cmake_minimum_required (VERSION 3.14)
2 |
3 | project(CMSISDSPInterpolation)
4 |
5 | include(configLib)
6 | include(configDsp)
7 |
8 |
9 | add_library(CMSISDSPInterpolation STATIC)
10 |
11 | target_sources(CMSISDSPInterpolation PRIVATE arm_bilinear_interp_f32.c)
12 | target_sources(CMSISDSPInterpolation PRIVATE arm_bilinear_interp_q15.c)
13 | target_sources(CMSISDSPInterpolation PRIVATE arm_bilinear_interp_q31.c)
14 | target_sources(CMSISDSPInterpolation PRIVATE arm_bilinear_interp_q7.c)
15 | target_sources(CMSISDSPInterpolation PRIVATE arm_linear_interp_f32.c)
16 | target_sources(CMSISDSPInterpolation PRIVATE arm_linear_interp_q15.c)
17 | target_sources(CMSISDSPInterpolation PRIVATE arm_linear_interp_q31.c)
18 | target_sources(CMSISDSPInterpolation PRIVATE arm_linear_interp_q7.c)
19 | target_sources(CMSISDSPInterpolation PRIVATE arm_spline_interp_f32.c)
20 | target_sources(CMSISDSPInterpolation PRIVATE arm_spline_interp_init_f32.c)
21 |
22 |
23 | configLib(CMSISDSPInterpolation ${ROOT})
24 | configDsp(CMSISDSPInterpolation ${ROOT})
25 |
26 | ### Includes
27 | target_include_directories(CMSISDSPInterpolation PUBLIC "${DSP}/Include")
28 |
29 |
30 |
31 | if ((NOT ARMAC5) AND (NOT DISABLEFLOAT16))
32 | target_sources(CMSISDSPInterpolation PRIVATE arm_bilinear_interp_f16.c)
33 | target_sources(CMSISDSPInterpolation PRIVATE arm_linear_interp_f16.c)
34 | endif()
--------------------------------------------------------------------------------
/software/module/lib/puya_libs/CMSIS/DSP/Source/InterpolationFunctions/InterpolationFunctions.c:
--------------------------------------------------------------------------------
1 | /* ----------------------------------------------------------------------
2 | * Project: CMSIS DSP Library
3 | * Title: InterpolationFunctions.c
4 | * Description: Combination of all interpolation function source files.
5 | *
6 | * $Date: 22. July 2020
7 | * $Revision: V1.0.0
8 | *
9 | * Target Processor: Cortex-M cores
10 | * -------------------------------------------------------------------- */
11 | /*
12 | * Copyright (C) 2020 ARM Limited or its affiliates. All rights reserved.
13 | *
14 | * SPDX-License-Identifier: Apache-2.0
15 | *
16 | * Licensed under the Apache License, Version 2.0 (the License); you may
17 | * not use this file except in compliance with the License.
18 | * You may obtain a copy of the License at
19 | *
20 | * www.apache.org/licenses/LICENSE-2.0
21 | *
22 | * Unless required by applicable law or agreed to in writing, software
23 | * distributed under the License is distributed on an AS IS BASIS, WITHOUT
24 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
25 | * See the License for the specific language governing permissions and
26 | * limitations under the License.
27 | */
28 |
29 | #include "arm_bilinear_interp_f32.c"
30 | #include "arm_bilinear_interp_q15.c"
31 | #include "arm_bilinear_interp_q31.c"
32 | #include "arm_bilinear_interp_q7.c"
33 | #include "arm_linear_interp_f32.c"
34 | #include "arm_linear_interp_q15.c"
35 | #include "arm_linear_interp_q31.c"
36 | #include "arm_linear_interp_q7.c"
37 | #include "arm_spline_interp_f32.c"
38 | #include "arm_spline_interp_init_f32.c"
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/software/module/lib/puya_libs/CMSIS/DSP/Source/InterpolationFunctions/InterpolationFunctionsF16.c:
--------------------------------------------------------------------------------
1 | /* ----------------------------------------------------------------------
2 | * Project: CMSIS DSP Library
3 | * Title: InterpolationFunctions.c
4 | * Description: Combination of all interpolation function source files.
5 | *
6 | * $Date: 22. July 2020
7 | * $Revision: V1.0.0
8 | *
9 | * Target Processor: Cortex-M cores
10 | * -------------------------------------------------------------------- */
11 | /*
12 | * Copyright (C) 2020 ARM Limited or its affiliates. All rights reserved.
13 | *
14 | * SPDX-License-Identifier: Apache-2.0
15 | *
16 | * Licensed under the Apache License, Version 2.0 (the License); you may
17 | * not use this file except in compliance with the License.
18 | * You may obtain a copy of the License at
19 | *
20 | * www.apache.org/licenses/LICENSE-2.0
21 | *
22 | * Unless required by applicable law or agreed to in writing, software
23 | * distributed under the License is distributed on an AS IS BASIS, WITHOUT
24 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
25 | * See the License for the specific language governing permissions and
26 | * limitations under the License.
27 | */
28 |
29 | #include "arm_bilinear_interp_f16.c"
30 | #include "arm_linear_interp_f16.c"
31 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/software/module/lib/puya_libs/CMSIS/DSP/Source/MatrixFunctions/MatrixFunctionsF16.c:
--------------------------------------------------------------------------------
1 | /* ----------------------------------------------------------------------
2 | * Project: CMSIS DSP Library
3 | * Title: MatrixFunctions.c
4 | * Description: Combination of all matrix function f16 source files.
5 | *
6 | * $Date: 18. March 2020
7 | * $Revision: V1.0.0
8 | *
9 | * Target Processor: Cortex-M cores
10 | * -------------------------------------------------------------------- */
11 | /*
12 | * Copyright (C) 2020 ARM Limited or its affiliates. All rights reserved.
13 | *
14 | * SPDX-License-Identifier: Apache-2.0
15 | *
16 | * Licensed under the Apache License, Version 2.0 (the License); you may
17 | * not use this file except in compliance with the License.
18 | * You may obtain a copy of the License at
19 | *
20 | * www.apache.org/licenses/LICENSE-2.0
21 | *
22 | * Unless required by applicable law or agreed to in writing, software
23 | * distributed under the License is distributed on an AS IS BASIS, WITHOUT
24 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
25 | * See the License for the specific language governing permissions and
26 | * limitations under the License.
27 | */
28 |
29 | #include "arm_mat_add_f16.c"
30 | #include "arm_mat_sub_f16.c"
31 | #include "arm_mat_trans_f16.c"
32 | #include "arm_mat_scale_f16.c"
33 | #include "arm_mat_mult_f16.c"
34 | #include "arm_mat_vec_mult_f16.c"
35 | #include "arm_mat_cmplx_trans_f16.c"
36 | #include "arm_mat_cmplx_mult_f16.c"
37 | #include "arm_mat_inverse_f16.c"
38 | #include "arm_mat_init_f16.c"
39 | #include "arm_mat_cholesky_f16.c"
40 | #include "arm_mat_solve_upper_triangular_f16.c"
41 | #include "arm_mat_solve_lower_triangular_f16.c"
42 |
--------------------------------------------------------------------------------
/software/module/lib/puya_libs/CMSIS/DSP/Source/QuaternionMathFunctions/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | cmake_minimum_required (VERSION 3.14)
2 |
3 | project(CMSISDSPQuaternionMath)
4 |
5 | include(configLib)
6 | include(configDsp)
7 |
8 |
9 |
10 | add_library(CMSISDSPQuaternionMath STATIC arm_quaternion_norm_f32.c)
11 | target_sources(CMSISDSPQuaternionMath PRIVATE arm_quaternion_inverse_f32.c)
12 | target_sources(CMSISDSPQuaternionMath PRIVATE arm_quaternion_conjugate_f32.c)
13 | target_sources(CMSISDSPQuaternionMath PRIVATE arm_quaternion_normalize_f32.c)
14 | target_sources(CMSISDSPQuaternionMath PRIVATE arm_quaternion_product_single_f32.c)
15 | target_sources(CMSISDSPQuaternionMath PRIVATE arm_quaternion_product_f32.c)
16 | target_sources(CMSISDSPQuaternionMath PRIVATE arm_quaternion2rotation_f32.c)
17 | target_sources(CMSISDSPQuaternionMath PRIVATE arm_rotation2quaternion_f32.c)
18 |
19 |
20 | if ((NOT ARMAC5) AND (NOT DISABLEFLOAT16))
21 | endif()
22 |
23 |
24 | configLib(CMSISDSPQuaternionMath ${ROOT})
25 | configDsp(CMSISDSPQuaternionMath ${ROOT})
26 |
27 | ### Includes
28 | target_include_directories(CMSISDSPQuaternionMath PUBLIC "${DSP}/Include")
29 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/software/module/lib/puya_libs/CMSIS/DSP/Source/QuaternionMathFunctions/QuaternionMathFunctions.c:
--------------------------------------------------------------------------------
1 | /* ----------------------------------------------------------------------
2 | * Project: CMSIS DSP Library
3 | * Title: QuaternionMathFunctions.c
4 | * Description: Combination of all quaternion math function source files.
5 | *
6 | *
7 | * Target Processor: Cortex-M cores
8 | * -------------------------------------------------------------------- */
9 | /*
10 | * Copyright (C) 2019-2021 ARM Limited or its affiliates. All rights reserved.
11 | *
12 | * SPDX-License-Identifier: Apache-2.0
13 | *
14 | * Licensed under the Apache License, Version 2.0 (the License); you may
15 | * not use this file except in compliance with the License.
16 | * You may obtain a copy of the License at
17 | *
18 | * www.apache.org/licenses/LICENSE-2.0
19 | *
20 | * Unless required by applicable law or agreed to in writing, software
21 | * distributed under the License is distributed on an AS IS BASIS, WITHOUT
22 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
23 | * See the License for the specific language governing permissions and
24 | * limitations under the License.
25 | */
26 |
27 | #include "arm_quaternion_norm_f32.c"
28 | #include "arm_quaternion_inverse_f32.c"
29 | #include "arm_quaternion_conjugate_f32.c"
30 | #include "arm_quaternion_normalize_f32.c"
31 | #include "arm_quaternion_product_single_f32.c"
32 | #include "arm_quaternion_product_f32.c"
33 | #include "arm_quaternion2rotation_f32.c"
34 | #include "arm_rotation2quaternion_f32.c"
35 |
--------------------------------------------------------------------------------
/software/module/lib/puya_libs/CMSIS/DSP/Source/SVMFunctions/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | cmake_minimum_required (VERSION 3.14)
2 |
3 | project(CMSISDSPSVM)
4 |
5 | include(configLib)
6 | include(configDsp)
7 |
8 |
9 | add_library(CMSISDSPSVM STATIC)
10 |
11 | target_sources(CMSISDSPSVM PRIVATE arm_svm_linear_init_f32.c)
12 | target_sources(CMSISDSPSVM PRIVATE arm_svm_rbf_init_f32.c)
13 | target_sources(CMSISDSPSVM PRIVATE arm_svm_linear_predict_f32.c)
14 | target_sources(CMSISDSPSVM PRIVATE arm_svm_rbf_predict_f32.c)
15 | target_sources(CMSISDSPSVM PRIVATE arm_svm_polynomial_init_f32.c)
16 | target_sources(CMSISDSPSVM PRIVATE arm_svm_sigmoid_init_f32.c)
17 | target_sources(CMSISDSPSVM PRIVATE arm_svm_polynomial_predict_f32.c)
18 | target_sources(CMSISDSPSVM PRIVATE arm_svm_sigmoid_predict_f32.c)
19 |
20 |
21 |
22 | configLib(CMSISDSPSVM ${ROOT})
23 | configDsp(CMSISDSPSVM ${ROOT})
24 |
25 | ### Includes
26 | target_include_directories(CMSISDSPSVM PUBLIC "${DSP}/Include")
27 |
28 | if ((NOT ARMAC5) AND (NOT DISABLEFLOAT16))
29 | target_sources(CMSISDSPSVM PRIVATE arm_svm_linear_init_f16.c)
30 | target_sources(CMSISDSPSVM PRIVATE arm_svm_rbf_init_f16.c)
31 | target_sources(CMSISDSPSVM PRIVATE arm_svm_linear_predict_f16.c)
32 | target_sources(CMSISDSPSVM PRIVATE arm_svm_rbf_predict_f16.c)
33 | target_sources(CMSISDSPSVM PRIVATE arm_svm_polynomial_init_f16.c)
34 | target_sources(CMSISDSPSVM PRIVATE arm_svm_sigmoid_init_f16.c)
35 | target_sources(CMSISDSPSVM PRIVATE arm_svm_polynomial_predict_f16.c)
36 | target_sources(CMSISDSPSVM PRIVATE arm_svm_sigmoid_predict_f16.c)
37 | endif()
38 |
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/software/module/lib/puya_libs/CMSIS/DSP/Source/SVMFunctions/SVMFunctions.c:
--------------------------------------------------------------------------------
1 | /* ----------------------------------------------------------------------
2 | * Project: CMSIS DSP Library
3 | * Title: BayesFunctions.c
4 | * Description: Combination of all SVM function source files.
5 | *
6 | * $Date: 16. March 2020
7 | * $Revision: V1.0.0
8 | *
9 | * Target Processor: Cortex-M cores
10 | * -------------------------------------------------------------------- */
11 | /*
12 | * Copyright (C) 2020 ARM Limited or its affiliates. All rights reserved.
13 | *
14 | * SPDX-License-Identifier: Apache-2.0
15 | *
16 | * Licensed under the Apache License, Version 2.0 (the License); you may
17 | * not use this file except in compliance with the License.
18 | * You may obtain a copy of the License at
19 | *
20 | * www.apache.org/licenses/LICENSE-2.0
21 | *
22 | * Unless required by applicable law or agreed to in writing, software
23 | * distributed under the License is distributed on an AS IS BASIS, WITHOUT
24 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
25 | * See the License for the specific language governing permissions and
26 | * limitations under the License.
27 | */
28 |
29 | #include "arm_svm_linear_init_f32.c"
30 | #include "arm_svm_linear_predict_f32.c"
31 | #include "arm_svm_polynomial_init_f32.c"
32 | #include "arm_svm_polynomial_predict_f32.c"
33 | #include "arm_svm_rbf_init_f32.c"
34 | #include "arm_svm_rbf_predict_f32.c"
35 | #include "arm_svm_sigmoid_init_f32.c"
36 | #include "arm_svm_sigmoid_predict_f32.c"
37 |
--------------------------------------------------------------------------------
/software/module/lib/puya_libs/CMSIS/DSP/Source/SVMFunctions/SVMFunctionsF16.c:
--------------------------------------------------------------------------------
1 | /* ----------------------------------------------------------------------
2 | * Project: CMSIS DSP Library
3 | * Title: BayesFunctions.c
4 | * Description: Combination of all SVM function source files.
5 | *
6 | * $Date: 16. March 2020
7 | * $Revision: V1.0.0
8 | *
9 | * Target Processor: Cortex-M cores
10 | * -------------------------------------------------------------------- */
11 | /*
12 | * Copyright (C) 2020 ARM Limited or its affiliates. All rights reserved.
13 | *
14 | * SPDX-License-Identifier: Apache-2.0
15 | *
16 | * Licensed under the Apache License, Version 2.0 (the License); you may
17 | * not use this file except in compliance with the License.
18 | * You may obtain a copy of the License at
19 | *
20 | * www.apache.org/licenses/LICENSE-2.0
21 | *
22 | * Unless required by applicable law or agreed to in writing, software
23 | * distributed under the License is distributed on an AS IS BASIS, WITHOUT
24 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
25 | * See the License for the specific language governing permissions and
26 | * limitations under the License.
27 | */
28 |
29 | #include "arm_svm_linear_init_f16.c"
30 | #include "arm_svm_linear_predict_f16.c"
31 | #include "arm_svm_polynomial_init_f16.c"
32 | #include "arm_svm_polynomial_predict_f16.c"
33 | #include "arm_svm_rbf_init_f16.c"
34 | #include "arm_svm_rbf_predict_f16.c"
35 | #include "arm_svm_sigmoid_init_f16.c"
36 | #include "arm_svm_sigmoid_predict_f16.c"
37 |
--------------------------------------------------------------------------------
/software/module/lib/puya_libs/CMSIS/DSP/Source/SupportFunctions/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | cmake_minimum_required (VERSION 3.14)
2 |
3 | project(CMSISDSPSupport)
4 |
5 | include(configLib)
6 | include(configDsp)
7 |
8 | file(GLOB SRC "./*_*.c")
9 |
10 | add_library(CMSISDSPSupport STATIC ${SRC})
11 |
12 | configLib(CMSISDSPSupport ${ROOT})
13 | configDsp(CMSISDSPSupport ${ROOT})
14 |
15 | ### Includes
16 | target_include_directories(CMSISDSPSupport PUBLIC "${DSP}/Include")
17 |
18 | if ((NOT ARMAC5) AND (NOT DISABLEFLOAT16))
19 | target_sources(CMSISDSPSupport PRIVATE arm_copy_f16.c)
20 | target_sources(CMSISDSPSupport PRIVATE arm_fill_f16.c)
21 | target_sources(CMSISDSPSupport PRIVATE arm_f16_to_q15.c)
22 | target_sources(CMSISDSPSupport PRIVATE arm_q15_to_f16.c)
23 | target_sources(CMSISDSPSupport PRIVATE arm_float_to_f16.c)
24 | target_sources(CMSISDSPSupport PRIVATE arm_f16_to_float.c)
25 | target_sources(CMSISDSPSupport PRIVATE arm_weighted_sum_f16.c)
26 | target_sources(CMSISDSPSupport PRIVATE arm_barycenter_f16.c)
27 | endif()
28 |
29 |
--------------------------------------------------------------------------------
/software/module/lib/puya_libs/CMSIS/DSP/Source/SupportFunctions/SupportFunctionsF16.c:
--------------------------------------------------------------------------------
1 | /* ----------------------------------------------------------------------
2 | * Project: CMSIS DSP Library
3 | * Title: SupportFunctions.c
4 | * Description: Combination of all support function source files.
5 | *
6 | * $Date: 16. March 2020
7 | * $Revision: V1.1.0
8 | *
9 | * Target Processor: Cortex-M cores
10 | * -------------------------------------------------------------------- */
11 | /*
12 | * Copyright (C) 2019-2020 ARM Limited or its affiliates. All rights reserved.
13 | *
14 | * SPDX-License-Identifier: Apache-2.0
15 | *
16 | * Licensed under the Apache License, Version 2.0 (the License); you may
17 | * not use this file except in compliance with the License.
18 | * You may obtain a copy of the License at
19 | *
20 | * www.apache.org/licenses/LICENSE-2.0
21 | *
22 | * Unless required by applicable law or agreed to in writing, software
23 | * distributed under the License is distributed on an AS IS BASIS, WITHOUT
24 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
25 | * See the License for the specific language governing permissions and
26 | * limitations under the License.
27 | */
28 |
29 | #include "arm_copy_f16.c"
30 | #include "arm_fill_f16.c"
31 | #include "arm_f16_to_q15.c"
32 | #include "arm_f16_to_float.c"
33 | #include "arm_q15_to_f16.c"
34 | #include "arm_float_to_f16.c"
35 | #include "arm_weighted_sum_f16.c"
36 | #include "arm_barycenter_f16.c"
37 |
--------------------------------------------------------------------------------
/software/module/lib/puya_libs/CMSIS/DSP/Source/SupportFunctions/arm_sort_init_f32.c:
--------------------------------------------------------------------------------
1 | /* ----------------------------------------------------------------------
2 | * Project: CMSIS DSP Library
3 | * Title: arm_sort_init_f32.c
4 | * Description: Floating point sort initialization function
5 | *
6 | * $Date: 23 April 2021
7 | * $Revision: V1.9.0
8 | *
9 | * Target Processor: Cortex-M and Cortex-A cores
10 | * -------------------------------------------------------------------- */
11 | /*
12 | * Copyright (C) 2010-2021 ARM Limited or its affiliates. All rights reserved.
13 | *
14 | * SPDX-License-Identifier: Apache-2.0
15 | *
16 | * Licensed under the Apache License, Version 2.0 (the License); you may
17 | * not use this file except in compliance with the License.
18 | * You may obtain a copy of the License at
19 | *
20 | * www.apache.org/licenses/LICENSE-2.0
21 | *
22 | * Unless required by applicable law or agreed to in writing, software
23 | * distributed under the License is distributed on an AS IS BASIS, WITHOUT
24 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
25 | * See the License for the specific language governing permissions and
26 | * limitations under the License.
27 | */
28 |
29 | #include "arm_sorting.h"
30 |
31 | /**
32 | @ingroup groupSupport
33 | */
34 |
35 | /**
36 | @addtogroup Sorting
37 | @{
38 | */
39 |
40 |
41 | /**
42 | * @param[in,out] S points to an instance of the sorting structure.
43 | * @param[in] alg Selected algorithm.
44 | * @param[in] dir Sorting order.
45 | */
46 | void arm_sort_init_f32(arm_sort_instance_f32 * S, arm_sort_alg alg, arm_sort_dir dir)
47 | {
48 | S->alg = alg;
49 | S->dir = dir;
50 | }
51 |
52 | /**
53 | @} end of Sorting group
54 | */
55 |
--------------------------------------------------------------------------------
/software/module/lib/puya_libs/CMSIS/DSP/Source/TransformFunctions/TransformFunctionsF16.c:
--------------------------------------------------------------------------------
1 | /* ----------------------------------------------------------------------
2 | * Project: CMSIS DSP Library
3 | * Title: TransformFunctionsF16.c
4 | * Description: Combination of all transform function f16 source files.
5 | *
6 | * $Date: 20. April 2020
7 | * $Revision: V1.0.0
8 | *
9 | * Target Processor: Cortex-M cores
10 | * -------------------------------------------------------------------- */
11 | /*
12 | * Copyright (C) 2019 ARM Limited or its affiliates. All rights reserved.
13 | *
14 | * SPDX-License-Identifier: Apache-2.0
15 | *
16 | * Licensed under the Apache License, Version 2.0 (the License); you may
17 | * not use this file except in compliance with the License.
18 | * You may obtain a copy of the License at
19 | *
20 | * www.apache.org/licenses/LICENSE-2.0
21 | *
22 | * Unless required by applicable law or agreed to in writing, software
23 | * distributed under the License is distributed on an AS IS BASIS, WITHOUT
24 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
25 | * See the License for the specific language governing permissions and
26 | * limitations under the License.
27 | */
28 |
29 | #include "arm_cfft_f16.c"
30 | #include "arm_cfft_init_f16.c"
31 | #include "arm_cfft_radix2_f16.c"
32 | #include "arm_cfft_radix4_f16.c"
33 | #include "arm_rfft_fast_init_f16.c"
34 | #include "arm_rfft_fast_f16.c"
35 | #include "arm_cfft_radix8_f16.c"
36 |
37 | #include "arm_bitreversal_f16.c"
38 |
39 | #include "arm_mfcc_init_f16.c"
40 | #include "arm_mfcc_f16.c"
41 |
42 | /* Deprecated */
43 | #include "arm_cfft_radix2_init_f16.c"
44 | #include "arm_cfft_radix4_init_f16.c"
45 |
--------------------------------------------------------------------------------
/software/module/lib/puya_libs/CMSIS/DSP/Source/configDsp.cmake:
--------------------------------------------------------------------------------
1 | function(configDsp project root)
2 |
3 | if (HOST)
4 | target_compile_definitions(${project} PUBLIC __GNUC_PYTHON__)
5 | endif()
6 |
7 | if (CONFIGTABLE)
8 | # Public because initialization for FFT may be defined in client code
9 | # and needs access to the table.
10 | target_compile_definitions(${project} PUBLIC ARM_DSP_CONFIG_TABLES)
11 | endif()
12 |
13 | if (LOOPUNROLL)
14 | target_compile_definitions(${project} PRIVATE ARM_MATH_LOOPUNROLL)
15 | endif()
16 |
17 | if (ROUNDING)
18 | target_compile_definitions(${project} PRIVATE ARM_MATH_ROUNDING)
19 | endif()
20 |
21 | if (MATRIXCHECK)
22 | target_compile_definitions(${project} PRIVATE ARM_MATH_MATRIX_CHECK)
23 | endif()
24 |
25 | if (AUTOVECTORIZE)
26 | target_compile_definitions(${project} PRIVATE ARM_MATH_AUTOVECTORIZE)
27 | endif()
28 |
29 | if (NEON OR NEONEXPERIMENTAL)
30 | # Used in arm_vec_math.h
31 | target_include_directories(${project} PUBLIC "${root}/CMSIS/DSP/ComputeLibrary/Include")
32 | endif()
33 |
34 | if (MVEFLOAT16)
35 | target_compile_definitions(${project} PRIVATE ARM_MATH_MVE_FLOAT16)
36 | endif()
37 |
38 | if (HELIUM OR MVEF OR SUPPORT)
39 | target_include_directories(${project} PRIVATE "${root}/CMSIS/DSP/PrivateInclude")
40 | endif()
41 |
42 | if (DISABLEFLOAT16)
43 | target_compile_definitions(${project} PRIVATE DISABLEFLOAT16)
44 | endif()
45 |
46 |
47 | endfunction()
48 |
--------------------------------------------------------------------------------
/software/module/lib/puya_libs/EPaper/Examples/EPD_Test.h:
--------------------------------------------------------------------------------
1 | /*****************************************************************************
2 | * | File : EPD_Test.h
3 | * | Author : Waveshare team
4 | * | Function : e-Paper test Demo
5 | * | Info :
6 | *----------------
7 | * | This version: V1.0
8 | * | Date : 2019-06-11
9 | * | Info :
10 | #
11 | # Permission is hereby granted, free of charge, to any person obtaining a copy
12 | # of this software and associated documnetation files (the "Software"), to deal
13 | # in the Software without restriction, including without limitation the rights
14 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
15 | # copies of the Software, and to permit persons to whom the Software is
16 | # furished to do so, subject to the following conditions:
17 | #
18 | # The above copyright notice and this permission notice shall be included in
19 | # all copies or substantial portions of the Software.
20 | #
21 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
22 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23 | # FITNESS OR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
24 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
25 | # LIABILITY WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
26 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
27 | # THE SOFTWARE.
28 | #
29 | ******************************************************************************/
30 | #ifndef _EPD_TEST_H_
31 | #define _EPD_TEST_H_
32 |
33 | #include "EPD_Common.h"
34 | #include "GUI_Paint.h"
35 | #include "EPD_TestImage.h"
36 |
37 | #include // malloc() free()
38 |
39 | int EPD_test(void);
40 |
41 | #endif
42 |
--------------------------------------------------------------------------------
/software/module/lib/puya_libs/EPaper/Fonts/fonts.h:
--------------------------------------------------------------------------------
1 | /**
2 | ******************************************************************************
3 | * @file fonts.h
4 | * @author MCD Application Team
5 | * @version V1.0.0
6 | * @date 18-February-2014
7 | * @brief Header for fonts.c file
8 | ******************************************************************************
9 | */
10 |
11 | /* Define to prevent recursive inclusion -------------------------------------*/
12 | #ifndef __FONTS_H
13 | #define __FONTS_H
14 |
15 | #define MAX_HEIGHT_FONT 41
16 | #define MAX_WIDTH_FONT 32
17 | #define OFFSET_BITMAP
18 |
19 | #ifdef __cplusplus
20 | extern "C" {
21 | #endif
22 |
23 | /* Includes ------------------------------------------------------------------*/
24 | #include
25 |
26 | //ASCII
27 | typedef struct _tFont
28 | {
29 | const uint8_t *table;
30 | uint16_t Width;
31 | uint16_t Height;
32 |
33 | } sFONT;
34 |
35 |
36 | typedef struct
37 | {
38 | unsigned char index[3];
39 | const char matrix[MAX_HEIGHT_FONT*MAX_WIDTH_FONT/8];
40 | } CH_CN;
41 |
42 |
43 | typedef struct
44 | {
45 | const CH_CN *table;
46 | uint16_t size;
47 | uint16_t ASCII_Width;
48 | uint16_t Width;
49 | uint16_t Height;
50 |
51 | } cFONT;
52 |
53 | extern sFONT Font24;
54 | extern sFONT Font20;
55 | extern sFONT Font16;
56 | extern sFONT Font12;
57 | extern sFONT Font8;
58 |
59 | extern cFONT Font12CN;
60 | extern cFONT Font24CN;
61 |
62 | #ifdef __cplusplus
63 | }
64 | #endif
65 |
66 | #endif /* __FONTS_H */
67 |
--------------------------------------------------------------------------------
/software/module/lib/puya_libs/EPaper/Lib/EPD_1in64g.h:
--------------------------------------------------------------------------------
1 | /*****************************************************************************
2 | * | File : EPD_1in64g.h
3 | * | Author : Waveshare team
4 | * | Function : 1.64inch e-paper (G)
5 | * | Info :
6 | *----------------
7 | * | This version: V1.0
8 | * | Date : 2022-07-14
9 | * | Info :
10 | * -----------------------------------------------------------------------------
11 | ******************************************************************************/
12 | #ifndef __EPD_1IN64G_H_
13 | #define __EPD_1IN64G_H_
14 |
15 | #include "EPD_Common.h"
16 |
17 | // Display resolution
18 | #define EPD_1IN64G_WIDTH 168
19 | #define EPD_1IN64G_HEIGHT 168
20 |
21 | // Color
22 | #define EPD_1IN64G_BLACK 0x0
23 | #define EPD_1IN64G_WHITE 0x1
24 | #define EPD_1IN64G_YELLOW 0x2
25 | #define EPD_1IN64G_RED 0x3
26 |
27 | void EPD_1IN64G_Init(void);
28 | void EPD_1IN64G_Clear(UBYTE color);
29 | void EPD_1IN64G_Display(UBYTE *Image);
30 | void EPD_1IN64G_Sleep(void);
31 |
32 | #endif
33 |
--------------------------------------------------------------------------------
/software/module/lib/puya_libs/EPaper/Lib/EPD_3in0g.h:
--------------------------------------------------------------------------------
1 | /*****************************************************************************
2 | * | File : EPD_3in0g.h
3 | * | Author : Waveshare team
4 | * | Function : 3inch e-paper (G)
5 | * | Info :
6 | *----------------
7 | * | This version: V1.0
8 | * | Date : 2022-07-15
9 | * | Info :
10 | * -----------------------------------------------------------------------------
11 | ******************************************************************************/
12 | #ifndef __EPD_3IN0G_H_
13 | #define __EPD_3IN0G_H_
14 |
15 | #include "EPD_Common.h"
16 |
17 | // Display resolution
18 | #define EPD_3IN0G_WIDTH 168
19 | #define EPD_3IN0G_HEIGHT 400
20 |
21 | // Color
22 | #define EPD_3IN0G_BLACK 0x0
23 | #define EPD_3IN0G_WHITE 0x1
24 | #define EPD_3IN0G_YELLOW 0x2
25 | #define EPD_3IN0G_RED 0x3
26 |
27 | void EPD_3IN0G_Init(void);
28 | void EPD_3IN0G_Clear(UBYTE color);
29 | void EPD_3IN0G_Display(UBYTE *Image);
30 | void EPD_3IN0G_Sleep(void);
31 |
32 | #endif
33 |
--------------------------------------------------------------------------------
/software/module/lib/puya_libs/FreeRTOS/GitHub-FreeRTOS-Kernel-Home.url:
--------------------------------------------------------------------------------
1 | [{000214A0-0000-0000-C000-000000000046}]
2 | Prop3=19,2
3 | [InternetShortcut]
4 | URL=https://github.com/FreeRTOS/FreeRTOS-Kernel
5 | IconIndex=0
6 | IDList=
7 | HotKey=0
8 |
9 |
--------------------------------------------------------------------------------
/software/module/lib/puya_libs/FreeRTOS/LICENSE.md:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Permission is hereby granted, free of charge, to any person obtaining a copy
4 | of this software and associated documentation files (the "Software"), to deal
5 | in the Software without restriction, including without limitation the rights
6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 | copies of the Software, and to permit persons to whom the Software is
8 | furnished to do so, subject to the following conditions:
9 |
10 | The above copyright notice and this permission notice shall be included in all
11 | copies or substantial portions of the Software.
12 |
13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19 | SOFTWARE.
20 |
--------------------------------------------------------------------------------
/software/module/lib/puya_libs/FreeRTOS/Quick_Start_Guide.url:
--------------------------------------------------------------------------------
1 | [InternetShortcut]
2 | URL=https://www.FreeRTOS.org/FreeRTOS-quick-start-guide.html
3 | IDList=
4 | [{000214A0-0000-0000-C000-000000000046}]
5 | Prop3=19,2
6 |
--------------------------------------------------------------------------------
/software/module/lib/puya_libs/FreeRTOS/include/StackMacros.h:
--------------------------------------------------------------------------------
1 | /*
2 | * FreeRTOS Kernel V10.5.1
3 | * Copyright (C) 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved.
4 | *
5 | * SPDX-License-Identifier: MIT
6 | *
7 | * Permission is hereby granted, free of charge, to any person obtaining a copy of
8 | * this software and associated documentation files (the "Software"), to deal in
9 | * the Software without restriction, including without limitation the rights to
10 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
11 | * the Software, and to permit persons to whom the Software is furnished to do so,
12 | * 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, FITNESS
19 | * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
20 | * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
21 | * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
22 | * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23 | *
24 | * https://www.FreeRTOS.org
25 | * https://github.com/FreeRTOS
26 | *
27 | */
28 |
29 |
30 | #ifndef _MSC_VER /* Visual Studio doesn't support #warning. */
31 | #warning The name of this file has changed to stack_macros.h. Please update your code accordingly. This source file (which has the original name) will be removed in a future release.
32 | #endif
33 |
34 | #include "stack_macros.h"
35 |
--------------------------------------------------------------------------------
/software/module/lib/puya_libs/FreeRTOS/manifest.yml:
--------------------------------------------------------------------------------
1 | name : "FreeRTOS-Kernel"
2 | version: "v10.5.1"
3 | description: "FreeRTOS Kernel."
4 | license: "MIT"
5 |
--------------------------------------------------------------------------------
/software/module/lib/puya_libs/FreeRTOS/portable/MemMang/ReadMe.url:
--------------------------------------------------------------------------------
1 | [{000214A0-0000-0000-C000-000000000046}]
2 | Prop3=19,2
3 | [InternetShortcut]
4 | URL=https://www.FreeRTOS.org/a00111.html
5 | IDList=
6 |
--------------------------------------------------------------------------------
/software/module/lib/rbuff/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | project(rbuff)
2 | add_library(${PROJECT_NAME} STATIC rbuff.c)
3 | target_include_directories(${PROJECT_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/inc)
--------------------------------------------------------------------------------
/software/module/lib/rbuff/rbuff.c:
--------------------------------------------------------------------------------
1 | #include "rbuff.h"
2 |
3 | void rbuff_init(rbuff_t *rbuff, uint8_t *buff, uint8_t size)
4 | {
5 | rbuff->buff = buff;
6 | rbuff->size = size;
7 | rbuff->r_cnt = 0;
8 | rbuff->w_cnt = 0;
9 | }
10 |
11 | uint8_t rbuff_read(rbuff_t *rbuff, uint8_t *data, uint8_t size)
12 | {
13 | uint8_t cnt = 0;
14 | while (cnt < size && !rbuff_is_empty(rbuff)) {
15 | data[cnt++] = rbuff->buff[rbuff->r_cnt];
16 | rbuff->r_cnt = (rbuff->r_cnt + 1) % rbuff->size;
17 | }
18 | return cnt;
19 | }
20 |
21 | uint8_t rbuff_write(rbuff_t *rbuff, uint8_t *data, uint8_t size)
22 | {
23 | uint8_t cnt = 0;
24 | while (cnt < size && !rbuff_is_full(rbuff)) {
25 | rbuff->buff[rbuff->w_cnt] = data[cnt++];
26 | rbuff->w_cnt = (rbuff->w_cnt + 1) % rbuff->size;
27 | }
28 | return cnt;
29 | }
30 |
31 | bool rbuff_is_empty(rbuff_t *rbuff)
32 | {
33 | return (rbuff->r_cnt == rbuff->w_cnt);
34 | }
35 |
36 | bool rbuff_is_full(rbuff_t *rbuff)
37 | {
38 | return (rbuff->r_cnt == (rbuff->w_cnt + 1) % rbuff->size);
39 | }
40 |
41 | uint8_t rbuff_cnt_used(rbuff_t *rbuff)
42 | {
43 | return (rbuff->w_cnt - rbuff->r_cnt + rbuff->size) % rbuff->size;
44 | }
45 |
46 | uint8_t rbuff_cnt_free(rbuff_t *rbuff)
47 | {
48 | return rbuff->size - rbuff_cnt_used(rbuff) - 1;
49 | }
50 |
51 | void rbuff_flush(rbuff_t *rbuff)
52 | {
53 | rbuff->r_cnt = 0;
54 | rbuff->w_cnt = 0;
55 | }
56 |
57 | uint8_t rbuff_peek(rbuff_t *rbuff, uint8_t *data, uint8_t size)
58 | {
59 | uint8_t cnt = 0, r_cnt = rbuff->r_cnt;
60 | while (cnt < size && !rbuff_is_empty(rbuff)) {
61 | data[cnt++] = rbuff->buff[r_cnt++];
62 | r_cnt = r_cnt % size;
63 | }
64 | return cnt;
65 | }
--------------------------------------------------------------------------------
/software/module/lib/uart_driver/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | project(uart_driver)
2 | add_library(${PROJECT_NAME} STATIC uart_driver.c)
3 | target_include_directories(${PROJECT_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/inc)
4 | target_link_libraries(${PROJECT_NAME} PUBLIC rbuff)
5 | target_link_libraries(${PROJECT_NAME} PUBLIC debug_io)
6 | target_link_libraries(${PROJECT_NAME} PUBLIC $)
7 | target_include_directories(${PROJECT_NAME} PUBLIC $)
--------------------------------------------------------------------------------
/software/module/memory_map.ld:
--------------------------------------------------------------------------------
1 | /* Memory Map
2 | *
3 | *
4 | * +===============+ 0x08000000
5 | * | Bootloader |
6 | * +---------------+ 0x08001000
7 | * | |
8 | * | Application 1 |
9 | * | |
10 | * +---------------+ 0x08007FFC
11 | * | Checksum 1 |
12 | * +===============+ 0x08008000
13 | * | |
14 | * | Application 2 |
15 | * | |
16 | * +---------------+ 0x0800EFFC
17 | * | Checksum 2 |
18 | * +===============+ 0x0800F000
19 | * | Config |
20 | * +===============+ 0x0800FFFF
21 | *
22 | *
23 | *
24 | */
25 |
26 | MEMORY
27 | {
28 | RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 8K /* TODO: CHANGE TO 8K RAM */
29 | FLASH_BTL (rx) : ORIGIN = 0x08000000, LENGTH = 4K /* Bootloader */
30 | FLASH_APP (rx) : ORIGIN = 0x08001000, LENGTH = 28K - 4 /* [ 64K (total) - 4K (nvs) - 4K bootloader ] / 2 = 28K - 4 (Checksum) */
31 | FLASH_CS(r) : ORIGIN = 0x08007FFC, LENGTH = 4 /* Checksum sector */
32 | FLASH_NVS (r) : ORIGIN = 0x0800F000, LENGTH = 4K /* Flash sector used to store OpenFlap configuration. */
33 | }
34 |
35 | __FLASH_BTL_START__ = ORIGIN(FLASH_BTL);
36 | __FLASH_BTL_SIZE__ = LENGTH(FLASH_BTL);
37 | __FLASH_APP_START__ = ORIGIN(FLASH_APP);
38 | __FLASH_APP_SIZE__ = LENGTH(FLASH_APP);
39 | __FLASH_CS_START__ = ORIGIN(FLASH_CS);
40 | __FLASH_CS_SIZE__ = LENGTH(FLASH_CS);
41 | __FLASH_NVS_START__ = ORIGIN(FLASH_NVS);
42 | __FLASH_NVS_SIZE__ = LENGTH(FLASH_NVS);
43 |
--------------------------------------------------------------------------------
/software/module/pyocd/pyocd.in:
--------------------------------------------------------------------------------
1 | probes:
2 | @OCD_PROBE@:
3 | target_override: @PUYA_CHIP@
4 |
5 | pack:
6 | - @CMAKE_SOURCE_DIR@/pyocd/Puya.PY32F0xx_DFP.1.1.7.pack
7 |
--------------------------------------------------------------------------------
/software/module/rtt_adc_plotter.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python3
2 | import sys
3 | import re
4 | import matplotlib.pyplot as plt
5 | import matplotlib.animation as animation
6 |
7 | # Store ADC values over time
8 | x_data = []
9 | y_data = [[], [], [], [], [], []] # Six ADC channels
10 |
11 | def update_plot(frame):
12 | """Read a new line from stdin and update the plot if it's ADC data."""
13 | line = sys.stdin.readline().strip()
14 |
15 | if not line:
16 | return # Skip empty lines
17 |
18 | # Print all non-ADC output normally
19 | if not line.startswith("ADC:"):
20 | print(line)
21 | return
22 |
23 | # Extract ADC values using regex
24 | match = re.search(r"ADC:\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)", line)
25 | if match:
26 | adc_values = list(map(int, match.groups()))
27 |
28 | # Append data
29 | if len(x_data) > 50: # Keep last 50 readings
30 | x_data.pop(0)
31 | for i in range(6):
32 | y_data[i].pop(0)
33 |
34 | x_data.append(len(x_data)) # Time index
35 | for i in range(6):
36 | y_data[i].append(adc_values[i])
37 |
38 | # Update plot
39 | ax.clear()
40 | for i in range(6):
41 | ax.plot(x_data, y_data[i], marker='o', linestyle='-', label=f"CH{i+1}")
42 |
43 | ax.legend()
44 | ax.set_title("ADC Values Over Time")
45 | ax.set_xlabel("Sample Number")
46 | ax.set_ylabel("ADC Value")
47 | ax.set_ylim(0, 1024) # Assuming 10-bit ADC (0-1023)
48 |
49 | # Set up live plotting
50 | fig, ax = plt.subplots()
51 | ani = animation.FuncAnimation(fig, update_plot, interval=500)
52 |
53 | # Show the plot
54 | plt.show()
55 |
--------------------------------------------------------------------------------