From 28dd0660e9c3a0799b9ca0bfcaa55e592e5802cf Mon Sep 17 00:00:00 2001 From: Prusa Research Date: Wed, 15 Nov 2023 12:44:56 +0100 Subject: [PATCH] Release v5.1.0-beta --- CMakeLists.txt | 39 +- ProjectOptions.cmake | 26 +- README.md | 9 + cmake/ProjectVersion.cmake | 2 +- cmake/Utilities.cmake | 6 +- doc/logging_components.md | 2 +- doc/metrics.md | 8 + doc/metricsProxy.d | 36 + include/buddy/ffconf.h | 2 +- include/buddy/lwipopts.h | 2 +- include/buddy/priorities_config.h | 5 +- .../buddy/{usb_device.h => usb_device.hpp} | 8 - include/marlin/Configuration_MINI.h | 2 +- include/marlin/Configuration_MINI_adv.h | 8 +- include/marlin/Configuration_MK3.5.h | 9 +- include/marlin/Configuration_MK3.5_adv.h | 4 +- include/marlin/Configuration_MK4_adv.h | 4 +- include/marlin/Configuration_XL.h | 9 +- include/marlin/Configuration_XL_Dwarf.h | 10 +- include/marlin/Configuration_XL_adv.h | 4 +- include/marlin/Configuration_iX.h | 8 +- include/puppies/Dwarf.hpp | 14 + include/puppies/fifo_coder.hpp | 12 +- include/tasks.hpp | 16 +- include/usb_host/usb_host.h | 3 + include/usb_host/usbh_async_diskio.hpp | 8 +- include/usb_host/usbh_conf.h | 2 +- .../cores/arduino/USBSerial.cpp | 55 +- .../cores/arduino/WMath.cpp | 6 +- lib/Drivers/AddLIS2DH12.cmake | 6 + lib/Drivers/CMakeLists.txt | 1 + lib/Drivers/lis2dh12-pid/.gitrepo | 12 + lib/Drivers/lis2dh12-pid/CONTRIBUTING.md | 33 + lib/Drivers/lis2dh12-pid/LICENSE | 29 + lib/Drivers/lis2dh12-pid/README.md | 59 + lib/Drivers/lis2dh12-pid/Release_Notes.html | 73 + lib/Drivers/lis2dh12-pid/Release_Notes.md | 77 + lib/Drivers/lis2dh12-pid/_htmresc/favicon.png | Bin 0 -> 4126 bytes .../lis2dh12-pid/_htmresc/mini-st_2020.css | 1711 ++ .../lis2dh12-pid/_htmresc/st_logo_2020.png | Bin 0 -> 7520 bytes lib/Drivers/lis2dh12-pid/lis2dh12_reg.c | 2780 +++ lib/Drivers/lis2dh12-pid/lis2dh12_reg.h | 1072 ++ .../input_shaper/input_shaper_config.cpp | 3 + .../input_shaper/input_shaper_config.hpp | 15 +- .../pressure_advance/pressure_advance.cpp | 24 +- .../src/feature/prusa/MMU2/mmu2_mk4.cpp | 46 +- .../src/feature/prusa/MMU2/mmu2_reporting.h | 7 +- .../src/feature/prusa/MMU2/protocol_logic.cpp | 9 +- .../src/feature/prusa/MMU2/protocol_logic.h | 2 + .../src/feature/prusa/crash_recovery.cpp | 4 +- lib/Marlin/Marlin/src/feature/tmc_util.cpp | 42 +- lib/Marlin/Marlin/src/feature/tmc_util.h | 8 +- .../Marlin/src/gcode/calibrate/M958.cpp | 1 + lib/Marlin/Marlin/src/gcode/queue.cpp | 4 + lib/Marlin/Marlin/src/module/planner.cpp | 7 + lib/Marlin/Marlin/src/module/probe.cpp | 6 +- .../Marlin/src/module/prusa/accelerometer.h | 4 +- .../src/module/prusa/accelerometer_remote.cpp | 11 +- .../src/module/prusa/accelerometer_utils.cpp | 3 +- .../src/module/prusa/accelerometer_utils.h | 10 +- .../Marlin/src/module/prusa/toolchanger.cpp | 10 +- .../Marlin/src/module/prusa/toolchanger.h | 3 +- lib/Marlin/Marlin/src/module/temperature.cpp | 1 + lib/Marlin/Marlin/src/module/temperature.h | 6 + .../Class/MSC/Src/usbh_msc.c | 5 +- .../Core/Inc/usbh_def.h | 4 +- .../Core/Src/usbh_core.c | 2 + lib/Prusa-Error-Codes/.gitrepo | 4 +- lib/Prusa-Error-Codes/04_MMU/error-codes.yaml | 13 +- .../12_MINI/error-codes.yaml | 15 + lib/Prusa-Error-Codes/13_MK4/error-codes.yaml | 19 + lib/Prusa-Error-Codes/16_iX/error-codes.yaml | 15 + lib/Prusa-Error-Codes/17_XL/error-codes.yaml | 15 + .../20_MK3.5/error-codes.yaml | 15 + .../20_MK35/error-codes.yaml | 311 - lib/Prusa-Error-Codes/README.md | 2 + .../generate_buddy_headers.py | 20 +- lib/Prusa-Firmware-MMU/cmake/Utilities.cmake | 2 +- lib/WUI/CMakeLists.txt | 7 +- lib/WUI/espif.cpp | 12 +- lib/WUI/espif.h | 1 - lib/WUI/link_content/basic_gets.cpp | 12 +- lib/WUI/nhttp/gcode_upload.cpp | 149 +- lib/WUI/nhttp/gcode_upload.h | 6 +- lib/WUI/nhttp/handler.h | 10 +- lib/WUI/nhttp/job_command_marlin.cpp | 6 + lib/WUI/nhttp/req_parser.cpp | 16 +- lib/WUI/nhttp/server.cpp | 365 +- lib/WUI/nhttp/server.h | 59 +- lib/WUI/nhttp/splice.cpp | 195 +- lib/WUI/nhttp/splice.h | 94 +- lib/WUI/nhttp/status_renderer.cpp | 10 +- lib/WUI/random.cpp | 10 - lib/WUI/random.h | 7 - lib/WUI/wui.cpp | 10 +- lib/WUI/wui_api.cpp | 4 +- lib/tinyusb/.clang-format | 4 - lib/tinyusb/.codespellrc | 10 + lib/tinyusb/.gitattributes | 6 +- .../.github/ISSUE_TEMPLATE/bug_report.yml | 19 +- lib/tinyusb/.github/ISSUE_TEMPLATE/config.yml | 4 + .../.github/ISSUE_TEMPLATE/feature_request.md | 14 - .../ISSUE_TEMPLATE/feature_request.yml | 49 + .../.github/workflows/build_aarch64.yml | 41 +- lib/tinyusb/.github/workflows/build_arm.yml | 173 +- lib/tinyusb/.github/workflows/build_esp.yml | 51 +- lib/tinyusb/.github/workflows/build_iar.yml | 54 + .../.github/workflows/build_msp430.yml | 49 +- .../.github/workflows/build_renesas.yml | 46 +- lib/tinyusb/.github/workflows/build_riscv.yml | 47 +- .../.github/workflows/build_win_mac.yml | 54 + lib/tinyusb/.github/workflows/cifuzz.yml | 34 + lib/tinyusb/.github/workflows/cmake_arm.yml | 164 + lib/tinyusb/.github/workflows/pre-commit.yml | 48 + lib/tinyusb/.github/workflows/trigger.yml | 10 +- lib/tinyusb/.gitignore | 62 +- lib/tinyusb/.gitmodules | 136 - lib/tinyusb/.gitrepo | 6 +- lib/tinyusb/.idea/.gitignore | 8 + lib/tinyusb/.idea/cmake.xml | 70 + lib/tinyusb/.idea/runConfigurations/kl25.xml | 10 + .../.idea/runConfigurations/lpc1857.xml | 10 + .../.idea/runConfigurations/lpc4088.xml | 10 + .../.idea/runConfigurations/lpc54628.xml | 10 + .../.idea/runConfigurations/lpc55s69.xml | 10 + .../.idea/runConfigurations/mcx947.xml | 10 + .../.idea/runConfigurations/nrf52840.xml | 10 + .../.idea/runConfigurations/nrf5340.xml | 10 + lib/tinyusb/.idea/runConfigurations/ra4m1.xml | 10 + lib/tinyusb/.idea/runConfigurations/ra6m1.xml | 10 + lib/tinyusb/.idea/runConfigurations/ra6m5.xml | 10 + .../.idea/runConfigurations/rp2040.xml | 10 + .../.idea/runConfigurations/rt1010.xml | 10 + .../.idea/runConfigurations/rt1060.xml | 10 + .../.idea/runConfigurations/samd21g18.xml | 10 + .../.idea/runConfigurations/samd51j19.xml | 10 + .../.idea/runConfigurations/stlink.xml | 10 + .../.idea/runConfigurations/stm32g474.xml | 10 + .../.idea/runConfigurations/stm32h743.xml | 10 + .../.idea/runConfigurations/uno_r4.xml | 10 + lib/tinyusb/.idea/vcs.xml | 6 + lib/tinyusb/.pre-commit-config.yaml | 42 + lib/tinyusb/.readthedocs.yaml | 10 +- lib/tinyusb/CONTRIBUTORS.rst | 22 +- lib/tinyusb/README.rst | 50 +- lib/tinyusb/docs/assets/stack.svg | 2 +- lib/tinyusb/docs/contributing/index.rst | 2 +- lib/tinyusb/docs/contributing/porting.rst | 8 +- lib/tinyusb/docs/info/changelog.rst | 233 +- lib/tinyusb/docs/reference/dependencies.rst | 64 + .../docs/reference/getting_started.rst | 36 +- lib/tinyusb/docs/reference/index.rst | 5 +- lib/tinyusb/docs/reference/supported.rst | 45 +- lib/tinyusb/docs/requirements.txt | 3 +- lib/tinyusb/examples/CMakeLists.txt | 11 + lib/tinyusb/examples/device/CMakeLists.txt | 7 +- .../audio_4_channel_mic/.skip.MCU_SAME5X | 0 .../device/audio_4_channel_mic/.skip.MCU_SAMG | 0 .../device/audio_4_channel_mic/CMakeLists.txt | 24 +- .../device/audio_4_channel_mic/Makefile | 6 +- .../device/audio_4_channel_mic/skip.txt | 4 + .../device/audio_4_channel_mic/src/main.c | 78 +- .../src/plot_audio_samples.py | 8 +- .../audio_4_channel_mic/src/tusb_config.h | 64 +- .../audio_4_channel_mic/src/usb_descriptors.c | 76 +- .../device/audio_test/.skip.MCU_SAMD11 | 0 .../device/audio_test/.skip.MCU_SAME5X | 0 .../examples/device/audio_test/.skip.MCU_SAMG | 0 .../examples/device/audio_test/CMakeLists.txt | 19 +- .../examples/device/audio_test/Makefile | 1 - .../examples/device/audio_test/skip.txt | 3 + .../examples/device/audio_test/src/main.c | 26 +- .../audio_test/src/plot_audio_samples.py | 5 +- .../device/audio_test/src/tusb_config.h | 30 +- .../device/audio_test/src/usb_descriptors.c | 74 +- .../audio_test_multi_rate/CMakeLists.txt | 33 + .../device/audio_test_multi_rate/Makefile | 11 + .../device/audio_test_multi_rate/skip.txt | 3 + .../device/audio_test_multi_rate/src/main.c | 525 + .../src/plot_audio_samples.py | 37 + .../audio_test_multi_rate/src/tusb_config.h | 141 + .../src/usb_descriptors.c | 185 + .../src/usb_descriptors.h | 102 + .../examples/device/board_test/CMakeLists.txt | 54 +- .../examples/device/board_test/Makefile | 7 - .../device/board_test/src/CMakeLists.txt | 16 +- .../examples/device/board_test/src/main.c | 17 +- .../device/board_test/src/tusb_config.h | 24 +- .../device/cdc_dual_ports/CMakeLists.txt | 25 +- .../examples/device/cdc_dual_ports/Makefile | 1 - .../examples/device/cdc_dual_ports/src/main.c | 19 +- .../device/cdc_dual_ports/src/tusb_config.h | 50 +- .../cdc_dual_ports/src/usb_descriptors.c | 78 +- .../examples/device/cdc_msc/.skip.MCU_SAMD11 | 0 .../examples/device/cdc_msc/CMakeLists.txt | 24 +- lib/tinyusb/examples/device/cdc_msc/Makefile | 7 +- lib/tinyusb/examples/device/cdc_msc/skip.txt | 1 + .../examples/device/cdc_msc/src/main.c | 18 +- .../examples/device/cdc_msc/src/msc_disk.c | 10 +- .../examples/device/cdc_msc/src/tusb_config.h | 55 +- .../device/cdc_msc/src/usb_descriptors.c | 197 +- .../device/cdc_msc_freertos/.skip.MCU_BCM2711 | 0 .../device/cdc_msc_freertos/.skip.MCU_CXD56 | 0 .../cdc_msc_freertos/.skip.MCU_GD32VF103 | 0 .../cdc_msc_freertos/.skip.MCU_MKL25ZXX | 0 .../cdc_msc_freertos/.skip.MCU_MSP430x5xx | 0 .../device/cdc_msc_freertos/.skip.MCU_RP2040 | 0 .../device/cdc_msc_freertos/.skip.MCU_SAMD11 | 0 .../device/cdc_msc_freertos/.skip.MCU_SAMX7X | 0 .../.skip.MCU_VALENTYUSB_EPTRI | 0 .../device/cdc_msc_freertos/CMakeLists.txt | 35 +- .../examples/device/cdc_msc_freertos/Makefile | 26 +- .../examples/device/cdc_msc_freertos/skip.txt | 13 + .../cdc_msc_freertos/src/CMakeLists.txt | 31 +- .../src/FreeRTOSConfig/FreeRTOSConfig.h | 27 +- .../device/cdc_msc_freertos/src/main.c | 112 +- .../device/cdc_msc_freertos/src/msc_disk.c | 9 +- .../device/cdc_msc_freertos/src/tusb_config.h | 57 +- .../cdc_msc_freertos/src/usb_descriptors.c | 65 +- .../examples/device/cdc_uac2/CMakeLists.txt | 38 + lib/tinyusb/examples/device/cdc_uac2/Makefile | 16 + .../examples/device/cdc_uac2/README.md | 52 + .../examples/device/cdc_uac2/src/cdc_app.c | 72 + .../examples/device/cdc_uac2/src/common.h | 34 + .../examples/device/cdc_uac2/src/main.c | 99 + .../device/cdc_uac2/src/tusb_config.h | 174 + .../examples/device/cdc_uac2/src/uac2_app.c | 316 + .../device/cdc_uac2/src/usb_descriptors.c | 216 + .../device/cdc_uac2/src/usb_descriptors.h | 158 + .../examples/device/dfu/.skip.MCU_TM4C123 | 4 - .../examples/device/dfu/CMakeLists.txt | 14 +- lib/tinyusb/examples/device/dfu/Makefile | 6 +- lib/tinyusb/examples/device/dfu/skip.txt | 2 + lib/tinyusb/examples/device/dfu/src/main.c | 13 +- .../examples/device/dfu/src/tusb_config.h | 58 +- .../examples/device/dfu/src/usb_descriptors.c | 74 +- .../device/dfu_runtime/CMakeLists.txt | 14 +- .../examples/device/dfu_runtime/Makefile | 1 - .../examples/device/dfu_runtime/src/main.c | 17 +- .../device/dfu_runtime/src/tusb_config.h | 52 +- .../device/dfu_runtime/src/usb_descriptors.c | 74 +- .../dynamic_configuration/.skip.MCU_SAMD11 | 0 .../dynamic_configuration/CMakeLists.txt | 14 +- .../device/dynamic_configuration/Makefile | 1 - .../device/dynamic_configuration/skip.txt | 1 + .../device/dynamic_configuration/src/main.c | 18 +- .../dynamic_configuration/src/msc_disk.c | 15 +- .../dynamic_configuration/src/tusb_config.h | 54 +- .../src/usb_descriptors.c | 85 +- .../device/hid_boot_interface/CMakeLists.txt | 14 +- .../device/hid_boot_interface/Makefile | 3 +- .../device/hid_boot_interface/src/main.c | 22 +- .../hid_boot_interface/src/tusb_config.h | 54 +- .../hid_boot_interface/src/usb_descriptors.c | 65 +- .../hid_boot_interface/src/usb_descriptors.h | 2 +- .../device/hid_composite/CMakeLists.txt | 14 +- .../examples/device/hid_composite/Makefile | 1 - .../examples/device/hid_composite/src/main.c | 20 +- .../device/hid_composite/src/tusb_config.h | 52 +- .../hid_composite/src/usb_descriptors.c | 65 +- .../hid_composite/src/usb_descriptors.h | 2 +- .../hid_composite_freertos/.skip.MCU_BCM2711 | 0 .../hid_composite_freertos/.skip.MCU_CXD56 | 0 .../.skip.MCU_GD32VF103 | 0 .../.skip.MCU_MSP430x5xx | 0 .../hid_composite_freertos/.skip.MCU_RP2040 | 0 .../hid_composite_freertos/.skip.MCU_SAMD11 | 0 .../hid_composite_freertos/.skip.MCU_SAMX7X | 0 .../.skip.MCU_VALENTYUSB_EPTRI | 0 .../hid_composite_freertos/CMakeLists.txt | 49 +- .../device/hid_composite_freertos/Makefile | 24 +- .../device/hid_composite_freertos/skip.txt | 13 + .../hid_composite_freertos/src/CMakeLists.txt | 30 +- .../src/FreeRTOSConfig/FreeRTOSConfig.h | 31 +- .../device/hid_composite_freertos/src/main.c | 50 +- .../hid_composite_freertos/src/tusb_config.h | 55 +- .../src/usb_descriptors.c | 65 +- .../src/usb_descriptors.h | 2 +- .../device/hid_generic_inout/CMakeLists.txt | 14 +- .../device/hid_generic_inout/Makefile | 1 - .../device/hid_generic_inout/hid_test.js | 3 +- .../device/hid_generic_inout/hid_test.py | 4 +- .../device/hid_generic_inout/src/main.c | 15 +- .../hid_generic_inout/src/tusb_config.h | 54 +- .../hid_generic_inout/src/usb_descriptors.c | 67 +- .../hid_multiple_interface/CMakeLists.txt | 14 +- .../device/hid_multiple_interface/Makefile | 1 - .../device/hid_multiple_interface/src/main.c | 14 +- .../hid_multiple_interface/src/tusb_config.h | 52 +- .../src/usb_descriptors.c | 63 +- .../examples/device/midi_test/CMakeLists.txt | 15 +- .../examples/device/midi_test/Makefile | 1 - .../examples/device/midi_test/src/main.c | 18 +- .../device/midi_test/src/tusb_config.h | 54 +- .../device/midi_test/src/usb_descriptors.c | 81 +- .../device/msc_dual_lun/.skip.MCU_MKL25ZXX | 0 .../device/msc_dual_lun/.skip.MCU_SAMD11 | 0 .../device/msc_dual_lun/CMakeLists.txt | 27 +- .../examples/device/msc_dual_lun/Makefile | 1 - .../examples/device/msc_dual_lun/skip.txt | 2 + .../examples/device/msc_dual_lun/src/main.c | 15 +- .../device/msc_dual_lun/src/msc_disk_dual.c | 32 +- .../device/msc_dual_lun/src/tusb_config.h | 54 +- .../device/msc_dual_lun/src/usb_descriptors.c | 71 +- .../net_lwip_webserver/.skip.MCU_BCM2711 | 1 - .../net_lwip_webserver/.skip.MCU_LPC11UXX | 0 .../net_lwip_webserver/.skip.MCU_LPC13XX | 0 .../net_lwip_webserver/.skip.MCU_MKL25ZXX | 0 .../net_lwip_webserver/.skip.MCU_MSP430x5xx | 1 - .../net_lwip_webserver/.skip.MCU_NUC121 | 0 .../net_lwip_webserver/.skip.MCU_SAMD11 | 0 .../net_lwip_webserver/.skip.MCU_STM32L0 | 0 .../device/net_lwip_webserver/CMakeLists.txt | 152 +- .../device/net_lwip_webserver/Makefile | 3 +- .../device/net_lwip_webserver/skip.txt | 11 + .../net_lwip_webserver/src/arch/bpstruct.h | 35 + .../device/net_lwip_webserver/src/arch/cc.h | 32 +- .../net_lwip_webserver/src/arch/epstruct.h | 35 + .../device/net_lwip_webserver/src/lwipopts.h | 28 +- .../device/net_lwip_webserver/src/main.c | 18 +- .../net_lwip_webserver/src/tusb_config.h | 54 +- .../net_lwip_webserver/src/usb_descriptors.c | 84 +- .../device/uac2_headset/.skip.MCU_LPC11UXX | 0 .../device/uac2_headset/.skip.MCU_LPC13XX | 0 .../device/uac2_headset/.skip.MCU_NUC121 | 0 .../device/uac2_headset/.skip.MCU_SAMD11 | 0 .../device/uac2_headset/.skip.MCU_SAME5X | 0 .../device/uac2_headset/.skip.MCU_SAMG | 0 .../device/uac2_headset/CMakeLists.txt | 15 +- .../examples/device/uac2_headset/Makefile | 1 - .../examples/device/uac2_headset/skip.txt | 7 + .../examples/device/uac2_headset/src/main.c | 41 +- .../device/uac2_headset/src/tusb_config.h | 41 +- .../device/uac2_headset/src/usb_descriptors.c | 88 +- .../device/uac2_headset/src/usb_descriptors.h | 14 +- .../examples/device/usbtmc/CMakeLists.txt | 15 +- lib/tinyusb/examples/device/usbtmc/Makefile | 1 - lib/tinyusb/examples/device/usbtmc/skip.txt | 1 + lib/tinyusb/examples/device/usbtmc/src/main.c | 15 +- .../examples/device/usbtmc/src/tusb_config.h | 54 +- .../device/usbtmc/src/usb_descriptors.c | 144 +- .../examples/device/usbtmc/src/usbtmc_app.c | 23 +- .../examples/device/usbtmc/visaQuery.py | 61 +- .../device/video_capture/.skip.MCU_MSP430x5xx | 1 - .../device/video_capture/.skip.MCU_SAMD11 | 0 .../device/video_capture/CMakeLists.txt | 21 +- .../examples/device/video_capture/Makefile | 8 +- .../examples/device/video_capture/skip.txt | 3 + .../device/video_capture/src/images.h | 285 + .../examples/device/video_capture/src/main.c | 45 +- .../device/video_capture/src/tusb_config.h | 53 +- .../video_capture/src/usb_descriptors.c | 108 +- .../video_capture/src/usb_descriptors.h | 176 +- .../device/webusb_serial/CMakeLists.txt | 15 +- .../examples/device/webusb_serial/Makefile | 1 - .../examples/device/webusb_serial/src/main.c | 21 +- .../device/webusb_serial/src/tusb_config.h | 54 +- .../webusb_serial/src/usb_descriptors.c | 72 +- .../webusb_serial/src/usb_descriptors.h | 2 +- lib/tinyusb/examples/dual/CMakeLists.txt | 13 + .../host_hid_to_device_cdc/CMakeLists.txt | 40 + .../dual/host_hid_to_device_cdc/Makefile | 18 + .../dual/host_hid_to_device_cdc/only.txt | 6 + .../dual/host_hid_to_device_cdc/src/main.c | 302 + .../host_hid_to_device_cdc/src/tusb_config.h | 147 + .../src/usb_descriptors.c | 278 + lib/tinyusb/examples/host/CMakeLists.txt | 6 +- .../examples/host/bare_api/CMakeLists.txt | 32 + lib/tinyusb/examples/host/bare_api/Makefile | 13 + lib/tinyusb/examples/host/bare_api/only.txt | 14 + lib/tinyusb/examples/host/bare_api/src/main.c | 424 + .../examples/host/bare_api/src/tusb_config.h | 115 + .../host/cdc_msc_hid/.only.MCU_LPC175X_6X | 0 .../host/cdc_msc_hid/.only.MCU_LPC177X_8X | 0 .../host/cdc_msc_hid/.only.MCU_LPC18XX | 0 .../host/cdc_msc_hid/.only.MCU_LPC40XX | 0 .../host/cdc_msc_hid/.only.MCU_LPC43XX | 0 .../host/cdc_msc_hid/.only.MCU_MIMXRT10XX | 0 .../host/cdc_msc_hid/.only.MCU_MSP432E4 | 0 .../host/cdc_msc_hid/.only.MCU_RP2040 | 0 .../examples/host/cdc_msc_hid/CMakeLists.txt | 28 +- .../examples/host/cdc_msc_hid/Makefile | 22 +- .../examples/host/cdc_msc_hid/only.txt | 14 + .../examples/host/cdc_msc_hid/src/cdc_app.c | 113 + .../examples/host/cdc_msc_hid/src/hid_app.c | 8 +- .../examples/host/cdc_msc_hid/src/main.c | 53 +- .../examples/host/cdc_msc_hid/src/msc_app.c | 48 +- .../host/cdc_msc_hid/src/tusb_config.h | 72 +- .../host/cdc_msc_hid_freertos/CMakeLists.txt | 36 + .../host/cdc_msc_hid_freertos/Makefile | 34 + .../host/cdc_msc_hid_freertos/only.txt | 13 + .../cdc_msc_hid_freertos/src/CMakeLists.txt | 6 + .../src/FreeRTOSConfig/FreeRTOSConfig.h | 215 + .../host/cdc_msc_hid_freertos/src/cdc_app.c | 145 + .../cdc_msc_hid_freertos/src/freertos_hook.c | 111 + .../host/cdc_msc_hid_freertos/src/hid_app.c | 267 + .../host/cdc_msc_hid_freertos/src/main.c | 165 + .../host/cdc_msc_hid_freertos/src/msc_app.c | 67 + .../cdc_msc_hid_freertos/src/tusb_config.h | 133 + .../host/hid_controller/.only.MCU_LPC175X_6X | 0 .../host/hid_controller/.only.MCU_LPC177X_8X | 0 .../host/hid_controller/.only.MCU_LPC18XX | 0 .../host/hid_controller/.only.MCU_LPC40XX | 0 .../host/hid_controller/.only.MCU_LPC43XX | 0 .../host/hid_controller/.only.MCU_MIMXRT10XX | 0 .../host/hid_controller/.only.MCU_MSP432E4 | 0 .../host/hid_controller/.only.MCU_RP2040 | 0 .../host/hid_controller/CMakeLists.txt | 25 +- .../examples/host/hid_controller/Makefile | 15 - .../examples/host/hid_controller/only.txt | 14 + .../host/hid_controller/src/hid_app.c | 91 +- .../examples/host/hid_controller/src/main.c | 15 +- .../host/hid_controller/src/tusb_config.h | 56 +- .../host/msc_file_explorer/CMakeLists.txt | 47 + .../examples/host/msc_file_explorer/Makefile | 27 + .../examples/host/msc_file_explorer/only.txt | 14 + .../host/msc_file_explorer/src/main.c | 132 + .../host/msc_file_explorer/src/msc_app.c | 643 + .../host/msc_file_explorer/src/tusb_config.h | 115 + lib/tinyusb/examples/make.mk | 114 +- lib/tinyusb/examples/rules.mk | 174 +- lib/tinyusb/examples/typec/CMakeLists.txt | 9 + .../typec/power_delivery/CMakeLists.txt | 32 + .../examples/typec/power_delivery/Makefile | 11 + .../examples/typec/power_delivery/only.txt | 1 + .../examples/typec/power_delivery/src/main.c | 193 + .../typec/power_delivery/src/tusb_config.h | 83 + lib/tinyusb/hw/bsp/ansi_escape.h | 4 +- lib/tinyusb/hw/bsp/board.c | 99 +- lib/tinyusb/hw/bsp/{board.h => board_api.h} | 134 +- lib/tinyusb/hw/bsp/board_mcu.h | 40 +- .../boards/raspberrypi_zero_w}/board.h | 2 +- .../boards/raspberrypi_zero_w/board.mk | 5 + .../{raspberrypi4 => broadcom_32bit}/family.c | 36 +- lib/tinyusb/hw/bsp/broadcom_32bit/family.mk | 46 + .../boards/raspberrypi_cm4}/board.h | 8 +- .../boards/raspberrypi_cm4/board.mk | 3 + .../boards/raspberrypi_zero2w/board.h | 38 + .../boards/raspberrypi_zero2w/board.mk | 3 + lib/tinyusb/hw/bsp/broadcom_64bit/family.c | 156 + .../family.mk | 21 +- .../hw/bsp/brtmm90x/boards/mm900evxb/board.h | 82 + lib/tinyusb/hw/bsp/brtmm90x/family.c | 256 + lib/tinyusb/hw/bsp/brtmm90x/family.mk | 67 + .../ch32v307/boards/ch32v307v_r1_1v0/board.h | 50 + .../ch32v307/boards/ch32v307v_r1_1v0/board.mk | 1 + .../boards/ch32v307v_r1_1v0/debug_uart.c | 110 + .../boards/ch32v307v_r1_1v0/debug_uart.h | 31 + lib/tinyusb/hw/bsp/ch32v307/ch32v307.ld | 167 + lib/tinyusb/hw/bsp/ch32v307/ch32v30x_conf.h | 38 + lib/tinyusb/hw/bsp/ch32v307/ch32v30x_it.c | 47 + lib/tinyusb/hw/bsp/ch32v307/ch32v30x_it.h | 16 + lib/tinyusb/hw/bsp/ch32v307/core_riscv.h | 379 + lib/tinyusb/hw/bsp/ch32v307/family.c | 178 + lib/tinyusb/hw/bsp/ch32v307/family.mk | 64 + lib/tinyusb/hw/bsp/ch32v307/system_ch32v30x.c | 776 + lib/tinyusb/hw/bsp/ch32v307/system_ch32v30x.h | 27 + lib/tinyusb/hw/bsp/ch32v307/wch-riscv.cfg | 15 + lib/tinyusb/hw/bsp/d5035_01/board.mk | 61 - lib/tinyusb/hw/bsp/da14695_dk_usb/board.mk | 3 +- .../hw/bsp/da14695_dk_usb/da14695_dk_usb.c | 6 +- lib/tinyusb/hw/bsp/da14695_dk_usb/da1469x.ld | 1 - lib/tinyusb/hw/bsp/da1469x_dk_pro/board.mk | 3 +- .../hw/bsp/da1469x_dk_pro/da1469x-dk-pro.c | 8 +- lib/tinyusb/hw/bsp/da1469x_dk_pro/da1469x.ld | 1 - lib/tinyusb/hw/bsp/ea4357/board.mk | 48 - .../hw/bsp/esp32s2/boards/CMakeLists.txt | 12 - .../adafruit_feather_esp32s2/board.cmake | 17 - .../boards/adafruit_magtag_29gray/board.cmake | 17 - .../boards/adafruit_metro_esp32s2/board.cmake | 17 - lib/tinyusb/hw/bsp/esp32s2/boards/esp32s2.c | 143 - .../boards/espressif_kaluga_1/board.cmake | 17 - .../boards/espressif_saola_1/board.cmake | 17 - .../components/led_strip/CMakeLists.txt | 8 - .../led_strip/src/led_strip_rmt_ws2812.c | 171 - lib/tinyusb/hw/bsp/esp32s2/family.cmake | 7 - .../hw/bsp/esp32s3/boards/CMakeLists.txt | 14 - lib/tinyusb/hw/bsp/esp32s3/boards/esp32s3.c | 143 - .../boards/espressif_addax_1/board.cmake | 17 - .../components/led_strip/include/led_strip.h | 126 - lib/tinyusb/hw/bsp/esp32s3/family.cmake | 7 - lib/tinyusb/hw/bsp/esp32s3/family.mk | 26 - .../hw/bsp/espressif/boards/CMakeLists.txt | 8 + .../adafruit_feather_esp32s2/board.cmake | 2 + .../boards/adafruit_feather_esp32s2/board.h | 2 +- .../boards/adafruit_magtag_29gray/board.cmake | 2 + .../boards/adafruit_magtag_29gray/board.h | 2 +- .../boards/adafruit_metro_esp32s2/board.cmake | 2 + .../boards/adafruit_metro_esp32s2/board.h | 51 + .../boards/espressif_addax_1/board.cmake | 2 + .../boards/espressif_addax_1/board.h | 2 +- .../boards/espressif_kaluga_1/board.cmake | 2 + .../boards/espressif_kaluga_1/board.h | 52 + .../boards/espressif_s2_devkitc/board.cmake | 2 + .../boards/espressif_s2_devkitc}/board.h | 2 +- .../boards/espressif_s3_devkitc/board.cmake | 2 + .../boards/espressif_s3_devkitc}/board.h | 4 +- .../boards/espressif_s3_devkitm/board.cmake | 2 + .../boards/espressif_s3_devkitm/board.h | 51 + .../boards/espressif_saola_1/board.cmake | 2 + .../boards/espressif_saola_1/board.h | 45 + lib/tinyusb/hw/bsp/espressif/boards/family.c | 299 + .../components/led_strip/CMakeLists.txt | 1 - .../components/led_strip/include/led_strip.h | 0 .../led_strip/src/led_strip_rmt_ws2812.c | 2 +- .../components/tinyusb_src/CMakeLists.txt | 73 + lib/tinyusb/hw/bsp/espressif/family.cmake | 15 + .../hw/bsp/{esp32s2 => espressif}/family.mk | 19 +- lib/tinyusb/hw/bsp/f1c100s/README.md | 20 + lib/tinyusb/hw/bsp/f1c100s/board.h | 1 + lib/tinyusb/hw/bsp/f1c100s/board.mk | 52 + lib/tinyusb/hw/bsp/f1c100s/f1c100s.c | 130 + lib/tinyusb/hw/bsp/family_support.cmake | 504 +- lib/tinyusb/hw/bsp/fomu/boards/fomu/board.mk | 2 +- lib/tinyusb/hw/bsp/fomu/family.mk | 4 +- lib/tinyusb/hw/bsp/fomu/fomu.c | 6 +- lib/tinyusb/hw/bsp/fomu/include/hw/common.h | 2 +- lib/tinyusb/hw/bsp/fomu/include/irq.h | 2 +- lib/tinyusb/hw/bsp/frdm_k32l2b/board.mk | 51 - lib/tinyusb/hw/bsp/frdm_kl25z/board.mk | 51 - lib/tinyusb/hw/bsp/gd32vf103/family.c | 8 +- lib/tinyusb/hw/bsp/gd32vf103/family.mk | 4 +- .../hw/bsp/gd32vf103/system_gd32vf103.c | 12 +- .../bsp/imxrt/FreeRTOSConfig/FreeRTOSConfig.h | 165 + .../imxrt/boards/metro_m7_1011/board.cmake | 15 + .../hw/bsp/imxrt/boards/metro_m7_1011/board.h | 53 + .../bsp/imxrt/boards/metro_m7_1011/board.mk | 17 + .../boards/metro_m7_1011/board/clock_config.c | 340 + .../boards/metro_m7_1011/board/clock_config.h | 97 + .../evkmimxrt1010_flexspi_nor_config.c | 48 + .../evkmimxrt1010_flexspi_nor_config.h | 267 + .../boards/metro_m7_1011/metro_m7_1011.ld | 270 + .../boards/metro_m7_1011/metro_m7_1011.mex | 692 + .../imxrt/boards/mimxrt1010_evk/board.cmake | 15 + .../bsp/imxrt/boards/mimxrt1010_evk/board.h | 2 +- .../bsp/imxrt/boards/mimxrt1010_evk/board.mk | 2 +- .../mimxrt1010_evk/board/clock_config.c | 351 + .../mimxrt1010_evk/board/clock_config.h | 97 + .../evkmimxrt1010_flexspi_nor_config.h | 10 +- .../boards/mimxrt1010_evk/mimxrt1010_evk.mex | 692 + .../imxrt/boards/mimxrt1015_evk/board.cmake | 15 + .../bsp/imxrt/boards/mimxrt1015_evk/board.h | 2 +- .../mimxrt1015_evk/board/clock_config.c | 357 + .../mimxrt1015_evk/board/clock_config.h | 100 + .../evkmimxrt1015_flexspi_nor_config.h | 10 +- .../boards/mimxrt1015_evk/mimxrt1015_evk.mex | 576 + .../imxrt/boards/mimxrt1020_evk/board.cmake | 14 + .../bsp/imxrt/boards/mimxrt1020_evk/board.h | 2 +- .../bsp/imxrt/boards/mimxrt1020_evk/board.mk | 2 +- .../mimxrt1020_evk/board/clock_config.c | 421 + .../mimxrt1020_evk/board/clock_config.h | 108 + .../evkmimxrt1020_flexspi_nor_config.h | 10 +- .../boards/mimxrt1020_evk/mimxrt1020_evk.mex | 597 + .../imxrt/boards/mimxrt1024_evk/board.cmake | 16 + .../bsp/imxrt/boards/mimxrt1024_evk/board.h | 52 + .../bsp/imxrt/boards/mimxrt1024_evk/board.mk | 14 + .../mimxrt1024_evk/board/clock_config.c | 421 + .../mimxrt1024_evk/board/clock_config.h | 108 + .../evkmimxrt1024_flexspi_nor_config.c | 48 + .../evkmimxrt1024_flexspi_nor_config.h | 266 + .../boards/mimxrt1024_evk/mimxrt1024_evk.mex | 503 + .../imxrt/boards/mimxrt1050_evkb/board.cmake | 16 + .../bsp/imxrt/boards/mimxrt1050_evkb/board.h | 6 +- .../bsp/imxrt/boards/mimxrt1050_evkb/board.mk | 2 + .../mimxrt1050_evkb/board/clock_config.c | 495 + .../mimxrt1050_evkb/board/clock_config.h | 119 + .../evkbimxrt1050_flexspi_nor_config.h | 10 +- .../mimxrt1050_evkb/mimxrt1050_evkb.mex | 1001 + .../imxrt/boards/mimxrt1060_evk/board.cmake | 16 + .../bsp/imxrt/boards/mimxrt1060_evk/board.h | 2 +- .../bsp/imxrt/boards/mimxrt1060_evk/board.mk | 3 + .../mimxrt1060_evk/board/clock_config.c | 509 + .../mimxrt1060_evk/board/clock_config.h | 123 + .../evkmimxrt1060_flexspi_nor_config.h | 10 +- .../boards/mimxrt1060_evk/mimxrt1060_evk.mex | 1001 + .../imxrt/boards/mimxrt1064_evk/board.cmake | 16 + .../bsp/imxrt/boards/mimxrt1064_evk/board.h | 2 +- .../bsp/imxrt/boards/mimxrt1064_evk/board.mk | 3 + .../mimxrt1064_evk/board/clock_config.c | 511 + .../mimxrt1064_evk/board/clock_config.h | 123 + .../evkmimxrt1064_flexspi_nor_config.h | 10 +- .../boards/mimxrt1064_evk/mimxrt1064_evk.mex | 1006 + .../hw/bsp/imxrt/boards/teensy_40/board.cmake | 21 + .../hw/bsp/imxrt/boards/teensy_40/board.h | 2 +- .../hw/bsp/imxrt/boards/teensy_40/board.mk | 2 +- .../boards/teensy_40/board/clock_config.c | 509 + .../boards/teensy_40/board/clock_config.h | 123 + .../bsp/imxrt/boards/teensy_40/teensy40.mex | 1001 + .../teensy_40/teensy40_flexspi_nor_config.c | 2 +- .../teensy_40/teensy40_flexspi_nor_config.h | 10 +- .../hw/bsp/imxrt/boards/teensy_41/board.cmake | 21 + .../hw/bsp/imxrt/boards/teensy_41/board.h | 52 + .../hw/bsp/imxrt/boards/teensy_41/board.mk | 10 + .../boards/teensy_41/board/clock_config.c | 509 + .../boards/teensy_41/board/clock_config.h | 123 + .../bsp/imxrt/boards/teensy_41/teensy41.mex | 1001 + .../teensy_41/teensy41_flexspi_nor_config.c | 49 + .../teensy_41/teensy41_flexspi_nor_config.h | 268 + lib/tinyusb/hw/bsp/imxrt/debug.jlinkscript | 5 + lib/tinyusb/hw/bsp/imxrt/family.c | 153 +- lib/tinyusb/hw/bsp/imxrt/family.cmake | 132 + lib/tinyusb/hw/bsp/imxrt/family.mk | 39 +- .../boards/frdm_k32l2a4s/board.h | 58 + .../boards/frdm_k32l2a4s/board.mk | 21 + .../boards/frdm_k32l2a4s/frdm_k32l2a4s.c | 171 + .../boards}/frdm_k32l2b/board.h | 2 +- .../kinetis_k32l2/boards/frdm_k32l2b/board.mk | 21 + .../boards}/frdm_k32l2b/frdm_k32l2b.c | 14 +- .../boards}/kuiic/K32L2B31xxxxA_flash.ld | 1 - .../{ => kinetis_k32l2/boards}/kuiic/board.h | 2 +- .../bsp/kinetis_k32l2/boards/kuiic/board.mk | 18 + .../{ => kinetis_k32l2/boards}/kuiic/kuiic.c | 20 +- lib/tinyusb/hw/bsp/kinetis_k32l2/family.mk | 32 + .../FreeRTOSConfig/FreeRTOSConfig.h | 165 + .../kinetis_kl/boards/frdm_kl25z/board.cmake | 18 + .../bsp/kinetis_kl/boards/frdm_kl25z/board.h | 58 + .../bsp/kinetis_kl/boards/frdm_kl25z/board.mk | 26 + .../boards/frdm_kl25z/clock_config.c | 307 + .../boards/frdm_kl25z/clock_config.h | 130 + .../frdm_kl25z.c => kinetis_kl/family.c} | 50 +- lib/tinyusb/hw/bsp/kinetis_kl/family.cmake | 107 + lib/tinyusb/hw/bsp/kinetis_kl/family.mk | 34 + .../bsp/kinetis_kl/gcc/MKL25Z128xxx4_flash.ld | 253 + .../hw/bsp/kinetis_kl/gcc/startup_MKL25Z4.S | 383 + lib/tinyusb/hw/bsp/kuiic/board.mk | 52 - .../bsp/lpc11/boards/lpcxpresso11u37/board.mk | 24 + .../boards}/lpcxpresso11u37/lpc11u37.ld | 50 +- .../boards}/lpcxpresso11u37/lpcxpresso11u37.c | 4 +- .../bsp/lpc11/boards/lpcxpresso11u68/board.mk | 18 + .../boards}/lpcxpresso11u68/lpc11u68.ld | 68 +- .../boards}/lpcxpresso11u68/lpcxpresso11u68.c | 4 +- lib/tinyusb/hw/bsp/lpc11/family.mk | 38 + .../bsp/lpc13/boards/lpcxpresso1347/board.mk | 13 + .../boards}/lpcxpresso1347/lpc1347.ld | 68 +- .../boards}/lpcxpresso1347/lpcxpresso1347.c | 6 +- .../board.mk => lpc13/family.mk} | 27 +- .../lpc15/boards/lpcxpresso1549/lpc1549.ld | 60 +- lib/tinyusb/hw/bsp/lpc15/family.c | 4 +- lib/tinyusb/hw/bsp/lpc15/family.mk | 9 +- .../bsp/lpc17/boards/lpcxpresso1769/board.mk | 8 + .../boards}/lpcxpresso1769/lpc1769.ld | 54 +- .../boards}/lpcxpresso1769/lpcxpresso1769.c | 16 +- .../hw/bsp/lpc17/boards/mbed1768/board.mk | 9 + .../{ => lpc17/boards}/mbed1768/lpc1768.ld | 54 +- .../{ => lpc17/boards}/mbed1768/mbed1768.c | 16 +- .../board.mk => lpc17/family.mk} | 26 +- .../bsp/lpc18/FreeRTOSConfig/FreeRTOSConfig.h | 165 + .../lpc18/boards/lpcxpresso18s37/board.cmake | 11 + .../bsp/lpc18/boards/lpcxpresso18s37/board.h | 1 + .../lpc18/boards/lpcxpresso18s37/lpc1837.ld | 86 +- .../hw/bsp/lpc18/boards/mcb1800/board.cmake | 11 + .../hw/bsp/lpc18/boards/mcb1800/board.h | 22 +- .../hw/bsp/lpc18/boards/mcb1800/lpc1857.ld | 106 +- .../lpc18/boards/mcb1800/ozone/lpc1857.jdebug | 37 + lib/tinyusb/hw/bsp/lpc18/family.c | 95 +- lib/tinyusb/hw/bsp/lpc18/family.cmake | 101 + lib/tinyusb/hw/bsp/lpc18/family.mk | 7 +- .../bsp/lpc40/FreeRTOSConfig/FreeRTOSConfig.h | 165 + .../boards/ea4088_quickstart/board.cmake | 9 + .../lpc40/boards/ea4088_quickstart/board.h | 74 + .../lpc40/boards/ea4088_quickstart/board.mk | 8 + .../boards/ea4088_quickstart}/lpc4088.ld | 54 +- .../ozone/ea4088_quickstart.jdebug | 238 + .../{ea4088qs/ea4088qs.c => lpc40/family.c} | 123 +- lib/tinyusb/hw/bsp/lpc40/family.cmake | 102 + .../{ea4088qs/board.mk => lpc40/family.mk} | 27 +- .../bsp/lpc43/FreeRTOSConfig/FreeRTOSConfig.h | 165 + .../hw/bsp/lpc43/boards/ea4357/board.cmake | 16 + .../hw/bsp/lpc43/boards/ea4357/board.h | 85 + .../hw/bsp/lpc43/boards/ea4357/board.mk | 11 + .../bsp/{ => lpc43/boards}/ea4357/lpc4357.ld | 106 +- .../bsp/{ => lpc43/boards}/ea4357/pca9532.c | 6 +- .../bsp/{ => lpc43/boards}/ea4357/pca9532.h | 2 +- .../lpc43/boards/lpcxpresso43s67/board.cmake | 11 + .../bsp/lpc43/boards/lpcxpresso43s67/board.h | 73 + .../bsp/lpc43/boards/lpcxpresso43s67/board.mk | 6 + .../lpc43/boards/lpcxpresso43s67/lpc4367.ld | 402 + .../bsp/{ea4357/ea4357.c => lpc43/family.c} | 192 +- lib/tinyusb/hw/bsp/lpc43/family.cmake | 103 + lib/tinyusb/hw/bsp/lpc43/family.mk | 37 + .../bsp/lpc51/boards/lpcxpresso51u68/board.mk | 11 + .../boards}/lpcxpresso51u68/lpcxpresso51u68.c | 4 +- .../board.mk => lpc51/family.mk} | 34 +- .../bsp/lpc54/FreeRTOSConfig/FreeRTOSConfig.h | 165 + .../lpc54/boards/lpcxpresso54114/board.cmake | 21 + .../lpc54/boards/lpcxpresso54608/board.cmake | 22 + .../bsp/lpc54/boards/lpcxpresso54608/board.h | 59 + .../bsp/lpc54/boards/lpcxpresso54608/board.mk | 18 + .../lpc54/boards/lpcxpresso54628/board.cmake | 22 + .../bsp/lpc54/boards/lpcxpresso54628/board.mk | 4 +- lib/tinyusb/hw/bsp/lpc54/family.c | 33 +- lib/tinyusb/hw/bsp/lpc54/family.cmake | 158 + lib/tinyusb/hw/bsp/lpc54/family.mk | 22 +- .../bsp/lpc55/FreeRTOSConfig/FreeRTOSConfig.h | 165 + .../LPC55S69_cm33_core0_uf2.ld | 1 - .../boards/double_m33_express/board.cmake | 19 + .../lpc55/boards/lpcxpresso55s28/board.cmake | 17 + .../lpc55/boards/lpcxpresso55s69/board.cmake | 17 + .../hw/bsp/lpc55/boards/mcu_link/board.cmake | 14 + lib/tinyusb/hw/bsp/lpc55/family.c | 27 +- lib/tinyusb/hw/bsp/lpc55/family.cmake | 159 + lib/tinyusb/hw/bsp/lpc55/family.mk | 18 +- lib/tinyusb/hw/bsp/lpcxpresso11u37/board.mk | 46 - lib/tinyusb/hw/bsp/lpcxpresso11u68/board.mk | 42 - lib/tinyusb/hw/bsp/mbed1768/board.mk | 45 - .../bsp/mcx/FreeRTOSConfig/FreeRTOSConfig.h | 165 + .../hw/bsp/mcx/boards/mcxn947brk/board.cmake | 21 + .../hw/bsp/mcx/boards/mcxn947brk/board.h | 66 + .../hw/bsp/mcx/boards/mcxn947brk/board.mk | 11 + .../bsp/mcx/boards/mcxn947brk/clock_config.c | 338 + .../bsp/mcx/boards/mcxn947brk/clock_config.h | 177 + .../hw/bsp/mcx/boards/mcxn947brk/pin_mux.c | 141 + .../hw/bsp/mcx/boards/mcxn947brk/pin_mux.h | 51 + lib/tinyusb/hw/bsp/mcx/debug.jlinkscript | 5 + lib/tinyusb/hw/bsp/mcx/family.c | 245 + lib/tinyusb/hw/bsp/mcx/family.cmake | 110 + lib/tinyusb/hw/bsp/mcx/family.mk | 49 + .../boards/mm32f327x_bluepillplus/board.mk | 11 + .../boards/mm32f327x_bluepillplus/flash.ld | 163 + .../mm32f327x_bluepillplus.c | 182 + .../bsp/mm32/boards/mm32f327x_mb39/board.mk | 4 + .../bsp/mm32/boards/mm32f327x_mb39/flash.ld | 10 +- .../boards/mm32f327x_mb39/mm32f327x_mb39.c | 7 +- .../boards/mm32f327x_pitaya_lite/board.mk | 11 + .../boards/mm32f327x_pitaya_lite/flash.ld | 163 + .../mm32f327x_pitaya_lite.c | 182 + lib/tinyusb/hw/bsp/mm32/family.mk | 12 +- lib/tinyusb/hw/bsp/msp430/family.c | 2 +- lib/tinyusb/hw/bsp/msp432e4/family.c | 14 +- lib/tinyusb/hw/bsp/msp432e4/family.mk | 11 +- lib/tinyusb/hw/bsp/ngx4330/board.mk | 4 +- lib/tinyusb/hw/bsp/ngx4330/ngx4330.c | 39 +- lib/tinyusb/hw/bsp/ngx4330/ngx4330.ld | 80 +- .../bsp/nrf/FreeRTOSConfig/FreeRTOSConfig.h | 165 + .../bsp/nrf/boards/adafruit_clue/board.cmake | 5 + .../hw/bsp/nrf/boards/adafruit_clue/board.h | 2 +- .../hw/bsp/nrf/boards/adafruit_clue/board.mk | 3 + .../boards/adafruit_clue/nrf52840_s140_v6.ld | 38 - .../arduino_nano33_ble/arduino_nano33_ble.ld | 4 +- .../nrf/boards/arduino_nano33_ble/board.cmake | 5 + .../bsp/nrf/boards/arduino_nano33_ble/board.h | 2 +- .../circuitplayground_bluefruit/board.cmake | 5 + .../circuitplayground_bluefruit/board.h | 2 +- .../circuitplayground_bluefruit/board.mk | 3 + .../nrf52840_s140_v6.ld | 38 - .../feather_nrf52840_express/board.cmake | 9 + .../boards/feather_nrf52840_express/board.h | 9 +- .../boards/feather_nrf52840_express/board.mk | 6 + .../boards/feather_nrf52840_sense/board.cmake | 5 + .../nrf/boards/feather_nrf52840_sense/board.h | 2 +- .../boards/feather_nrf52840_sense/board.mk | 3 + .../nrf52840_s140_v6.ld | 38 - .../nrf/boards/itsybitsy_nrf52840/board.cmake | 5 + .../bsp/nrf/boards/itsybitsy_nrf52840/board.h | 2 +- .../nrf/boards/itsybitsy_nrf52840/board.mk | 3 + .../itsybitsy_nrf52840/nrf52840_s140_v6.ld | 38 - .../boards/nrf52840_mdk_dongle/board.cmake | 5 + .../nrf/boards/nrf52840_mdk_dongle/board.h | 2 +- .../nrf/boards/nrf52840_mdk_dongle/board.mk | 2 +- .../hw/bsp/nrf/boards/pca10056/board.cmake | 5 + .../hw/bsp/nrf/boards/pca10056/board.h | 13 +- .../nrf/boards/pca10056/ozone/nrf52840.jdebug | 238 + .../hw/bsp/nrf/boards/pca10059/board.cmake | 5 + .../hw/bsp/nrf/boards/pca10059/board.h | 2 +- .../hw/bsp/nrf/boards/pca10095/board.cmake | 8 + .../hw/bsp/nrf/boards/pca10095/board.h | 59 + .../hw/bsp/nrf/boards/pca10095/board.mk | 14 + .../nrf/boards/pca10095/ozone/nrf5340.jdebug | 335 + .../hw/bsp/nrf/boards/pca10100/board.cmake | 5 + .../hw/bsp/nrf/boards/pca10100/board.h | 2 +- .../nrf/boards/raytac_mdbt50q_rx/board.cmake | 5 + .../bsp/nrf/boards/raytac_mdbt50q_rx/board.h | 2 +- lib/tinyusb/hw/bsp/nrf/family.c | 254 +- lib/tinyusb/hw/bsp/nrf/family.cmake | 135 + lib/tinyusb/hw/bsp/nrf/family.mk | 45 +- .../nrf52840_s140_v6.ld | 6 +- lib/tinyusb/hw/bsp/nrf/nrfx_config.h | 45 + .../hw/{mcu/nordic => bsp/nrf}/nrfx_glue.h | 69 + .../hw/{mcu/nordic => bsp/nrf}/nrfx_log.h | 0 lib/tinyusb/hw/bsp/nutiny_nuc121s/board.mk | 5 +- .../hw/bsp/nutiny_nuc121s/nuc121_flash.ld | 2 +- .../hw/bsp/nutiny_nuc121s/nutiny_nuc121.c | 4 +- lib/tinyusb/hw/bsp/nutiny_nuc125s/board.mk | 5 +- .../hw/bsp/nutiny_nuc125s/nuc125_flash.ld | 2 +- .../hw/bsp/nutiny_nuc125s/nutiny_nuc125.c | 4 +- lib/tinyusb/hw/bsp/nutiny_nuc126v/board.mk | 5 +- .../hw/bsp/nutiny_nuc126v/nutiny_nuc126.c | 4 +- lib/tinyusb/hw/bsp/nutiny_sdk_nuc120/board.mk | 2 +- .../bsp/nutiny_sdk_nuc120/nutiny_sdk_nuc120.c | 4 +- lib/tinyusb/hw/bsp/nutiny_sdk_nuc505/board.mk | 9 +- .../bsp/nutiny_sdk_nuc505/nutiny_sdk_nuc505.c | 4 +- .../bsp/pic32mz/boards/olimex_emz64/board.mk | 5 + .../boards/olimex_emz64/olimex_emz64.c | 144 + .../bsp/pic32mz/boards/olimex_hmz144/board.mk | 5 + .../boards/olimex_hmz144/olimex_hmz144.c | 142 + lib/tinyusb/hw/bsp/pic32mz/family.c | 110 + lib/tinyusb/hw/bsp/pic32mz/family.mk | 20 + .../hw/bsp/ra/FreeRTOSConfig/FreeRTOSConfig.h | 180 + lib/tinyusb/hw/bsp/ra/board_cfg.h | 45 + .../hw/bsp/ra/boards/portenta_c33/board.cmake | 25 + .../hw/bsp/ra/boards/portenta_c33/board.h | 68 + .../hw/bsp/ra/boards/portenta_c33/board.mk | 12 + .../boards/portenta_c33/fsp_cfg/bsp/bsp_cfg.h | 63 + .../fsp_cfg/bsp/bsp_mcu_device_cfg.h | 5 + .../fsp_cfg/bsp/bsp_mcu_device_pn_cfg.h | 11 + .../fsp_cfg/bsp/bsp_mcu_family_cfg.h | 387 + .../portenta_c33/fsp_cfg/bsp_clock_cfg.h | 37 + .../ra/boards/portenta_c33/portenta_c33.ld | 25 + .../hw/bsp/ra/boards/ra4m1_ek/board.cmake | 10 + lib/tinyusb/hw/bsp/ra/boards/ra4m1_ek/board.h | 53 + .../hw/bsp/ra/boards/ra4m1_ek/board.mk | 7 + .../ra/boards/ra4m1_ek/fsp_cfg/bsp/bsp_cfg.h | 35 + .../ra4m1_ek/fsp_cfg/bsp/bsp_mcu_device_cfg.h | 5 + .../fsp_cfg/bsp/bsp_mcu_device_pn_cfg.h | 11 + .../ra4m1_ek/fsp_cfg/bsp/bsp_mcu_family_cfg.h | 78 + .../boards/ra4m1_ek/fsp_cfg/bsp_clock_cfg.h | 21 + .../hw/bsp/ra/boards/ra4m3_ek/board.cmake | 10 + lib/tinyusb/hw/bsp/ra/boards/ra4m3_ek/board.h | 53 + .../hw/bsp/ra/boards/ra4m3_ek/board.mk | 7 + .../ra/boards/ra4m3_ek/fsp_cfg/bsp/bsp_cfg.h | 63 + .../ra4m3_ek/fsp_cfg/bsp/bsp_mcu_device_cfg.h | 5 + .../fsp_cfg/bsp/bsp_mcu_device_pn_cfg.h | 11 + .../ra4m3_ek/fsp_cfg/bsp/bsp_mcu_family_cfg.h | 386 + .../boards/ra4m3_ek/fsp_cfg/bsp_clock_cfg.h | 25 + .../hw/bsp/ra/boards/ra6m1_ek/board.cmake | 10 + lib/tinyusb/hw/bsp/ra/boards/ra6m1_ek/board.h | 51 + .../hw/bsp/ra/boards/ra6m1_ek/board.mk | 7 + .../ra/boards/ra6m1_ek/fsp_cfg/bsp/bsp_cfg.h | 68 + .../ra6m1_ek/fsp_cfg/bsp/bsp_mcu_device_cfg.h | 5 + .../fsp_cfg/bsp/bsp_mcu_device_pn_cfg.h | 11 + .../ra6m1_ek/fsp_cfg/bsp/bsp_mcu_family_cfg.h | 84 + .../boards/ra6m1_ek/fsp_cfg/bsp_clock_cfg.h | 23 + .../hw/bsp/ra/boards/ra6m5_ek/board.cmake | 22 + lib/tinyusb/hw/bsp/ra/boards/ra6m5_ek/board.h | 68 + .../hw/bsp/ra/boards/ra6m5_ek/board.mk | 10 + .../ra/boards/ra6m5_ek/fsp_cfg/bsp/bsp_cfg.h | 63 + .../ra6m5_ek/fsp_cfg/bsp/bsp_mcu_device_cfg.h | 5 + .../fsp_cfg/bsp/bsp_mcu_device_pn_cfg.h | 11 + .../ra6m5_ek/fsp_cfg/bsp/bsp_mcu_family_cfg.h | 387 + .../boards/ra6m5_ek/fsp_cfg/bsp_clock_cfg.h | 37 + .../bsp/ra/boards/ra6m5_ek/ozone/ra6m5.jdebug | 106 + .../hw/bsp/ra/boards/uno_r4/board.cmake | 11 + lib/tinyusb/hw/bsp/ra/boards/uno_r4/board.h | 53 + lib/tinyusb/hw/bsp/ra/boards/uno_r4/board.mk | 9 + .../ra/boards/uno_r4/fsp_cfg/bsp/bsp_cfg.h | 35 + .../uno_r4/fsp_cfg/bsp/bsp_mcu_device_cfg.h | 5 + .../fsp_cfg/bsp/bsp_mcu_device_pn_cfg.h | 11 + .../uno_r4/fsp_cfg/bsp/bsp_mcu_family_cfg.h | 87 + .../ra/boards/uno_r4/fsp_cfg/bsp_clock_cfg.h | 21 + lib/tinyusb/hw/bsp/ra/boards/uno_r4/uno_r4.ld | 25 + lib/tinyusb/hw/bsp/ra/debug.jlinkscript | 4 + lib/tinyusb/hw/bsp/ra/family.c | 279 + lib/tinyusb/hw/bsp/ra/family.cmake | 133 + lib/tinyusb/hw/bsp/ra/family.mk | 73 + lib/tinyusb/hw/bsp/ra/linker/gcc/fsp.ld | 716 + lib/tinyusb/hw/bsp/ra/linker/gcc/ra4m1.ld | 22 + lib/tinyusb/hw/bsp/ra/linker/gcc/ra4m3.ld | 22 + lib/tinyusb/hw/bsp/ra/linker/gcc/ra6m1.ld | 22 + lib/tinyusb/hw/bsp/ra/linker/gcc/ra6m5.ld | 22 + lib/tinyusb/hw/bsp/ra/r_ioport_cfg.h | 7 + lib/tinyusb/hw/bsp/ra/vector_data.h | 36 + .../boards/raspberrypi_cm4/board.mk | 1 - lib/tinyusb/hw/bsp/rp2040/board.h | 32 +- .../adafruit_feather_rp2040/board.cmake | 1 - .../adafruit_itsybitsy_rp2040/board.cmake | 1 - .../boards/adafruit_qtpy_rp2040/board.cmake | 1 - .../boards/raspberry_pi_pico/board.cmake | 2 +- lib/tinyusb/hw/bsp/rp2040/family.c | 88 +- lib/tinyusb/hw/bsp/rp2040/family.cmake | 466 +- lib/tinyusb/hw/bsp/rp2040/family.mk | 5 +- lib/tinyusb/hw/bsp/rp2040/rp2040-openocd.cfg | 3 + .../hw/bsp/rx/boards/gr_citrus/board.mk | 4 +- .../hw/bsp/rx/boards/gr_citrus/gr_citrus.c | 13 +- .../hw/bsp/rx/boards/rx65n_target/board.mk | 2 +- .../hw/bsp/rx/boards/rx65n_target/r5f565ne.ld | 4 +- .../bsp/rx/boards/rx65n_target/rx65n_target.c | 14 +- lib/tinyusb/hw/bsp/rx/family.mk | 6 +- .../boards/{luna_d11 => cynthion_d11}/board.h | 6 + .../bsp/samd11/boards/cynthion_d11/board.mk | 22 + .../samd11d14am_flash.ld | 2 +- .../hw/bsp/samd11/boards/luna_d11/board.mk | 11 - .../bsp/samd11/boards/samd11_xplained/board.h | 1 + .../samd11_xplained/samd11d14am_flash.ld | 4 +- lib/tinyusb/hw/bsp/samd11/family.c | 4 +- lib/tinyusb/hw/bsp/samd11/family.mk | 13 +- .../samd21/FreeRTOSConfig/FreeRTOSConfig.h | 165 + .../samd21/boards/atsamd21_xpro/board.cmake | 9 + .../bsp/samd21/boards/atsamd21_xpro/board.h | 2 +- .../circuitplayground_express/board.cmake | 9 + .../boards/circuitplayground_express/board.h | 2 +- .../.skip.device.net_lwip_webserver | 0 .../samd21/boards/curiosity_nano/board.cmake | 10 + .../bsp/samd21/boards/curiosity_nano/board.h | 2 +- .../samd21/boards/cynthion_d21/board.cmake | 12 + .../boards/{luna_d21 => cynthion_d21}/board.h | 2 +- .../{luna_d21 => cynthion_d21}/board.mk | 7 +- .../samd21g18a_flash.ld | 2 +- .../boards/feather_m0_express/board.cmake | 9 + .../samd21/boards/feather_m0_express/board.h | 2 +- .../samd21/boards/itsybitsy_m0/board.cmake | 9 + .../hw/bsp/samd21/boards/itsybitsy_m0/board.h | 2 +- .../boards/metro_m0_express/board.cmake | 9 + .../samd21/boards/metro_m0_express/board.h | 18 +- .../hw/bsp/samd21/boards/qtpy/board.cmake | 9 + lib/tinyusb/hw/bsp/samd21/boards/qtpy/board.h | 2 +- .../samd21/boards/seeeduino_xiao/board.cmake | 9 + .../bsp/samd21/boards/seeeduino_xiao/board.h | 2 +- .../bsp/samd21/boards/trinket_m0/board.cmake | 9 + .../hw/bsp/samd21/boards/trinket_m0/board.h | 1 - .../hw/bsp/samd21/boards/trinket_m0/board.mk | 1 - lib/tinyusb/hw/bsp/samd21/family.c | 249 +- lib/tinyusb/hw/bsp/samd21/family.cmake | 105 + lib/tinyusb/hw/bsp/samd21/family.mk | 44 +- .../samd51/FreeRTOSConfig/FreeRTOSConfig.h | 165 + .../boards/feather_m4_express/board.cmake | 8 + .../samd51/boards/feather_m4_express/board.h | 2 +- .../samd51/boards/itsybitsy_m4/board.cmake | 8 + .../hw/bsp/samd51/boards/itsybitsy_m4/board.h | 2 +- .../boards/metro_m4_express/board.cmake | 8 + .../samd51/boards/metro_m4_express/board.h | 18 +- .../samd51/boards/metro_m4_express/board.mk | 1 - .../hw/bsp/samd51/boards/pybadge/board.cmake | 8 + .../hw/bsp/samd51/boards/pybadge/board.h | 2 +- .../hw/bsp/samd51/boards/pyportal/board.cmake | 8 + .../hw/bsp/samd51/boards/pyportal/board.h | 2 +- lib/tinyusb/hw/bsp/samd51/family.c | 277 +- lib/tinyusb/hw/bsp/samd51/family.cmake | 104 + lib/tinyusb/hw/bsp/samd51/family.mk | 13 +- lib/tinyusb/hw/bsp/same54xplainedpro/board.mk | 48 - .../hw/bsp/same5x/boards/d5035_01/board.mk | 21 + .../{ => same5x/boards}/d5035_01/d5035_01.c | 4 +- .../boards}/d5035_01/same51j19a_flash.ld | 1 + .../same5x/boards/same54_xplained/board.mk | 12 + .../boards/same54_xplained/same54_xplained.c} | 4 +- .../same54_xplained}/same54p20a_flash.ld | 4 +- .../same54_xplained}/same54p20a_sram.ld | 4 +- lib/tinyusb/hw/bsp/same5x/family.mk | 36 + lib/tinyusb/hw/bsp/same70_qmtech/board.mk | 7 +- .../hw/bsp/same70_qmtech/same70_qmtech.c | 2 +- lib/tinyusb/hw/bsp/same70_xplained/board.mk | 9 +- .../hw/bsp/same70_xplained/same70_xplained.c | 2 +- lib/tinyusb/hw/bsp/samg55xplained/board.mk | 9 +- .../hw/bsp/samg55xplained/samg55xplained.c | 6 +- .../bsp/saml2x/boards/atsaml21_xpro/board.h | 2 +- .../bsp/saml2x/boards/saml22_feather/board.h | 2 +- .../boards/saml22_feather/saml22_feather.ld | 4 +- .../bsp/saml2x/boards/sensorwatch_m0/board.h | 2 +- .../boards/sensorwatch_m0/sensorwatch_m0.ld | 4 +- lib/tinyusb/hw/bsp/saml2x/family.c | 4 +- lib/tinyusb/hw/bsp/saml2x/family.mk | 17 +- lib/tinyusb/hw/bsp/sltb009a/board.mk | 2 +- lib/tinyusb/hw/bsp/sltb009a/sltb009a.c | 8 +- lib/tinyusb/hw/bsp/spresense/board.mk | 3 +- .../hw/bsp/spresense/board_spresense.c | 8 +- .../stm32f0/FreeRTOSConfig/FreeRTOSConfig.h | 165 + .../boards/stm32f070rbnucleo/board.cmake | 11 + .../stm32f0/boards/stm32f070rbnucleo/board.h | 2 +- .../stm32f0/boards/stm32f070rbnucleo/board.mk | 7 +- .../stm32f070rbnucleo/stm32F070rbtx_flash.ld | 16 +- .../stm32f072disco/STM32F072RBTx_FLASH.ld | 10 +- .../stm32f0/boards/stm32f072disco/board.cmake | 11 + .../bsp/stm32f0/boards/stm32f072disco/board.h | 2 +- .../stm32f0/boards/stm32f072disco/board.mk | 7 +- .../stm32f0/boards/stm32f072eval/board.cmake | 12 + .../bsp/stm32f0/boards/stm32f072eval/board.h | 2 +- .../bsp/stm32f0/boards/stm32f072eval/board.mk | 7 +- lib/tinyusb/hw/bsp/stm32f0/family.c | 95 +- lib/tinyusb/hw/bsp/stm32f0/family.cmake | 113 + lib/tinyusb/hw/bsp/stm32f0/family.mk | 33 +- .../hw/bsp/stm32f0/stm32f0xx_hal_conf.h | 55 +- .../stm32f1/FreeRTOSConfig/FreeRTOSConfig.h | 165 + .../stm32f103_bluepill/STM32F103X8_FLASH.ld | 8 +- .../boards/stm32f103_bluepill/board.cmake | 13 + .../stm32f1/boards/stm32f103_bluepill/board.h | 2 +- .../boards/stm32f103_bluepill/board.mk | 8 +- .../stm32f103_bluepill/stm32f103x8_flash.icf | 31 + .../stm32f103_mini_2/STM32F103XC_FLASH.ld | 8 +- .../boards/stm32f103_mini_2/board.cmake | 12 + .../stm32f1/boards/stm32f103_mini_2/board.h | 2 +- .../stm32f1/boards/stm32f103_mini_2/board.mk | 8 +- .../stm32f103_mini_2/stm32f103xc_flash.icf | 31 + lib/tinyusb/hw/bsp/stm32f1/family.c | 89 +- lib/tinyusb/hw/bsp/stm32f1/family.cmake | 110 + lib/tinyusb/hw/bsp/stm32f1/family.mk | 26 +- .../hw/bsp/stm32f1/stm32f1xx_hal_conf.h | 48 +- .../stm32f207nucleo/STM32F207ZGTx_FLASH.ld | 10 +- .../stm32f2/boards/stm32f207nucleo/board.mk | 14 + .../boards}/stm32f207nucleo/stm32f207nucleo.c | 9 +- .../board.mk => stm32f2/family.mk} | 37 +- .../stm32f2xx_hal_conf.h | 56 +- .../stm32f303disco/STM32F303VCTx_FLASH.ld | 20 +- .../stm32f3/boards/stm32f303disco/board.mk | 14 + .../boards}/stm32f303disco/stm32f303disco.c | 5 +- .../stm32f303disco/stm32f3xx_hal_conf.h | 38 +- .../board.mk => stm32f3/family.mk} | 32 +- .../stm32f4/FreeRTOSConfig/FreeRTOSConfig.h | 165 + .../feather_stm32f405/STM32F405RGTx_FLASH.ld | 20 +- .../boards/feather_stm32f405/board.cmake | 10 + .../stm32f4/boards/feather_stm32f405/board.h | 2 +- .../stm32f4/boards/feather_stm32f405/board.mk | 8 +- .../boards/pyboardv11/STM32F405RGTx_FLASH.ld | 20 +- .../bsp/stm32f4/boards/pyboardv11/board.cmake | 10 + .../hw/bsp/stm32f4/boards/pyboardv11/board.h | 2 +- .../hw/bsp/stm32f4/boards/pyboardv11/board.mk | 8 +- .../stm32f401blackpill/STM32F401VCTx_FLASH.ld | 10 +- .../boards/stm32f401blackpill/board.cmake | 10 + .../stm32f4/boards/stm32f401blackpill/board.h | 4 +- .../boards/stm32f401blackpill/board.mk | 8 +- .../stm32f401blackpill/stm32f4xx_hal_conf.h | 82 +- .../stm32f407blackvet/STM32F407VETx_FLASH.ld | 177 + .../boards/stm32f407blackvet/board.cmake | 13 + .../stm32f4/boards/stm32f407blackvet/board.h | 107 + .../stm32f4/boards/stm32f407blackvet/board.mk | 16 + .../stm32f407blackvet/stm32f4xx_hal_conf.h} | 301 +- .../stm32f407disco/STM32F407VGTx_FLASH.ld | 20 +- .../stm32f4/boards/stm32f407disco/board.cmake | 10 + .../bsp/stm32f4/boards/stm32f407disco/board.h | 2 +- .../stm32f4/boards/stm32f407disco/board.mk | 9 +- .../stm32f407disco/stm32f4xx_hal_conf.h | 82 +- .../stm32f411blackpill/STM32F411CEUx_FLASH.ld | 10 +- .../boards/stm32f411blackpill/board.cmake | 10 + .../stm32f4/boards/stm32f411blackpill/board.h | 4 +- .../boards/stm32f411blackpill/board.mk | 8 +- .../stm32f411blackpill/stm32f4xx_hal_conf.h | 82 +- .../stm32f411disco/STM32F411VETx_FLASH.ld | 10 +- .../stm32f4/boards/stm32f411disco/board.cmake | 10 + .../bsp/stm32f4/boards/stm32f411disco/board.h | 2 +- .../stm32f4/boards/stm32f411disco/board.mk | 8 +- .../stm32f411disco/stm32f4xx_hal_conf.h | 82 +- .../stm32f412disco/STM32F412ZGTx_FLASH.ld | 10 +- .../stm32f4/boards/stm32f412disco/board.cmake | 10 + .../bsp/stm32f4/boards/stm32f412disco/board.h | 2 +- .../stm32f4/boards/stm32f412disco/board.mk | 8 +- .../stm32f412disco/stm32f4xx_hal_conf.h | 82 +- .../stm32f412nucleo/STM32F412ZGTx_FLASH.ld | 10 +- .../boards/stm32f412nucleo/board.cmake | 10 + .../stm32f4/boards/stm32f412nucleo/board.mk | 8 +- .../stm32f412nucleo/stm32f4xx_hal_conf.h | 82 +- .../stm32f439nucleo/STM32F439ZITX_FLASH.ld | 206 + .../boards/stm32f439nucleo/board.cmake | 10 + .../stm32f4/boards/stm32f439nucleo/board.h | 108 + .../stm32f4/boards/stm32f439nucleo/board.mk | 15 + .../stm32f439nucleo/stm32f4xx_hal_conf.h} | 326 +- lib/tinyusb/hw/bsp/stm32f4/family.c | 94 +- lib/tinyusb/hw/bsp/stm32f4/family.cmake | 115 + lib/tinyusb/hw/bsp/stm32f4/family.mk | 26 +- .../stm32f4xx_hal_conf.h} | 301 +- .../stm32f7/FreeRTOSConfig/FreeRTOSConfig.h | 165 + .../boards/stlinkv3mini/STM32F723xE_FLASH.ld | 2 +- .../stm32f7/boards/stlinkv3mini/board.cmake | 14 + .../bsp/stm32f7/boards/stlinkv3mini/board.h | 2 +- .../bsp/stm32f7/boards/stlinkv3mini/board.mk | 7 +- .../stm32f723disco/STM32F723xE_FLASH.ld | 2 +- .../stm32f7/boards/stm32f723disco/board.cmake | 14 + .../bsp/stm32f7/boards/stm32f723disco/board.h | 2 +- .../stm32f7/boards/stm32f723disco/board.mk | 6 +- .../stm32f746disco/STM32F746ZGTx_FLASH.ld | 2 +- .../stm32f7/boards/stm32f746disco/board.cmake | 14 + .../bsp/stm32f7/boards/stm32f746disco/board.h | 2 +- .../stm32f7/boards/stm32f746disco/board.mk | 6 +- .../stm32f746nucleo/STM32F746ZGTx_FLASH.ld | 8 +- .../boards/stm32f746nucleo/board.cmake | 13 + .../stm32f7/boards/stm32f746nucleo/board.h | 2 +- .../stm32f7/boards/stm32f746nucleo/board.mk | 6 +- .../stm32f746nucleo/stm32f7xx_hal_conf.h | 472 - .../stm32f767nucleo/STM32F767ZITx_FLASH.ld | 10 +- .../boards/stm32f767nucleo/board.cmake | 13 + .../stm32f7/boards/stm32f767nucleo/board.h | 2 +- .../stm32f7/boards/stm32f767nucleo/board.mk | 8 +- .../stm32f767nucleo/stm32f7xx_hal_conf.h | 472 - .../stm32f769disco/STM32F769ZITx_FLASH.ld | 2 +- .../stm32f7/boards/stm32f769disco/board.cmake | 14 + .../bsp/stm32f7/boards/stm32f769disco/board.h | 2 +- .../stm32f7/boards/stm32f769disco/board.mk | 6 +- lib/tinyusb/hw/bsp/stm32f7/family.c | 152 +- lib/tinyusb/hw/bsp/stm32f7/family.cmake | 115 + lib/tinyusb/hw/bsp/stm32f7/family.mk | 37 +- .../stlinkv3mini => }/stm32f7xx_hal_conf.h | 0 .../stm32g0/FreeRTOSConfig/FreeRTOSConfig.h | 165 + .../stm32g0b1nucleo/STM32G0B1RETx_FLASH.ld | 187 + .../boards/stm32g0b1nucleo/board.cmake | 10 + .../stm32g0/boards/stm32g0b1nucleo/board.h | 163 + .../stm32g0/boards/stm32g0b1nucleo/board.mk | 13 + lib/tinyusb/hw/bsp/stm32g0/family.c | 193 + lib/tinyusb/hw/bsp/stm32g0/family.cmake | 116 + lib/tinyusb/hw/bsp/stm32g0/family.mk | 49 + .../hw/bsp/stm32g0/stm32g0xx_hal_conf.h | 351 + .../stm32g4/FreeRTOSConfig/FreeRTOSConfig.h | 165 + .../b_g474e_dpow1/STM32G474RETx_FLASH.ld | 200 + .../stm32g4/boards/b_g474e_dpow1/board.cmake | 10 + .../bsp/stm32g4/boards/b_g474e_dpow1/board.h | 134 + .../bsp/stm32g4/boards/b_g474e_dpow1/board.mk | 10 + .../b_g474e_dpow1/cubemx/b_g474e_dpow1.ioc | 194 + .../stm32g474nucleo/STM32G474RETx_FLASH.ld | 74 +- .../boards/stm32g474nucleo/board.cmake | 11 + .../stm32g4/boards/stm32g474nucleo/board.h | 4 +- .../stm32g4/boards/stm32g474nucleo/board.mk | 7 +- lib/tinyusb/hw/bsp/stm32g4/family.c | 104 +- lib/tinyusb/hw/bsp/stm32g4/family.cmake | 110 + lib/tinyusb/hw/bsp/stm32g4/family.mk | 30 +- .../hw/bsp/stm32g4/stm32g4xx_hal_conf.h | 26 +- .../stm32h7/FreeRTOSConfig/FreeRTOSConfig.h | 165 + .../bsp/stm32h7/boards/daisyseed/board.cmake | 15 + .../hw/bsp/stm32h7/boards/daisyseed/board.h | 140 + .../hw/bsp/stm32h7/boards/daisyseed/board.mk | 18 + .../stm32h750ibkx_flash.ld} | 33 +- .../boards/daisyseed/stm32h750ibkx_ram.ld | 173 + .../boards/stm32h723nucleo/board.cmake | 14 + .../stm32h7/boards/stm32h723nucleo/board.h | 131 + .../stm32h7/boards/stm32h723nucleo/board.mk | 18 + .../stm32h7/boards/stm32h743eval/board.cmake | 14 + .../bsp/stm32h7/boards/stm32h743eval/board.h | 51 +- .../bsp/stm32h7/boards/stm32h743eval/board.mk | 9 +- .../stm32h743eval/cubemx/stm32h743eval.ioc | 1127 ++ .../stm32h743eval/ozone/stm32h743.jdebug | 245 + .../boards/stm32h743nucleo/board.cmake | 14 + .../stm32h7/boards/stm32h743nucleo/board.h | 6 +- .../stm32h7/boards/stm32h743nucleo/board.mk | 9 +- .../stm32h7/boards/stm32h745disco/board.cmake | 16 + .../bsp/stm32h7/boards/stm32h745disco/board.h | 6 +- .../stm32h7/boards/stm32h745disco/board.mk | 10 +- .../boards/waveshare_openh743i/board.cmake | 19 + .../boards/waveshare_openh743i/board.h | 14 +- .../boards/waveshare_openh743i/board.mk | 13 +- lib/tinyusb/hw/bsp/stm32h7/family.c | 135 +- lib/tinyusb/hw/bsp/stm32h7/family.cmake | 118 + lib/tinyusb/hw/bsp/stm32h7/family.mk | 39 +- .../bsp/stm32h7/linker/stm32h723xx_flash.ld | 192 + .../stm32h743xx_flash.ld | 10 +- .../hw/bsp/stm32h7/stm32h7xx_hal_conf.h | 6 +- .../stm32l052dap52/STM32L052K8Ux_FLASH.ld} | 30 +- .../bsp/stm32l0/boards/stm32l052dap52/board.h | 109 + .../stm32l0/boards/stm32l052dap52/board.mk | 12 + .../stm32l0538disco/STM32L053C8Tx_FLASH.ld | 10 +- .../stm32l0/boards/stm32l0538disco/board.h | 109 + .../stm32l0/boards/stm32l0538disco/board.mk | 14 + .../stm32l0538disco.c => stm32l0/family.c} | 149 +- lib/tinyusb/hw/bsp/stm32l0/family.mk | 41 + .../stm32l0xx_hal_conf.h | 140 +- lib/tinyusb/hw/bsp/stm32l0538disco/board.mk | 54 - .../stm32l4/FreeRTOSConfig/FreeRTOSConfig.h | 165 + .../stm32l412nucleo/STM32L412KBUx_FLASH.ld | 182 + .../boards/stm32l412nucleo/board.cmake | 10 + .../stm32l4/boards/stm32l412nucleo/board.h | 141 + .../stm32l4/boards/stm32l412nucleo/board.mk | 13 + .../stm32l476disco/STM32L476VGTx_FLASH.ld | 16 +- .../stm32l4/boards/stm32l476disco/board.cmake | 10 + .../bsp/stm32l4/boards/stm32l476disco/board.h | 2 +- .../stm32l4/boards/stm32l476disco/board.mk | 9 +- .../stm32l4p5nucleo/STM32L4P5ZGTX_FLASH.ld | 12 +- .../boards/stm32l4p5nucleo/board.cmake | 10 + .../stm32l4/boards/stm32l4p5nucleo/board.h | 2 +- .../stm32l4/boards/stm32l4p5nucleo/board.mk | 9 +- .../stm32l4r5nucleo/STM32L4RXxI_FLASH.ld | 8 +- .../boards/stm32l4r5nucleo/board.cmake | 11 + .../stm32l4/boards/stm32l4r5nucleo/board.h | 2 +- .../stm32l4/boards/stm32l4r5nucleo/board.mk | 9 +- lib/tinyusb/hw/bsp/stm32l4/family.c | 88 +- lib/tinyusb/hw/bsp/stm32l4/family.cmake | 116 + lib/tinyusb/hw/bsp/stm32l4/family.mk | 37 +- .../hw/bsp/stm32l4/stm32l4xx_hal_conf.h | 10 +- .../stm32u5/FreeRTOSConfig/FreeRTOSConfig.h | 165 + .../stm32u5/boards/stm32u575eval/board.cmake | 10 + .../bsp/stm32u5/boards/stm32u575eval/board.h | 112 + .../bsp/stm32u5/boards/stm32u575eval/board.mk | 10 + .../boards/stm32u575nucleo/board.cmake | 10 + .../stm32u5/boards/stm32u575nucleo/board.h | 111 + .../stm32u5/boards/stm32u575nucleo/board.mk | 10 + lib/tinyusb/hw/bsp/stm32u5/family.c | 207 + lib/tinyusb/hw/bsp/stm32u5/family.cmake | 109 + lib/tinyusb/hw/bsp/stm32u5/family.mk | 38 + .../hw/bsp/stm32u5/stm32u5xx_hal_conf.h | 505 + .../stm32wb/boards/stm32wb55nucleo/board.h | 122 + .../stm32wb/boards/stm32wb55nucleo/board.mk | 9 + .../stm32wb55nucleo/stm32wb55xx_flash_cm4.ld | 169 + lib/tinyusb/hw/bsp/stm32wb/family.c | 192 + lib/tinyusb/hw/bsp/stm32wb/family.mk | 37 + .../hw/bsp/stm32wb/stm32wbxx_hal_conf.h | 349 + .../{ek-tm4c123gxl => ek_tm4c123gxl}/board.h | 0 .../{ek-tm4c123gxl => ek_tm4c123gxl}/board.mk | 2 +- .../tm4c123.ld | 24 +- lib/tinyusb/hw/bsp/tm4c123/family.c | 11 +- lib/tinyusb/hw/bsp/tm4c123/family.mk | 11 +- .../bsp/xmc4000/boards/xmc4500_relax/board.h | 2 +- .../bsp/xmc4000/boards/xmc4500_relax/board.mk | 3 + .../bsp/xmc4000/boards/xmc4700_relax/board.h | 81 + .../bsp/xmc4000/boards/xmc4700_relax/board.mk | 12 + lib/tinyusb/hw/bsp/xmc4000/family.c | 28 +- lib/tinyusb/hw/bsp/xmc4000/family.mk | 15 +- lib/tinyusb/hw/mcu/bridgetek/ft9xx/Readme.md | 7 + .../hw/mcu/bridgetek/ft9xx/scripts/crt0.S | 286 + .../mcu/bridgetek/ft9xx/scripts/ldscript.ld | 95 + lib/tinyusb/hw/mcu/dialog/README.md | 4 +- .../SDK_10.0.8.105/sdk/bsp/arm_license.txt | 1 - .../sdk/bsp/include/DA1469xAB.h | 10 +- .../sdk/bsp/include/cmsis_compiler.h | 1 - .../sdk/bsp/include/cmsis_gcc.h | 10 +- .../SDK_10.0.8.105/sdk/bsp/include/core_cm0.h | 2 +- .../sdk/bsp/include/core_cm33.h | 4 +- .../sdk/bsp/include/mpu_armv8.h | 33 +- lib/tinyusb/hw/mcu/dialog/da1469x/da1469x.ld | 1 - .../hw/mcu/dialog/da1469x/include/mcu/mcu.h | 1 - .../mcu/dialog/da1469x/src/system_da1469x.c | 2 +- .../nrf5x/s140_nrf52_6.1.1_API/include/ble.h | 2 +- .../s140_nrf52_6.1.1_API/include/ble_gap.h | 2 +- .../s140_nrf52_6.1.1_API/include/ble_l2cap.h | 2 +- lib/tinyusb/hw/mcu/nordic/nrfx_config.h | 18 - lib/tinyusb/hw/mcu/sony/cxd56/mkspk/mkspk.c | 2 + .../tools/__pycache__/xmodem.cpython-36.pyc | Bin 15257 -> 0 bytes .../hw/mcu/sony/cxd56/tools/flash_writer.py | 6 +- lib/tinyusb/hw/mcu/sony/cxd56/tools/xmodem.py | 4 +- .../{RTT => Config}/SEGGER_RTT_Conf.h | 152 +- lib/tinyusb/lib/SEGGER_RTT/LICENSE.md | 36 + lib/tinyusb/lib/SEGGER_RTT/License.txt | 34 - lib/tinyusb/lib/SEGGER_RTT/README.md | 24 + lib/tinyusb/lib/SEGGER_RTT/README.txt | 20 - lib/tinyusb/lib/SEGGER_RTT/RTT/SEGGER_RTT.c | 446 +- lib/tinyusb/lib/SEGGER_RTT/RTT/SEGGER_RTT.h | 246 +- .../SEGGER_RTT/RTT/SEGGER_RTT_ASM_ARMv7M.S | 13 +- .../Syscalls/SEGGER_RTT_Syscalls_GCC.c | 120 - .../Syscalls/SEGGER_RTT_Syscalls_IAR.c | 115 - .../Syscalls/SEGGER_RTT_Syscalls_KEIL.c | 386 - .../Syscalls/SEGGER_RTT_Syscalls_SES.c | 247 - lib/tinyusb/lib/embedded-cli/embedded_cli.h | 1511 ++ lib/tinyusb/lib/fatfs/00readme.txt | 138 - lib/tinyusb/lib/fatfs/LICENSE.txt | 24 + lib/tinyusb/lib/fatfs/ccsbcs.c | 543 - lib/tinyusb/lib/fatfs/diskio.c | 193 - lib/tinyusb/lib/fatfs/ff.c | 4330 ----- lib/tinyusb/lib/fatfs/ff.h | 342 - lib/tinyusb/lib/fatfs/ffconf.h | 193 - lib/tinyusb/lib/fatfs/integer.h | 36 - lib/tinyusb/lib/fatfs/source/00history.txt | 368 + lib/tinyusb/lib/fatfs/source/00readme.txt | 20 + lib/tinyusb/lib/fatfs/source/diskio.c | 228 + lib/tinyusb/lib/fatfs/{ => source}/diskio.h | 66 +- lib/tinyusb/lib/fatfs/source/ff.c | 7083 +++++++ lib/tinyusb/lib/fatfs/source/ff.h | 429 + lib/tinyusb/lib/fatfs/source/ffconf.h | 296 + lib/tinyusb/lib/fatfs/source/ffsystem.c | 207 + lib/tinyusb/lib/fatfs/source/ffunicode.c | 15593 ++++++++++++++++ lib/tinyusb/lib/networking/dhserver.c | 22 +- lib/tinyusb/lib/networking/dhserver.h | 6 +- lib/tinyusb/lib/networking/dnserver.c | 16 +- lib/tinyusb/lib/networking/dnserver.h | 6 +- lib/tinyusb/lib/networking/ndis.h | 12 +- lib/tinyusb/lib/networking/rndis_protocol.h | 28 +- lib/tinyusb/lib/networking/rndis_reports.c | 18 +- lib/tinyusb/repository.yml | 10 +- lib/tinyusb/src/CMakeLists.txt | 106 + lib/tinyusb/src/class/audio/audio.h | 8 +- lib/tinyusb/src/class/audio/audio_device.c | 950 +- lib/tinyusb/src/class/audio/audio_device.h | 84 +- lib/tinyusb/src/class/bth/bth_device.c | 10 +- lib/tinyusb/src/class/bth/bth_device.h | 2 +- lib/tinyusb/src/class/cdc/cdc.h | 45 +- lib/tinyusb/src/class/cdc/cdc_device.c | 54 +- lib/tinyusb/src/class/cdc/cdc_device.h | 7 +- lib/tinyusb/src/class/cdc/cdc_host.c | 1138 +- lib/tinyusb/src/class/cdc/cdc_host.h | 208 +- lib/tinyusb/src/class/cdc/cdc_rndis.h | 2 +- lib/tinyusb/src/class/cdc/cdc_rndis_host.c | 20 +- lib/tinyusb/src/class/cdc/cdc_rndis_host.h | 4 +- lib/tinyusb/src/class/cdc/serial/cp210x.h | 64 + lib/tinyusb/src/class/cdc/serial/ftdi_sio.h | 249 + lib/tinyusb/src/class/dfu/dfu_device.c | 29 +- lib/tinyusb/src/class/dfu/dfu_rt_device.c | 17 +- lib/tinyusb/src/class/hid/hid.h | 20 +- lib/tinyusb/src/class/hid/hid_device.c | 36 +- lib/tinyusb/src/class/hid/hid_device.h | 35 +- lib/tinyusb/src/class/hid/hid_host.c | 659 +- lib/tinyusb/src/class/hid/hid_host.h | 56 +- lib/tinyusb/src/class/midi/midi.h | 6 +- lib/tinyusb/src/class/midi/midi_device.c | 33 +- lib/tinyusb/src/class/midi/midi_device.h | 2 +- lib/tinyusb/src/class/msc/msc.h | 12 +- lib/tinyusb/src/class/msc/msc_device.c | 140 +- lib/tinyusb/src/class/msc/msc_device.h | 5 +- lib/tinyusb/src/class/msc/msc_host.c | 364 +- lib/tinyusb/src/class/msc/msc_host.h | 31 +- lib/tinyusb/src/class/net/ecm_rndis_device.c | 43 +- lib/tinyusb/src/class/net/ncm_device.c | 38 +- lib/tinyusb/src/class/net/net_device.h | 4 +- lib/tinyusb/src/class/usbtmc/usbtmc.h | 30 +- lib/tinyusb/src/class/usbtmc/usbtmc_device.c | 200 +- lib/tinyusb/src/class/usbtmc/usbtmc_device.h | 6 +- lib/tinyusb/src/class/vendor/vendor_device.c | 76 +- lib/tinyusb/src/class/vendor/vendor_device.h | 20 +- lib/tinyusb/src/class/vendor/vendor_host.c | 4 +- lib/tinyusb/src/class/vendor/vendor_host.h | 14 +- lib/tinyusb/src/class/video/video.h | 85 +- lib/tinyusb/src/class/video/video_device.c | 382 +- lib/tinyusb/src/common/tusb_common.h | 224 +- lib/tinyusb/src/common/tusb_compiler.h | 62 +- lib/tinyusb/src/common/tusb_debug.h | 170 + lib/tinyusb/src/common/tusb_error.h | 75 - lib/tinyusb/src/common/tusb_fifo.c | 499 +- lib/tinyusb/src/common/tusb_fifo.h | 103 +- lib/tinyusb/src/common/tusb_mcu.h | 423 + lib/tinyusb/src/common/tusb_private.h | 178 + lib/tinyusb/src/common/tusb_types.h | 79 +- lib/tinyusb/src/common/tusb_verify.h | 97 +- lib/tinyusb/src/device/dcd.h | 85 +- lib/tinyusb/src/device/dcd_attr.h | 210 - lib/tinyusb/src/device/usbd.c | 455 +- lib/tinyusb/src/device/usbd.h | 60 +- lib/tinyusb/src/device/usbd_control.c | 22 +- lib/tinyusb/src/device/usbd_pvt.h | 44 +- lib/tinyusb/src/host/hcd.h | 115 +- lib/tinyusb/src/host/hcd_attr.h | 105 - lib/tinyusb/src/host/hub.c | 279 +- lib/tinyusb/src/host/hub.h | 33 +- lib/tinyusb/src/host/usbh.c | 1897 +- lib/tinyusb/src/host/usbh.h | 243 +- lib/tinyusb/src/host/usbh_control.c | 138 - .../host/{usbh_classdriver.h => usbh_pvt.h} | 37 +- lib/tinyusb/src/osal/osal.h | 81 +- lib/tinyusb/src/osal/osal_freertos.h | 164 +- lib/tinyusb/src/osal/osal_mynewt.h | 24 +- lib/tinyusb/src/osal/osal_none.h | 89 +- lib/tinyusb/src/osal/osal_pico.h | 53 +- lib/tinyusb/src/osal/osal_rtthread.h | 42 +- lib/tinyusb/src/osal/osal_rtx4.h | 170 + .../src/portable/analog/max3421/hcd_max3421.c | 924 + .../src/portable/bridgetek/ft9xx/dcd_ft9xx.c | 1203 ++ .../portable/broadcom/synopsys/dcd_synopsys.c | 1267 -- .../broadcom/synopsys/synopsys_common.h | 1476 -- .../portable/chipidea/ci_fs/ci_fs_kinetis.h | 51 + .../src/portable/chipidea/ci_fs/ci_fs_mcx.h | 47 + .../src/portable/chipidea/ci_fs/ci_fs_type.h | 118 + .../src/portable/chipidea/ci_fs/dcd_ci_fs.c | 555 + .../src/portable/chipidea/ci_hs/ci_hs_imxrt.h | 57 +- .../portable/chipidea/ci_hs/ci_hs_lpc18_43.h | 15 +- .../src/portable/chipidea/ci_hs/ci_hs_mcx.h | 52 + .../src/portable/chipidea/ci_hs/ci_hs_type.h | 16 +- .../src/portable/chipidea/ci_hs/dcd_ci_hs.c | 135 +- .../src/portable/chipidea/ci_hs/hcd_ci_hs.c | 50 +- .../src/portable/dialog/da146xx/dcd_da146xx.c | 31 +- lib/tinyusb/src/portable/ehci/ehci.c | 961 +- lib/tinyusb/src/portable/ehci/ehci.h | 191 +- .../portable/espressif/esp32sx/dcd_esp32sx.c | 30 +- .../src/portable/mentor/musb/dcd_musb.c | 58 +- .../src/portable/mentor/musb/hcd_musb.c | 35 +- .../src/portable/microchip/pic/dcd_pic.c | 786 + .../portable/microchip/pic32mz/dcd_pic32mz.c | 753 + .../microchip/pic32mz/usbhs_registers.h | 931 + .../src/portable/microchip/samd/dcd_samd.c | 29 +- .../src/portable/microchip/samg/dcd_samg.c | 10 +- .../microchip/samx7x/common_usb_regs.h | 6 +- .../portable/microchip/samx7x/dcd_samx7x.c | 54 +- .../mindmotion/mm32/dcd_mm32f327x_otg.c | 12 +- .../src/portable/nordic/nrf5x/dcd_nrf5x.c | 135 +- .../src/portable/nuvoton/nuc120/dcd_nuc120.c | 16 +- .../src/portable/nuvoton/nuc121/dcd_nuc121.c | 16 +- .../src/portable/nuvoton/nuc505/dcd_nuc505.c | 18 +- lib/tinyusb/src/portable/nxp/khci/dcd_khci.c | 28 +- lib/tinyusb/src/portable/nxp/khci/hcd_khci.c | 641 + .../src/portable/nxp/lpc17_40/dcd_lpc17_40.c | 14 +- .../src/portable/nxp/lpc17_40/dcd_lpc17_40.h | 2 +- .../src/portable/nxp/lpc17_40/hcd_lpc17_40.c | 5 +- .../portable/nxp/lpc_ip3511/dcd_lpc_ip3511.c | 362 +- .../transdimension/common_transdimension.h | 136 - .../nxp/transdimension/dcd_transdimension.c | 664 - .../nxp/transdimension/hcd_transdimension.c | 119 - lib/tinyusb/src/portable/ohci/ohci.c | 210 +- lib/tinyusb/src/portable/ohci/ohci.h | 44 +- .../raspberrypi/pio_usb/dcd_pio_usb.c | 210 + .../raspberrypi/pio_usb/hcd_pio_usb.c | 209 + .../portable/raspberrypi/rp2040/dcd_rp2040.c | 238 +- .../portable/raspberrypi/rp2040/hcd_rp2040.c | 721 +- .../portable/raspberrypi/rp2040/rp2040_usb.c | 200 +- .../portable/raspberrypi/rp2040/rp2040_usb.h | 85 +- .../src/portable/renesas/rusb2/dcd_rusb2.c | 1055 ++ .../src/portable/renesas/rusb2/hcd_rusb2.c | 861 + .../renesas/rusb2/rusb2_common.c} | 69 +- .../src/portable/renesas/rusb2/rusb2_ra.h | 109 + .../src/portable/renesas/rusb2/rusb2_rx.h | 94 + .../src/portable/renesas/rusb2/rusb2_type.h | 1780 ++ .../src/portable/renesas/usba/dcd_usba.c | 903 - .../src/portable/sony/cxd56/dcd_cxd56.c | 15 +- .../portable/st/stm32_fsdev/dcd_stm32_fsdev.c | 893 +- .../st/stm32_fsdev/dcd_stm32_fsdev_pvt_st.h | 371 +- .../src/portable/st/synopsys/dcd_synopsys.c | 9 +- .../portable/st/synopsys/synopsys_common.h | 672 +- .../src/portable/st/typec/typec_stm32.c | 372 + .../src/portable/sunxi/dcd_sunxi_musb.c | 1219 ++ lib/tinyusb/src/portable/sunxi/musb_def.h | 643 + .../src/portable/synopsys/dwc2/dcd_dwc2.c | 169 +- .../src/portable/synopsys/dwc2/dwc2_bcm.h | 16 +- .../src/portable/synopsys/dwc2/dwc2_efm32.h | 12 +- .../src/portable/synopsys/dwc2/dwc2_esp32.h | 8 +- .../src/portable/synopsys/dwc2/dwc2_gd32.h | 13 +- .../src/portable/synopsys/dwc2/dwc2_stm32.h | 75 +- .../src/portable/synopsys/dwc2/dwc2_type.h | 25 +- .../src/portable/synopsys/dwc2/dwc2_xmc.h | 15 +- .../src/portable/template/dcd_template.c | 14 +- .../src/portable/template/hcd_template.c | 163 + .../portable/ti/msp430x5xx/dcd_msp430x5xx.c | 23 +- .../src/portable/valentyusb/eptri/dcd_eptri.c | 19 +- .../src/portable/valentyusb/eptri/dcd_eptri.h | 2 +- .../portable/wch/ch32v307/ch32_usbhs_reg.h | 345 + .../src/portable/wch/ch32v307/dcd_usbhs.c | 391 + lib/tinyusb/src/tinyusb.mk | 26 + lib/tinyusb/src/tusb.c | 314 +- lib/tinyusb/src/tusb.h | 24 +- lib/tinyusb/src/tusb_option.h | 251 +- lib/tinyusb/src/typec/pd_types.h | 237 + lib/tinyusb/src/typec/tcd.h | 143 + lib/tinyusb/src/typec/usbc.c | 219 + lib/tinyusb/src/typec/usbc.h | 91 + lib/tinyusb/test/fuzz/dcd_fuzz.cc | 208 + .../test/fuzz/device/cdc/CMakeLists.txt | 29 + lib/tinyusb/test/fuzz/device/cdc/Makefile | 11 + .../test/fuzz/device/cdc/cdc_seed_corpus.zip | Bin 0 -> 50127 bytes lib/tinyusb/test/fuzz/device/cdc/src/fuzz.cc | 174 + .../test/fuzz/device/cdc/src/tusb_config.h | 114 + .../fuzz/device/cdc/src/usb_descriptors.cc | 229 + .../test/fuzz/device/msc/CMakeLists.txt | 29 + lib/tinyusb/test/fuzz/device/msc/Makefile | 11 + .../test/fuzz/device/msc/msc_seed_corpus.zip | Bin 0 -> 50127 bytes lib/tinyusb/test/fuzz/device/msc/src/fuzz.cc | 61 + .../test/fuzz/device/msc/src/tusb_config.h | 114 + .../fuzz/device/msc/src/usb_descriptors.cc | 224 + .../test/fuzz/device/net/CMakeLists.txt | 29 + lib/tinyusb/test/fuzz/device/net/Makefile | 70 + .../test/fuzz/device/net/src/arch/cc.h | 75 + lib/tinyusb/test/fuzz/device/net/src/fuzz.cc | 99 + .../test/fuzz/device/net/src/lwipopts.h | 71 + .../test/fuzz/device/net/src/tusb_config.h | 122 + .../fuzz/device/net/src/usb_descriptors.cc | 229 + lib/tinyusb/test/fuzz/dicts/cdc.dict | 73 + lib/tinyusb/test/fuzz/fuzz.cc | 34 + lib/tinyusb/test/fuzz/fuzz.h | 37 + lib/tinyusb/test/fuzz/fuzz_private.h | 30 + lib/tinyusb/test/fuzz/make.mk | 134 + lib/tinyusb/test/fuzz/msc_fuzz.cc | 162 + lib/tinyusb/test/fuzz/net_fuzz.cc | 82 + lib/tinyusb/test/fuzz/rules.mk | 159 + lib/tinyusb/test/fuzz/usbd_fuzz.cc | 73 + lib/tinyusb/test/hil/hil_hfp.json | 25 + lib/tinyusb/test/hil/hil_test.py | 250 + lib/tinyusb/test/{ => unit-test}/ceedling | 0 lib/tinyusb/test/{ => unit-test}/project.yml | 25 +- .../test/device/msc/test_msc_device.c | 5 +- .../test/device/usbd/test_usbd.c | 5 +- .../test/support/tusb_config.h | 2 +- .../test/unit-test/test/test_common_func.c | 82 + .../test/{ => unit-test}/test/test_fifo.c | 150 +- .../vendor/ceedling/bin/ceedling | 83 +- .../vendor/ceedling/lib/ceedling.rb | 3 +- .../lib/ceedling/build_invoker_utils.rb | 16 +- .../ceedling/lib/ceedling/cacheinator.rb | 10 +- .../lib/ceedling/cacheinator_helper.rb | 35 + .../ceedling/lib/ceedling/cmock_builder.rb | 8 +- .../ceedling/lib/ceedling/configurator.rb | 34 +- .../lib/ceedling/configurator_builder.rb | 45 +- .../lib/ceedling/configurator_plugins.rb | 22 +- .../lib/ceedling/configurator_setup.rb | 3 +- .../lib/ceedling/configurator_validator.rb | 78 +- .../vendor/ceedling/lib/ceedling/constants.rb | 2 + .../vendor/ceedling/lib/ceedling/defaults.rb | 77 +- .../ceedling/lib/ceedling/dependinator.rb | 7 +- .../ceedling/lib/ceedling/erb_wrapper.rb | 2 +- .../ceedling/lib/ceedling/file_finder.rb | 1 - .../lib/ceedling/file_finder_helper.rb | 28 +- .../ceedling/lib/ceedling/file_path_utils.rb | 8 +- .../lib/ceedling/file_system_utils.rb | 14 +- .../lib/ceedling/file_system_wrapper.rb | 2 +- .../ceedling/lib/ceedling/file_wrapper.rb | 8 +- .../ceedling/lib/ceedling/flaginator.rb | 14 +- .../vendor/ceedling/lib/ceedling/generator.rb | 9 +- .../ceedling/lib/ceedling/generator_helper.rb | 8 +- .../lib/ceedling/generator_test_results.rb | 15 +- .../generator_test_results_sanity_checker.rb | 22 +- .../lib/ceedling/generator_test_runner.rb | 6 +- .../vendor/ceedling/lib/ceedling/loginator.rb | 6 +- .../vendor/ceedling/lib/ceedling/makefile.rb | 4 +- .../vendor/ceedling/lib/ceedling/objects.yml | 49 +- .../vendor/ceedling/lib/ceedling/par_map.rb | 1 - .../vendor/ceedling/lib/ceedling/plugin.rb | 8 +- .../ceedling/lib/ceedling/plugin_builder.rb | 4 +- .../ceedling/lib/ceedling/plugin_manager.rb | 0 .../lib/ceedling/plugin_manager_helper.rb | 0 .../lib/ceedling/plugin_reportinator.rb | 40 +- .../ceedling/plugin_reportinator_helper.rb | 10 +- .../ceedling/lib/ceedling/preprocessinator.rb | 56 + .../ceedling/preprocessinator_extractor.rb | 25 + .../ceedling/preprocessinator_file_handler.rb | 13 + .../lib/ceedling/preprocessinator_helper.rb | 4 + .../preprocessinator_includes_handler.rb | 140 +- .../lib/ceedling/project_config_manager.rb | 14 +- .../lib/ceedling/project_file_loader.rb | 0 .../ceedling/lib/ceedling/rake_utils.rb | 2 +- .../ceedling/lib/ceedling/rake_wrapper.rb | 0 .../vendor/ceedling/lib/ceedling/rakefile.rb | 1 - .../ceedling/lib/ceedling/release_invoker.rb | 29 +- .../lib/ceedling/release_invoker_helper.rb | 0 .../ceedling/lib/ceedling/reportinator.rb | 4 +- .../ceedling/lib/ceedling/rules_cmock.rake | 2 +- .../lib/ceedling/rules_preprocess.rake | 7 +- .../ceedling/lib/ceedling/rules_release.rake | 22 +- .../rules_release_deep_dependencies.rake | 3 +- .../ceedling/lib/ceedling/rules_tests.rake | 10 +- .../rules_tests_deep_dependencies.rake | 1 - .../ceedling/lib/ceedling/setupinator.rb | 10 +- .../ceedling/lib/ceedling/stream_wrapper.rb | 2 +- .../ceedling/lib/ceedling/streaminator.rb | 2 +- .../lib/ceedling/streaminator_helper.rb | 2 +- .../ceedling/lib/ceedling/system_utils.rb | 8 +- .../ceedling/lib/ceedling/system_wrapper.rb | 0 .../ceedling/lib/ceedling/target_loader.rb | 0 .../ceedling/lib/ceedling/task_invoker.rb | 41 +- .../ceedling/lib/ceedling/tasks_base.rake | 54 +- .../lib/ceedling/tasks_filesystem.rake | 36 +- .../ceedling/lib/ceedling/tasks_release.rake | 11 +- .../tasks_release_deep_dependencies.rake | 0 .../ceedling/lib/ceedling/tasks_tests.rake | 15 +- .../tasks_tests_deep_dependencies.rake | 0 .../ceedling/lib/ceedling/tasks_vendor.rake | 0 .../lib/ceedling/test_includes_extractor.rb | 26 + .../ceedling/lib/ceedling/test_invoker.rb | 95 +- .../lib/ceedling/test_invoker_helper.rb | 10 +- .../ceedling/lib/ceedling/tool_executor.rb | 0 .../lib/ceedling/tool_executor_helper.rb | 0 .../ceedling/lib/ceedling/verbosinator.rb | 0 .../vendor/ceedling/lib/ceedling/version.rb | 54 + .../ceedling/lib/ceedling/yaml_wrapper.rb | 0 .../vendor/ceedling/plugins/beep/README.md | 0 .../vendor/ceedling/plugins/beep/lib/beep.rb | 1 - .../ceedling/plugins/bullseye/README.md | 76 + .../plugins/bullseye/assets/template.erb | 1 - .../ceedling/plugins/bullseye/bullseye.rake | 34 +- .../plugins/bullseye/config/defaults.yml | 0 .../ceedling/plugins/bullseye/lib/bullseye.rb | 26 +- .../ceedling/plugins/colour_report/README.md | 20 + .../colour_report/lib/colour_report.rb | 0 .../ceedling/plugins/command_hooks/README.md | 0 .../command_hooks/lib/command_hooks.rb | 1 - .../plugins/compile_commands_json/README.md | 29 + .../lib/compile_commands_json.rb | 35 + .../ceedling/plugins/dependencies/README.md | 254 + .../plugins/dependencies/config/defaults.yml | 5 + .../plugins/dependencies/dependencies.rake | 147 + .../plugins/dependencies/lib/dependencies.rb | 237 + .../plugins/fake_function_framework/README.md | 2 +- .../plugins/fake_function_framework/Rakefile | 2 +- .../examples/fff_example/project.yml | 4 +- .../examples/fff_example/rakefile.rb | 0 .../examples/fff_example/src/bar.c | 0 .../examples/fff_example/src/bar.h | 0 .../examples/fff_example/src/custom_types.h | 0 .../examples/fff_example/src/display.c | 2 +- .../examples/fff_example/src/display.h | 0 .../fff_example/src/event_processor.c | 0 .../fff_example/src/event_processor.h | 0 .../examples/fff_example/src/foo.c | 0 .../examples/fff_example/src/foo.h | 0 .../examples/fff_example/src/subfolder/zzz.c | 0 .../examples/fff_example/src/subfolder/zzz.h | 0 .../fff_example/test/test_event_processor.c | 2 +- .../examples/fff_example/test/test_foo.c | 0 .../lib/fake_function_framework.rb | 2 +- .../lib/fff_mock_generator.rb | 2 +- .../spec/fff_mock_header_generator_spec.rb | 2 +- .../spec/fff_mock_source_generator_spec.rb | 2 +- .../spec/header_generator.rb | 2 +- .../spec/spec_helper.rb | 0 .../src/fff_unity_helper.h | 2 +- .../vendor/ceedling/plugins/gcov/README.md | 433 + .../ceedling/plugins/gcov/assets/template.erb | 1 - .../plugins/gcov/config/defaults_gcov.rb | 118 + .../vendor/ceedling/plugins/gcov/gcov.rake | 95 +- .../vendor/ceedling/plugins/gcov/lib/gcov.rb | 33 +- .../plugins/gcov/lib/gcov_constants.rb | 48 + .../plugins/gcov/lib/gcovr_reportinator.rb | 331 + .../gcov/lib/reportgenerator_reportinator.rb | 195 + .../plugins/gcov/lib/reportinator_helper.rb | 15 + .../plugins/json_tests_report/README.md | 36 + .../lib/json_tests_report.rb | 83 + .../plugins/junit_tests_report/README.md | 0 .../lib/junit_tests_report.rb | 19 +- .../plugins/module_generator/README.md | 117 + .../config/module_generator.yml | 2 +- .../module_generator/lib/module_generator.rb | 16 +- .../module_generator/module_generator.rake | 15 + .../plugins/raw_output_report/README.md | 19 + .../lib/raw_output_report.rb | 0 .../stdout_gtestlike_tests_report/README.md | 19 + .../assets/template.erb | 0 .../assets/template.erb copy | 0 .../config/stdout_gtestlike_tests_report.yml | 0 .../lib/stdout_gtestlike_tests_report.rb | 0 .../plugins/stdout_ide_tests_report/README.md | 18 + .../config/stdout_ide_tests_report.yml | 0 .../lib/stdout_ide_tests_report.rb | 0 .../stdout_pretty_tests_report/README.md | 20 + .../assets/template.erb | 1 - .../config/stdout_pretty_tests_report.yml | 0 .../lib/stdout_pretty_tests_report.rb | 8 +- .../ceedling/plugins/subprojects/README.md | 14 +- .../plugins/subprojects/config/defaults.yml | 0 .../plugins/subprojects/lib/subprojects.rb | 4 +- .../plugins/subprojects/subprojects.rake | 3 +- .../plugins/teamcity_tests_report/README.md | 18 + .../config/teamcity_tests_report.yml | 0 .../lib/teamcity_tests_report.rb | 0 .../plugins/warnings_report/README.md | 19 + .../warnings_report/lib/warnings_report.rb | 0 .../plugins/xml_tests_report/README.md | 2 +- .../xml_tests_report/lib/xml_tests_report.rb | 0 .../vendor/c_exception/lib/CException.c | 1 - .../vendor/c_exception/lib/CException.h | 2 +- .../vendor/c_exception/lib/meson.build | 11 + .../cmock/config/production_environment.rb | 12 +- .../vendor/cmock/config/test_environment.rb | 2 +- .../vendor/ceedling/vendor/cmock/lib/cmock.rb | 111 + .../ceedling/vendor/cmock/lib/cmock_config.rb | 174 + .../vendor/cmock/lib/cmock_file_writer.rb | 31 +- .../vendor/cmock/lib/cmock_generator.rb | 368 + .../cmock/lib/cmock_generator_plugin_array.rb | 30 +- .../lib/cmock_generator_plugin_callback.rb | 24 +- .../lib/cmock_generator_plugin_cexception.rb | 50 + .../lib/cmock_generator_plugin_expect.rb | 100 + .../cmock_generator_plugin_expect_any_args.rb | 50 + .../lib/cmock_generator_plugin_ignore.rb | 88 + .../lib/cmock_generator_plugin_ignore_arg.rb | 12 +- ...cmock_generator_plugin_ignore_stateless.rb | 85 + .../cmock_generator_plugin_return_thru_ptr.rb | 79 + .../vendor/cmock/lib/cmock_generator_utils.rb | 250 + .../vendor/cmock/lib/cmock_header_parser.rb | 623 + .../vendor/cmock/lib/cmock_plugin_manager.rb | 50 + .../cmock/lib/cmock_unityhelper_parser.rb | 77 + .../vendor/ceedling/vendor/cmock/src/cmock.c | 91 +- .../vendor/ceedling/vendor/cmock/src/cmock.h | 33 +- .../vendor/cmock/src/cmock_internals.h | 16 +- .../ceedling/vendor/cmock/src/meson.build | 12 + .../vendor/ceedling/vendor/diy/lib/diy.rb | 60 +- .../ceedling/vendor/diy/lib/diy/factory.rb | 5 +- .../vendor/unity/auto/colour_prompt.rb | 0 .../vendor/unity/auto/colour_reporter.rb | 0 .../vendor/unity/auto/generate_config.yml | 2 +- .../vendor/unity/auto/generate_module.rb | 42 +- .../vendor/unity/auto/generate_test_runner.rb | 58 +- .../vendor/unity/auto/parse_output.rb | 0 .../ceedling/vendor/unity/auto/run_test.erb | 7 +- .../vendor/unity/auto/stylize_as_junit.rb | 0 .../vendor/unity/auto/test_file_filter.rb | 0 .../vendor/unity/auto/type_sanitizer.rb | 0 .../vendor/unity/auto/unity_test_summary.py | 0 .../vendor/unity/auto/unity_test_summary.rb | 0 .../vendor/unity/auto/unity_to_junit.py | 0 .../ceedling/vendor/unity/src/meson.build | 11 + .../vendor/ceedling/vendor/unity/src/unity.c | 275 +- .../vendor/ceedling/vendor/unity/src/unity.h | 56 +- .../vendor/unity/src/unity_internals.h | 71 +- .../test/vendor/ceedling/docs/CException.md | 292 - .../vendor/ceedling/docs/CMock_Summary.md | 603 - .../vendor/ceedling/docs/CeedlingPacket.md | 2060 -- .../docs/ThrowTheSwitchCodingStandard.md | 206 - ...tSuitableforPrintingandPossiblyFraming.pdf | Bin 144467 -> 0 bytes .../ceedling/docs/UnityAssertionsReference.md | 779 - .../ceedling/docs/UnityConfigurationGuide.md | 433 - .../ceedling/docs/UnityGettingStartedGuide.md | 192 - .../ceedling/docs/UnityHelperScriptsGuide.md | 260 - .../lib/ceedling/cacheinator_helper.rb | 31 - .../ceedling/lib/ceedling/preprocessinator.rb | 42 - .../vendor/ceedling/lib/ceedling/version.rb | 36 - .../ceedling/lib/ceedling/version.rb.erb | 15 - .../ceedling/plugins/bullseye/readme.txt | 0 .../vendor/ceedling/plugins/gcov/README.md | 101 - .../ceedling/plugins/gcov/config/defaults.yml | 73 - .../plugins/gcov/lib/gcov_constants.rb | 19 - .../vendor/c_exception/release/build.info | 2 - .../vendor/c_exception/release/version.info | 2 - .../vendor/ceedling/vendor/cmock/lib/cmock.rb | 86 - .../ceedling/vendor/cmock/lib/cmock_config.rb | 153 - .../vendor/cmock/lib/cmock_generator.rb | 268 - .../lib/cmock_generator_plugin_cexception.rb | 51 - .../lib/cmock_generator_plugin_expect.rb | 103 - .../cmock_generator_plugin_expect_any_args.rb | 53 - .../lib/cmock_generator_plugin_ignore.rb | 75 - .../cmock_generator_plugin_return_thru_ptr.rb | 79 - .../vendor/cmock/lib/cmock_generator_utils.rb | 253 - .../vendor/cmock/lib/cmock_header_parser.rb | 364 - .../vendor/cmock/lib/cmock_plugin_manager.rb | 55 - .../cmock/lib/cmock_unityhelper_parser.rb | 75 - .../ceedling/vendor/cmock/release/build.info | 2 - .../vendor/cmock/release/version.info | 2 - .../ceedling/vendor/cmock/src/meson.build | 17 - .../vendor/deep_merge/lib/deep_merge.rb | 211 - .../ceedling/vendor/unity/release/build.info | 2 - .../vendor/unity/release/version.info | 2 - .../ceedling/vendor/unity/src/CMakeLists.txt | 22 - .../ceedling/vendor/unity/src/meson.build | 16 - lib/tinyusb/tools/build_board.py | 154 +- lib/tinyusb/tools/build_cmake.py | 105 + .../{build_esp32sx.py => build_esp32.py} | 71 +- lib/tinyusb/tools/build_family.py | 178 +- lib/tinyusb/tools/build_utils.py | 130 + lib/tinyusb/tools/cmake/cpu/cortex-m0.cmake | 17 + .../tools/cmake/cpu/cortex-m0plus.cmake | 17 + lib/tinyusb/tools/cmake/cpu/cortex-m3.cmake | 16 + lib/tinyusb/tools/cmake/cpu/cortex-m33.cmake | 19 + lib/tinyusb/tools/cmake/cpu/cortex-m4.cmake | 23 + lib/tinyusb/tools/cmake/cpu/cortex-m7.cmake | 19 + .../tools/cmake/toolchain/arm_gcc.cmake | 46 + .../tools/cmake/toolchain/arm_iar.cmake | 31 + .../tools/cmake/toolchain/set_flags.cmake | 17 + .../codespell/exclude-file.txt} | 0 lib/tinyusb/tools/codespell/ignore-words.txt | 13 + lib/tinyusb/tools/gen_doc.py | 35 + lib/tinyusb/tools/get_deps.py | 238 + lib/tinyusb/tools/iar_gen.py | 123 +- lib/tinyusb/tools/iar_template.ipcf | 294 +- lib/tinyusb/tools/make/cpu/arm1176.mk | 9 + lib/tinyusb/tools/make/cpu/cortex-a53.mk | 12 + lib/tinyusb/tools/make/cpu/cortex-a72.mk | 12 + lib/tinyusb/tools/make/cpu/cortex-m0.mk | 14 + lib/tinyusb/tools/make/cpu/cortex-m0plus.mk | 14 + lib/tinyusb/tools/make/cpu/cortex-m3.mk | 17 + lib/tinyusb/tools/make/cpu/cortex-m33.mk | 19 + lib/tinyusb/tools/make/cpu/cortex-m4.mk | 13 + lib/tinyusb/tools/make/cpu/cortex-m7.mk | 19 + lib/tinyusb/tools/make/toolchain/arm_gcc.mk | 71 + .../tools/make/toolchain/arm_gcc_rules.mk | 79 + lib/tinyusb/tools/make/toolchain/arm_iar.mk | 11 + .../tools/make/toolchain/arm_iar_rules.mk | 44 + lib/tinyusb/tools/make_release.py | 40 + lib/tinyusb/tools/mksunxi.py | 48 + lib/tinyusb/tools/pcapng_to_corpus.py | 44 + lib/tinyusb/tools/top.mk | 30 - .../tools/usb_drivers/tinyusb_win_usbser.inf | 2 +- src/bootloader/bootloader_update.cpp | 13 +- src/buddy/logging.cpp | 2 +- src/buddy/main.cpp | 36 +- src/buddy/timing_sys.cpp | 2 +- src/buddy/usb_device.cpp | 47 +- src/buddy/usb_device_cdc.cpp | 2 +- src/buddy/usb_device_msc.cpp | 2 +- src/buddy/usb_host.cpp | 61 +- src/buddy/usbh_diskio.cpp | 46 +- src/common/CMakeLists.txt | 5 +- src/common/MindaRedscreen.cpp | 1 - src/common/appmain.cpp | 44 - src/common/bsod_gui.cpp | 2 +- src/common/client_response.hpp | 19 +- src/common/client_response_texts.cpp | 5 +- src/common/client_response_texts.hpp | 9 +- src/common/cmath_ext.h | 6 - src/common/compact_pointer.hpp | 155 + src/common/crash_dump/dump.cpp | 3 + src/common/fanctl/local/c_fan_ctl.cpp | 3 +- src/common/filament_sensor_adc.cpp | 36 +- src/common/footer_def.hpp | 13 +- src/common/gcode/gcode_buffer.cpp | 31 +- src/common/gcode/gcode_buffer.hpp | 10 +- src/common/gcode/gcode_info.cpp | 374 +- src/common/gcode/gcode_info.hpp | 90 +- src/common/gcode/gcode_reader.cpp | 168 +- src/common/gcode/gcode_reader.hpp | 64 +- src/common/general_response.hpp | 4 +- src/common/http/CMakeLists.txt | 1 + src/common/http/connect_error.cpp | 31 + src/common/http/connect_error.h | 4 +- src/common/http/httpc.cpp | 41 - src/common/http/httpc.hpp | 23 - src/common/hwio_pindef.h | 3 + src/common/hwio_pindef_XL.h | 1 + src/common/hwio_pindef_XL_dwarf.h | 3 +- src/common/include/dwarf_registers.hpp | 2 + src/common/loadcell.cpp | 21 +- src/common/loadcell.hpp | 8 +- src/common/marlin_client.cpp | 16 +- src/common/marlin_client.hpp | 2 +- src/common/marlin_events.h | 14 + src/common/marlin_print_preview.cpp | 78 +- src/common/marlin_print_preview.hpp | 18 +- src/common/marlin_server.cpp | 190 +- src/common/marlin_server.hpp | 17 +- src/common/marlin_server_shared.h | 1 + src/common/media.cpp | 296 +- src/common/media.h | 14 +- src/common/metric.cpp | 24 +- src/common/metric.h | 32 +- src/common/metric_handlers.cpp | 180 +- src/common/power_panic.cpp | 12 +- src/common/print_utils.cpp | 4 +- src/common/print_utils.hpp | 24 +- src/common/random.h | 37 + src/common/random_hw.cpp | 48 + src/common/random_sw.cpp | 16 + src/common/scope_guard.hpp | 29 + src/common/selftest/i_selftest.cpp | 57 +- src/common/selftest/i_selftest.hpp | 8 +- .../include_MINI/printer_selftest.hpp | 1 - .../include_MK3.5/printer_selftest.hpp | 1 - .../selftest/include_MK4/printer_selftest.hpp | 24 +- .../selftest/include_XL/printer_selftest.hpp | 26 - .../selftest/include_iX/printer_selftest.hpp | 1 - src/common/selftest/power_check.cpp | 6 +- src/common/selftest/selftest_MINI.cpp | 14 - src/common/selftest/selftest_MK3.5.cpp | 13 - src/common/selftest/selftest_MK4.cpp | 112 +- src/common/selftest/selftest_XL.cpp | 133 +- .../selftest/selftest_axis_interface.cpp | 6 +- .../selftest/selftest_axis_interface.hpp | 4 +- src/common/selftest/selftest_dock.cpp | 7 - src/common/selftest/selftest_esp.hpp | 2 +- src/common/selftest/selftest_esp_update.cpp | 6 +- src/common/selftest/selftest_esp_update.hpp | 4 +- src/common/selftest/selftest_fan.cpp | 8 - src/common/selftest/selftest_firstlayer.cpp | 1 - src/common/selftest/selftest_gears.cpp | 10 + src/common/selftest/selftest_heater.cpp | 64 +- src/common/selftest/selftest_heater.h | 15 +- .../selftest/selftest_heaters_interface.cpp | 28 +- src/common/selftest/selftest_iX.cpp | 13 - src/common/selftest/selftest_tool_offsets.cpp | 14 +- src/common/selftest/selftest_tool_offsets.hpp | 1 + .../selftest_tool_offsets_interface.cpp | 2 + src/common/selftest_result.cpp | 42 +- src/common/selftest_result.hpp | 21 +- src/common/selftest_state_names.hpp | 6 +- src/common/serial_printing.cpp | 86 + src/common/serial_printing.hpp | 37 + src/common/str_utils.cpp | 93 + src/common/str_utils.hpp | 115 + src/common/timing.cpp | 8 - src/common/timing.h | 4 +- src/common/trinamic.cpp | 6 +- src/common/version.h | 2 +- src/connect/command.cpp | 21 +- src/connect/command.hpp | 5 +- src/connect/connect.cpp | 2 +- src/connect/marlin_printer.cpp | 2 +- src/connect/planner.cpp | 18 +- src/connect/planner.hpp | 2 +- src/connect/render.cpp | 2 +- src/connect/sleep.cpp | 7 +- src/connect/tls/hardware_rng.cpp | 5 +- src/gui/CMakeLists.txt | 7 +- src/gui/MItem_basic_selftest.cpp | 6 + src/gui/MItem_filament.cpp | 31 +- src/gui/MItem_menus.cpp | 11 +- src/gui/MItem_menus.hpp | 10 - src/gui/MItem_mmu.cpp | 6 +- src/gui/MItem_tools.cpp | 64 +- src/gui/MItem_tools.hpp | 13 + src/gui/ScreenFactory.hpp | 2 - src/gui/ScreenSelftest.cpp | 5 +- src/gui/ScreenSelftest.hpp | 2 +- src/gui/box_unfinished_selftest.cpp | 29 +- src/gui/dialogs/DialogHandler.cpp | 14 + src/gui/dialogs/DialogHandler.hpp | 4 + src/gui/dialogs/DialogLoadUnload.cpp | 186 +- src/gui/dialogs/DialogLoadUnload.hpp | 67 +- src/gui/dialogs/DialogStateful.cpp | 28 +- src/gui/dialogs/DialogStateful.hpp | 62 +- src/gui/dialogs/IDialog.cpp | 14 + src/gui/dialogs/IDialog.hpp | 17 +- src/gui/dialogs/i_radio_button.cpp | 190 +- src/gui/dialogs/i_radio_button.hpp | 16 +- src/gui/dialogs/liveadjust_z.hpp | 1 - src/gui/dialogs/print_progress.cpp | 18 +- src/gui/dialogs/print_progress.hpp | 3 +- src/gui/dialogs/radio_button.cpp | 4 +- src/gui/dialogs/radio_button_fsm.hpp | 30 +- .../radio_button_preview.cpp | 3 +- src/gui/dialogs/window_dlg_preheat.cpp | 4 - src/gui/dialogs/window_dlg_preheat.hpp | 2 - src/gui/dialogs/window_dlg_quickpause.cpp | 4 - src/gui/dialogs/window_dlg_quickpause.hpp | 3 - src/gui/dialogs/window_dlg_strong_warning.hpp | 4 +- src/gui/gui_bootstrap_screen.cpp | 6 +- src/gui/gui_bootstrap_screen.hpp | 3 +- src/gui/guimain.cpp | 3 +- .../screen_menu_calibration_parent_alias.hpp | 14 - .../screen_menu_calibration_parent_alias.hpp | 17 - .../include_MK3.5/selftest_snake_config.hpp | 17 +- .../screen_menu_calibration_parent_alias.hpp | 17 - src/gui/include_MK4/selftest_snake_config.cpp | 6 +- src/gui/include_MK4/selftest_snake_config.hpp | 19 +- .../screen_menu_calibration_parent_alias.hpp | 32 - .../screen_menu_calibration_parent_alias.hpp | 18 - src/gui/lazyfilelist.hpp | 47 +- .../printer_animation_state.cpp | 1 + src/gui/res/mini_used_imgs.txt | 2 + src/gui/res/png/error_48x48.png | Bin 0 -> 643 bytes src/gui/res/png/mapping_80x80.png | Bin 0 -> 4923 bytes src/gui/res/png/mapping_80x80_focused.png | Bin 0 -> 4996 bytes src/gui/res/png/no_stream_48x48.png | Bin 0 -> 5213 bytes src/gui/screen_filebrowser.cpp | 6 +- src/gui/screen_home.cpp | 52 +- src/gui/screen_menu.hpp | 11 +- src/gui/screen_menu_calibration.cpp | 24 - src/gui/screen_menu_calibration.hpp | 15 - src/gui/screen_menu_control.hpp | 8 +- src/gui/screen_menu_move.cpp | 29 +- src/gui/screen_menu_move.hpp | 49 +- src/gui/screen_menu_move_utils.cpp | 9 +- src/gui/screen_menu_move_utils.hpp | 2 +- src/gui/screen_menu_selftest_snake.cpp | 25 +- src/gui/screen_menu_settings.hpp | 4 - src/gui/screen_print_preview.cpp | 29 +- src/gui/screen_print_preview.hpp | 6 +- src/gui/screen_printing.cpp | 6 +- src/gui/screen_printing_serial.cpp | 70 +- src/gui/screen_printing_serial.hpp | 2 + src/gui/screen_reset_error.cpp | 29 +- src/gui/screen_reset_error.hpp | 6 +- src/gui/screen_test_dlg.hpp | 2 - src/gui/screen_test_graph.hpp | 19 - src/gui/screen_test_wizard_icons.hpp | 1 - src/gui/screen_tools_mapping.cpp | 8 +- src/gui/signals.txt | 16 - src/gui/test/CMakeLists.txt | 1 - src/gui/test/screen_test_graph.cpp | 36 - src/gui/window_file_list.cpp | 378 +- src/gui/window_file_list.hpp | 72 +- src/gui/window_filebrowser.cpp | 173 +- src/gui/window_filebrowser.hpp | 14 +- src/gui/window_temp_graph.cpp | 117 - src/gui/window_temp_graph.hpp | 28 - src/gui/wizard/selftest_frame_temp.cpp | 114 +- src/gui/wizard/selftest_frame_temp.hpp | 10 +- .../wizard/selftest_frame_tool_offsets.cpp | 2 +- src/guiapi/include/WinMenuContainer.hpp | 8 +- src/guiapi/include/WindowMenuSpin.hpp | 8 +- src/guiapi/include/guitypes.hpp | 15 + src/guiapi/include/i_window_menu.hpp | 117 +- .../include/i_window_menu_container.hpp | 24 +- src/guiapi/include/i_window_menu_item.hpp | 66 +- src/guiapi/include/screen.hpp | 14 +- src/guiapi/include/screen_init_variant.hpp | 4 +- src/guiapi/include/window.hpp | 17 +- src/guiapi/include/window_frame.hpp | 12 +- src/guiapi/include/window_menu.hpp | 74 +- src/guiapi/include/window_menu_adv.hpp | 27 +- src/guiapi/include/window_menu_bar.hpp | 27 +- src/guiapi/include/window_msgbox.hpp | 83 +- src/guiapi/include/window_types.hpp | 4 - src/guiapi/src/CMakeLists.txt | 1 + src/guiapi/src/Rect16.cpp | 2 +- src/guiapi/src/WindowItemFormatableSpin.cpp | 6 +- src/guiapi/src/WindowMenuSpin.cpp | 9 +- src/guiapi/src/WindowMenuSwitch.cpp | 9 +- src/guiapi/src/i_window_menu.cpp | 188 + src/guiapi/src/i_window_menu_container.cpp | 71 +- src/guiapi/src/i_window_menu_item.cpp | 110 +- src/guiapi/src/ili9488.cpp | 32 +- src/guiapi/src/led_lcd_cs_selector.cpp | 2 +- src/guiapi/src/screen.cpp | 8 +- src/guiapi/src/window.cpp | 32 +- src/guiapi/src/window_frame.cpp | 6 +- src/guiapi/src/window_menu.cpp | 360 +- src/guiapi/src/window_menu_adv.cpp | 127 +- src/guiapi/src/window_menu_bar.cpp | 71 +- src/guiapi/src/window_msgbox.cpp | 220 +- src/guiconfig/GuiDefaults.hpp | 7 +- src/guiconfig/guiconfig.h | 3 - src/hw/CMakeLists.txt | 9 +- src/hw/FUSB302B.cpp | 67 +- src/hw/FUSB302B.hpp | 8 +- src/hw/fusb303.cpp | 1 - src/hw/fusb303.hpp | 18 - src/hw/mk3.5/CMakeLists.txt | 1 + src/hw/mk3.5/hw_configuration.hpp | 1 + src/logging/log_dest_usb.cpp | 2 +- src/marlin_stubs/G425.cpp | 2 +- src/marlin_stubs/M876.cpp | 9 - src/marlin_stubs/M997.cpp | 2 +- src/marlin_stubs/MK4/configuration.cpp | 2 +- src/marlin_stubs/host/M115.cpp | 4 +- src/marlin_stubs/include/pause_stubbed.hpp | 10 +- src/marlin_stubs/pause/M600.cpp | 9 + src/marlin_stubs/pause/pause.cpp | 69 +- src/mmu2/mmu2_error_converter.cpp | 12 +- src/mmu2/mmu2_fsm.cpp | 95 +- src/mmu2/mmu2_reporting.cpp | 41 +- src/persistent_stores/journal/store_item.hpp | 18 +- .../store_instances/config_store/defaults.hpp | 10 +- .../config_store/migrations.cpp | 28 + .../config_store/migrations.hpp | 10 + .../config_store/old_eeprom/eeprom_v10.hpp | 26 +- .../config_store/old_eeprom/eeprom_v11.hpp | 102 + .../config_store/old_eeprom/eeprom_v12.hpp | 129 +- .../config_store/old_eeprom/eeprom_v22.hpp | 248 + .../config_store/old_eeprom/eeprom_v32787.hpp | 56 + .../old_eeprom/last_migration.cpp | 125 +- .../old_eeprom/last_migration.hpp | 7 + .../config_store/store_definition.cpp | 124 +- .../config_store/store_definition.hpp | 61 +- src/puppies/Dwarf.cpp | 8 + src/puppies/PuppyBootstrap.cpp | 22 +- src/puppies/puppy_task.cpp | 6 +- src/puppy/dwarf/accelerometer.cpp | 293 +- src/puppy/dwarf/accelerometer.hpp | 1 + src/puppy/dwarf/interrupts.cpp | 25 +- src/puppy/dwarf/modbus/ModbusControl.cpp | 37 +- src/resources/CMakeLists.txt | 2 +- src/resources/web/index.html | 2 +- ...702172.js => main.2812ca58adec020e163e.js} | 2 +- src/state/printer_state.cpp | 1 + src/transfers/CMakeLists.txt | 4 - src/transfers/async_io.cpp | 73 - src/transfers/async_io.hpp | 86 - src/transfers/changed_path.cpp | 4 +- src/transfers/changed_path.hpp | 2 + src/transfers/decrypt.cpp | 101 +- src/transfers/decrypt.hpp | 67 +- src/transfers/download.cpp | 88 +- src/transfers/download.hpp | 18 +- src/transfers/files.cpp | 53 - src/transfers/files.hpp | 15 - src/transfers/monitor.cpp | 6 +- src/transfers/partial_file.cpp | 136 +- src/transfers/partial_file.hpp | 51 +- src/transfers/transfer.cpp | 238 +- src/transfers/transfer.hpp | 22 +- src/transfers/transfer_recovery.cpp | 97 +- tests/integration/test_prusa_link.py | 3 - tests/stubs/FreeRTOS.h | 6 + tests/stubs/Marlin/src/inc/MarlinConfigPre.h | 1 + tests/stubs/semphr.h | 3 +- tests/unit/CMakeLists.txt | 3 + tests/unit/common/CMakeLists.txt | 4 +- tests/unit/common/Leds/timing_dummy.cpp | 5 - .../common/filament_sensor/CMakeLists.txt | 1 - tests/unit/common/gcode/CMakeLists.txt | 1 - tests/unit/common/gcode/gcode_reader.cpp | 2 +- tests/unit/common/http/CMakeLists.txt | 1 - .../probe_position_lookback_test.cpp | 4 - tests/unit/common/str_utils_test.cpp | 90 + tests/unit/common/timing_tests.cpp | 4 + tests/unit/connect/CMakeLists.txt | 9 +- tests/unit/connect/command.cpp | 2 +- tests/unit/connect/missing_functions.cpp | 6 +- tests/unit/connect/partial_file_mock.cpp | 4 +- tests/unit/gui/gui_time_tests.c | 1 + tests/unit/gui/timing.h | 1 + tests/unit/gui/window/CMakeLists.txt | 1 + tests/unit/lang/eeprom/CMakeLists.txt | 7 +- .../lib/Marlin/MMU2/mmu2-printer_test.cpp | 4 +- .../lib/Marlin/MMU2/stubs/mmu2_reporting.cpp | 17 +- tests/unit/lib/Marlin/MMU2/stubs/mock_log.cpp | 1 - .../lib/Marlin/MMU2/stubs/stub_interfaces.h | 12 +- tests/unit/lib/WUI/nhttp/CMakeLists.txt | 11 +- tests/unit/lib/WUI/nhttp/missing_functions.c | 4 - .../unit/lib/WUI/nhttp/partial_file_mock.cpp | 12 + tests/unit/lib/WUI/nhttp/random_mock.cpp | 20 +- tests/unit/mock/timing_dummy.cpp | 6 - tests/unit/persistent_stores/CMakeLists.txt | 1 + tests/unit/transfers/CMakeLists.txt | 4 +- tests/unit/transfers/decrypt.cpp | 24 +- tests/unit/transfers/missing_functions.cpp | 4 - tests/unit/transfers/partial_file_mock.cpp | 2 +- tests/unit/transfers/transfer_tests.cpp | 39 - utils/bootstrap.py | 20 +- utils/holly/build-pr.jenkins | 6 +- utils/metrics/collect.py | 242 +- utils/pack_fw.py | 2 +- 2061 files changed, 135308 insertions(+), 40832 deletions(-) create mode 100644 doc/metricsProxy.d rename include/buddy/{usb_device.h => usb_device.hpp} (60%) create mode 100644 lib/Drivers/AddLIS2DH12.cmake create mode 100644 lib/Drivers/lis2dh12-pid/.gitrepo create mode 100644 lib/Drivers/lis2dh12-pid/CONTRIBUTING.md create mode 100644 lib/Drivers/lis2dh12-pid/LICENSE create mode 100644 lib/Drivers/lis2dh12-pid/README.md create mode 100644 lib/Drivers/lis2dh12-pid/Release_Notes.html create mode 100644 lib/Drivers/lis2dh12-pid/Release_Notes.md create mode 100644 lib/Drivers/lis2dh12-pid/_htmresc/favicon.png create mode 100644 lib/Drivers/lis2dh12-pid/_htmresc/mini-st_2020.css create mode 100644 lib/Drivers/lis2dh12-pid/_htmresc/st_logo_2020.png create mode 100644 lib/Drivers/lis2dh12-pid/lis2dh12_reg.c create mode 100644 lib/Drivers/lis2dh12-pid/lis2dh12_reg.h delete mode 100644 lib/Prusa-Error-Codes/20_MK35/error-codes.yaml delete mode 100644 lib/WUI/random.cpp delete mode 100644 lib/WUI/random.h delete mode 100644 lib/tinyusb/.clang-format create mode 100644 lib/tinyusb/.codespellrc delete mode 100644 lib/tinyusb/.github/ISSUE_TEMPLATE/feature_request.md create mode 100644 lib/tinyusb/.github/ISSUE_TEMPLATE/feature_request.yml create mode 100644 lib/tinyusb/.github/workflows/build_iar.yml create mode 100644 lib/tinyusb/.github/workflows/build_win_mac.yml create mode 100644 lib/tinyusb/.github/workflows/cifuzz.yml create mode 100644 lib/tinyusb/.github/workflows/cmake_arm.yml create mode 100644 lib/tinyusb/.github/workflows/pre-commit.yml delete mode 100644 lib/tinyusb/.gitmodules create mode 100644 lib/tinyusb/.idea/.gitignore create mode 100644 lib/tinyusb/.idea/cmake.xml create mode 100644 lib/tinyusb/.idea/runConfigurations/kl25.xml create mode 100644 lib/tinyusb/.idea/runConfigurations/lpc1857.xml create mode 100644 lib/tinyusb/.idea/runConfigurations/lpc4088.xml create mode 100644 lib/tinyusb/.idea/runConfigurations/lpc54628.xml create mode 100644 lib/tinyusb/.idea/runConfigurations/lpc55s69.xml create mode 100644 lib/tinyusb/.idea/runConfigurations/mcx947.xml create mode 100644 lib/tinyusb/.idea/runConfigurations/nrf52840.xml create mode 100644 lib/tinyusb/.idea/runConfigurations/nrf5340.xml create mode 100644 lib/tinyusb/.idea/runConfigurations/ra4m1.xml create mode 100644 lib/tinyusb/.idea/runConfigurations/ra6m1.xml create mode 100644 lib/tinyusb/.idea/runConfigurations/ra6m5.xml create mode 100644 lib/tinyusb/.idea/runConfigurations/rp2040.xml create mode 100644 lib/tinyusb/.idea/runConfigurations/rt1010.xml create mode 100644 lib/tinyusb/.idea/runConfigurations/rt1060.xml create mode 100644 lib/tinyusb/.idea/runConfigurations/samd21g18.xml create mode 100644 lib/tinyusb/.idea/runConfigurations/samd51j19.xml create mode 100644 lib/tinyusb/.idea/runConfigurations/stlink.xml create mode 100644 lib/tinyusb/.idea/runConfigurations/stm32g474.xml create mode 100644 lib/tinyusb/.idea/runConfigurations/stm32h743.xml create mode 100644 lib/tinyusb/.idea/runConfigurations/uno_r4.xml create mode 100644 lib/tinyusb/.idea/vcs.xml create mode 100644 lib/tinyusb/.pre-commit-config.yaml create mode 100644 lib/tinyusb/docs/reference/dependencies.rst create mode 100644 lib/tinyusb/examples/CMakeLists.txt delete mode 100644 lib/tinyusb/examples/device/audio_4_channel_mic/.skip.MCU_SAME5X delete mode 100644 lib/tinyusb/examples/device/audio_4_channel_mic/.skip.MCU_SAMG create mode 100644 lib/tinyusb/examples/device/audio_4_channel_mic/skip.txt delete mode 100644 lib/tinyusb/examples/device/audio_test/.skip.MCU_SAMD11 delete mode 100644 lib/tinyusb/examples/device/audio_test/.skip.MCU_SAME5X delete mode 100644 lib/tinyusb/examples/device/audio_test/.skip.MCU_SAMG create mode 100644 lib/tinyusb/examples/device/audio_test/skip.txt create mode 100644 lib/tinyusb/examples/device/audio_test_multi_rate/CMakeLists.txt create mode 100644 lib/tinyusb/examples/device/audio_test_multi_rate/Makefile create mode 100644 lib/tinyusb/examples/device/audio_test_multi_rate/skip.txt create mode 100644 lib/tinyusb/examples/device/audio_test_multi_rate/src/main.c create mode 100644 lib/tinyusb/examples/device/audio_test_multi_rate/src/plot_audio_samples.py create mode 100644 lib/tinyusb/examples/device/audio_test_multi_rate/src/tusb_config.h create mode 100644 lib/tinyusb/examples/device/audio_test_multi_rate/src/usb_descriptors.c create mode 100644 lib/tinyusb/examples/device/audio_test_multi_rate/src/usb_descriptors.h delete mode 100644 lib/tinyusb/examples/device/cdc_msc/.skip.MCU_SAMD11 create mode 100644 lib/tinyusb/examples/device/cdc_msc/skip.txt delete mode 100644 lib/tinyusb/examples/device/cdc_msc_freertos/.skip.MCU_BCM2711 delete mode 100644 lib/tinyusb/examples/device/cdc_msc_freertos/.skip.MCU_CXD56 delete mode 100644 lib/tinyusb/examples/device/cdc_msc_freertos/.skip.MCU_GD32VF103 delete mode 100644 lib/tinyusb/examples/device/cdc_msc_freertos/.skip.MCU_MKL25ZXX delete mode 100644 lib/tinyusb/examples/device/cdc_msc_freertos/.skip.MCU_MSP430x5xx delete mode 100644 lib/tinyusb/examples/device/cdc_msc_freertos/.skip.MCU_RP2040 delete mode 100644 lib/tinyusb/examples/device/cdc_msc_freertos/.skip.MCU_SAMD11 delete mode 100644 lib/tinyusb/examples/device/cdc_msc_freertos/.skip.MCU_SAMX7X delete mode 100644 lib/tinyusb/examples/device/cdc_msc_freertos/.skip.MCU_VALENTYUSB_EPTRI create mode 100644 lib/tinyusb/examples/device/cdc_msc_freertos/skip.txt create mode 100644 lib/tinyusb/examples/device/cdc_uac2/CMakeLists.txt create mode 100644 lib/tinyusb/examples/device/cdc_uac2/Makefile create mode 100644 lib/tinyusb/examples/device/cdc_uac2/README.md create mode 100644 lib/tinyusb/examples/device/cdc_uac2/src/cdc_app.c create mode 100644 lib/tinyusb/examples/device/cdc_uac2/src/common.h create mode 100644 lib/tinyusb/examples/device/cdc_uac2/src/main.c create mode 100644 lib/tinyusb/examples/device/cdc_uac2/src/tusb_config.h create mode 100644 lib/tinyusb/examples/device/cdc_uac2/src/uac2_app.c create mode 100644 lib/tinyusb/examples/device/cdc_uac2/src/usb_descriptors.c create mode 100644 lib/tinyusb/examples/device/cdc_uac2/src/usb_descriptors.h delete mode 100644 lib/tinyusb/examples/device/dfu/.skip.MCU_TM4C123 create mode 100644 lib/tinyusb/examples/device/dfu/skip.txt delete mode 100644 lib/tinyusb/examples/device/dynamic_configuration/.skip.MCU_SAMD11 create mode 100644 lib/tinyusb/examples/device/dynamic_configuration/skip.txt delete mode 100644 lib/tinyusb/examples/device/hid_composite_freertos/.skip.MCU_BCM2711 delete mode 100644 lib/tinyusb/examples/device/hid_composite_freertos/.skip.MCU_CXD56 delete mode 100644 lib/tinyusb/examples/device/hid_composite_freertos/.skip.MCU_GD32VF103 delete mode 100644 lib/tinyusb/examples/device/hid_composite_freertos/.skip.MCU_MSP430x5xx delete mode 100644 lib/tinyusb/examples/device/hid_composite_freertos/.skip.MCU_RP2040 delete mode 100644 lib/tinyusb/examples/device/hid_composite_freertos/.skip.MCU_SAMD11 delete mode 100644 lib/tinyusb/examples/device/hid_composite_freertos/.skip.MCU_SAMX7X delete mode 100644 lib/tinyusb/examples/device/hid_composite_freertos/.skip.MCU_VALENTYUSB_EPTRI create mode 100644 lib/tinyusb/examples/device/hid_composite_freertos/skip.txt delete mode 100644 lib/tinyusb/examples/device/msc_dual_lun/.skip.MCU_MKL25ZXX delete mode 100644 lib/tinyusb/examples/device/msc_dual_lun/.skip.MCU_SAMD11 create mode 100644 lib/tinyusb/examples/device/msc_dual_lun/skip.txt delete mode 100644 lib/tinyusb/examples/device/net_lwip_webserver/.skip.MCU_BCM2711 delete mode 100644 lib/tinyusb/examples/device/net_lwip_webserver/.skip.MCU_LPC11UXX delete mode 100644 lib/tinyusb/examples/device/net_lwip_webserver/.skip.MCU_LPC13XX delete mode 100644 lib/tinyusb/examples/device/net_lwip_webserver/.skip.MCU_MKL25ZXX delete mode 100644 lib/tinyusb/examples/device/net_lwip_webserver/.skip.MCU_MSP430x5xx delete mode 100644 lib/tinyusb/examples/device/net_lwip_webserver/.skip.MCU_NUC121 delete mode 100644 lib/tinyusb/examples/device/net_lwip_webserver/.skip.MCU_SAMD11 delete mode 100644 lib/tinyusb/examples/device/net_lwip_webserver/.skip.MCU_STM32L0 create mode 100644 lib/tinyusb/examples/device/net_lwip_webserver/skip.txt create mode 100644 lib/tinyusb/examples/device/net_lwip_webserver/src/arch/bpstruct.h create mode 100644 lib/tinyusb/examples/device/net_lwip_webserver/src/arch/epstruct.h delete mode 100644 lib/tinyusb/examples/device/uac2_headset/.skip.MCU_LPC11UXX delete mode 100644 lib/tinyusb/examples/device/uac2_headset/.skip.MCU_LPC13XX delete mode 100644 lib/tinyusb/examples/device/uac2_headset/.skip.MCU_NUC121 delete mode 100644 lib/tinyusb/examples/device/uac2_headset/.skip.MCU_SAMD11 delete mode 100644 lib/tinyusb/examples/device/uac2_headset/.skip.MCU_SAME5X delete mode 100644 lib/tinyusb/examples/device/uac2_headset/.skip.MCU_SAMG create mode 100644 lib/tinyusb/examples/device/uac2_headset/skip.txt create mode 100644 lib/tinyusb/examples/device/usbtmc/skip.txt delete mode 100644 lib/tinyusb/examples/device/video_capture/.skip.MCU_MSP430x5xx delete mode 100644 lib/tinyusb/examples/device/video_capture/.skip.MCU_SAMD11 create mode 100644 lib/tinyusb/examples/device/video_capture/skip.txt create mode 100644 lib/tinyusb/examples/dual/CMakeLists.txt create mode 100644 lib/tinyusb/examples/dual/host_hid_to_device_cdc/CMakeLists.txt create mode 100644 lib/tinyusb/examples/dual/host_hid_to_device_cdc/Makefile create mode 100644 lib/tinyusb/examples/dual/host_hid_to_device_cdc/only.txt create mode 100644 lib/tinyusb/examples/dual/host_hid_to_device_cdc/src/main.c create mode 100644 lib/tinyusb/examples/dual/host_hid_to_device_cdc/src/tusb_config.h create mode 100644 lib/tinyusb/examples/dual/host_hid_to_device_cdc/src/usb_descriptors.c create mode 100644 lib/tinyusb/examples/host/bare_api/CMakeLists.txt create mode 100644 lib/tinyusb/examples/host/bare_api/Makefile create mode 100644 lib/tinyusb/examples/host/bare_api/only.txt create mode 100644 lib/tinyusb/examples/host/bare_api/src/main.c create mode 100644 lib/tinyusb/examples/host/bare_api/src/tusb_config.h delete mode 100644 lib/tinyusb/examples/host/cdc_msc_hid/.only.MCU_LPC175X_6X delete mode 100644 lib/tinyusb/examples/host/cdc_msc_hid/.only.MCU_LPC177X_8X delete mode 100644 lib/tinyusb/examples/host/cdc_msc_hid/.only.MCU_LPC18XX delete mode 100644 lib/tinyusb/examples/host/cdc_msc_hid/.only.MCU_LPC40XX delete mode 100644 lib/tinyusb/examples/host/cdc_msc_hid/.only.MCU_LPC43XX delete mode 100644 lib/tinyusb/examples/host/cdc_msc_hid/.only.MCU_MIMXRT10XX delete mode 100644 lib/tinyusb/examples/host/cdc_msc_hid/.only.MCU_MSP432E4 delete mode 100644 lib/tinyusb/examples/host/cdc_msc_hid/.only.MCU_RP2040 create mode 100644 lib/tinyusb/examples/host/cdc_msc_hid/only.txt create mode 100644 lib/tinyusb/examples/host/cdc_msc_hid/src/cdc_app.c create mode 100644 lib/tinyusb/examples/host/cdc_msc_hid_freertos/CMakeLists.txt create mode 100644 lib/tinyusb/examples/host/cdc_msc_hid_freertos/Makefile create mode 100644 lib/tinyusb/examples/host/cdc_msc_hid_freertos/only.txt create mode 100644 lib/tinyusb/examples/host/cdc_msc_hid_freertos/src/CMakeLists.txt create mode 100644 lib/tinyusb/examples/host/cdc_msc_hid_freertos/src/FreeRTOSConfig/FreeRTOSConfig.h create mode 100644 lib/tinyusb/examples/host/cdc_msc_hid_freertos/src/cdc_app.c create mode 100644 lib/tinyusb/examples/host/cdc_msc_hid_freertos/src/freertos_hook.c create mode 100644 lib/tinyusb/examples/host/cdc_msc_hid_freertos/src/hid_app.c create mode 100644 lib/tinyusb/examples/host/cdc_msc_hid_freertos/src/main.c create mode 100644 lib/tinyusb/examples/host/cdc_msc_hid_freertos/src/msc_app.c create mode 100644 lib/tinyusb/examples/host/cdc_msc_hid_freertos/src/tusb_config.h delete mode 100644 lib/tinyusb/examples/host/hid_controller/.only.MCU_LPC175X_6X delete mode 100644 lib/tinyusb/examples/host/hid_controller/.only.MCU_LPC177X_8X delete mode 100644 lib/tinyusb/examples/host/hid_controller/.only.MCU_LPC18XX delete mode 100644 lib/tinyusb/examples/host/hid_controller/.only.MCU_LPC40XX delete mode 100644 lib/tinyusb/examples/host/hid_controller/.only.MCU_LPC43XX delete mode 100644 lib/tinyusb/examples/host/hid_controller/.only.MCU_MIMXRT10XX delete mode 100644 lib/tinyusb/examples/host/hid_controller/.only.MCU_MSP432E4 delete mode 100644 lib/tinyusb/examples/host/hid_controller/.only.MCU_RP2040 create mode 100644 lib/tinyusb/examples/host/hid_controller/only.txt create mode 100644 lib/tinyusb/examples/host/msc_file_explorer/CMakeLists.txt create mode 100644 lib/tinyusb/examples/host/msc_file_explorer/Makefile create mode 100644 lib/tinyusb/examples/host/msc_file_explorer/only.txt create mode 100644 lib/tinyusb/examples/host/msc_file_explorer/src/main.c create mode 100644 lib/tinyusb/examples/host/msc_file_explorer/src/msc_app.c create mode 100644 lib/tinyusb/examples/host/msc_file_explorer/src/tusb_config.h create mode 100644 lib/tinyusb/examples/typec/CMakeLists.txt create mode 100644 lib/tinyusb/examples/typec/power_delivery/CMakeLists.txt create mode 100644 lib/tinyusb/examples/typec/power_delivery/Makefile create mode 100644 lib/tinyusb/examples/typec/power_delivery/only.txt create mode 100644 lib/tinyusb/examples/typec/power_delivery/src/main.c create mode 100644 lib/tinyusb/examples/typec/power_delivery/src/tusb_config.h rename lib/tinyusb/hw/bsp/{board.h => board_api.h} (50%) rename lib/tinyusb/hw/bsp/{raspberrypi4/boards/raspberrypi_cm4 => broadcom_32bit/boards/raspberrypi_zero_w}/board.h (99%) create mode 100644 lib/tinyusb/hw/bsp/broadcom_32bit/boards/raspberrypi_zero_w/board.mk rename lib/tinyusb/hw/bsp/{raspberrypi4 => broadcom_32bit}/family.c (81%) create mode 100644 lib/tinyusb/hw/bsp/broadcom_32bit/family.mk rename lib/tinyusb/hw/bsp/{esp32s2/boards/espressif_kaluga_1 => broadcom_64bit/boards/raspberrypi_cm4}/board.h (89%) create mode 100644 lib/tinyusb/hw/bsp/broadcom_64bit/boards/raspberrypi_cm4/board.mk create mode 100644 lib/tinyusb/hw/bsp/broadcom_64bit/boards/raspberrypi_zero2w/board.h create mode 100644 lib/tinyusb/hw/bsp/broadcom_64bit/boards/raspberrypi_zero2w/board.mk create mode 100644 lib/tinyusb/hw/bsp/broadcom_64bit/family.c rename lib/tinyusb/hw/bsp/{raspberrypi4 => broadcom_64bit}/family.mk (74%) create mode 100644 lib/tinyusb/hw/bsp/brtmm90x/boards/mm900evxb/board.h create mode 100644 lib/tinyusb/hw/bsp/brtmm90x/family.c create mode 100644 lib/tinyusb/hw/bsp/brtmm90x/family.mk create mode 100644 lib/tinyusb/hw/bsp/ch32v307/boards/ch32v307v_r1_1v0/board.h create mode 100644 lib/tinyusb/hw/bsp/ch32v307/boards/ch32v307v_r1_1v0/board.mk create mode 100644 lib/tinyusb/hw/bsp/ch32v307/boards/ch32v307v_r1_1v0/debug_uart.c create mode 100644 lib/tinyusb/hw/bsp/ch32v307/boards/ch32v307v_r1_1v0/debug_uart.h create mode 100644 lib/tinyusb/hw/bsp/ch32v307/ch32v307.ld create mode 100644 lib/tinyusb/hw/bsp/ch32v307/ch32v30x_conf.h create mode 100644 lib/tinyusb/hw/bsp/ch32v307/ch32v30x_it.c create mode 100644 lib/tinyusb/hw/bsp/ch32v307/ch32v30x_it.h create mode 100644 lib/tinyusb/hw/bsp/ch32v307/core_riscv.h create mode 100644 lib/tinyusb/hw/bsp/ch32v307/family.c create mode 100644 lib/tinyusb/hw/bsp/ch32v307/family.mk create mode 100644 lib/tinyusb/hw/bsp/ch32v307/system_ch32v30x.c create mode 100644 lib/tinyusb/hw/bsp/ch32v307/system_ch32v30x.h create mode 100644 lib/tinyusb/hw/bsp/ch32v307/wch-riscv.cfg delete mode 100644 lib/tinyusb/hw/bsp/d5035_01/board.mk delete mode 100644 lib/tinyusb/hw/bsp/ea4357/board.mk delete mode 100644 lib/tinyusb/hw/bsp/esp32s2/boards/CMakeLists.txt delete mode 100644 lib/tinyusb/hw/bsp/esp32s2/boards/adafruit_feather_esp32s2/board.cmake delete mode 100644 lib/tinyusb/hw/bsp/esp32s2/boards/adafruit_magtag_29gray/board.cmake delete mode 100644 lib/tinyusb/hw/bsp/esp32s2/boards/adafruit_metro_esp32s2/board.cmake delete mode 100644 lib/tinyusb/hw/bsp/esp32s2/boards/esp32s2.c delete mode 100644 lib/tinyusb/hw/bsp/esp32s2/boards/espressif_kaluga_1/board.cmake delete mode 100644 lib/tinyusb/hw/bsp/esp32s2/boards/espressif_saola_1/board.cmake delete mode 100644 lib/tinyusb/hw/bsp/esp32s2/components/led_strip/CMakeLists.txt delete mode 100644 lib/tinyusb/hw/bsp/esp32s2/components/led_strip/src/led_strip_rmt_ws2812.c delete mode 100644 lib/tinyusb/hw/bsp/esp32s2/family.cmake delete mode 100644 lib/tinyusb/hw/bsp/esp32s3/boards/CMakeLists.txt delete mode 100644 lib/tinyusb/hw/bsp/esp32s3/boards/esp32s3.c delete mode 100644 lib/tinyusb/hw/bsp/esp32s3/boards/espressif_addax_1/board.cmake delete mode 100644 lib/tinyusb/hw/bsp/esp32s3/components/led_strip/include/led_strip.h delete mode 100644 lib/tinyusb/hw/bsp/esp32s3/family.cmake delete mode 100644 lib/tinyusb/hw/bsp/esp32s3/family.mk create mode 100644 lib/tinyusb/hw/bsp/espressif/boards/CMakeLists.txt create mode 100644 lib/tinyusb/hw/bsp/espressif/boards/adafruit_feather_esp32s2/board.cmake rename lib/tinyusb/hw/bsp/{esp32s2 => espressif}/boards/adafruit_feather_esp32s2/board.h (99%) create mode 100644 lib/tinyusb/hw/bsp/espressif/boards/adafruit_magtag_29gray/board.cmake rename lib/tinyusb/hw/bsp/{esp32s2 => espressif}/boards/adafruit_magtag_29gray/board.h (99%) create mode 100644 lib/tinyusb/hw/bsp/espressif/boards/adafruit_metro_esp32s2/board.cmake create mode 100644 lib/tinyusb/hw/bsp/espressif/boards/adafruit_metro_esp32s2/board.h create mode 100644 lib/tinyusb/hw/bsp/espressif/boards/espressif_addax_1/board.cmake rename lib/tinyusb/hw/bsp/{esp32s3 => espressif}/boards/espressif_addax_1/board.h (99%) create mode 100644 lib/tinyusb/hw/bsp/espressif/boards/espressif_kaluga_1/board.cmake create mode 100644 lib/tinyusb/hw/bsp/espressif/boards/espressif_kaluga_1/board.h create mode 100644 lib/tinyusb/hw/bsp/espressif/boards/espressif_s2_devkitc/board.cmake rename lib/tinyusb/hw/bsp/{esp32s2/boards/espressif_saola_1 => espressif/boards/espressif_s2_devkitc}/board.h (99%) create mode 100644 lib/tinyusb/hw/bsp/espressif/boards/espressif_s3_devkitc/board.cmake rename lib/tinyusb/hw/bsp/{esp32s2/boards/adafruit_metro_esp32s2 => espressif/boards/espressif_s3_devkitc}/board.h (97%) create mode 100644 lib/tinyusb/hw/bsp/espressif/boards/espressif_s3_devkitm/board.cmake create mode 100644 lib/tinyusb/hw/bsp/espressif/boards/espressif_s3_devkitm/board.h create mode 100644 lib/tinyusb/hw/bsp/espressif/boards/espressif_saola_1/board.cmake create mode 100644 lib/tinyusb/hw/bsp/espressif/boards/espressif_saola_1/board.h create mode 100644 lib/tinyusb/hw/bsp/espressif/boards/family.c rename lib/tinyusb/hw/bsp/{esp32s3 => espressif}/components/led_strip/CMakeLists.txt (99%) rename lib/tinyusb/hw/bsp/{esp32s2 => espressif}/components/led_strip/include/led_strip.h (100%) rename lib/tinyusb/hw/bsp/{esp32s3 => espressif}/components/led_strip/src/led_strip_rmt_ws2812.c (99%) create mode 100644 lib/tinyusb/hw/bsp/espressif/components/tinyusb_src/CMakeLists.txt create mode 100644 lib/tinyusb/hw/bsp/espressif/family.cmake rename lib/tinyusb/hw/bsp/{esp32s2 => espressif}/family.mk (54%) create mode 100644 lib/tinyusb/hw/bsp/f1c100s/README.md create mode 100644 lib/tinyusb/hw/bsp/f1c100s/board.h create mode 100644 lib/tinyusb/hw/bsp/f1c100s/board.mk create mode 100644 lib/tinyusb/hw/bsp/f1c100s/f1c100s.c delete mode 100644 lib/tinyusb/hw/bsp/frdm_k32l2b/board.mk delete mode 100644 lib/tinyusb/hw/bsp/frdm_kl25z/board.mk create mode 100644 lib/tinyusb/hw/bsp/imxrt/FreeRTOSConfig/FreeRTOSConfig.h create mode 100644 lib/tinyusb/hw/bsp/imxrt/boards/metro_m7_1011/board.cmake create mode 100644 lib/tinyusb/hw/bsp/imxrt/boards/metro_m7_1011/board.h create mode 100644 lib/tinyusb/hw/bsp/imxrt/boards/metro_m7_1011/board.mk create mode 100644 lib/tinyusb/hw/bsp/imxrt/boards/metro_m7_1011/board/clock_config.c create mode 100644 lib/tinyusb/hw/bsp/imxrt/boards/metro_m7_1011/board/clock_config.h create mode 100644 lib/tinyusb/hw/bsp/imxrt/boards/metro_m7_1011/evkmimxrt1010_flexspi_nor_config.c create mode 100644 lib/tinyusb/hw/bsp/imxrt/boards/metro_m7_1011/evkmimxrt1010_flexspi_nor_config.h create mode 100644 lib/tinyusb/hw/bsp/imxrt/boards/metro_m7_1011/metro_m7_1011.ld create mode 100644 lib/tinyusb/hw/bsp/imxrt/boards/metro_m7_1011/metro_m7_1011.mex create mode 100644 lib/tinyusb/hw/bsp/imxrt/boards/mimxrt1010_evk/board.cmake create mode 100644 lib/tinyusb/hw/bsp/imxrt/boards/mimxrt1010_evk/board/clock_config.c create mode 100644 lib/tinyusb/hw/bsp/imxrt/boards/mimxrt1010_evk/board/clock_config.h create mode 100644 lib/tinyusb/hw/bsp/imxrt/boards/mimxrt1010_evk/mimxrt1010_evk.mex create mode 100644 lib/tinyusb/hw/bsp/imxrt/boards/mimxrt1015_evk/board.cmake create mode 100644 lib/tinyusb/hw/bsp/imxrt/boards/mimxrt1015_evk/board/clock_config.c create mode 100644 lib/tinyusb/hw/bsp/imxrt/boards/mimxrt1015_evk/board/clock_config.h create mode 100644 lib/tinyusb/hw/bsp/imxrt/boards/mimxrt1015_evk/mimxrt1015_evk.mex create mode 100644 lib/tinyusb/hw/bsp/imxrt/boards/mimxrt1020_evk/board.cmake create mode 100644 lib/tinyusb/hw/bsp/imxrt/boards/mimxrt1020_evk/board/clock_config.c create mode 100644 lib/tinyusb/hw/bsp/imxrt/boards/mimxrt1020_evk/board/clock_config.h create mode 100644 lib/tinyusb/hw/bsp/imxrt/boards/mimxrt1020_evk/mimxrt1020_evk.mex create mode 100644 lib/tinyusb/hw/bsp/imxrt/boards/mimxrt1024_evk/board.cmake create mode 100644 lib/tinyusb/hw/bsp/imxrt/boards/mimxrt1024_evk/board.h create mode 100644 lib/tinyusb/hw/bsp/imxrt/boards/mimxrt1024_evk/board.mk create mode 100644 lib/tinyusb/hw/bsp/imxrt/boards/mimxrt1024_evk/board/clock_config.c create mode 100644 lib/tinyusb/hw/bsp/imxrt/boards/mimxrt1024_evk/board/clock_config.h create mode 100644 lib/tinyusb/hw/bsp/imxrt/boards/mimxrt1024_evk/evkmimxrt1024_flexspi_nor_config.c create mode 100644 lib/tinyusb/hw/bsp/imxrt/boards/mimxrt1024_evk/evkmimxrt1024_flexspi_nor_config.h create mode 100644 lib/tinyusb/hw/bsp/imxrt/boards/mimxrt1024_evk/mimxrt1024_evk.mex create mode 100644 lib/tinyusb/hw/bsp/imxrt/boards/mimxrt1050_evkb/board.cmake create mode 100644 lib/tinyusb/hw/bsp/imxrt/boards/mimxrt1050_evkb/board/clock_config.c create mode 100644 lib/tinyusb/hw/bsp/imxrt/boards/mimxrt1050_evkb/board/clock_config.h create mode 100644 lib/tinyusb/hw/bsp/imxrt/boards/mimxrt1050_evkb/mimxrt1050_evkb.mex create mode 100644 lib/tinyusb/hw/bsp/imxrt/boards/mimxrt1060_evk/board.cmake create mode 100644 lib/tinyusb/hw/bsp/imxrt/boards/mimxrt1060_evk/board/clock_config.c create mode 100644 lib/tinyusb/hw/bsp/imxrt/boards/mimxrt1060_evk/board/clock_config.h create mode 100644 lib/tinyusb/hw/bsp/imxrt/boards/mimxrt1060_evk/mimxrt1060_evk.mex create mode 100644 lib/tinyusb/hw/bsp/imxrt/boards/mimxrt1064_evk/board.cmake create mode 100644 lib/tinyusb/hw/bsp/imxrt/boards/mimxrt1064_evk/board/clock_config.c create mode 100644 lib/tinyusb/hw/bsp/imxrt/boards/mimxrt1064_evk/board/clock_config.h create mode 100644 lib/tinyusb/hw/bsp/imxrt/boards/mimxrt1064_evk/mimxrt1064_evk.mex create mode 100644 lib/tinyusb/hw/bsp/imxrt/boards/teensy_40/board.cmake create mode 100644 lib/tinyusb/hw/bsp/imxrt/boards/teensy_40/board/clock_config.c create mode 100644 lib/tinyusb/hw/bsp/imxrt/boards/teensy_40/board/clock_config.h create mode 100644 lib/tinyusb/hw/bsp/imxrt/boards/teensy_40/teensy40.mex create mode 100644 lib/tinyusb/hw/bsp/imxrt/boards/teensy_41/board.cmake create mode 100644 lib/tinyusb/hw/bsp/imxrt/boards/teensy_41/board.h create mode 100644 lib/tinyusb/hw/bsp/imxrt/boards/teensy_41/board.mk create mode 100644 lib/tinyusb/hw/bsp/imxrt/boards/teensy_41/board/clock_config.c create mode 100644 lib/tinyusb/hw/bsp/imxrt/boards/teensy_41/board/clock_config.h create mode 100644 lib/tinyusb/hw/bsp/imxrt/boards/teensy_41/teensy41.mex create mode 100644 lib/tinyusb/hw/bsp/imxrt/boards/teensy_41/teensy41_flexspi_nor_config.c create mode 100644 lib/tinyusb/hw/bsp/imxrt/boards/teensy_41/teensy41_flexspi_nor_config.h create mode 100644 lib/tinyusb/hw/bsp/imxrt/debug.jlinkscript create mode 100644 lib/tinyusb/hw/bsp/imxrt/family.cmake create mode 100644 lib/tinyusb/hw/bsp/kinetis_k32l2/boards/frdm_k32l2a4s/board.h create mode 100644 lib/tinyusb/hw/bsp/kinetis_k32l2/boards/frdm_k32l2a4s/board.mk create mode 100644 lib/tinyusb/hw/bsp/kinetis_k32l2/boards/frdm_k32l2a4s/frdm_k32l2a4s.c rename lib/tinyusb/hw/bsp/{ => kinetis_k32l2/boards}/frdm_k32l2b/board.h (99%) create mode 100644 lib/tinyusb/hw/bsp/kinetis_k32l2/boards/frdm_k32l2b/board.mk rename lib/tinyusb/hw/bsp/{ => kinetis_k32l2/boards}/frdm_k32l2b/frdm_k32l2b.c (97%) rename lib/tinyusb/hw/bsp/{ => kinetis_k32l2/boards}/kuiic/K32L2B31xxxxA_flash.ld (99%) rename lib/tinyusb/hw/bsp/{ => kinetis_k32l2/boards}/kuiic/board.h (99%) create mode 100644 lib/tinyusb/hw/bsp/kinetis_k32l2/boards/kuiic/board.mk rename lib/tinyusb/hw/bsp/{ => kinetis_k32l2/boards}/kuiic/kuiic.c (97%) create mode 100644 lib/tinyusb/hw/bsp/kinetis_k32l2/family.mk create mode 100644 lib/tinyusb/hw/bsp/kinetis_kl/FreeRTOSConfig/FreeRTOSConfig.h create mode 100644 lib/tinyusb/hw/bsp/kinetis_kl/boards/frdm_kl25z/board.cmake create mode 100644 lib/tinyusb/hw/bsp/kinetis_kl/boards/frdm_kl25z/board.h create mode 100644 lib/tinyusb/hw/bsp/kinetis_kl/boards/frdm_kl25z/board.mk create mode 100644 lib/tinyusb/hw/bsp/kinetis_kl/boards/frdm_kl25z/clock_config.c create mode 100644 lib/tinyusb/hw/bsp/kinetis_kl/boards/frdm_kl25z/clock_config.h rename lib/tinyusb/hw/bsp/{frdm_kl25z/frdm_kl25z.c => kinetis_kl/family.c} (73%) create mode 100644 lib/tinyusb/hw/bsp/kinetis_kl/family.cmake create mode 100644 lib/tinyusb/hw/bsp/kinetis_kl/family.mk create mode 100644 lib/tinyusb/hw/bsp/kinetis_kl/gcc/MKL25Z128xxx4_flash.ld create mode 100644 lib/tinyusb/hw/bsp/kinetis_kl/gcc/startup_MKL25Z4.S delete mode 100644 lib/tinyusb/hw/bsp/kuiic/board.mk create mode 100644 lib/tinyusb/hw/bsp/lpc11/boards/lpcxpresso11u37/board.mk rename lib/tinyusb/hw/bsp/{ => lpc11/boards}/lpcxpresso11u37/lpc11u37.ld (82%) rename lib/tinyusb/hw/bsp/{ => lpc11/boards}/lpcxpresso11u37/lpcxpresso11u37.c (99%) create mode 100644 lib/tinyusb/hw/bsp/lpc11/boards/lpcxpresso11u68/board.mk rename lib/tinyusb/hw/bsp/{ => lpc11/boards}/lpcxpresso11u68/lpc11u68.ld (81%) rename lib/tinyusb/hw/bsp/{ => lpc11/boards}/lpcxpresso11u68/lpcxpresso11u68.c (99%) create mode 100644 lib/tinyusb/hw/bsp/lpc11/family.mk create mode 100644 lib/tinyusb/hw/bsp/lpc13/boards/lpcxpresso1347/board.mk rename lib/tinyusb/hw/bsp/{ => lpc13/boards}/lpcxpresso1347/lpc1347.ld (81%) rename lib/tinyusb/hw/bsp/{ => lpc13/boards}/lpcxpresso1347/lpcxpresso1347.c (98%) rename lib/tinyusb/hw/bsp/{lpcxpresso1347/board.mk => lpc13/family.mk} (58%) create mode 100644 lib/tinyusb/hw/bsp/lpc17/boards/lpcxpresso1769/board.mk rename lib/tinyusb/hw/bsp/{ => lpc17/boards}/lpcxpresso1769/lpc1769.ld (81%) rename lib/tinyusb/hw/bsp/{ => lpc17/boards}/lpcxpresso1769/lpcxpresso1769.c (96%) create mode 100644 lib/tinyusb/hw/bsp/lpc17/boards/mbed1768/board.mk rename lib/tinyusb/hw/bsp/{ => lpc17/boards}/mbed1768/lpc1768.ld (81%) rename lib/tinyusb/hw/bsp/{ => lpc17/boards}/mbed1768/mbed1768.c (95%) rename lib/tinyusb/hw/bsp/{lpcxpresso1769/board.mk => lpc17/family.mk} (68%) create mode 100644 lib/tinyusb/hw/bsp/lpc18/FreeRTOSConfig/FreeRTOSConfig.h create mode 100644 lib/tinyusb/hw/bsp/lpc18/boards/lpcxpresso18s37/board.cmake create mode 100644 lib/tinyusb/hw/bsp/lpc18/boards/mcb1800/board.cmake create mode 100644 lib/tinyusb/hw/bsp/lpc18/boards/mcb1800/ozone/lpc1857.jdebug create mode 100644 lib/tinyusb/hw/bsp/lpc18/family.cmake create mode 100644 lib/tinyusb/hw/bsp/lpc40/FreeRTOSConfig/FreeRTOSConfig.h create mode 100644 lib/tinyusb/hw/bsp/lpc40/boards/ea4088_quickstart/board.cmake create mode 100644 lib/tinyusb/hw/bsp/lpc40/boards/ea4088_quickstart/board.h create mode 100644 lib/tinyusb/hw/bsp/lpc40/boards/ea4088_quickstart/board.mk rename lib/tinyusb/hw/bsp/{ea4088qs => lpc40/boards/ea4088_quickstart}/lpc4088.ld (81%) create mode 100644 lib/tinyusb/hw/bsp/lpc40/boards/ea4088_quickstart/ozone/ea4088_quickstart.jdebug rename lib/tinyusb/hw/bsp/{ea4088qs/ea4088qs.c => lpc40/family.c} (58%) create mode 100644 lib/tinyusb/hw/bsp/lpc40/family.cmake rename lib/tinyusb/hw/bsp/{ea4088qs/board.mk => lpc40/family.mk} (71%) create mode 100644 lib/tinyusb/hw/bsp/lpc43/FreeRTOSConfig/FreeRTOSConfig.h create mode 100644 lib/tinyusb/hw/bsp/lpc43/boards/ea4357/board.cmake create mode 100644 lib/tinyusb/hw/bsp/lpc43/boards/ea4357/board.h create mode 100644 lib/tinyusb/hw/bsp/lpc43/boards/ea4357/board.mk rename lib/tinyusb/hw/bsp/{ => lpc43/boards}/ea4357/lpc4357.ld (78%) rename lib/tinyusb/hw/bsp/{ => lpc43/boards}/ea4357/pca9532.c (99%) rename lib/tinyusb/hw/bsp/{ => lpc43/boards}/ea4357/pca9532.h (97%) create mode 100644 lib/tinyusb/hw/bsp/lpc43/boards/lpcxpresso43s67/board.cmake create mode 100644 lib/tinyusb/hw/bsp/lpc43/boards/lpcxpresso43s67/board.h create mode 100644 lib/tinyusb/hw/bsp/lpc43/boards/lpcxpresso43s67/board.mk create mode 100644 lib/tinyusb/hw/bsp/lpc43/boards/lpcxpresso43s67/lpc4367.ld rename lib/tinyusb/hw/bsp/{ea4357/ea4357.c => lpc43/family.c} (68%) create mode 100644 lib/tinyusb/hw/bsp/lpc43/family.cmake create mode 100644 lib/tinyusb/hw/bsp/lpc43/family.mk create mode 100644 lib/tinyusb/hw/bsp/lpc51/boards/lpcxpresso51u68/board.mk rename lib/tinyusb/hw/bsp/{ => lpc51/boards}/lpcxpresso51u68/lpcxpresso51u68.c (99%) rename lib/tinyusb/hw/bsp/{lpcxpresso51u68/board.mk => lpc51/family.mk} (53%) create mode 100644 lib/tinyusb/hw/bsp/lpc54/FreeRTOSConfig/FreeRTOSConfig.h create mode 100644 lib/tinyusb/hw/bsp/lpc54/boards/lpcxpresso54114/board.cmake create mode 100644 lib/tinyusb/hw/bsp/lpc54/boards/lpcxpresso54608/board.cmake create mode 100644 lib/tinyusb/hw/bsp/lpc54/boards/lpcxpresso54608/board.h create mode 100644 lib/tinyusb/hw/bsp/lpc54/boards/lpcxpresso54608/board.mk create mode 100644 lib/tinyusb/hw/bsp/lpc54/boards/lpcxpresso54628/board.cmake create mode 100644 lib/tinyusb/hw/bsp/lpc54/family.cmake create mode 100644 lib/tinyusb/hw/bsp/lpc55/FreeRTOSConfig/FreeRTOSConfig.h create mode 100644 lib/tinyusb/hw/bsp/lpc55/boards/double_m33_express/board.cmake create mode 100644 lib/tinyusb/hw/bsp/lpc55/boards/lpcxpresso55s28/board.cmake create mode 100644 lib/tinyusb/hw/bsp/lpc55/boards/lpcxpresso55s69/board.cmake create mode 100644 lib/tinyusb/hw/bsp/lpc55/boards/mcu_link/board.cmake create mode 100644 lib/tinyusb/hw/bsp/lpc55/family.cmake delete mode 100644 lib/tinyusb/hw/bsp/lpcxpresso11u37/board.mk delete mode 100644 lib/tinyusb/hw/bsp/lpcxpresso11u68/board.mk delete mode 100644 lib/tinyusb/hw/bsp/mbed1768/board.mk create mode 100644 lib/tinyusb/hw/bsp/mcx/FreeRTOSConfig/FreeRTOSConfig.h create mode 100644 lib/tinyusb/hw/bsp/mcx/boards/mcxn947brk/board.cmake create mode 100644 lib/tinyusb/hw/bsp/mcx/boards/mcxn947brk/board.h create mode 100644 lib/tinyusb/hw/bsp/mcx/boards/mcxn947brk/board.mk create mode 100644 lib/tinyusb/hw/bsp/mcx/boards/mcxn947brk/clock_config.c create mode 100644 lib/tinyusb/hw/bsp/mcx/boards/mcxn947brk/clock_config.h create mode 100644 lib/tinyusb/hw/bsp/mcx/boards/mcxn947brk/pin_mux.c create mode 100644 lib/tinyusb/hw/bsp/mcx/boards/mcxn947brk/pin_mux.h create mode 100644 lib/tinyusb/hw/bsp/mcx/debug.jlinkscript create mode 100644 lib/tinyusb/hw/bsp/mcx/family.c create mode 100644 lib/tinyusb/hw/bsp/mcx/family.cmake create mode 100644 lib/tinyusb/hw/bsp/mcx/family.mk create mode 100644 lib/tinyusb/hw/bsp/mm32/boards/mm32f327x_bluepillplus/board.mk create mode 100644 lib/tinyusb/hw/bsp/mm32/boards/mm32f327x_bluepillplus/flash.ld create mode 100644 lib/tinyusb/hw/bsp/mm32/boards/mm32f327x_bluepillplus/mm32f327x_bluepillplus.c create mode 100644 lib/tinyusb/hw/bsp/mm32/boards/mm32f327x_pitaya_lite/board.mk create mode 100644 lib/tinyusb/hw/bsp/mm32/boards/mm32f327x_pitaya_lite/flash.ld create mode 100644 lib/tinyusb/hw/bsp/mm32/boards/mm32f327x_pitaya_lite/mm32f327x_pitaya_lite.c create mode 100644 lib/tinyusb/hw/bsp/nrf/FreeRTOSConfig/FreeRTOSConfig.h create mode 100644 lib/tinyusb/hw/bsp/nrf/boards/adafruit_clue/board.cmake delete mode 100755 lib/tinyusb/hw/bsp/nrf/boards/adafruit_clue/nrf52840_s140_v6.ld create mode 100644 lib/tinyusb/hw/bsp/nrf/boards/arduino_nano33_ble/board.cmake create mode 100644 lib/tinyusb/hw/bsp/nrf/boards/circuitplayground_bluefruit/board.cmake delete mode 100755 lib/tinyusb/hw/bsp/nrf/boards/circuitplayground_bluefruit/nrf52840_s140_v6.ld create mode 100644 lib/tinyusb/hw/bsp/nrf/boards/feather_nrf52840_express/board.cmake create mode 100644 lib/tinyusb/hw/bsp/nrf/boards/feather_nrf52840_sense/board.cmake delete mode 100644 lib/tinyusb/hw/bsp/nrf/boards/feather_nrf52840_sense/nrf52840_s140_v6.ld create mode 100644 lib/tinyusb/hw/bsp/nrf/boards/itsybitsy_nrf52840/board.cmake delete mode 100644 lib/tinyusb/hw/bsp/nrf/boards/itsybitsy_nrf52840/nrf52840_s140_v6.ld create mode 100644 lib/tinyusb/hw/bsp/nrf/boards/nrf52840_mdk_dongle/board.cmake create mode 100644 lib/tinyusb/hw/bsp/nrf/boards/pca10056/board.cmake create mode 100644 lib/tinyusb/hw/bsp/nrf/boards/pca10056/ozone/nrf52840.jdebug create mode 100644 lib/tinyusb/hw/bsp/nrf/boards/pca10059/board.cmake create mode 100644 lib/tinyusb/hw/bsp/nrf/boards/pca10095/board.cmake create mode 100644 lib/tinyusb/hw/bsp/nrf/boards/pca10095/board.h create mode 100644 lib/tinyusb/hw/bsp/nrf/boards/pca10095/board.mk create mode 100644 lib/tinyusb/hw/bsp/nrf/boards/pca10095/ozone/nrf5340.jdebug create mode 100644 lib/tinyusb/hw/bsp/nrf/boards/pca10100/board.cmake create mode 100644 lib/tinyusb/hw/bsp/nrf/boards/raytac_mdbt50q_rx/board.cmake create mode 100644 lib/tinyusb/hw/bsp/nrf/family.cmake rename lib/tinyusb/hw/bsp/nrf/{boards/feather_nrf52840_express => linker}/nrf52840_s140_v6.ld (95%) create mode 100644 lib/tinyusb/hw/bsp/nrf/nrfx_config.h rename lib/tinyusb/hw/{mcu/nordic => bsp/nrf}/nrfx_glue.h (74%) rename lib/tinyusb/hw/{mcu/nordic => bsp/nrf}/nrfx_log.h (100%) create mode 100644 lib/tinyusb/hw/bsp/pic32mz/boards/olimex_emz64/board.mk create mode 100644 lib/tinyusb/hw/bsp/pic32mz/boards/olimex_emz64/olimex_emz64.c create mode 100644 lib/tinyusb/hw/bsp/pic32mz/boards/olimex_hmz144/board.mk create mode 100644 lib/tinyusb/hw/bsp/pic32mz/boards/olimex_hmz144/olimex_hmz144.c create mode 100644 lib/tinyusb/hw/bsp/pic32mz/family.c create mode 100644 lib/tinyusb/hw/bsp/pic32mz/family.mk create mode 100644 lib/tinyusb/hw/bsp/ra/FreeRTOSConfig/FreeRTOSConfig.h create mode 100644 lib/tinyusb/hw/bsp/ra/board_cfg.h create mode 100644 lib/tinyusb/hw/bsp/ra/boards/portenta_c33/board.cmake create mode 100644 lib/tinyusb/hw/bsp/ra/boards/portenta_c33/board.h create mode 100644 lib/tinyusb/hw/bsp/ra/boards/portenta_c33/board.mk create mode 100644 lib/tinyusb/hw/bsp/ra/boards/portenta_c33/fsp_cfg/bsp/bsp_cfg.h create mode 100644 lib/tinyusb/hw/bsp/ra/boards/portenta_c33/fsp_cfg/bsp/bsp_mcu_device_cfg.h create mode 100644 lib/tinyusb/hw/bsp/ra/boards/portenta_c33/fsp_cfg/bsp/bsp_mcu_device_pn_cfg.h create mode 100644 lib/tinyusb/hw/bsp/ra/boards/portenta_c33/fsp_cfg/bsp/bsp_mcu_family_cfg.h create mode 100644 lib/tinyusb/hw/bsp/ra/boards/portenta_c33/fsp_cfg/bsp_clock_cfg.h create mode 100644 lib/tinyusb/hw/bsp/ra/boards/portenta_c33/portenta_c33.ld create mode 100644 lib/tinyusb/hw/bsp/ra/boards/ra4m1_ek/board.cmake create mode 100644 lib/tinyusb/hw/bsp/ra/boards/ra4m1_ek/board.h create mode 100644 lib/tinyusb/hw/bsp/ra/boards/ra4m1_ek/board.mk create mode 100644 lib/tinyusb/hw/bsp/ra/boards/ra4m1_ek/fsp_cfg/bsp/bsp_cfg.h create mode 100644 lib/tinyusb/hw/bsp/ra/boards/ra4m1_ek/fsp_cfg/bsp/bsp_mcu_device_cfg.h create mode 100644 lib/tinyusb/hw/bsp/ra/boards/ra4m1_ek/fsp_cfg/bsp/bsp_mcu_device_pn_cfg.h create mode 100644 lib/tinyusb/hw/bsp/ra/boards/ra4m1_ek/fsp_cfg/bsp/bsp_mcu_family_cfg.h create mode 100644 lib/tinyusb/hw/bsp/ra/boards/ra4m1_ek/fsp_cfg/bsp_clock_cfg.h create mode 100644 lib/tinyusb/hw/bsp/ra/boards/ra4m3_ek/board.cmake create mode 100644 lib/tinyusb/hw/bsp/ra/boards/ra4m3_ek/board.h create mode 100644 lib/tinyusb/hw/bsp/ra/boards/ra4m3_ek/board.mk create mode 100644 lib/tinyusb/hw/bsp/ra/boards/ra4m3_ek/fsp_cfg/bsp/bsp_cfg.h create mode 100644 lib/tinyusb/hw/bsp/ra/boards/ra4m3_ek/fsp_cfg/bsp/bsp_mcu_device_cfg.h create mode 100644 lib/tinyusb/hw/bsp/ra/boards/ra4m3_ek/fsp_cfg/bsp/bsp_mcu_device_pn_cfg.h create mode 100644 lib/tinyusb/hw/bsp/ra/boards/ra4m3_ek/fsp_cfg/bsp/bsp_mcu_family_cfg.h create mode 100644 lib/tinyusb/hw/bsp/ra/boards/ra4m3_ek/fsp_cfg/bsp_clock_cfg.h create mode 100644 lib/tinyusb/hw/bsp/ra/boards/ra6m1_ek/board.cmake create mode 100644 lib/tinyusb/hw/bsp/ra/boards/ra6m1_ek/board.h create mode 100644 lib/tinyusb/hw/bsp/ra/boards/ra6m1_ek/board.mk create mode 100644 lib/tinyusb/hw/bsp/ra/boards/ra6m1_ek/fsp_cfg/bsp/bsp_cfg.h create mode 100644 lib/tinyusb/hw/bsp/ra/boards/ra6m1_ek/fsp_cfg/bsp/bsp_mcu_device_cfg.h create mode 100644 lib/tinyusb/hw/bsp/ra/boards/ra6m1_ek/fsp_cfg/bsp/bsp_mcu_device_pn_cfg.h create mode 100644 lib/tinyusb/hw/bsp/ra/boards/ra6m1_ek/fsp_cfg/bsp/bsp_mcu_family_cfg.h create mode 100644 lib/tinyusb/hw/bsp/ra/boards/ra6m1_ek/fsp_cfg/bsp_clock_cfg.h create mode 100644 lib/tinyusb/hw/bsp/ra/boards/ra6m5_ek/board.cmake create mode 100644 lib/tinyusb/hw/bsp/ra/boards/ra6m5_ek/board.h create mode 100644 lib/tinyusb/hw/bsp/ra/boards/ra6m5_ek/board.mk create mode 100644 lib/tinyusb/hw/bsp/ra/boards/ra6m5_ek/fsp_cfg/bsp/bsp_cfg.h create mode 100644 lib/tinyusb/hw/bsp/ra/boards/ra6m5_ek/fsp_cfg/bsp/bsp_mcu_device_cfg.h create mode 100644 lib/tinyusb/hw/bsp/ra/boards/ra6m5_ek/fsp_cfg/bsp/bsp_mcu_device_pn_cfg.h create mode 100644 lib/tinyusb/hw/bsp/ra/boards/ra6m5_ek/fsp_cfg/bsp/bsp_mcu_family_cfg.h create mode 100644 lib/tinyusb/hw/bsp/ra/boards/ra6m5_ek/fsp_cfg/bsp_clock_cfg.h create mode 100644 lib/tinyusb/hw/bsp/ra/boards/ra6m5_ek/ozone/ra6m5.jdebug create mode 100644 lib/tinyusb/hw/bsp/ra/boards/uno_r4/board.cmake create mode 100644 lib/tinyusb/hw/bsp/ra/boards/uno_r4/board.h create mode 100644 lib/tinyusb/hw/bsp/ra/boards/uno_r4/board.mk create mode 100644 lib/tinyusb/hw/bsp/ra/boards/uno_r4/fsp_cfg/bsp/bsp_cfg.h create mode 100644 lib/tinyusb/hw/bsp/ra/boards/uno_r4/fsp_cfg/bsp/bsp_mcu_device_cfg.h create mode 100644 lib/tinyusb/hw/bsp/ra/boards/uno_r4/fsp_cfg/bsp/bsp_mcu_device_pn_cfg.h create mode 100644 lib/tinyusb/hw/bsp/ra/boards/uno_r4/fsp_cfg/bsp/bsp_mcu_family_cfg.h create mode 100644 lib/tinyusb/hw/bsp/ra/boards/uno_r4/fsp_cfg/bsp_clock_cfg.h create mode 100644 lib/tinyusb/hw/bsp/ra/boards/uno_r4/uno_r4.ld create mode 100644 lib/tinyusb/hw/bsp/ra/debug.jlinkscript create mode 100644 lib/tinyusb/hw/bsp/ra/family.c create mode 100644 lib/tinyusb/hw/bsp/ra/family.cmake create mode 100644 lib/tinyusb/hw/bsp/ra/family.mk create mode 100644 lib/tinyusb/hw/bsp/ra/linker/gcc/fsp.ld create mode 100644 lib/tinyusb/hw/bsp/ra/linker/gcc/ra4m1.ld create mode 100644 lib/tinyusb/hw/bsp/ra/linker/gcc/ra4m3.ld create mode 100644 lib/tinyusb/hw/bsp/ra/linker/gcc/ra6m1.ld create mode 100644 lib/tinyusb/hw/bsp/ra/linker/gcc/ra6m5.ld create mode 100644 lib/tinyusb/hw/bsp/ra/r_ioport_cfg.h create mode 100644 lib/tinyusb/hw/bsp/ra/vector_data.h delete mode 100644 lib/tinyusb/hw/bsp/raspberrypi4/boards/raspberrypi_cm4/board.mk delete mode 100644 lib/tinyusb/hw/bsp/rp2040/boards/adafruit_feather_rp2040/board.cmake delete mode 100644 lib/tinyusb/hw/bsp/rp2040/boards/adafruit_itsybitsy_rp2040/board.cmake delete mode 100644 lib/tinyusb/hw/bsp/rp2040/boards/adafruit_qtpy_rp2040/board.cmake create mode 100644 lib/tinyusb/hw/bsp/rp2040/rp2040-openocd.cfg rename lib/tinyusb/hw/bsp/samd11/boards/{luna_d11 => cynthion_d11}/board.h (87%) create mode 100644 lib/tinyusb/hw/bsp/samd11/boards/cynthion_d11/board.mk rename lib/tinyusb/hw/bsp/samd11/boards/{luna_d11 => cynthion_d11}/samd11d14am_flash.ld (97%) delete mode 100644 lib/tinyusb/hw/bsp/samd11/boards/luna_d11/board.mk create mode 100644 lib/tinyusb/hw/bsp/samd21/FreeRTOSConfig/FreeRTOSConfig.h create mode 100644 lib/tinyusb/hw/bsp/samd21/boards/atsamd21_xpro/board.cmake create mode 100644 lib/tinyusb/hw/bsp/samd21/boards/circuitplayground_express/board.cmake delete mode 100644 lib/tinyusb/hw/bsp/samd21/boards/curiosity_nano/.skip.device.net_lwip_webserver create mode 100644 lib/tinyusb/hw/bsp/samd21/boards/curiosity_nano/board.cmake create mode 100644 lib/tinyusb/hw/bsp/samd21/boards/cynthion_d21/board.cmake rename lib/tinyusb/hw/bsp/samd21/boards/{luna_d21 => cynthion_d21}/board.h (99%) rename lib/tinyusb/hw/bsp/samd21/boards/{luna_d21 => cynthion_d21}/board.mk (61%) rename lib/tinyusb/hw/bsp/samd21/boards/{luna_d21 => cynthion_d21}/samd21g18a_flash.ld (97%) create mode 100644 lib/tinyusb/hw/bsp/samd21/boards/feather_m0_express/board.cmake create mode 100644 lib/tinyusb/hw/bsp/samd21/boards/itsybitsy_m0/board.cmake create mode 100644 lib/tinyusb/hw/bsp/samd21/boards/metro_m0_express/board.cmake create mode 100644 lib/tinyusb/hw/bsp/samd21/boards/qtpy/board.cmake create mode 100644 lib/tinyusb/hw/bsp/samd21/boards/seeeduino_xiao/board.cmake create mode 100644 lib/tinyusb/hw/bsp/samd21/boards/trinket_m0/board.cmake create mode 100644 lib/tinyusb/hw/bsp/samd21/family.cmake create mode 100644 lib/tinyusb/hw/bsp/samd51/FreeRTOSConfig/FreeRTOSConfig.h create mode 100644 lib/tinyusb/hw/bsp/samd51/boards/feather_m4_express/board.cmake create mode 100644 lib/tinyusb/hw/bsp/samd51/boards/itsybitsy_m4/board.cmake create mode 100644 lib/tinyusb/hw/bsp/samd51/boards/metro_m4_express/board.cmake create mode 100644 lib/tinyusb/hw/bsp/samd51/boards/pybadge/board.cmake create mode 100644 lib/tinyusb/hw/bsp/samd51/boards/pyportal/board.cmake create mode 100644 lib/tinyusb/hw/bsp/samd51/family.cmake delete mode 100644 lib/tinyusb/hw/bsp/same54xplainedpro/board.mk create mode 100644 lib/tinyusb/hw/bsp/same5x/boards/d5035_01/board.mk rename lib/tinyusb/hw/bsp/{ => same5x/boards}/d5035_01/d5035_01.c (99%) rename lib/tinyusb/hw/bsp/{ => same5x/boards}/d5035_01/same51j19a_flash.ld (99%) create mode 100644 lib/tinyusb/hw/bsp/same5x/boards/same54_xplained/board.mk rename lib/tinyusb/hw/bsp/{same54xplainedpro/same54xplainedpro.c => same5x/boards/same54_xplained/same54_xplained.c} (99%) rename lib/tinyusb/hw/bsp/{same54xplainedpro => same5x/boards/same54_xplained}/same54p20a_flash.ld (99%) rename lib/tinyusb/hw/bsp/{same54xplainedpro => same5x/boards/same54_xplained}/same54p20a_sram.ld (99%) create mode 100644 lib/tinyusb/hw/bsp/same5x/family.mk create mode 100644 lib/tinyusb/hw/bsp/stm32f0/FreeRTOSConfig/FreeRTOSConfig.h create mode 100644 lib/tinyusb/hw/bsp/stm32f0/boards/stm32f070rbnucleo/board.cmake create mode 100644 lib/tinyusb/hw/bsp/stm32f0/boards/stm32f072disco/board.cmake create mode 100644 lib/tinyusb/hw/bsp/stm32f0/boards/stm32f072eval/board.cmake create mode 100644 lib/tinyusb/hw/bsp/stm32f0/family.cmake create mode 100644 lib/tinyusb/hw/bsp/stm32f1/FreeRTOSConfig/FreeRTOSConfig.h create mode 100644 lib/tinyusb/hw/bsp/stm32f1/boards/stm32f103_bluepill/board.cmake create mode 100644 lib/tinyusb/hw/bsp/stm32f1/boards/stm32f103_bluepill/stm32f103x8_flash.icf create mode 100644 lib/tinyusb/hw/bsp/stm32f1/boards/stm32f103_mini_2/board.cmake create mode 100644 lib/tinyusb/hw/bsp/stm32f1/boards/stm32f103_mini_2/stm32f103xc_flash.icf create mode 100644 lib/tinyusb/hw/bsp/stm32f1/family.cmake rename lib/tinyusb/hw/bsp/{ => stm32f2/boards}/stm32f207nucleo/STM32F207ZGTx_FLASH.ld (99%) create mode 100644 lib/tinyusb/hw/bsp/stm32f2/boards/stm32f207nucleo/board.mk rename lib/tinyusb/hw/bsp/{ => stm32f2/boards}/stm32f207nucleo/stm32f207nucleo.c (98%) rename lib/tinyusb/hw/bsp/{stm32f207nucleo/board.mk => stm32f2/family.mk} (53%) rename lib/tinyusb/hw/bsp/{stm32f207nucleo => stm32f2}/stm32f2xx_hal_conf.h (96%) rename lib/tinyusb/hw/bsp/{ => stm32f3/boards}/stm32f303disco/STM32F303VCTx_FLASH.ld (98%) create mode 100644 lib/tinyusb/hw/bsp/stm32f3/boards/stm32f303disco/board.mk rename lib/tinyusb/hw/bsp/{ => stm32f3/boards}/stm32f303disco/stm32f303disco.c (99%) rename lib/tinyusb/hw/bsp/{ => stm32f3/boards}/stm32f303disco/stm32f3xx_hal_conf.h (96%) rename lib/tinyusb/hw/bsp/{stm32f303disco/board.mk => stm32f3/family.mk} (57%) create mode 100644 lib/tinyusb/hw/bsp/stm32f4/FreeRTOSConfig/FreeRTOSConfig.h create mode 100644 lib/tinyusb/hw/bsp/stm32f4/boards/feather_stm32f405/board.cmake create mode 100644 lib/tinyusb/hw/bsp/stm32f4/boards/pyboardv11/board.cmake create mode 100644 lib/tinyusb/hw/bsp/stm32f4/boards/stm32f401blackpill/board.cmake create mode 100644 lib/tinyusb/hw/bsp/stm32f4/boards/stm32f407blackvet/STM32F407VETx_FLASH.ld create mode 100644 lib/tinyusb/hw/bsp/stm32f4/boards/stm32f407blackvet/board.cmake create mode 100644 lib/tinyusb/hw/bsp/stm32f4/boards/stm32f407blackvet/board.h create mode 100644 lib/tinyusb/hw/bsp/stm32f4/boards/stm32f407blackvet/board.mk rename lib/tinyusb/hw/bsp/{stm32f7/boards/stm32f723disco/stm32f7xx_hal_conf.h => stm32f4/boards/stm32f407blackvet/stm32f4xx_hal_conf.h} (66%) create mode 100644 lib/tinyusb/hw/bsp/stm32f4/boards/stm32f407disco/board.cmake create mode 100644 lib/tinyusb/hw/bsp/stm32f4/boards/stm32f411blackpill/board.cmake create mode 100644 lib/tinyusb/hw/bsp/stm32f4/boards/stm32f411disco/board.cmake create mode 100644 lib/tinyusb/hw/bsp/stm32f4/boards/stm32f412disco/board.cmake create mode 100644 lib/tinyusb/hw/bsp/stm32f4/boards/stm32f412nucleo/board.cmake create mode 100644 lib/tinyusb/hw/bsp/stm32f4/boards/stm32f439nucleo/STM32F439ZITX_FLASH.ld create mode 100644 lib/tinyusb/hw/bsp/stm32f4/boards/stm32f439nucleo/board.cmake create mode 100644 lib/tinyusb/hw/bsp/stm32f4/boards/stm32f439nucleo/board.h create mode 100644 lib/tinyusb/hw/bsp/stm32f4/boards/stm32f439nucleo/board.mk rename lib/tinyusb/hw/bsp/{stm32f7/boards/stm32f746disco/stm32f7xx_hal_conf.h => stm32f4/boards/stm32f439nucleo/stm32f4xx_hal_conf.h} (60%) create mode 100644 lib/tinyusb/hw/bsp/stm32f4/family.cmake rename lib/tinyusb/hw/bsp/{stm32f7/boards/stm32f769disco/stm32f7xx_hal_conf.h => stm32f4/stm32f4xx_hal_conf.h} (66%) create mode 100644 lib/tinyusb/hw/bsp/stm32f7/FreeRTOSConfig/FreeRTOSConfig.h create mode 100644 lib/tinyusb/hw/bsp/stm32f7/boards/stlinkv3mini/board.cmake create mode 100644 lib/tinyusb/hw/bsp/stm32f7/boards/stm32f723disco/board.cmake create mode 100644 lib/tinyusb/hw/bsp/stm32f7/boards/stm32f746disco/board.cmake create mode 100644 lib/tinyusb/hw/bsp/stm32f7/boards/stm32f746nucleo/board.cmake delete mode 100644 lib/tinyusb/hw/bsp/stm32f7/boards/stm32f746nucleo/stm32f7xx_hal_conf.h create mode 100644 lib/tinyusb/hw/bsp/stm32f7/boards/stm32f767nucleo/board.cmake delete mode 100644 lib/tinyusb/hw/bsp/stm32f7/boards/stm32f767nucleo/stm32f7xx_hal_conf.h create mode 100644 lib/tinyusb/hw/bsp/stm32f7/boards/stm32f769disco/board.cmake create mode 100644 lib/tinyusb/hw/bsp/stm32f7/family.cmake rename lib/tinyusb/hw/bsp/stm32f7/{boards/stlinkv3mini => }/stm32f7xx_hal_conf.h (100%) create mode 100644 lib/tinyusb/hw/bsp/stm32g0/FreeRTOSConfig/FreeRTOSConfig.h create mode 100644 lib/tinyusb/hw/bsp/stm32g0/boards/stm32g0b1nucleo/STM32G0B1RETx_FLASH.ld create mode 100644 lib/tinyusb/hw/bsp/stm32g0/boards/stm32g0b1nucleo/board.cmake create mode 100644 lib/tinyusb/hw/bsp/stm32g0/boards/stm32g0b1nucleo/board.h create mode 100644 lib/tinyusb/hw/bsp/stm32g0/boards/stm32g0b1nucleo/board.mk create mode 100644 lib/tinyusb/hw/bsp/stm32g0/family.c create mode 100644 lib/tinyusb/hw/bsp/stm32g0/family.cmake create mode 100644 lib/tinyusb/hw/bsp/stm32g0/family.mk create mode 100644 lib/tinyusb/hw/bsp/stm32g0/stm32g0xx_hal_conf.h create mode 100644 lib/tinyusb/hw/bsp/stm32g4/FreeRTOSConfig/FreeRTOSConfig.h create mode 100644 lib/tinyusb/hw/bsp/stm32g4/boards/b_g474e_dpow1/STM32G474RETx_FLASH.ld create mode 100644 lib/tinyusb/hw/bsp/stm32g4/boards/b_g474e_dpow1/board.cmake create mode 100644 lib/tinyusb/hw/bsp/stm32g4/boards/b_g474e_dpow1/board.h create mode 100644 lib/tinyusb/hw/bsp/stm32g4/boards/b_g474e_dpow1/board.mk create mode 100644 lib/tinyusb/hw/bsp/stm32g4/boards/b_g474e_dpow1/cubemx/b_g474e_dpow1.ioc create mode 100644 lib/tinyusb/hw/bsp/stm32g4/boards/stm32g474nucleo/board.cmake create mode 100644 lib/tinyusb/hw/bsp/stm32g4/family.cmake create mode 100644 lib/tinyusb/hw/bsp/stm32h7/FreeRTOSConfig/FreeRTOSConfig.h create mode 100644 lib/tinyusb/hw/bsp/stm32h7/boards/daisyseed/board.cmake create mode 100644 lib/tinyusb/hw/bsp/stm32h7/boards/daisyseed/board.h create mode 100644 lib/tinyusb/hw/bsp/stm32h7/boards/daisyseed/board.mk rename lib/tinyusb/hw/bsp/stm32h7/boards/{waveshare_openh743i/STM32H743IITX_FLASH.ld => daisyseed/stm32h750ibkx_flash.ld} (85%) create mode 100644 lib/tinyusb/hw/bsp/stm32h7/boards/daisyseed/stm32h750ibkx_ram.ld create mode 100644 lib/tinyusb/hw/bsp/stm32h7/boards/stm32h723nucleo/board.cmake create mode 100644 lib/tinyusb/hw/bsp/stm32h7/boards/stm32h723nucleo/board.h create mode 100644 lib/tinyusb/hw/bsp/stm32h7/boards/stm32h723nucleo/board.mk create mode 100644 lib/tinyusb/hw/bsp/stm32h7/boards/stm32h743eval/board.cmake create mode 100644 lib/tinyusb/hw/bsp/stm32h7/boards/stm32h743eval/cubemx/stm32h743eval.ioc create mode 100644 lib/tinyusb/hw/bsp/stm32h7/boards/stm32h743eval/ozone/stm32h743.jdebug create mode 100644 lib/tinyusb/hw/bsp/stm32h7/boards/stm32h743nucleo/board.cmake create mode 100644 lib/tinyusb/hw/bsp/stm32h7/boards/stm32h745disco/board.cmake create mode 100644 lib/tinyusb/hw/bsp/stm32h7/boards/waveshare_openh743i/board.cmake create mode 100644 lib/tinyusb/hw/bsp/stm32h7/family.cmake create mode 100644 lib/tinyusb/hw/bsp/stm32h7/linker/stm32h723xx_flash.ld rename lib/tinyusb/hw/bsp/stm32h7/{boards/stm32h743eval => linker}/stm32h743xx_flash.ld (99%) rename lib/tinyusb/hw/bsp/{stm32h7/boards/stm32h743nucleo/stm32h743xx_flash.ld => stm32l0/boards/stm32l052dap52/STM32L052K8Ux_FLASH.ld} (88%) create mode 100644 lib/tinyusb/hw/bsp/stm32l0/boards/stm32l052dap52/board.h create mode 100644 lib/tinyusb/hw/bsp/stm32l0/boards/stm32l052dap52/board.mk rename lib/tinyusb/hw/bsp/{ => stm32l0/boards}/stm32l0538disco/STM32L053C8Tx_FLASH.ld (99%) create mode 100644 lib/tinyusb/hw/bsp/stm32l0/boards/stm32l0538disco/board.h create mode 100644 lib/tinyusb/hw/bsp/stm32l0/boards/stm32l0538disco/board.mk rename lib/tinyusb/hw/bsp/{stm32l0538disco/stm32l0538disco.c => stm32l0/family.c} (53%) create mode 100644 lib/tinyusb/hw/bsp/stm32l0/family.mk rename lib/tinyusb/hw/bsp/{stm32l0538disco => stm32l0}/stm32l0xx_hal_conf.h (79%) delete mode 100644 lib/tinyusb/hw/bsp/stm32l0538disco/board.mk create mode 100644 lib/tinyusb/hw/bsp/stm32l4/FreeRTOSConfig/FreeRTOSConfig.h create mode 100644 lib/tinyusb/hw/bsp/stm32l4/boards/stm32l412nucleo/STM32L412KBUx_FLASH.ld create mode 100644 lib/tinyusb/hw/bsp/stm32l4/boards/stm32l412nucleo/board.cmake create mode 100644 lib/tinyusb/hw/bsp/stm32l4/boards/stm32l412nucleo/board.h create mode 100644 lib/tinyusb/hw/bsp/stm32l4/boards/stm32l412nucleo/board.mk create mode 100644 lib/tinyusb/hw/bsp/stm32l4/boards/stm32l476disco/board.cmake create mode 100644 lib/tinyusb/hw/bsp/stm32l4/boards/stm32l4p5nucleo/board.cmake create mode 100644 lib/tinyusb/hw/bsp/stm32l4/boards/stm32l4r5nucleo/board.cmake create mode 100644 lib/tinyusb/hw/bsp/stm32l4/family.cmake create mode 100644 lib/tinyusb/hw/bsp/stm32u5/FreeRTOSConfig/FreeRTOSConfig.h create mode 100644 lib/tinyusb/hw/bsp/stm32u5/boards/stm32u575eval/board.cmake create mode 100644 lib/tinyusb/hw/bsp/stm32u5/boards/stm32u575eval/board.h create mode 100644 lib/tinyusb/hw/bsp/stm32u5/boards/stm32u575eval/board.mk create mode 100644 lib/tinyusb/hw/bsp/stm32u5/boards/stm32u575nucleo/board.cmake create mode 100644 lib/tinyusb/hw/bsp/stm32u5/boards/stm32u575nucleo/board.h create mode 100644 lib/tinyusb/hw/bsp/stm32u5/boards/stm32u575nucleo/board.mk create mode 100644 lib/tinyusb/hw/bsp/stm32u5/family.c create mode 100644 lib/tinyusb/hw/bsp/stm32u5/family.cmake create mode 100644 lib/tinyusb/hw/bsp/stm32u5/family.mk create mode 100644 lib/tinyusb/hw/bsp/stm32u5/stm32u5xx_hal_conf.h create mode 100644 lib/tinyusb/hw/bsp/stm32wb/boards/stm32wb55nucleo/board.h create mode 100644 lib/tinyusb/hw/bsp/stm32wb/boards/stm32wb55nucleo/board.mk create mode 100644 lib/tinyusb/hw/bsp/stm32wb/boards/stm32wb55nucleo/stm32wb55xx_flash_cm4.ld create mode 100644 lib/tinyusb/hw/bsp/stm32wb/family.c create mode 100644 lib/tinyusb/hw/bsp/stm32wb/family.mk create mode 100644 lib/tinyusb/hw/bsp/stm32wb/stm32wbxx_hal_conf.h rename lib/tinyusb/hw/bsp/tm4c123/boards/{ek-tm4c123gxl => ek_tm4c123gxl}/board.h (100%) rename lib/tinyusb/hw/bsp/tm4c123/boards/{ek-tm4c123gxl => ek_tm4c123gxl}/board.mk (99%) rename lib/tinyusb/hw/bsp/tm4c123/boards/{ek-tm4c123gxl => ek_tm4c123gxl}/tm4c123.ld (83%) create mode 100644 lib/tinyusb/hw/bsp/xmc4000/boards/xmc4700_relax/board.h create mode 100644 lib/tinyusb/hw/bsp/xmc4000/boards/xmc4700_relax/board.mk create mode 100644 lib/tinyusb/hw/mcu/bridgetek/ft9xx/Readme.md create mode 100644 lib/tinyusb/hw/mcu/bridgetek/ft9xx/scripts/crt0.S create mode 100644 lib/tinyusb/hw/mcu/bridgetek/ft9xx/scripts/ldscript.ld delete mode 100644 lib/tinyusb/hw/mcu/nordic/nrfx_config.h delete mode 100644 lib/tinyusb/hw/mcu/sony/cxd56/tools/__pycache__/xmodem.cpython-36.pyc rename lib/tinyusb/lib/SEGGER_RTT/{RTT => Config}/SEGGER_RTT_Conf.h (68%) create mode 100644 lib/tinyusb/lib/SEGGER_RTT/LICENSE.md delete mode 100644 lib/tinyusb/lib/SEGGER_RTT/License.txt create mode 100644 lib/tinyusb/lib/SEGGER_RTT/README.md delete mode 100644 lib/tinyusb/lib/SEGGER_RTT/README.txt delete mode 100644 lib/tinyusb/lib/SEGGER_RTT/Syscalls/SEGGER_RTT_Syscalls_GCC.c delete mode 100644 lib/tinyusb/lib/SEGGER_RTT/Syscalls/SEGGER_RTT_Syscalls_IAR.c delete mode 100644 lib/tinyusb/lib/SEGGER_RTT/Syscalls/SEGGER_RTT_Syscalls_KEIL.c delete mode 100644 lib/tinyusb/lib/SEGGER_RTT/Syscalls/SEGGER_RTT_Syscalls_SES.c create mode 100644 lib/tinyusb/lib/embedded-cli/embedded_cli.h delete mode 100644 lib/tinyusb/lib/fatfs/00readme.txt create mode 100644 lib/tinyusb/lib/fatfs/LICENSE.txt delete mode 100644 lib/tinyusb/lib/fatfs/ccsbcs.c delete mode 100644 lib/tinyusb/lib/fatfs/diskio.c delete mode 100644 lib/tinyusb/lib/fatfs/ff.c delete mode 100644 lib/tinyusb/lib/fatfs/ff.h delete mode 100644 lib/tinyusb/lib/fatfs/ffconf.h delete mode 100644 lib/tinyusb/lib/fatfs/integer.h create mode 100644 lib/tinyusb/lib/fatfs/source/00history.txt create mode 100644 lib/tinyusb/lib/fatfs/source/00readme.txt create mode 100644 lib/tinyusb/lib/fatfs/source/diskio.c rename lib/tinyusb/lib/fatfs/{ => source}/diskio.h (54%) create mode 100644 lib/tinyusb/lib/fatfs/source/ff.c create mode 100644 lib/tinyusb/lib/fatfs/source/ff.h create mode 100644 lib/tinyusb/lib/fatfs/source/ffconf.h create mode 100644 lib/tinyusb/lib/fatfs/source/ffsystem.c create mode 100644 lib/tinyusb/lib/fatfs/source/ffunicode.c create mode 100644 lib/tinyusb/src/CMakeLists.txt create mode 100644 lib/tinyusb/src/class/cdc/serial/cp210x.h create mode 100644 lib/tinyusb/src/class/cdc/serial/ftdi_sio.h create mode 100644 lib/tinyusb/src/common/tusb_debug.h delete mode 100644 lib/tinyusb/src/common/tusb_error.h create mode 100644 lib/tinyusb/src/common/tusb_mcu.h create mode 100644 lib/tinyusb/src/common/tusb_private.h delete mode 100644 lib/tinyusb/src/device/dcd_attr.h delete mode 100644 lib/tinyusb/src/host/hcd_attr.h delete mode 100644 lib/tinyusb/src/host/usbh_control.c rename lib/tinyusb/src/host/{usbh_classdriver.h => usbh_pvt.h} (66%) create mode 100644 lib/tinyusb/src/osal/osal_rtx4.h create mode 100644 lib/tinyusb/src/portable/analog/max3421/hcd_max3421.c create mode 100644 lib/tinyusb/src/portable/bridgetek/ft9xx/dcd_ft9xx.c delete mode 100644 lib/tinyusb/src/portable/broadcom/synopsys/dcd_synopsys.c delete mode 100644 lib/tinyusb/src/portable/broadcom/synopsys/synopsys_common.h create mode 100644 lib/tinyusb/src/portable/chipidea/ci_fs/ci_fs_kinetis.h create mode 100644 lib/tinyusb/src/portable/chipidea/ci_fs/ci_fs_mcx.h create mode 100644 lib/tinyusb/src/portable/chipidea/ci_fs/ci_fs_type.h create mode 100644 lib/tinyusb/src/portable/chipidea/ci_fs/dcd_ci_fs.c create mode 100644 lib/tinyusb/src/portable/chipidea/ci_hs/ci_hs_mcx.h create mode 100644 lib/tinyusb/src/portable/microchip/pic/dcd_pic.c create mode 100644 lib/tinyusb/src/portable/microchip/pic32mz/dcd_pic32mz.c create mode 100644 lib/tinyusb/src/portable/microchip/pic32mz/usbhs_registers.h create mode 100644 lib/tinyusb/src/portable/nxp/khci/hcd_khci.c delete mode 100644 lib/tinyusb/src/portable/nxp/transdimension/common_transdimension.h delete mode 100644 lib/tinyusb/src/portable/nxp/transdimension/dcd_transdimension.c delete mode 100644 lib/tinyusb/src/portable/nxp/transdimension/hcd_transdimension.c create mode 100644 lib/tinyusb/src/portable/raspberrypi/pio_usb/dcd_pio_usb.c create mode 100644 lib/tinyusb/src/portable/raspberrypi/pio_usb/hcd_pio_usb.c create mode 100644 lib/tinyusb/src/portable/renesas/rusb2/dcd_rusb2.c create mode 100644 lib/tinyusb/src/portable/renesas/rusb2/hcd_rusb2.c rename lib/tinyusb/src/{common/tusb_timeout.h => portable/renesas/rusb2/rusb2_common.c} (55%) create mode 100644 lib/tinyusb/src/portable/renesas/rusb2/rusb2_ra.h create mode 100644 lib/tinyusb/src/portable/renesas/rusb2/rusb2_rx.h create mode 100644 lib/tinyusb/src/portable/renesas/rusb2/rusb2_type.h delete mode 100644 lib/tinyusb/src/portable/renesas/usba/dcd_usba.c create mode 100644 lib/tinyusb/src/portable/st/typec/typec_stm32.c create mode 100644 lib/tinyusb/src/portable/sunxi/dcd_sunxi_musb.c create mode 100644 lib/tinyusb/src/portable/sunxi/musb_def.h create mode 100644 lib/tinyusb/src/portable/template/hcd_template.c create mode 100644 lib/tinyusb/src/portable/wch/ch32v307/ch32_usbhs_reg.h create mode 100644 lib/tinyusb/src/portable/wch/ch32v307/dcd_usbhs.c create mode 100644 lib/tinyusb/src/tinyusb.mk create mode 100644 lib/tinyusb/src/typec/pd_types.h create mode 100644 lib/tinyusb/src/typec/tcd.h create mode 100644 lib/tinyusb/src/typec/usbc.c create mode 100644 lib/tinyusb/src/typec/usbc.h create mode 100644 lib/tinyusb/test/fuzz/dcd_fuzz.cc create mode 100644 lib/tinyusb/test/fuzz/device/cdc/CMakeLists.txt create mode 100644 lib/tinyusb/test/fuzz/device/cdc/Makefile create mode 100644 lib/tinyusb/test/fuzz/device/cdc/cdc_seed_corpus.zip create mode 100644 lib/tinyusb/test/fuzz/device/cdc/src/fuzz.cc create mode 100644 lib/tinyusb/test/fuzz/device/cdc/src/tusb_config.h create mode 100644 lib/tinyusb/test/fuzz/device/cdc/src/usb_descriptors.cc create mode 100644 lib/tinyusb/test/fuzz/device/msc/CMakeLists.txt create mode 100644 lib/tinyusb/test/fuzz/device/msc/Makefile create mode 100644 lib/tinyusb/test/fuzz/device/msc/msc_seed_corpus.zip create mode 100644 lib/tinyusb/test/fuzz/device/msc/src/fuzz.cc create mode 100644 lib/tinyusb/test/fuzz/device/msc/src/tusb_config.h create mode 100644 lib/tinyusb/test/fuzz/device/msc/src/usb_descriptors.cc create mode 100644 lib/tinyusb/test/fuzz/device/net/CMakeLists.txt create mode 100644 lib/tinyusb/test/fuzz/device/net/Makefile create mode 100644 lib/tinyusb/test/fuzz/device/net/src/arch/cc.h create mode 100644 lib/tinyusb/test/fuzz/device/net/src/fuzz.cc create mode 100644 lib/tinyusb/test/fuzz/device/net/src/lwipopts.h create mode 100644 lib/tinyusb/test/fuzz/device/net/src/tusb_config.h create mode 100644 lib/tinyusb/test/fuzz/device/net/src/usb_descriptors.cc create mode 100644 lib/tinyusb/test/fuzz/dicts/cdc.dict create mode 100644 lib/tinyusb/test/fuzz/fuzz.cc create mode 100644 lib/tinyusb/test/fuzz/fuzz.h create mode 100644 lib/tinyusb/test/fuzz/fuzz_private.h create mode 100644 lib/tinyusb/test/fuzz/make.mk create mode 100644 lib/tinyusb/test/fuzz/msc_fuzz.cc create mode 100644 lib/tinyusb/test/fuzz/net_fuzz.cc create mode 100644 lib/tinyusb/test/fuzz/rules.mk create mode 100644 lib/tinyusb/test/fuzz/usbd_fuzz.cc create mode 100644 lib/tinyusb/test/hil/hil_hfp.json create mode 100644 lib/tinyusb/test/hil/hil_test.py rename lib/tinyusb/test/{ => unit-test}/ceedling (100%) rename lib/tinyusb/test/{ => unit-test}/project.yml (71%) rename lib/tinyusb/test/{ => unit-test}/test/device/msc/test_msc_device.c (99%) rename lib/tinyusb/test/{ => unit-test}/test/device/usbd/test_usbd.c (99%) rename lib/tinyusb/test/{ => unit-test}/test/support/tusb_config.h (98%) create mode 100644 lib/tinyusb/test/unit-test/test/test_common_func.c rename lib/tinyusb/test/{ => unit-test}/test/test_fifo.c (62%) rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/bin/ceedling (81%) rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/lib/ceedling.rb (98%) rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/lib/ceedling/build_invoker_utils.rb (89%) rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/lib/ceedling/cacheinator.rb (98%) create mode 100644 lib/tinyusb/test/unit-test/vendor/ceedling/lib/ceedling/cacheinator_helper.rb rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/lib/ceedling/cmock_builder.rb (88%) rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/lib/ceedling/configurator.rb (91%) rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/lib/ceedling/configurator_builder.rb (93%) rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/lib/ceedling/configurator_plugins.rb (81%) rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/lib/ceedling/configurator_setup.rb (97%) rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/lib/ceedling/configurator_validator.rb (93%) rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/lib/ceedling/constants.rb (98%) rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/lib/ceedling/defaults.rb (79%) rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/lib/ceedling/dependinator.rb (92%) rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/lib/ceedling/erb_wrapper.rb (97%) rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/lib/ceedling/file_finder.rb (99%) rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/lib/ceedling/file_finder_helper.rb (82%) rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/lib/ceedling/file_path_utils.rb (98%) rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/lib/ceedling/file_system_utils.rb (98%) rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/lib/ceedling/file_system_wrapper.rb (95%) rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/lib/ceedling/file_wrapper.rb (88%) rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/lib/ceedling/flaginator.rb (98%) rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/lib/ceedling/generator.rb (96%) rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/lib/ceedling/generator_helper.rb (97%) rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/lib/ceedling/generator_test_results.rb (81%) rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/lib/ceedling/generator_test_results_sanity_checker.rb (95%) rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/lib/ceedling/generator_test_runner.rb (89%) rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/lib/ceedling/loginator.rb (98%) rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/lib/ceedling/makefile.rb (98%) rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/lib/ceedling/objects.yml (88%) rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/lib/ceedling/par_map.rb (99%) rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/lib/ceedling/plugin.rb (99%) rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/lib/ceedling/plugin_builder.rb (99%) rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/lib/ceedling/plugin_manager.rb (100%) rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/lib/ceedling/plugin_manager_helper.rb (100%) rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/lib/ceedling/plugin_reportinator.rb (94%) rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/lib/ceedling/plugin_reportinator_helper.rb (99%) create mode 100644 lib/tinyusb/test/unit-test/vendor/ceedling/lib/ceedling/preprocessinator.rb rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/lib/ceedling/preprocessinator_extractor.rb (56%) rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/lib/ceedling/preprocessinator_file_handler.rb (54%) rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/lib/ceedling/preprocessinator_helper.rb (93%) rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/lib/ceedling/preprocessinator_includes_handler.rb (54%) rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/lib/ceedling/project_config_manager.rb (75%) rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/lib/ceedling/project_file_loader.rb (100%) rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/lib/ceedling/rake_utils.rb (99%) rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/lib/ceedling/rake_wrapper.rb (100%) rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/lib/ceedling/rakefile.rb (97%) rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/lib/ceedling/release_invoker.rb (66%) rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/lib/ceedling/release_invoker_helper.rb (100%) rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/lib/ceedling/reportinator.rb (94%) rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/lib/ceedling/rules_cmock.rake (96%) rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/lib/ceedling/rules_preprocess.rake (93%) rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/lib/ceedling/rules_release.rake (73%) rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/lib/ceedling/rules_release_deep_dependencies.rake (97%) rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/lib/ceedling/rules_tests.rake (91%) rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/lib/ceedling/rules_tests_deep_dependencies.rake (99%) rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/lib/ceedling/setupinator.rb (97%) rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/lib/ceedling/stream_wrapper.rb (99%) rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/lib/ceedling/streaminator.rb (99%) rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/lib/ceedling/streaminator_helper.rb (98%) rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/lib/ceedling/system_utils.rb (89%) rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/lib/ceedling/system_wrapper.rb (100%) rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/lib/ceedling/target_loader.rb (100%) rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/lib/ceedling/task_invoker.rb (79%) rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/lib/ceedling/tasks_base.rake (66%) rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/lib/ceedling/tasks_filesystem.rake (74%) rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/lib/ceedling/tasks_release.rake (94%) rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/lib/ceedling/tasks_release_deep_dependencies.rake (100%) rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/lib/ceedling/tasks_tests.rake (86%) rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/lib/ceedling/tasks_tests_deep_dependencies.rake (100%) rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/lib/ceedling/tasks_vendor.rake (100%) rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/lib/ceedling/test_includes_extractor.rb (75%) rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/lib/ceedling/test_invoker.rb (60%) rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/lib/ceedling/test_invoker_helper.rb (96%) rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/lib/ceedling/tool_executor.rb (100%) rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/lib/ceedling/tool_executor_helper.rb (100%) rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/lib/ceedling/verbosinator.rb (100%) create mode 100644 lib/tinyusb/test/unit-test/vendor/ceedling/lib/ceedling/version.rb rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/lib/ceedling/yaml_wrapper.rb (100%) rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/plugins/beep/README.md (100%) rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/plugins/beep/lib/beep.rb (99%) create mode 100644 lib/tinyusb/test/unit-test/vendor/ceedling/plugins/bullseye/README.md rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/plugins/bullseye/assets/template.erb (99%) rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/plugins/bullseye/bullseye.rake (93%) rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/plugins/bullseye/config/defaults.yml (100%) rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/plugins/bullseye/lib/bullseye.rb (98%) create mode 100644 lib/tinyusb/test/unit-test/vendor/ceedling/plugins/colour_report/README.md rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/plugins/colour_report/lib/colour_report.rb (100%) rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/plugins/command_hooks/README.md (100%) rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/plugins/command_hooks/lib/command_hooks.rb (99%) create mode 100644 lib/tinyusb/test/unit-test/vendor/ceedling/plugins/compile_commands_json/README.md create mode 100644 lib/tinyusb/test/unit-test/vendor/ceedling/plugins/compile_commands_json/lib/compile_commands_json.rb create mode 100644 lib/tinyusb/test/unit-test/vendor/ceedling/plugins/dependencies/README.md create mode 100644 lib/tinyusb/test/unit-test/vendor/ceedling/plugins/dependencies/config/defaults.yml create mode 100644 lib/tinyusb/test/unit-test/vendor/ceedling/plugins/dependencies/dependencies.rake create mode 100644 lib/tinyusb/test/unit-test/vendor/ceedling/plugins/dependencies/lib/dependencies.rb rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/plugins/fake_function_framework/README.md (99%) rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/plugins/fake_function_framework/Rakefile (90%) rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/plugins/fake_function_framework/examples/fff_example/project.yml (97%) rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/plugins/fake_function_framework/examples/fff_example/rakefile.rb (100%) rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/plugins/fake_function_framework/examples/fff_example/src/bar.c (100%) rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/plugins/fake_function_framework/examples/fff_example/src/bar.h (100%) rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/plugins/fake_function_framework/examples/fff_example/src/custom_types.h (100%) rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/plugins/fake_function_framework/examples/fff_example/src/display.c (98%) rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/plugins/fake_function_framework/examples/fff_example/src/display.h (100%) rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/plugins/fake_function_framework/examples/fff_example/src/event_processor.c (100%) rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/plugins/fake_function_framework/examples/fff_example/src/event_processor.h (100%) rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/plugins/fake_function_framework/examples/fff_example/src/foo.c (100%) rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/plugins/fake_function_framework/examples/fff_example/src/foo.h (100%) rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/plugins/fake_function_framework/examples/fff_example/src/subfolder/zzz.c (100%) rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/plugins/fake_function_framework/examples/fff_example/src/subfolder/zzz.h (100%) rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/plugins/fake_function_framework/examples/fff_example/test/test_event_processor.c (98%) rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/plugins/fake_function_framework/examples/fff_example/test/test_foo.c (100%) rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/plugins/fake_function_framework/lib/fake_function_framework.rb (98%) rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/plugins/fake_function_framework/lib/fff_mock_generator.rb (99%) rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/plugins/fake_function_framework/spec/fff_mock_header_generator_spec.rb (99%) rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/plugins/fake_function_framework/spec/fff_mock_source_generator_spec.rb (99%) rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/plugins/fake_function_framework/spec/header_generator.rb (99%) rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/plugins/fake_function_framework/spec/spec_helper.rb (100%) rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/plugins/fake_function_framework/src/fff_unity_helper.h (99%) create mode 100644 lib/tinyusb/test/unit-test/vendor/ceedling/plugins/gcov/README.md rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/plugins/gcov/assets/template.erb (99%) create mode 100644 lib/tinyusb/test/unit-test/vendor/ceedling/plugins/gcov/config/defaults_gcov.rb rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/plugins/gcov/gcov.rake (63%) rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/plugins/gcov/lib/gcov.rb (76%) create mode 100644 lib/tinyusb/test/unit-test/vendor/ceedling/plugins/gcov/lib/gcov_constants.rb create mode 100644 lib/tinyusb/test/unit-test/vendor/ceedling/plugins/gcov/lib/gcovr_reportinator.rb create mode 100644 lib/tinyusb/test/unit-test/vendor/ceedling/plugins/gcov/lib/reportgenerator_reportinator.rb create mode 100644 lib/tinyusb/test/unit-test/vendor/ceedling/plugins/gcov/lib/reportinator_helper.rb create mode 100644 lib/tinyusb/test/unit-test/vendor/ceedling/plugins/json_tests_report/README.md create mode 100644 lib/tinyusb/test/unit-test/vendor/ceedling/plugins/json_tests_report/lib/json_tests_report.rb rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/plugins/junit_tests_report/README.md (100%) rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/plugins/junit_tests_report/lib/junit_tests_report.rb (86%) create mode 100644 lib/tinyusb/test/unit-test/vendor/ceedling/plugins/module_generator/README.md rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/plugins/module_generator/config/module_generator.yml (75%) rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/plugins/module_generator/lib/module_generator.rb (79%) rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/plugins/module_generator/module_generator.rake (75%) create mode 100644 lib/tinyusb/test/unit-test/vendor/ceedling/plugins/raw_output_report/README.md rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/plugins/raw_output_report/lib/raw_output_report.rb (100%) create mode 100644 lib/tinyusb/test/unit-test/vendor/ceedling/plugins/stdout_gtestlike_tests_report/README.md rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/plugins/stdout_gtestlike_tests_report/assets/template.erb (100%) rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/plugins/stdout_gtestlike_tests_report/assets/template.erb copy (100%) rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/plugins/stdout_gtestlike_tests_report/config/stdout_gtestlike_tests_report.yml (100%) rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/plugins/stdout_gtestlike_tests_report/lib/stdout_gtestlike_tests_report.rb (100%) create mode 100644 lib/tinyusb/test/unit-test/vendor/ceedling/plugins/stdout_ide_tests_report/README.md rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/plugins/stdout_ide_tests_report/config/stdout_ide_tests_report.yml (100%) rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/plugins/stdout_ide_tests_report/lib/stdout_ide_tests_report.rb (100%) create mode 100644 lib/tinyusb/test/unit-test/vendor/ceedling/plugins/stdout_pretty_tests_report/README.md rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/plugins/stdout_pretty_tests_report/assets/template.erb (99%) rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/plugins/stdout_pretty_tests_report/config/stdout_pretty_tests_report.yml (100%) rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/plugins/stdout_pretty_tests_report/lib/stdout_pretty_tests_report.rb (99%) rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/plugins/subprojects/README.md (90%) rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/plugins/subprojects/config/defaults.yml (100%) rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/plugins/subprojects/lib/subprojects.rb (98%) rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/plugins/subprojects/subprojects.rake (99%) create mode 100644 lib/tinyusb/test/unit-test/vendor/ceedling/plugins/teamcity_tests_report/README.md rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/plugins/teamcity_tests_report/config/teamcity_tests_report.yml (100%) rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/plugins/teamcity_tests_report/lib/teamcity_tests_report.rb (100%) create mode 100644 lib/tinyusb/test/unit-test/vendor/ceedling/plugins/warnings_report/README.md rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/plugins/warnings_report/lib/warnings_report.rb (100%) rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/plugins/xml_tests_report/README.md (97%) rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/plugins/xml_tests_report/lib/xml_tests_report.rb (100%) rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/vendor/c_exception/lib/CException.c (99%) rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/vendor/c_exception/lib/CException.h (99%) create mode 100644 lib/tinyusb/test/unit-test/vendor/ceedling/vendor/c_exception/lib/meson.build rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/vendor/cmock/config/production_environment.rb (65%) rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/vendor/cmock/config/test_environment.rb (82%) create mode 100644 lib/tinyusb/test/unit-test/vendor/ceedling/vendor/cmock/lib/cmock.rb create mode 100644 lib/tinyusb/test/unit-test/vendor/ceedling/vendor/cmock/lib/cmock_config.rb rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/vendor/cmock/lib/cmock_file_writer.rb (50%) create mode 100644 lib/tinyusb/test/unit-test/vendor/ceedling/vendor/cmock/lib/cmock_generator.rb rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/vendor/cmock/lib/cmock_generator_plugin_array.rb (76%) rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/vendor/cmock/lib/cmock_generator_plugin_callback.rb (80%) create mode 100644 lib/tinyusb/test/unit-test/vendor/ceedling/vendor/cmock/lib/cmock_generator_plugin_cexception.rb create mode 100644 lib/tinyusb/test/unit-test/vendor/ceedling/vendor/cmock/lib/cmock_generator_plugin_expect.rb create mode 100644 lib/tinyusb/test/unit-test/vendor/ceedling/vendor/cmock/lib/cmock_generator_plugin_expect_any_args.rb create mode 100644 lib/tinyusb/test/unit-test/vendor/ceedling/vendor/cmock/lib/cmock_generator_plugin_ignore.rb rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/vendor/cmock/lib/cmock_generator_plugin_ignore_arg.rb (80%) create mode 100644 lib/tinyusb/test/unit-test/vendor/ceedling/vendor/cmock/lib/cmock_generator_plugin_ignore_stateless.rb create mode 100644 lib/tinyusb/test/unit-test/vendor/ceedling/vendor/cmock/lib/cmock_generator_plugin_return_thru_ptr.rb create mode 100644 lib/tinyusb/test/unit-test/vendor/ceedling/vendor/cmock/lib/cmock_generator_utils.rb create mode 100644 lib/tinyusb/test/unit-test/vendor/ceedling/vendor/cmock/lib/cmock_header_parser.rb create mode 100644 lib/tinyusb/test/unit-test/vendor/ceedling/vendor/cmock/lib/cmock_plugin_manager.rb create mode 100644 lib/tinyusb/test/unit-test/vendor/ceedling/vendor/cmock/lib/cmock_unityhelper_parser.rb rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/vendor/cmock/src/cmock.c (67%) rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/vendor/cmock/src/cmock.h (56%) rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/vendor/cmock/src/cmock_internals.h (79%) create mode 100644 lib/tinyusb/test/unit-test/vendor/ceedling/vendor/cmock/src/meson.build rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/vendor/diy/lib/diy.rb (95%) rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/vendor/diy/lib/diy/factory.rb (99%) rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/vendor/unity/auto/colour_prompt.rb (100%) rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/vendor/unity/auto/colour_reporter.rb (100%) rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/vendor/unity/auto/generate_config.yml (98%) rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/vendor/unity/auto/generate_module.rb (92%) rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/vendor/unity/auto/generate_test_runner.rb (91%) rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/vendor/unity/auto/parse_output.rb (100%) rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/vendor/unity/auto/run_test.erb (83%) rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/vendor/unity/auto/stylize_as_junit.rb (100%) rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/vendor/unity/auto/test_file_filter.rb (100%) rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/vendor/unity/auto/type_sanitizer.rb (100%) rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/vendor/unity/auto/unity_test_summary.py (100%) rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/vendor/unity/auto/unity_test_summary.rb (100%) rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/vendor/unity/auto/unity_to_junit.py (100%) create mode 100644 lib/tinyusb/test/unit-test/vendor/ceedling/vendor/unity/src/meson.build rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/vendor/unity/src/unity.c (97%) rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/vendor/unity/src/unity.h (92%) rename lib/tinyusb/test/{ => unit-test}/vendor/ceedling/vendor/unity/src/unity_internals.h (93%) delete mode 100644 lib/tinyusb/test/vendor/ceedling/docs/CException.md delete mode 100644 lib/tinyusb/test/vendor/ceedling/docs/CMock_Summary.md delete mode 100644 lib/tinyusb/test/vendor/ceedling/docs/CeedlingPacket.md delete mode 100644 lib/tinyusb/test/vendor/ceedling/docs/ThrowTheSwitchCodingStandard.md delete mode 100644 lib/tinyusb/test/vendor/ceedling/docs/UnityAssertionsCheatSheetSuitableforPrintingandPossiblyFraming.pdf delete mode 100644 lib/tinyusb/test/vendor/ceedling/docs/UnityAssertionsReference.md delete mode 100644 lib/tinyusb/test/vendor/ceedling/docs/UnityConfigurationGuide.md delete mode 100644 lib/tinyusb/test/vendor/ceedling/docs/UnityGettingStartedGuide.md delete mode 100644 lib/tinyusb/test/vendor/ceedling/docs/UnityHelperScriptsGuide.md delete mode 100644 lib/tinyusb/test/vendor/ceedling/lib/ceedling/cacheinator_helper.rb delete mode 100644 lib/tinyusb/test/vendor/ceedling/lib/ceedling/preprocessinator.rb delete mode 100644 lib/tinyusb/test/vendor/ceedling/lib/ceedling/version.rb delete mode 100644 lib/tinyusb/test/vendor/ceedling/lib/ceedling/version.rb.erb delete mode 100644 lib/tinyusb/test/vendor/ceedling/plugins/bullseye/readme.txt delete mode 100644 lib/tinyusb/test/vendor/ceedling/plugins/gcov/README.md delete mode 100644 lib/tinyusb/test/vendor/ceedling/plugins/gcov/config/defaults.yml delete mode 100644 lib/tinyusb/test/vendor/ceedling/plugins/gcov/lib/gcov_constants.rb delete mode 100644 lib/tinyusb/test/vendor/ceedling/vendor/c_exception/release/build.info delete mode 100644 lib/tinyusb/test/vendor/ceedling/vendor/c_exception/release/version.info delete mode 100644 lib/tinyusb/test/vendor/ceedling/vendor/cmock/lib/cmock.rb delete mode 100644 lib/tinyusb/test/vendor/ceedling/vendor/cmock/lib/cmock_config.rb delete mode 100644 lib/tinyusb/test/vendor/ceedling/vendor/cmock/lib/cmock_generator.rb delete mode 100644 lib/tinyusb/test/vendor/ceedling/vendor/cmock/lib/cmock_generator_plugin_cexception.rb delete mode 100644 lib/tinyusb/test/vendor/ceedling/vendor/cmock/lib/cmock_generator_plugin_expect.rb delete mode 100644 lib/tinyusb/test/vendor/ceedling/vendor/cmock/lib/cmock_generator_plugin_expect_any_args.rb delete mode 100644 lib/tinyusb/test/vendor/ceedling/vendor/cmock/lib/cmock_generator_plugin_ignore.rb delete mode 100644 lib/tinyusb/test/vendor/ceedling/vendor/cmock/lib/cmock_generator_plugin_return_thru_ptr.rb delete mode 100644 lib/tinyusb/test/vendor/ceedling/vendor/cmock/lib/cmock_generator_utils.rb delete mode 100644 lib/tinyusb/test/vendor/ceedling/vendor/cmock/lib/cmock_header_parser.rb delete mode 100644 lib/tinyusb/test/vendor/ceedling/vendor/cmock/lib/cmock_plugin_manager.rb delete mode 100644 lib/tinyusb/test/vendor/ceedling/vendor/cmock/lib/cmock_unityhelper_parser.rb delete mode 100644 lib/tinyusb/test/vendor/ceedling/vendor/cmock/release/build.info delete mode 100644 lib/tinyusb/test/vendor/ceedling/vendor/cmock/release/version.info delete mode 100644 lib/tinyusb/test/vendor/ceedling/vendor/cmock/src/meson.build delete mode 100644 lib/tinyusb/test/vendor/ceedling/vendor/deep_merge/lib/deep_merge.rb delete mode 100644 lib/tinyusb/test/vendor/ceedling/vendor/unity/release/build.info delete mode 100644 lib/tinyusb/test/vendor/ceedling/vendor/unity/release/version.info delete mode 100644 lib/tinyusb/test/vendor/ceedling/vendor/unity/src/CMakeLists.txt delete mode 100644 lib/tinyusb/test/vendor/ceedling/vendor/unity/src/meson.build create mode 100644 lib/tinyusb/tools/build_cmake.py rename lib/tinyusb/tools/{build_esp32sx.py => build_esp32.py} (53%) create mode 100644 lib/tinyusb/tools/build_utils.py create mode 100644 lib/tinyusb/tools/cmake/cpu/cortex-m0.cmake create mode 100644 lib/tinyusb/tools/cmake/cpu/cortex-m0plus.cmake create mode 100644 lib/tinyusb/tools/cmake/cpu/cortex-m3.cmake create mode 100644 lib/tinyusb/tools/cmake/cpu/cortex-m33.cmake create mode 100644 lib/tinyusb/tools/cmake/cpu/cortex-m4.cmake create mode 100644 lib/tinyusb/tools/cmake/cpu/cortex-m7.cmake create mode 100644 lib/tinyusb/tools/cmake/toolchain/arm_gcc.cmake create mode 100644 lib/tinyusb/tools/cmake/toolchain/arm_iar.cmake create mode 100644 lib/tinyusb/tools/cmake/toolchain/set_flags.cmake rename lib/tinyusb/{examples/device/audio_4_channel_mic/.skip.MCU_SAMD11 => tools/codespell/exclude-file.txt} (100%) create mode 100644 lib/tinyusb/tools/codespell/ignore-words.txt create mode 100644 lib/tinyusb/tools/gen_doc.py create mode 100644 lib/tinyusb/tools/get_deps.py create mode 100644 lib/tinyusb/tools/make/cpu/arm1176.mk create mode 100644 lib/tinyusb/tools/make/cpu/cortex-a53.mk create mode 100644 lib/tinyusb/tools/make/cpu/cortex-a72.mk create mode 100644 lib/tinyusb/tools/make/cpu/cortex-m0.mk create mode 100644 lib/tinyusb/tools/make/cpu/cortex-m0plus.mk create mode 100644 lib/tinyusb/tools/make/cpu/cortex-m3.mk create mode 100644 lib/tinyusb/tools/make/cpu/cortex-m33.mk create mode 100644 lib/tinyusb/tools/make/cpu/cortex-m4.mk create mode 100644 lib/tinyusb/tools/make/cpu/cortex-m7.mk create mode 100644 lib/tinyusb/tools/make/toolchain/arm_gcc.mk create mode 100644 lib/tinyusb/tools/make/toolchain/arm_gcc_rules.mk create mode 100644 lib/tinyusb/tools/make/toolchain/arm_iar.mk create mode 100644 lib/tinyusb/tools/make/toolchain/arm_iar_rules.mk create mode 100644 lib/tinyusb/tools/make_release.py create mode 100644 lib/tinyusb/tools/mksunxi.py create mode 100755 lib/tinyusb/tools/pcapng_to_corpus.py delete mode 100644 lib/tinyusb/tools/top.mk create mode 100644 src/common/compact_pointer.hpp create mode 100644 src/common/http/connect_error.cpp create mode 100644 src/common/random.h create mode 100644 src/common/random_hw.cpp create mode 100644 src/common/random_sw.cpp create mode 100644 src/common/scope_guard.hpp create mode 100644 src/common/serial_printing.cpp create mode 100644 src/common/serial_printing.hpp delete mode 100644 src/common/timing.cpp delete mode 100644 src/gui/include_MINI/screen_menu_calibration_parent_alias.hpp delete mode 100644 src/gui/include_MK3.5/screen_menu_calibration_parent_alias.hpp delete mode 100644 src/gui/include_MK4/screen_menu_calibration_parent_alias.hpp delete mode 100644 src/gui/include_XL/screen_menu_calibration_parent_alias.hpp delete mode 100644 src/gui/include_iX/screen_menu_calibration_parent_alias.hpp create mode 100644 src/gui/res/png/error_48x48.png create mode 100644 src/gui/res/png/mapping_80x80.png create mode 100644 src/gui/res/png/mapping_80x80_focused.png create mode 100644 src/gui/res/png/no_stream_48x48.png delete mode 100644 src/gui/screen_menu_calibration.cpp delete mode 100644 src/gui/screen_menu_calibration.hpp delete mode 100644 src/gui/screen_test_graph.hpp delete mode 100644 src/gui/signals.txt delete mode 100644 src/gui/test/screen_test_graph.cpp delete mode 100644 src/gui/window_temp_graph.cpp delete mode 100644 src/gui/window_temp_graph.hpp create mode 100644 src/guiapi/src/i_window_menu.cpp delete mode 100644 src/hw/fusb303.cpp delete mode 100644 src/hw/fusb303.hpp rename src/resources/web/{main.bf4381d9e5ab54702172.js => main.2812ca58adec020e163e.js} (70%) delete mode 100644 src/transfers/async_io.cpp delete mode 100644 src/transfers/async_io.hpp create mode 100644 tests/stubs/Marlin/src/inc/MarlinConfigPre.h diff --git a/CMakeLists.txt b/CMakeLists.txt index f02d1eabab..6ffd92edc5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -451,6 +451,24 @@ if(BOARD MATCHES ".*BUDDY" AND HAS_PUPPIES_BOOTLOADER) endif() endif() +# Unittests +if(NOT CMAKE_CROSSCOMPILING) + option(UNITTESTS_ENABLE "Enable building of unittest" ON) + if(UNITTESTS_ENABLE) + enable_testing() + add_subdirectory(tests) + endif() +endif() + +# std::rand/random +if(BOARD MATCHES ".*BUDDY") + set(ENABLE_HW_STD_RAND TRUE) + set(RANDOM_CPP random_hw.cpp) +else() + set(ENABLE_HW_STD_RAND FALSE) + set(RANDOM_CPP random_sw.cpp) +endif() + # # Buddy firmware # @@ -470,6 +488,15 @@ target_compile_options( -Wdouble-promotion ) +if(ENABLE_HW_STD_RAND) + # Wrap rand and replace the implementation with one using HW RNG + target_link_options(firmware PUBLIC -Wl,--wrap=rand) + + # Wrap srand, do not implement the wrapper -> throws error when referenced in the code. rand() + # uses HW RNG now, so it cannot be seeded + target_link_options(firmware PUBLIC -Wl,--wrap=srand) +endif() + # Appending fw descriptor (with calculated fingerprint) to the ELF if(BOARD STREQUAL "DWARF" OR BOARD STREQUAL "MODULARBED") add_custom_command( @@ -542,6 +569,8 @@ if(GENERATE_BBF) "${PRINTER_TYPE}" PRINTER_VERSION "${PRINTER_VERSION}" + PRINTER_SUBVERSION + "${PRINTER_SUBVERSION}" SIGNING_KEY "${SIGNING_KEY}" BBF_VERSION @@ -563,6 +592,8 @@ if(GENERATE_BBF) "${PRINTER_TYPE}" PRINTER_VERSION "${PRINTER_VERSION}" + PRINTER_SUBVERSION + "${PRINTER_SUBVERSION}" SIGNING_KEY "${SIGNING_KEY}" BBF_VERSION @@ -664,11 +695,3 @@ set_property( FW_VERSION_SUFFIX=${PROJECT_VERSION_SUFFIX} FW_VERSION_SUFFIX_SHORT=${PROJECT_VERSION_SUFFIX_SHORT} ) - -if(NOT CMAKE_CROSSCOMPILING) - option(UNITTESTS_ENABLE "Enable building of unittest" ON) - if(UNITTESTS_ENABLE) - enable_testing() - add_subdirectory(tests) - endif() -endif() diff --git a/ProjectOptions.cmake b/ProjectOptions.cmake index a8347ed951..8f3cfc7ab0 100644 --- a/ProjectOptions.cmake +++ b/ProjectOptions.cmake @@ -250,7 +250,7 @@ set(PRINTERS_WITH_PRECISE_HOMING_COREXY "XL") # private MINI would not fit to 1MB so it has disabled selftest set(PRINTERS_WITH_SELFTEST "MINI" # "MK4") set(PRINTERS_WITH_SELFTEST "MK4" "MK3.5" "XL" "iX" "MINI") -set(PRINTERS_WITH_SELFTEST_SNAKE "XL") +set(PRINTERS_WITH_SELFTEST_SNAKE "XL" "MK4") set(PRINTERS_WITH_HUMAN_INTERACTIONS "MINI" "MK4" "MK3.5" "XL") set(PRINTERS_WITH_LOADCELL "MK4" "iX" "XL") set(PRINTERS_WITH_HEATBREAK_TEMP "MK4" "iX" "XL") @@ -263,7 +263,7 @@ set(PRINTERS_WITH_TOOLCHANGER "XL") set(PRINTERS_WITH_SIDE_FSENSOR "XL") set(PRINTERS_WITH_EMBEDDED_ESP32 "XL") set(PRINTERS_WITH_SIDE_LEDS "XL" "iX") -set(PRINTERS_WITH_TRANSLATIONS "MK4" "XL") +set(PRINTERS_WITH_TRANSLATIONS "MK4" "MK3.5" "XL") set(PRINTERS_WITH_LOVE_BOARD "MK4" "iX") set(PRINTERS_WITH_MMU2 "MK4" "MK3.5") @@ -274,7 +274,6 @@ set(PRINTERS_WITH_GUI_W240H320 "MINI") set(PRINTERS_WITH_LEDS "MK4" "MK3.5" "XL" "iX") # disable serial printing for MINI to save flash set(PRINTERS_WITH_SERIAL_PRINTING "MK4" "MK3.5" "XL" "iX" "MINI") -set(PRINTERS_WITH_CONTROL_MENU "MK4" "MK3.5" "XL" "MINI") # Set printer board set(BOARDS_WITH_ADVANCED_POWER "XBUDDY" "XLBUDDY" "DWARF") @@ -533,7 +532,17 @@ else() set(HAS_PUPPIES_BOOTLOADER NO) endif() define_boolean_option(HAS_PUPPIES_BOOTLOADER ${HAS_PUPPIES_BOOTLOADER}) -define_boolean_option(PUPPY_FLASH_FW ${HAS_PUPPIES_BOOTLOADER}) + +set(PUPPY_SKIP_FLASH_FW + "OFF" + CACHE BOOL "Disable flashing puppies to debug puppy with bootloader." + ) +if(${HAS_PUPPIES_BOOTLOADER} AND NOT ${PUPPY_SKIP_FLASH_FW}) + set(PUPPY_FLASH_FW YES) +else() + set(PUPPY_FLASH_FW NO) +endif() +define_boolean_option(PUPPY_FLASH_FW ${PUPPY_FLASH_FW}) if(${PRINTER} IN_LIST PRINTERS_WITH_TOOLCHANGER) set(HAS_TOOLCHANGER YES) @@ -542,13 +551,6 @@ else() endif() define_boolean_option(HAS_TOOLCHANGER ${HAS_TOOLCHANGER}) -if(${PRINTER} IN_LIST PRINTERS_WITH_CONTROL_MENU) - set(HAS_CONTROL_MENU YES) -else() - set(HAS_CONTROL_MENU NO) -endif() -define_boolean_option(HAS_CONTROL_MENU ${HAS_CONTROL_MENU}) - if(${PRINTER} IN_LIST PRINTERS_WITH_SELFTEST_SNAKE) set(HAS_SELFTEST_SNAKE YES) else() @@ -582,8 +584,6 @@ else() define_boolean_option(NETWORKING_BENCHMARK_ENABLED NO) endif() -define_boolean_option(USE_ASYNCIO YES) - # define enabled features if(BOOTLOADER STREQUAL "YES" diff --git a/README.md b/README.md index 047ba1e352..286d69bc5b 100644 --- a/README.md +++ b/README.md @@ -103,6 +103,15 @@ With the XL, the situation gets a bit more complex. The firmware of XLBuddy cont - With the `ENABLE_PUPPY_BOOTLOAD` set to false, the project will disable Puppy flashing & interaction with Puppy bootloaders. - It is up to you to flash the correct firmware to the puppies (noboot variant). +5. Keep bootloaders but do not write firmware on boot. + ``` + -DPUPPY_SKIP_FLASH_FW=YES + ``` + - With the `PUPPY_SKIP_FLASH_FW` set to true, the project will disable Puppy flashing on boot. + - You can keep other puppies that are not debugged in the same state as before. + - Use puppy build config with bootloaders (e.g. `xl-dwarf_debug_boot`) on one or more puppies. + - Recommend breakpoint at the end of `puppy_task_body()` to prevent buddy from resetting the puppy immediately when puppy stops on breakpoint. + See /ProjectOptions.cmake for more information about those cache variables. #### Running tests diff --git a/cmake/ProjectVersion.cmake b/cmake/ProjectVersion.cmake index 628e6be290..4180d4e186 100644 --- a/cmake/ProjectVersion.cmake +++ b/cmake/ProjectVersion.cmake @@ -6,7 +6,7 @@ # PROJECT_VERSION (4.0.3) # PROJECT_VERSION_FULL (4.0.3-BETA+1035.PR111.B4) # PROJECT_VERSION_SUFFIX (-BETA+1035.PR111.B4) -# PROJECT_VERSION_SUFFIX_SHORT (+1035) +# PROJECT_VERSION_SUFFIX_SHORT (-BETA+1035) # # The `PROJECT_VERSION` variable is set as soon as the file is included. # To set the rest, the function `resolve_version_variables` has to be called. diff --git a/cmake/Utilities.cmake b/cmake/Utilities.cmake index 17ff97d0be..1077367943 100644 --- a/cmake/Utilities.cmake +++ b/cmake/Utilities.cmake @@ -103,6 +103,7 @@ function(pack_firmware target) BUILD_NUMBER PRINTER_TYPE PRINTER_VERSION + PRINTER_SUBVERSION SIGNING_KEY BBF_VERSION OUTPUT_PATH @@ -184,8 +185,9 @@ function(pack_firmware target) COMMAND "${Python3_EXECUTABLE}" "${CMAKE_SOURCE_DIR}/utils/pack_fw.py" --version="${ARG_FW_VERSION}" --printer-type "${ARG_PRINTER_TYPE}" --printer-version "${ARG_PRINTER_VERSION}" - --build-number "${ARG_BUILD_NUMBER}" ${sign_opts} ${resources_opts} ${bbf_version_opts} - ${output_path_opts} -- "${bin_firmware_path}" + --printer-subversion "${ARG_PRINTER_SUBVERSION}" --build-number "${ARG_BUILD_NUMBER}" + ${sign_opts} ${resources_opts} ${bbf_version_opts} ${output_path_opts} -- + "${bin_firmware_path}" ) endfunction() diff --git a/doc/logging_components.md b/doc/logging_components.md index 30f4280f1f..9330e55f72 100644 --- a/doc/logging_components.md +++ b/doc/logging_components.md @@ -1,7 +1,7 @@ # Logging - Defined Components This file is generated automatically so don't edit it directly -- Accelerometer: LOG_SEVERITY_WARNING, src/puppy/dwarf/accelerometer.cpp +- Accel: LOG_SEVERITY_INFO, src/puppy/dwarf/accelerometer.cpp - Bootloader: LOG_SEVERITY_INFO, src/bootloader/bootloader.cpp - Buddy: LOG_SEVERITY_DEBUG, src/common/appmain.cpp - BufferedSerial: LOG_SEVERITY_DEBUG, src/hw/buffered_serial.cpp diff --git a/doc/metrics.md b/doc/metrics.md index ab6129236f..d63d7517b9 100644 --- a/doc/metrics.md +++ b/doc/metrics.md @@ -141,6 +141,14 @@ What are metrics good for, if you have no way to store, view, and process them? > - You can view logs of all the running services using `docker-compose logs -f` > - To stop the services, run `docker-compose stop` +1. If you're on **WSL**, you might need to forward the UDP packets from your host machine to the WSL. For that purpose, we've written a simple UDP proxy application you can compile and run on your PC. + + 1. Download [DMD](https://dlang.org/) compiler. + 1. Compile `metricsProxy.d` located in this directory (`doc`): `dmd metricsProxy.d` + 1. Find out your WSL IP address: `(wsl) ifconfig` + 1. Start the proxy: `metricsProxy.exe (your-wsl-address)`. + + ##### This will start the following services 1. An InfluxDB database instance storing all your metrics. diff --git a/doc/metricsProxy.d b/doc/metricsProxy.d new file mode 100644 index 0000000000..cd501bde2b --- /dev/null +++ b/doc/metricsProxy.d @@ -0,0 +1,36 @@ +import std.stdio; +import std.socket; + +void main(string[] args) { + auto socket = new Socket(AddressFamily.INET, SocketType.DGRAM); + socket.blocking = true; + socket.bind(new InternetAddress("0.0.0.0", 8500)); + + auto targetAddress = new InternetAddress(args[1], 8500); + + auto buffer = new char[4096]; + + writeln("Running..."); + size_t i = 0; + + while(true) { + const auto rcvd = socket.receive(buffer); + if(rcvd == 0 || rcvd == Socket.ERROR) { + writeln(i++, " Error rcvd ", rcvd, ": ", socket.getErrorText); + continue; + } + + const auto sent = socket.sendTo(buffer[0 .. rcvd], targetAddress); + if(sent == 0 || sent == Socket.ERROR) { + writeln(i++, " Error sent ", sent, ": ", socket.getErrorText); + continue; + } + + if(sent != rcvd) { + writeln(i++, " Sent ", sent, " rcvd", rcvd); + continue; + } + + writeln(i++, " PACKET ", sent, "\n", buffer[0..rcvd]); + } +} diff --git a/include/buddy/ffconf.h b/include/buddy/ffconf.h index 889ce38452..b7b97b221f 100644 --- a/include/buddy/ffconf.h +++ b/include/buddy/ffconf.h @@ -249,7 +249,7 @@ #include "cmsis_os.h" // O/S definitions #define FF_FS_REENTRANT 1 -#define FF_FS_TIMEOUT 1000 +#define FF_FS_TIMEOUT portMAX_DELAY #define FF_SYNC_t osSemaphoreId /* The option FF_FS_REENTRANT switches the re-entrancy (thread safe) of the FatFs / module itself. Note that regardless of this option, file access to different diff --git a/include/buddy/lwipopts.h b/include/buddy/lwipopts.h index add1992861..f90af900d5 100644 --- a/include/buddy/lwipopts.h +++ b/include/buddy/lwipopts.h @@ -27,7 +27,7 @@ extern "C" { #define PBUF_POOL_SIZE 10 #define PBUF_POOL_SMALL_SIZE 12 #define IP_REASS_MAX_PBUFS 15 -#define TCPIP_THREAD_STACKSIZE 1088 +#define TCPIP_THREAD_STACKSIZE 1248 #define TCPIP_MBOX_SIZE PBUF_POOL_SIZE + PBUF_POOL_SMALL_SIZE #define DEFAULT_UDP_RECVMBOX_SIZE TCPIP_MBOX_SIZE diff --git a/include/buddy/priorities_config.h b/include/buddy/priorities_config.h index c39e388637..ed0d8b82b4 100644 --- a/include/buddy/priorities_config.h +++ b/include/buddy/priorities_config.h @@ -48,13 +48,13 @@ static_assert(configLIBRARY_LOWEST_INTERRUPT_PRIORITY == 15); #define TASK_PRIORITY_MEDIA_PREFETCH osPriorityHigh #define TASK_PRIORITY_METRIC_SYSTEM osPriorityAboveNormal #define TASK_PRIORITY_USB_HOST osPriorityNormal - #define TASK_PRIORITY_USB_MSC_WORKER osPriorityRealtime + #define TASK_PRIORITY_USB_MSC_WORKER_HIGH osPriorityRealtime + #define TASK_PRIORITY_USB_MSC_WORKER_LOW osPriorityNormal #define TASK_PRIORITY_DISPLAY_TASK osPriorityNormal #define TASK_PRIORITY_MEASUREMENT_TASK osPriorityNormal #define TASK_PRIORITY_ESP_UPDATE osPriorityNormal #define TASK_PRIORITY_MEDIA_PREFETCH_WHILE_FREAD osPriorityNormal // decreased priroity when media prefetch calls fread #define TASK_PRIORITY_TCPIP_THREAD osPriorityBelowNormal - #define TASK_PRIORITY_ASYNCIO osPriorityBelowNormal #define TASK_PRIORITY_WUI osPriorityBelowNormal #define TASK_PRIORITY_CONNECT osPriorityBelowNormal static_assert(configTIMER_TASK_PRIORITY == 5); // 5 is more than osPriorityRealtime @@ -69,6 +69,7 @@ static_assert(configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY == 0); #define ISR_PRIORITY_DMA1_CHANNEL1 0 #define ISR_PRIORITY_TICK_TIMER 1 #define ISR_PRIORITY_HX717 1 + #define ISR_PRIORITY_LIS2DH12 1 #define ISR_PRIORITY_STEP_TIMER 2 #define ISR_PRIORITY_TEMP_TIMER 2 #define ISR_PRIORITY_MOVE_TIMER 2 diff --git a/include/buddy/usb_device.h b/include/buddy/usb_device.hpp similarity index 60% rename from include/buddy/usb_device.h rename to include/buddy/usb_device.hpp index 67e01ad274..bbb3062b17 100644 --- a/include/buddy/usb_device.h +++ b/include/buddy/usb_device.hpp @@ -1,14 +1,6 @@ #pragma once -#ifdef __cplusplus -extern "C" { -#endif - #include "log.h" extern log_component_t LOG_COMPONENT(USBDevice); void usb_device_init(); - -#ifdef __cplusplus -} -#endif diff --git a/include/marlin/Configuration_MINI.h b/include/marlin/Configuration_MINI.h index 1a2f9fb184..957b534e70 100644 --- a/include/marlin/Configuration_MINI.h +++ b/include/marlin/Configuration_MINI.h @@ -565,7 +565,7 @@ //! implemented only for Cartesian kinematics #define MOVE_BACK_BEFORE_HOMING #if ENABLED(MOVE_BACK_BEFORE_HOMING) - #define MOVE_BACK_BEFORE_HOMING_DISTANCE 10.0f + #define MOVE_BACK_BEFORE_HOMING_DISTANCE 1.92f #endif // Specify here all the endstop connectors that are connected to any endstop or probe. diff --git a/include/marlin/Configuration_MINI_adv.h b/include/marlin/Configuration_MINI_adv.h index e10b8fd02e..ce9c072eec 100644 --- a/include/marlin/Configuration_MINI_adv.h +++ b/include/marlin/Configuration_MINI_adv.h @@ -482,8 +482,8 @@ #define HOMING_MAX_ATTEMPTS 10 // Homing hits each endstop, retracts by these distances, then does a slower bump. -#define X_HOME_BUMP_MM 10 -#define Y_HOME_BUMP_MM 10 +#define X_HOME_BUMP_MM 0 +#define Y_HOME_BUMP_MM 0 #define Z_HOME_BUMP_MM 2 #define HOMING_BUMP_DIVISOR \ { 1, 1, 4 } // Re-Bump Speed Divisor (Divides the Homing Feedrate) @@ -1744,8 +1744,8 @@ #define POWER_PANIC_Z_LIFT_CYCLES 4 // 4xFullStep cycles = ~0.64mm #define POWER_PANIC_MAX_BED_DIFF 10 // Maximum bed temperature (C) difference for auto-recovery - // Milliseconds to wait on hold before auto-restarting during short power failures - #define POWER_PANIC_HOLD_RST_MS 5000 + // seconds to wait on hold before auto-restarting during short power failures + #define POWER_PANIC_HOLD_RST_S 5 // TODO: Suboptimal values #define POWER_PANIC_X_CURRENT 350 // (mA) RMS current for parking diff --git a/include/marlin/Configuration_MK3.5.h b/include/marlin/Configuration_MK3.5.h index a0cb2fb6c2..644d559c6b 100644 --- a/include/marlin/Configuration_MK3.5.h +++ b/include/marlin/Configuration_MK3.5.h @@ -740,8 +740,9 @@ * Override with M92 * X, Y, Z, E0 [, E1[, E2[, E3[, E4[, E5]]]]] */ +#define DEFAULT_AXIS_STEPS_PER_UNIT_E0 266 // 95% of the original 280 to account for normalised flow #define DEFAULT_AXIS_STEPS_PER_UNIT \ - { 100, 100, 400, 280 } + { 100, 100, 400, DEFAULT_AXIS_STEPS_PER_UNIT_E0 } /** * Default Max Feed Rate (mm/s) * Override with M203 @@ -1027,9 +1028,9 @@ #define DISABLE_INACTIVE_EXTRUDER // Keep only the active extruder enabled // default values -#define DEFAULT_INVERT_X_DIR true -#define DEFAULT_INVERT_Y_DIR false -#define DEFAULT_INVERT_Z_DIR true +#define DEFAULT_INVERT_X_DIR false +#define DEFAULT_INVERT_Y_DIR true +#define DEFAULT_INVERT_Z_DIR false #define DEFAULT_INVERT_E0_DIR false diff --git a/include/marlin/Configuration_MK3.5_adv.h b/include/marlin/Configuration_MK3.5_adv.h index 990020efad..4280c869c1 100644 --- a/include/marlin/Configuration_MK3.5_adv.h +++ b/include/marlin/Configuration_MK3.5_adv.h @@ -1752,8 +1752,8 @@ #define POWER_PANIC_Z_LIFT_CYCLES 4 // 4xFullStep cycles = ~0.64mm #define POWER_PANIC_MAX_BED_DIFF 10 // Maximum bed temperature (C) difference for auto-recovery - // Milliseconds to wait on hold before auto-restarting during short power failures - #define POWER_PANIC_HOLD_RST_MS 5000 + // seconds to wait on hold before auto-restarting during short power failures + #define POWER_PANIC_HOLD_RST_S 5 #define POWER_PANIC_X_CURRENT 350 // (mA) RMS current for parking #define POWER_PANIC_X_FEEDRATE 200 // (mm/s, running at POWER_PANIC_X_CURRENT) diff --git a/include/marlin/Configuration_MK4_adv.h b/include/marlin/Configuration_MK4_adv.h index 36115fe86c..7183add87b 100644 --- a/include/marlin/Configuration_MK4_adv.h +++ b/include/marlin/Configuration_MK4_adv.h @@ -1764,8 +1764,8 @@ #define POWER_PANIC_Z_LIFT_CYCLES 4 // 4xFullStep cycles = ~0.64mm #define POWER_PANIC_MAX_BED_DIFF 10 // Maximum bed temperature (C) difference for auto-recovery - // Milliseconds to wait on hold before auto-restarting during short power failures - #define POWER_PANIC_HOLD_RST_MS 5000 + // seconds to wait on hold before auto-restarting during short power failures + #define POWER_PANIC_HOLD_RST_S 5 // TODO: currently arbitrary, needs to include optimal feedrates too #define POWER_PANIC_X_CURRENT 350 // (mA) RMS current for parking diff --git a/include/marlin/Configuration_XL.h b/include/marlin/Configuration_XL.h index 840a9c5070..e42ca4fe92 100644 --- a/include/marlin/Configuration_XL.h +++ b/include/marlin/Configuration_XL.h @@ -490,10 +490,11 @@ */ #define PID_FUNCTIONAL_RANGE 500 - // RING - #define DEFAULT_Kp 17.00 - #define DEFAULT_Ki 0.5 - #define DEFAULT_Kd 90.00 + // Nextruder in Dwarf + ///@note These values are not used in buddy, but sent over modbus to Dwarf. + #define DEFAULT_Kp 14.00 + #define DEFAULT_Ki 1.00 + #define DEFAULT_Kd 100.00 #define STEADY_STATE_HOTEND // Enable support for STEADY_STATE_HOTEND (feed-forward thermal management) #define STEADY_STATE_HOTEND_LINEAR_COOLING_TERM 0.322 diff --git a/include/marlin/Configuration_XL_Dwarf.h b/include/marlin/Configuration_XL_Dwarf.h index c8e5989739..b57ec6d505 100644 --- a/include/marlin/Configuration_XL_Dwarf.h +++ b/include/marlin/Configuration_XL_Dwarf.h @@ -445,10 +445,14 @@ //#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay //#define PID_PARAMS_PER_HOTEND // Uses separate PID parameters for each extruder (useful for mismatched extruders) // Set/get with gcode: M301 E[extruder number, 0-2] - #define PID_FUNCTIONAL_RANGE 500 // If the temperature difference between the target temperature and the actual temperature -// is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max. + /** + * If the temperature difference between the target temperature and the actual temperature + * is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max. + */ + #define PID_FUNCTIONAL_RANGE 500 - // RING + // Nextruder in Dwarf + ///@note These will be overriden with values from buddy's eeprom, defaulted at include/marlin/Configuration_XL.h #define DEFAULT_Kp 14.00 #define DEFAULT_Ki 1.00 #define DEFAULT_Kd 100.00 diff --git a/include/marlin/Configuration_XL_adv.h b/include/marlin/Configuration_XL_adv.h index b913f300f3..4f0671a2b1 100644 --- a/include/marlin/Configuration_XL_adv.h +++ b/include/marlin/Configuration_XL_adv.h @@ -1751,8 +1751,8 @@ #define POWER_PANIC_Z_LIFT_CYCLES 4 // 4xFullStep cycles = ~0.64mm #define POWER_PANIC_MAX_BED_DIFF 10 // Maximum bed temperature (C) difference for auto-recovery - // Milliseconds to wait on hold before auto-restarting during short power failures - #define POWER_PANIC_HOLD_RST_MS 5000 + // seconds to wait on hold before auto-restarting during short power failures + #define POWER_PANIC_HOLD_RST_S 5 // TODO: Suboptimal values #define POWER_PANIC_X_CURRENT 350 // (mA) RMS current for parking diff --git a/include/marlin/Configuration_iX.h b/include/marlin/Configuration_iX.h index e9a656743a..476cda38eb 100644 --- a/include/marlin/Configuration_iX.h +++ b/include/marlin/Configuration_iX.h @@ -1055,9 +1055,9 @@ #define DISABLE_INACTIVE_EXTRUDER // Keep only the active extruder enabled // default values -#define DEFAULT_INVERT_X_DIR true -#define DEFAULT_INVERT_Y_DIR true -#define DEFAULT_INVERT_Z_DIR false +#define DEFAULT_INVERT_X_DIR false +#define DEFAULT_INVERT_Y_DIR false +#define DEFAULT_INVERT_Z_DIR true #define DEFAULT_INVERT_E0_DIR false #ifdef USE_PRUSA_EEPROM_AS_SOURCE_OF_DEFAULT_VALUES @@ -1112,7 +1112,7 @@ #define X_MIN_POS -30 #define Y_MIN_POS -11 #define Z_MIN_POS 0 -#define X_MAX_POS X_MIN_POS + 299 +#define X_MAX_POS X_MIN_POS + 283 #define Y_MAX_POS Y_MIN_POS + 308 #ifdef USE_PRUSA_EEPROM_AS_SOURCE_OF_DEFAULT_VALUES #define DEFAULT_Z_MAX_POS Z_SIZE diff --git a/include/puppies/Dwarf.hpp b/include/puppies/Dwarf.hpp index ba7e94f8b3..53a8e7e82d 100644 --- a/include/puppies/Dwarf.hpp +++ b/include/puppies/Dwarf.hpp @@ -279,6 +279,14 @@ void ToolsMappingBody::windowEvent(EventLock, [[maybe_unused]] window_t *sender, set_status_led(dwarf_shared::StatusLed::Mode::pulse_w, r, g, b); } + /** + * @brief Set dwarf heater PID values. + * @param p format as Temperature::temp_hotend[0].pid.Kp + * @param i format as Temperature::temp_hotend[0].pid.Ki + * @param d format as Temperature::temp_hotend[0].pid.Kd + */ + void set_pid(float p, float i, float d); + float get_heatbreak_temp(); uint16_t get_heatbreak_fan_pwr(); @@ -339,6 +347,12 @@ void ToolsMappingBody::windowEvent(EventLock, [[maybe_unused]] window_t *sender, /// Dwarf status LED control, for encoding see dwarf_shared::StatusLed uint16_t status_led[dwarf_shared::StatusLed::REG_SIZE] {}; + + struct __attribute__((packed)) { + float p {}; + float i {}; + float d {}; + } pid; }; ModbusHoldingRegisterBlock GeneralWrite; diff --git a/include/puppies/fifo_coder.hpp b/include/puppies/fifo_coder.hpp index f8538f7d57..51063fcbdf 100644 --- a/include/puppies/fifo_coder.hpp +++ b/include/puppies/fifo_coder.hpp @@ -85,9 +85,13 @@ inline constexpr MessageType message_type() { namespace dwarf::accelerometer { struct AccelerometerRecord { common::puppies::fifo::TimeStamp_us timestamp; - uint16_t x; - uint16_t y; - uint16_t z; - bool corrupted = false; + union { + struct { + int16_t x, y, z; + }; + int16_t raw[3]; + }; + bool buffer_overflow = false; + bool sample_overrun = false; }; } // namespace dwarf::accelerometer diff --git a/include/tasks.hpp b/include/tasks.hpp index f86db152ac..166f0cb134 100644 --- a/include/tasks.hpp +++ b/include/tasks.hpp @@ -26,10 +26,8 @@ enum class Dependency { default_task_ready, esp_flashed, networking_ready, + media_prefetch_ready, usb_and_temp_ready, ///< Check autoprint and powerpanic state -#ifdef USE_ASYNCIO - async_io_ready, -#endif gui_screen_ready, _count }; @@ -37,13 +35,12 @@ enum class Dependency { // Check dependency mask fits into the dependency_t integer static_assert(ftrstd::to_underlying(Dependency::_count) <= sizeof(dependency_t) * 8); -#define NETWORK_DEPENDS_ON_ASYNCIO USE_ASYNCIO #define NETWORK_DEPENDS_ON_ESP_FLASHED (HAS_EMBEDDED_ESP32() && BOARD_VER_HIGHER_OR_EQUAL_TO(0, 5, 0)) // Create dependency mask from the dependencies enum constexpr dependency_t make(std::same_as auto... dependencies) { // Feel free to lift the assert in case some build configuration results in empty list -#if (NETWORK_DEPENDS_ON_ASYNCIO || NETWORK_DEPENDS_ON_ESP_FLASHED) && HAS_PUPPIES() +#if (NETWORK_DEPENDS_ON_ESP_FLASHED) && HAS_PUPPIES() static_assert(sizeof...(dependencies) > 0, "No dependencies, is this intended?"); #endif return ((1 << ftrstd::to_underlying(dependencies)) | ... | 0); @@ -52,10 +49,13 @@ constexpr dependency_t make(std::same_as auto... dependencies) { /// Definitions of dependencies for different tasks/components namespace Tasks { inline constexpr dependency_t default_start = make( + Dependency::media_prefetch_ready #if HAS_PUPPIES() + , Dependency::puppies_ready #endif ); + inline constexpr dependency_t marlin_client = make(Dependency::default_task_ready); inline constexpr dependency_t puppy_run = make(Dependency::default_task_ready); inline constexpr dependency_t espif = make(Dependency::esp_flashed); inline constexpr dependency_t bootstrap_done = make( @@ -78,12 +78,6 @@ namespace Tasks { // This is temporary, remove once everyone has compatible hardware. // Requires new sandwich rev. 06 or rev. 05 with R83 removed. Dependency::esp_flashed -#endif -#if NETWORK_DEPENDS_ON_ESP_FLASHED && NETWORK_DEPENDS_ON_ASYNCIO - , -#endif -#if NETWORK_DEPENDS_ON_ASYNCIO - Dependency::async_io_ready #endif ); inline constexpr dependency_t bootstrap_start = make(Dependency::gui_screen_ready); diff --git a/include/usb_host/usb_host.h b/include/usb_host/usb_host.h index a2dd6ea70c..3fd5253ab0 100644 --- a/include/usb_host/usb_host.h +++ b/include/usb_host/usb_host.h @@ -6,6 +6,7 @@ extern "C" { #endif /* Includes ------------------------------------------------------------------*/ +#include "usbh_def.h" #include "stm32f4xx.h" #include "stm32f4xx_hal.h" @@ -19,6 +20,8 @@ typedef enum { void MX_USB_HOST_Init(void); bool device_connected_at_startup(); +void USBH_UserProcess(USBH_HandleTypeDef *, uint8_t id); +void USBH_MSC_StealthReset(USBH_HandleTypeDef *, uint8_t lun); #ifdef __cplusplus } diff --git a/include/usb_host/usbh_async_diskio.hpp b/include/usb_host/usbh_async_diskio.hpp index 36a1776d61..de4695b24c 100644 --- a/include/usb_host/usbh_async_diskio.hpp +++ b/include/usb_host/usbh_async_diskio.hpp @@ -8,10 +8,12 @@ #include "usbh_msc.h" #endif -#define USBH_MSC_READAHEAD -// #ifdef _DEBUG -#define USBH_MSC_READAHEAD_STATISTICS +#if !PRINTER_IS_PRUSA_MINI /* MINI doesn't have enough RAM, sorry MINI */ + #define USBH_MSC_READAHEAD + // #ifdef _DEBUG + #define USBH_MSC_READAHEAD_STATISTICS // #endif +#endif /* !PRINTER_IS_PRUSA_MINI */ // Task handle of the process for executing the r/w MSC operations extern osThreadId USBH_MSC_WorkerTaskHandle; diff --git a/include/usb_host/usbh_conf.h b/include/usb_host/usbh_conf.h index 789cac7e75..f960ba60c4 100644 --- a/include/usb_host/usbh_conf.h +++ b/include/usb_host/usbh_conf.h @@ -38,7 +38,7 @@ extern "C" { #define USBH_MSC_TRANSFER_SIZE 512 -#define USBH_MSC_IO_TIMEOUT 10000U +#define USBH_MSC_IO_TIMEOUT (25 * 1000) /****************************************/ /* #define for FS and HS identification */ diff --git a/lib/Arduino_Core_Buddy/cores/arduino/USBSerial.cpp b/lib/Arduino_Core_Buddy/cores/arduino/USBSerial.cpp index b00a028c39..1584ca7578 100644 --- a/lib/Arduino_Core_Buddy/cores/arduino/USBSerial.cpp +++ b/lib/Arduino_Core_Buddy/cores/arduino/USBSerial.cpp @@ -1,5 +1,6 @@ #include "USBSerial.h" #include "tusb.h" +#include void USBSerial::enable() { enabled = true; @@ -65,27 +66,59 @@ void USBSerial::LineBufferAppend(char character) { } size_t USBSerial::write(uint8_t ch) { - int written = enabled ? tud_cdc_write_char(ch) : 1; + // its not possible to write to USB-CDC from ISR, so skip the write alltogether + if (xPortIsInsideInterrupt()) + return 0; - if (written) { - LineBufferAppend(ch); - if (ch == '\n') - flush(); + if (enabled) { + while (tud_cdc_write_char(ch) != 1) { + // TX is full, yield to lower-priority (which usb is part of) threads until ready + vTaskDelay(1); + } } - return written; + LineBufferAppend(ch); + if (ch == '\n') + flush(); + + return 1; +} + +static void cdc_write_sync(const uint8_t *buffer, size_t size) { + for (;;) { + size_t done = tud_cdc_write(buffer, size); + if (done == size) + break; + + // TX was full, yield to lower-priority (which usb is part of) threads until ready + buffer += done; + size -= done; + vTaskDelay(1); + } } size_t USBSerial::write(const uint8_t *buffer, size_t size) { - int written = enabled ? tud_cdc_write(buffer, size) : size; + // its not possible to write to USB-CDC from ISR, so skip the write alltogether + if (xPortIsInsideInterrupt()) + return 0; - for (int remaining = written; remaining > 0; remaining--, buffer++) { - LineBufferAppend(*buffer); - if (*buffer == '\n') + size_t beg = 0; + size_t end = 0; + + for (end = 0; end != size; ++end) { + uint8_t ch = buffer[end]; + LineBufferAppend(ch); + if (ch == '\n') { + // batch the last chunk up to the current \n + cdc_write_sync(buffer + beg, end - beg + 1); + beg = end + 1; flush(); + } } - return written; + // complete the cdc write + cdc_write_sync(buffer + beg, end - beg); + return size; } USBSerial::operator bool(void) { diff --git a/lib/Arduino_Core_Buddy/cores/arduino/WMath.cpp b/lib/Arduino_Core_Buddy/cores/arduino/WMath.cpp index 221f7044fe..a758b85d85 100644 --- a/lib/Arduino_Core_Buddy/cores/arduino/WMath.cpp +++ b/lib/Arduino_Core_Buddy/cores/arduino/WMath.cpp @@ -22,10 +22,10 @@ extern "C" { } #include "WMath.h" +#include + extern void randomSeed(uint32_t dwSeed) { - if (dwSeed != 0) { - srand(dwSeed); - } + // We're using HW RNG, there's no way to seed } extern long random(long howbig) { diff --git a/lib/Drivers/AddLIS2DH12.cmake b/lib/Drivers/AddLIS2DH12.cmake new file mode 100644 index 0000000000..342b18200f --- /dev/null +++ b/lib/Drivers/AddLIS2DH12.cmake @@ -0,0 +1,6 @@ +add_library( + LIS2DH12 + lis2dh12-pid/lis2dh12_reg.c +) + +target_include_directories(LIS2DH12 PUBLIC lis2dh12-pid) diff --git a/lib/Drivers/CMakeLists.txt b/lib/Drivers/CMakeLists.txt index 1695af7762..afb98fd9e8 100644 --- a/lib/Drivers/CMakeLists.txt +++ b/lib/Drivers/CMakeLists.txt @@ -2,3 +2,4 @@ add_subdirectory(CMSIS) add_subdirectory(cmsis_device_g0) include(AddStm32g0Hal.cmake) include(AddStm32f4Hal.cmake) +include(AddLIS2DH12.cmake) diff --git a/lib/Drivers/lis2dh12-pid/.gitrepo b/lib/Drivers/lis2dh12-pid/.gitrepo new file mode 100644 index 0000000000..45b0f705f4 --- /dev/null +++ b/lib/Drivers/lis2dh12-pid/.gitrepo @@ -0,0 +1,12 @@ +; DO NOT EDIT (unless you know what you are doing) +; +; This subdirectory is a git "subrepo", and this file is maintained by the +; git-subrepo command. See https://github.com/ingydotnet/git-subrepo#readme +; +[subrepo] + remote = https://github.com/STMicroelectronics/lis2dh12-pid.git + branch = master + commit = 32bf6c84e58e6e73cbbb28f288451ee16cb9e61b + parent = b3034a84308ae7d45f265538c08830a519cca890 + method = merge + cmdver = 0.4.6 diff --git a/lib/Drivers/lis2dh12-pid/CONTRIBUTING.md b/lib/Drivers/lis2dh12-pid/CONTRIBUTING.md new file mode 100644 index 0000000000..bb7d8a3b89 --- /dev/null +++ b/lib/Drivers/lis2dh12-pid/CONTRIBUTING.md @@ -0,0 +1,33 @@ +## Contributing guide +This document serves as a checklist before contributing to this repository. It includes links to additional information if topics are unclear to you. + +This guide mainly focuses on the proper use of Git. + +### 1. Before opening an issue +To report a bug/request please enter the issue in the right repository. + +Please check the following boxes before posting an issue: +- [ ] `Make sure you are using the latest commit (major releases are Tagged, but corrections are available as new commits).` +- [ ] `Make sure your issue is a question/feedback/suggestion RELATED TO the software provided in this repository.` Otherwise, it should be discussed on the [ST Community forum](https://community.st.com/s/). +- [ ] `Make sure your issue is not already reported/fixed on GitHub or discussed in a previous issue.` Please refer to the tab issue for the list of issues and pull-requests. Do not forget to browse to the **closed** issues. + +### 2. Posting the issue +When you have checked the previous boxes, you will find two templates (Bug Report or Other Issue) available in the **Issues** tab of the repository. + +### 3. Pull Requests +STMicroelectronics is happy to receive contributions from the community, based on an initial Contributor License Agreement (CLA) procedure. + +* If you are an individual writing original source code and you are sure **you own the intellectual property**, then you need to sign an Individual CLA (https://cla.st.com). +* If you work for a company that wants also to allow you to contribute with your work, your company needs to provide a Corporate CLA (https://cla.st.com) mentioning your GitHub account name. +* If you are not sure that a CLA (Individual or Corporate) has been signed for your GitHub account, you can check here (https://cla.st.com). + +Please note that: +* The Corporate CLA will always take precedence over the Individual CLA. +* One CLA submission is sufficient for any project proposed by STMicroelectronics. + +#### How to proceed + +* We recommend to engage first a communication through an issue, in order to present your proposal and just to confirm that it corresponds to a STMicroelectronics domain or scope. +* Then fork the project to your GitHub account to further develop your contribution. Please use the latest commit version. +* Please submit one Pull Request for one new feature or proposal. This will facilitate the analysis and the final merge if accepted. + diff --git a/lib/Drivers/lis2dh12-pid/LICENSE b/lib/Drivers/lis2dh12-pid/LICENSE new file mode 100644 index 0000000000..bc7d5adf95 --- /dev/null +++ b/lib/Drivers/lis2dh12-pid/LICENSE @@ -0,0 +1,29 @@ +BSD 3-Clause License + +Copyright (c) 2019, STMicroelectronics +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +* Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/lib/Drivers/lis2dh12-pid/README.md b/lib/Drivers/lis2dh12-pid/README.md new file mode 100644 index 0000000000..e9552aee2b --- /dev/null +++ b/lib/Drivers/lis2dh12-pid/README.md @@ -0,0 +1,59 @@ +# 1 - Introduction + +Sensor driver for LIS2DH12 sensor written in C programming language. This repository contains the sensor driver files (.h and .c) to be included, or linked directly as a git submodule, in your project. The driver is MISRA compliant and the documentation can be generated using the [Doxygen](http://www.doxygen.org/) tool. + +In order to `clone` the complete content of the repository folder, use the command: + +``` +git clone https://github.com/STMicroelectronics/LIS2DH12-PID/ +``` + +Some examples of driver usage can be found [here](https://github.com/STMicroelectronics/STMems_Standard_C_drivers). + +------ + + + +# 2 - Integration details + +The driver is platform-independent, you only need to define two functions for read and write transactions from the sensor hardware bus (ie. SPI or I²C). **A few devices integrate an extra bit in the communication protocol in order to enable multi read/write access, this bit must be managed in the read and write functions defined by the user.** Please refer to the read and write implementation in the [reference examples](https://github.com/STMicroelectronics/STMems_Standard_C_drivers/tree/master/lis2dh12_STdC/examples). + + + +### 2.a Source code integration + +- Include in your project the driver files of the sensor (.h and .c) +- Define in your code the read and write functions that use the I²C or SPI platform driver like the following: + +``` +/** Please note that is MANDATORY: return 0 -> no Error.**/ +int32_t platform_write(void *handle, uint8_t Reg, const uint8_t *Bufp, uint16_t len) +int32_t platform_read(void *handle, uint8_t Reg, uint8_t *Bufp, uint16_t len) +``` + +- Declare and initialize the structure of the device interface: + +``` +xxxxxxx_ctx_t dev_ctx; /** xxxxxxx is the used part number **/ +dev_ctx.write_reg = platform_write; +dev_ctx.read_reg = platform_read; +``` + +- If needed by the platform read and write functions, initialize the handle parameter: + +``` +dev_ctx.handle = &platform_handle; +``` + +Some integration examples can be found [here](https://github.com/STMicroelectronics/STMems_Standard_C_drivers/tree/master/lis2dh12_STdC/examples). + +### 2.b Required properties + +> - A standard C language compiler for the target MCU +> - A C library for the target MCU and the desired interface (ie. SPI, I²C) + +------ + +**More Information: [http://www.st.com](http://st.com/MEMS)** + +**Copyright (C) 2021 STMicroelectronics** \ No newline at end of file diff --git a/lib/Drivers/lis2dh12-pid/Release_Notes.html b/lib/Drivers/lis2dh12-pid/Release_Notes.html new file mode 100644 index 0000000000..33a1b207e7 --- /dev/null +++ b/lib/Drivers/lis2dh12-pid/Release_Notes.html @@ -0,0 +1,73 @@ + + + + + + + Release Notes for LIS2DH12 Component + + + + + + +
+
+
+

Release Notes for LIS2DH12 Component Driver

+

Copyright © 2021 STMicroelectronics
+

+ +
+

License

+

This software component is licensed by ST under BSD 3-Clause license, the “Licenseâ€. You may not use this component except in compliance with the License. You may obtain a copy of the License at:

+

BSD 3-Clause license

+

Purpose

+

This directory contains the LIS2DH12 component drivers.

+
+
+

Update history

+
+ +
+

Main changes

+

First release

+
    +
  • First official release [ref. DS v6.0]
  • +
+

+
+ +
+

Main changes

+
    +
  • Add __weak directive to read/write registers routines
  • +
  • Extend stmdev_ctx_t structure with mdelay callback
  • +
  • repo name changed adding ‘-pid’ extension
  • +
+

+
+
+
+
+
+
+
+

For complete documentation on LIS2DH12, visit: LIS2DH12

+
+

Info

+
+
+
+ + diff --git a/lib/Drivers/lis2dh12-pid/Release_Notes.md b/lib/Drivers/lis2dh12-pid/Release_Notes.md new file mode 100644 index 0000000000..ddf1bd12bb --- /dev/null +++ b/lib/Drivers/lis2dh12-pid/Release_Notes.md @@ -0,0 +1,77 @@ +--- +pagetitle: Release Notes for LIS2DH12 Component +lang: en +header-includes: +--- + +::: {.row} +::: {.col-sm-12 .col-lg-4} + +
+# Release Notes for LIS2DH12 Component Driver +Copyright © 2021 STMicroelectronics\ + +[![ST logo](_htmresc/st_logo_2020.png)](https://www.st.com){.logo} +
+ +# License + +This software component is licensed by ST under BSD 3-Clause license, the "License". +You may not use this component except in compliance with the License. You may obtain a copy of the License at: + +[BSD 3-Clause license](https://opensource.org/licenses/BSD-3-Clause) + +# Purpose + +This directory contains the LIS2DH12 component drivers. +::: + +::: {.col-sm-12 .col-lg-8} +# Update history + +::: {.collapse} + + +
+ +## Main changes + +### First release + +- First official release [ref. DS v6.0] + +## + +
+ + + +
+ +## Main changes + +- Add __weak directive to read/write registers routines +- Extend stmdev_ctx_t structure with mdelay callback +- repo name changed adding '-pid' extension + + +## + +
+::: + +::: +::: + +
+::: {.columns} +::: {.column width="95%"} +For complete documentation on LIS2DH12, +visit: +[LIS2DH12](https://www.st.com/content/st_com/en/products/mems-and-sensors/accelerometers/lis2dh12.html) +::: +::: {.column width="5%"} +Info +::: +::: +
diff --git a/lib/Drivers/lis2dh12-pid/_htmresc/favicon.png b/lib/Drivers/lis2dh12-pid/_htmresc/favicon.png new file mode 100644 index 0000000000000000000000000000000000000000..06713eec4974e141c6e9b4156d34e61e89f282ca GIT binary patch literal 4126 zcmV+(5aI8MP)ZIGU@QfPy~$kHP}Vz9c$a)g>fT6hB^OaK4>c|MGS0000HbW%=J|NsC0|NsC0 z|NsC0|NsC0041%NVgLXD!bwCyRCwCllie1CAP9sJ&9ooo{hxLjw5@YC+xxf~%TE}{ zNd5%935b--eKa7{Q8)vZ;eI6pGFH>rL)887WOA={e(b_&0g-g6to#Hm2B3vqWV>1u z@z7*I(bdWdx-Y=OT@|og)oZEgAbc7ep|Gf{$7j1Oa#T&r4>0xv(+}tR_4biWa z1Q-BfcsgeLIJPbT0000rV&neh&#Q1i z007~1e$oCcFS8neI|hJl{-P!B1ZZ9hpmq0)X0i`JwE&>$+E?>%_LC6RbVIkUx0b+_+BaR3cnT7Zv!AJxW zizFb)h!jyGOOZ85F;a?DAXP{m@;!0_IfqH8(HlgRxt7s3}k3K`kFu>>-2Q$QMFfPW!La{h336o>X zu_CMttHv6zR;&ZNiS=X8v3CR#fknUxHUxJ0uoBa_M6WNWeqIg~6QE69c9o#eyhGvpiOA@W-aonk<7r1(?fC{oI5N*U!4 zfg=2N-7=cNnjjOr{yriy6mMFgG#l znCF=fnQv8CDz++o6_Lscl}eQ+l^ZHARH>?_s@|##Rr6KLRFA1%Q+=*RRWnoLsR`7U zt5vFIcfW3@?wFpwUVxrVZ>QdQz32KIeJ}k~{cZZE^+ya? z2D1z#2HOnI7(B%_ac?{wFUQ;QQA1tBKtrWrm0_3Rgps+?Jfqb{jYbcQX~taRB;#$y zZN{S}1|}gUOHJxc?wV3fxuz+mJ4`!F$IZ;mqRrNsHJd##*D~ju=bP7?-?v~|cv>vB zsJ6IeNwVZxrdjT`yl#bBIa#GxRa#xMMy;K#CDyyGyQdMSxlWT#tDe?p!?5wT$+oGt z8L;Kp2HUQ-ZMJ=3XJQv;x5ci*?vuTfeY$;({XGW_huIFR9a(?@3)XSs8O^N5RyOM=TTmp(3=8^+zpz2r)C z^>JO{deZfso3oq3?Wo(Y?l$ge?uXo;%ru`Vo>?<<(8I_>;8Eq#KMS9gFl*neeosSB zfoHYnBQIkwkyowPu(zdms`p{<7e4kra-ZWq<2*OsGTvEV%s0Td$hXT+!*8Bnh2KMe zBmZRodjHV?r+_5^X9J0WL4jKW`}lf%A-|44I@@LTvf1rHjG(ze6+w@Jt%Bvjts!X0 z?2xS?_ve_-kiKB_KiJlZ$9G`c^=E@oNG)mWWaNo-3TIW8)$Hg0Ub-~8?KhvJ>$ z3*&nim@mj(aCxE5!t{lw7O5^0EIO7zOo&c6l<+|iDySBWCGrz@C5{St!X3hAA}`T4 z(TLbXTq+(;@<=L8dXnssyft|w#WSTW<++3>sgS%(4NTpeI-VAqb|7ssJvzNHgOZVu zaYCvgO_R1~>SyL=cFU|~g|hy|Zi}}s9+d~lYqOB71z9Z$wnC=pR9Yz4DhIM>Wmjgu z&56o6maCpC&F##y%G;1PobR9i?GnNg;gYtchD%p19a!eQtZF&3JaKv33gZ<8D~47E ztUS1iwkmDaPpj=$m#%)jCVEY4fnLGNg2A-`YwHVD3gv};>)hAvT~AmqS>Lr``i7kw zJ{5_It`yrBmlc25DBO7E8;5VoznR>Ww5hAaxn$2~(q`%A-YuS64wkBy=9dm`4cXeX z4c}I@?e+FW+b@^RDBHV(wnMq2zdX3SWv9u`%{xC-q*U}&`cyXV(%rRT*Z6MH?i+i& z_B8C(+grT%{XWUQ+f@NoP1R=AW&26{v-dx)iK^-Nmiuj8txj!m?Z*Ss1N{dh4z}01 z)YTo*JycSU)+_5r4#yw9{+;i4Ee$peRgIj+;v;ZGdF1K$3E%e~4LaI(jC-u%2h$&R z9cLXcYC@Xwnns&bn)_Q~Te?roKGD|d-g^8;+aC{{G(1^(O7m37Y1-+6)01cN&y1aw zoqc{T`P^XJqPBbIW6s}d4{z_f5Om?vMgNQEJG?v2T=KYd^0M3I6IZxbny)%vZR&LD zJpPl@Psh8QyPB@KTx+@RdcC!KX7}kEo;S|j^u2lU7XQ}Oo;f|;z4Ll+_r>@1-xl3| zawq-H%e&ckC+@AhPrP6BKT#_XdT7&;F71j}Joy zkC~6lh7E@6o;W@^IpRNZ{ptLtL(gQ-CY~4mqW;US7Zxvm_|@yz&e53Bp_lTPlfP|z zrTyx_>lv@x#=^!PzR7qqF<$gm`|ZJZ+;<)Cqu&ot2z=0000WV@Og>004R=004l4008;_004mL004C`008P>0026e000+nl3&F} z000F^NklQWRUVq~pvFslpiNq83Yr*1(ELa!!kppKfxQKEkPzz^I>0W)!71xam z(B64`)5a~kHf9SBOp*Wvo{xA*e4|Kv3g6TCo+fF8q^C$|g>#NlXyY$%lmkmCh$x1Z zFbJ_hiDG`37w>KPVB83d7E3>R@-M9$`|}|QFF}1qSk!nanPdVd3K38edo3y+D*=Uo zfOWCwj(F@GSjPG&B<0O;H!Zm0g>eDeK09{b@xB};mEy; z;Gp5H_Cr65qKM1uYIu6x&16!Ei=BHfJLe)1IUnFqc6d#D=ZVQmV9C73vy1=x$SK;s z=*CYZP+Ei1D5Vjl#u88v5dv#jId?iu)8mM}{mD`GcMXtAC5ap?ZoKr&iYuqTKHe$t zTR%R$ZZwxec?l+0r_LIVbe-mzH+D0*ZYsu4BE~~JA2A+AD?BAArO=g8ZfvXtU~o9c zZ(Bd-RFK5jh*DvM1v6^41HB@0K0qn7E8E&Xz1mk6hvmx?*|WB_H!dcO;5R$=<4b~s z5zr3N4zxlkMKOrDeny(PGpEM6^hGyc7lhg>MWtM!af*pn%&q_PxI(n^(-Zd{ICPAp z(WE@Zz5|EZyt{MEDy&l5$Cba^zU!9k&;Vs7lk$@o02LOwb#e2{#3%Cn2>kQF(RKUU z+tW!;FT0@d+TX^L;>@3RytlTP&ts$pqA}TwENBlg9?$-D zF9Sn4URZx8)hVBw<~NY=h3=so7{jEhG%Zc_0QBSvY~K4BS|W5MAem5XSb6m}VDN$f zy+b3n9qjIJoHM5pqYa`IPH9AIoM=!AE1Er>r|3E}#Jq-S)cTrfD&TZjAuN@+V}3mi zlhOce+q<8>Y?i93G=*Z3Web`ri!Q%p%LR*(bB?;|)B`&=J&ab0Z(UKpbzyZV5o*#& z0FLzzaI$v*-#WB)+`n>BoJ*1AwU0XSu;@w&Hu1WYXVR#!8itC%68CzMeiXhL#`9W$9J30NB-Wg!ex`hBlg9F5u@&o4>hd`TWPv z{r{JbyvQGZzbyvPS}zAifbhF49z~X|@9v|!=No>qsF|P~vf=g>7#%0yk<U?Ha8*Z4HW>#8w>z$A3 z>^uQlk;$a-6CQ(uc@RM)Cbss!xuPVl2@c1u-5tEUw}U8OfP_J+QYhfu$B<0Cj3xm7 c?*aZZ00ulYFs-m=@&Et;07*qoM6N<$f~=14i~s-t literal 0 HcmV?d00001 diff --git a/lib/Drivers/lis2dh12-pid/_htmresc/mini-st_2020.css b/lib/Drivers/lis2dh12-pid/_htmresc/mini-st_2020.css new file mode 100644 index 0000000000..986f4d4205 --- /dev/null +++ b/lib/Drivers/lis2dh12-pid/_htmresc/mini-st_2020.css @@ -0,0 +1,1711 @@ +@charset "UTF-8"; +/* + Flavor name: Custom (mini-custom) + Generated online - https://minicss.org/flavors + mini.css version: v3.0.1 +*/ +/* + Browsers resets and base typography. +*/ +/* Core module CSS variable definitions */ +:root { + --fore-color: #03234b; + --secondary-fore-color: #03234b; + --back-color: #ffffff; + --secondary-back-color: #ffffff; + --blockquote-color: #e6007e; + --pre-color: #e6007e; + --border-color: #3cb4e6; + --secondary-border-color: #3cb4e6; + --heading-ratio: 1.2; + --universal-margin: 0.5rem; + --universal-padding: 0.25rem; + --universal-border-radius: 0.075rem; + --background-margin: 1.5%; + --a-link-color: #3cb4e6; + --a-visited-color: #8c0078; } + +html { + font-size: 13.5px; } + +a, b, del, em, i, ins, q, span, strong, u { + font-size: 1em; } + +html, * { + font-family: -apple-system, BlinkMacSystemFont, Helvetica, arial, sans-serif; + line-height: 1.25; + -webkit-text-size-adjust: 100%; } + +* { + font-size: 1rem; } + +body { + margin: 0; + color: var(--fore-color); + @background: var(--back-color); + background: var(--back-color) linear-gradient(#ffd200, #ffd200) repeat-y left top; + background-size: var(--background-margin); + } + +details { + display: block; } + +summary { + display: list-item; } + +abbr[title] { + border-bottom: none; + text-decoration: underline dotted; } + +input { + overflow: visible; } + +img { + max-width: 100%; + height: auto; } + +h1, h2, h3, h4, h5, h6 { + line-height: 1.25; + margin: calc(1.5 * var(--universal-margin)) var(--universal-margin); + font-weight: 400; } + h1 small, h2 small, h3 small, h4 small, h5 small, h6 small { + color: var(--secondary-fore-color); + display: block; + margin-top: -0.25rem; } + +h1 { + font-size: calc(1rem * var(--heading-ratio) * var(--heading-ratio) * var(--heading-ratio)); } + +h2 { + font-size: calc(1rem * var(--heading-ratio) * var(--heading-ratio) ); + border-style: none none solid none ; + border-width: thin; + border-color: var(--border-color); } +h3 { + font-size: calc(1rem * var(--heading-ratio) ); } + +h4 { + font-size: calc(1rem * var(--heading-ratio)); } + +h5 { + font-size: 1rem; } + +h6 { + font-size: calc(1rem / var(--heading-ratio)); } + +p { + margin: var(--universal-margin); } + +ol, ul { + margin: var(--universal-margin); + padding-left: calc(3 * var(--universal-margin)); } + +b, strong { + font-weight: 700; } + +hr { + box-sizing: content-box; + border: 0; + line-height: 1.25em; + margin: var(--universal-margin); + height: 0.0714285714rem; + background: linear-gradient(to right, transparent, var(--border-color) 20%, var(--border-color) 80%, transparent); } + +blockquote { + display: block; + position: relative; + font-style: italic; + color: var(--secondary-fore-color); + margin: var(--universal-margin); + padding: calc(3 * var(--universal-padding)); + border: 0.0714285714rem solid var(--secondary-border-color); + border-left: 0.3rem solid var(--blockquote-color); + border-radius: 0 var(--universal-border-radius) var(--universal-border-radius) 0; } + blockquote:before { + position: absolute; + top: calc(0rem - var(--universal-padding)); + left: 0; + font-family: sans-serif; + font-size: 2rem; + font-weight: 800; + content: "\201c"; + color: var(--blockquote-color); } + blockquote[cite]:after { + font-style: normal; + font-size: 0.75em; + font-weight: 700; + content: "\a— " attr(cite); + white-space: pre; } + +code, kbd, pre, samp { + font-family: Menlo, Consolas, monospace; + font-size: 0.85em; } + +code { + background: var(--secondary-back-color); + border-radius: var(--universal-border-radius); + padding: calc(var(--universal-padding) / 4) calc(var(--universal-padding) / 2); } + +kbd { + background: var(--fore-color); + color: var(--back-color); + border-radius: var(--universal-border-radius); + padding: calc(var(--universal-padding) / 4) calc(var(--universal-padding) / 2); } + +pre { + overflow: auto; + background: var(--secondary-back-color); + padding: calc(1.5 * var(--universal-padding)); + margin: var(--universal-margin); + border: 0.0714285714rem solid var(--secondary-border-color); + border-left: 0.2857142857rem solid var(--pre-color); + border-radius: 0 var(--universal-border-radius) var(--universal-border-radius) 0; } + +sup, sub, code, kbd { + line-height: 0; + position: relative; + vertical-align: baseline; } + +small, sup, sub, figcaption { + font-size: 0.75em; } + +sup { + top: -0.5em; } + +sub { + bottom: -0.25em; } + +figure { + margin: var(--universal-margin); } + +figcaption { + color: var(--secondary-fore-color); } + +a { + text-decoration: none; } + a:link { + color: var(--a-link-color); } + a:visited { + color: var(--a-visited-color); } + a:hover, a:focus { + text-decoration: underline; } + +/* + Definitions for the grid system, cards and containers. +*/ +.container { + margin: 0 auto; + padding: 0 calc(1.5 * var(--universal-padding)); } + +.row { + box-sizing: border-box; + display: flex; + flex: 0 1 auto; + flex-flow: row wrap; + margin: 0 0 0 var(--background-margin); } + +.col-sm, +[class^='col-sm-'], +[class^='col-sm-offset-'], +.row[class*='cols-sm-'] > * { + box-sizing: border-box; + flex: 0 0 auto; + padding: 0 calc(var(--universal-padding) / 2); } + +.col-sm, +.row.cols-sm > * { + max-width: 100%; + flex-grow: 1; + flex-basis: 0; } + +.col-sm-1, +.row.cols-sm-1 > * { + max-width: 8.3333333333%; + flex-basis: 8.3333333333%; } + +.col-sm-offset-0 { + margin-left: 0; } + +.col-sm-2, +.row.cols-sm-2 > * { + max-width: 16.6666666667%; + flex-basis: 16.6666666667%; } + +.col-sm-offset-1 { + margin-left: 8.3333333333%; } + +.col-sm-3, +.row.cols-sm-3 > * { + max-width: 25%; + flex-basis: 25%; } + +.col-sm-offset-2 { + margin-left: 16.6666666667%; } + +.col-sm-4, +.row.cols-sm-4 > * { + max-width: 33.3333333333%; + flex-basis: 33.3333333333%; } + +.col-sm-offset-3 { + margin-left: 25%; } + +.col-sm-5, +.row.cols-sm-5 > * { + max-width: 41.6666666667%; + flex-basis: 41.6666666667%; } + +.col-sm-offset-4 { + margin-left: 33.3333333333%; } + +.col-sm-6, +.row.cols-sm-6 > * { + max-width: 50%; + flex-basis: 50%; } + +.col-sm-offset-5 { + margin-left: 41.6666666667%; } + +.col-sm-7, +.row.cols-sm-7 > * { + max-width: 58.3333333333%; + flex-basis: 58.3333333333%; } + +.col-sm-offset-6 { + margin-left: 50%; } + +.col-sm-8, +.row.cols-sm-8 > * { + max-width: 66.6666666667%; + flex-basis: 66.6666666667%; } + +.col-sm-offset-7 { + margin-left: 58.3333333333%; } + +.col-sm-9, +.row.cols-sm-9 > * { + max-width: 75%; + flex-basis: 75%; } + +.col-sm-offset-8 { + margin-left: 66.6666666667%; } + +.col-sm-10, +.row.cols-sm-10 > * { + max-width: 83.3333333333%; + flex-basis: 83.3333333333%; } + +.col-sm-offset-9 { + margin-left: 75%; } + +.col-sm-11, +.row.cols-sm-11 > * { + max-width: 91.6666666667%; + flex-basis: 91.6666666667%; } + +.col-sm-offset-10 { + margin-left: 83.3333333333%; } + +.col-sm-12, +.row.cols-sm-12 > * { + max-width: 100%; + flex-basis: 100%; } + +.col-sm-offset-11 { + margin-left: 91.6666666667%; } + +.col-sm-normal { + order: initial; } + +.col-sm-first { + order: -999; } + +.col-sm-last { + order: 999; } + +@media screen and (min-width: 500px) { + .col-md, + [class^='col-md-'], + [class^='col-md-offset-'], + .row[class*='cols-md-'] > * { + box-sizing: border-box; + flex: 0 0 auto; + padding: 0 calc(var(--universal-padding) / 2); } + + .col-md, + .row.cols-md > * { + max-width: 100%; + flex-grow: 1; + flex-basis: 0; } + + .col-md-1, + .row.cols-md-1 > * { + max-width: 8.3333333333%; + flex-basis: 8.3333333333%; } + + .col-md-offset-0 { + margin-left: 0; } + + .col-md-2, + .row.cols-md-2 > * { + max-width: 16.6666666667%; + flex-basis: 16.6666666667%; } + + .col-md-offset-1 { + margin-left: 8.3333333333%; } + + .col-md-3, + .row.cols-md-3 > * { + max-width: 25%; + flex-basis: 25%; } + + .col-md-offset-2 { + margin-left: 16.6666666667%; } + + .col-md-4, + .row.cols-md-4 > * { + max-width: 33.3333333333%; + flex-basis: 33.3333333333%; } + + .col-md-offset-3 { + margin-left: 25%; } + + .col-md-5, + .row.cols-md-5 > * { + max-width: 41.6666666667%; + flex-basis: 41.6666666667%; } + + .col-md-offset-4 { + margin-left: 33.3333333333%; } + + .col-md-6, + .row.cols-md-6 > * { + max-width: 50%; + flex-basis: 50%; } + + .col-md-offset-5 { + margin-left: 41.6666666667%; } + + .col-md-7, + .row.cols-md-7 > * { + max-width: 58.3333333333%; + flex-basis: 58.3333333333%; } + + .col-md-offset-6 { + margin-left: 50%; } + + .col-md-8, + .row.cols-md-8 > * { + max-width: 66.6666666667%; + flex-basis: 66.6666666667%; } + + .col-md-offset-7 { + margin-left: 58.3333333333%; } + + .col-md-9, + .row.cols-md-9 > * { + max-width: 75%; + flex-basis: 75%; } + + .col-md-offset-8 { + margin-left: 66.6666666667%; } + + .col-md-10, + .row.cols-md-10 > * { + max-width: 83.3333333333%; + flex-basis: 83.3333333333%; } + + .col-md-offset-9 { + margin-left: 75%; } + + .col-md-11, + .row.cols-md-11 > * { + max-width: 91.6666666667%; + flex-basis: 91.6666666667%; } + + .col-md-offset-10 { + margin-left: 83.3333333333%; } + + .col-md-12, + .row.cols-md-12 > * { + max-width: 100%; + flex-basis: 100%; } + + .col-md-offset-11 { + margin-left: 91.6666666667%; } + + .col-md-normal { + order: initial; } + + .col-md-first { + order: -999; } + + .col-md-last { + order: 999; } } +@media screen and (min-width: 1280px) { + .col-lg, + [class^='col-lg-'], + [class^='col-lg-offset-'], + .row[class*='cols-lg-'] > * { + box-sizing: border-box; + flex: 0 0 auto; + padding: 0 calc(var(--universal-padding) / 2); } + + .col-lg, + .row.cols-lg > * { + max-width: 100%; + flex-grow: 1; + flex-basis: 0; } + + .col-lg-1, + .row.cols-lg-1 > * { + max-width: 8.3333333333%; + flex-basis: 8.3333333333%; } + + .col-lg-offset-0 { + margin-left: 0; } + + .col-lg-2, + .row.cols-lg-2 > * { + max-width: 16.6666666667%; + flex-basis: 16.6666666667%; } + + .col-lg-offset-1 { + margin-left: 8.3333333333%; } + + .col-lg-3, + .row.cols-lg-3 > * { + max-width: 25%; + flex-basis: 25%; } + + .col-lg-offset-2 { + margin-left: 16.6666666667%; } + + .col-lg-4, + .row.cols-lg-4 > * { + max-width: 33.3333333333%; + flex-basis: 33.3333333333%; } + + .col-lg-offset-3 { + margin-left: 25%; } + + .col-lg-5, + .row.cols-lg-5 > * { + max-width: 41.6666666667%; + flex-basis: 41.6666666667%; } + + .col-lg-offset-4 { + margin-left: 33.3333333333%; } + + .col-lg-6, + .row.cols-lg-6 > * { + max-width: 50%; + flex-basis: 50%; } + + .col-lg-offset-5 { + margin-left: 41.6666666667%; } + + .col-lg-7, + .row.cols-lg-7 > * { + max-width: 58.3333333333%; + flex-basis: 58.3333333333%; } + + .col-lg-offset-6 { + margin-left: 50%; } + + .col-lg-8, + .row.cols-lg-8 > * { + max-width: 66.6666666667%; + flex-basis: 66.6666666667%; } + + .col-lg-offset-7 { + margin-left: 58.3333333333%; } + + .col-lg-9, + .row.cols-lg-9 > * { + max-width: 75%; + flex-basis: 75%; } + + .col-lg-offset-8 { + margin-left: 66.6666666667%; } + + .col-lg-10, + .row.cols-lg-10 > * { + max-width: 83.3333333333%; + flex-basis: 83.3333333333%; } + + .col-lg-offset-9 { + margin-left: 75%; } + + .col-lg-11, + .row.cols-lg-11 > * { + max-width: 91.6666666667%; + flex-basis: 91.6666666667%; } + + .col-lg-offset-10 { + margin-left: 83.3333333333%; } + + .col-lg-12, + .row.cols-lg-12 > * { + max-width: 100%; + flex-basis: 100%; } + + .col-lg-offset-11 { + margin-left: 91.6666666667%; } + + .col-lg-normal { + order: initial; } + + .col-lg-first { + order: -999; } + + .col-lg-last { + order: 999; } } +/* Card component CSS variable definitions */ +:root { + --card-back-color: #3cb4e6; + --card-fore-color: #03234b; + --card-border-color: #03234b; } + +.card { + display: flex; + flex-direction: column; + justify-content: space-between; + align-self: center; + position: relative; + width: 100%; + background: var(--card-back-color); + color: var(--card-fore-color); + border: 0.0714285714rem solid var(--card-border-color); + border-radius: var(--universal-border-radius); + margin: var(--universal-margin); + overflow: hidden; } + @media screen and (min-width: 320px) { + .card { + max-width: 320px; } } + .card > .sectione { + background: var(--card-back-color); + color: var(--card-fore-color); + box-sizing: border-box; + margin: 0; + border: 0; + border-radius: 0; + border-bottom: 0.0714285714rem solid var(--card-border-color); + padding: var(--universal-padding); + width: 100%; } + .card > .sectione.media { + height: 200px; + padding: 0; + -o-object-fit: cover; + object-fit: cover; } + .card > .sectione:last-child { + border-bottom: 0; } + +/* + Custom elements for card elements. +*/ +@media screen and (min-width: 240px) { + .card.small { + max-width: 240px; } } +@media screen and (min-width: 480px) { + .card.large { + max-width: 480px; } } +.card.fluid { + max-width: 100%; + width: auto; } + +.card.warning { + --card-back-color: #e5b8b7; + --card-fore-color: #3b234b; + --card-border-color: #8c0078; } + +.card.error { + --card-back-color: #464650; + --card-fore-color: #ffffff; + --card-border-color: #8c0078; } + +.card > .sectione.dark { + --card-back-color: #3b234b; + --card-fore-color: #ffffff; } + +.card > .sectione.double-padded { + padding: calc(1.5 * var(--universal-padding)); } + +/* + Definitions for forms and input elements. +*/ +/* Input_control module CSS variable definitions */ +:root { + --form-back-color: #ffe97f; + --form-fore-color: #03234b; + --form-border-color: #3cb4e6; + --input-back-color: #ffffff; + --input-fore-color: #03234b; + --input-border-color: #3cb4e6; + --input-focus-color: #0288d1; + --input-invalid-color: #d32f2f; + --button-back-color: #e2e2e2; + --button-hover-back-color: #dcdcdc; + --button-fore-color: #212121; + --button-border-color: transparent; + --button-hover-border-color: transparent; + --button-group-border-color: rgba(124, 124, 124, 0.54); } + +form { + background: var(--form-back-color); + color: var(--form-fore-color); + border: 0.0714285714rem solid var(--form-border-color); + border-radius: var(--universal-border-radius); + margin: var(--universal-margin); + padding: calc(2 * var(--universal-padding)) var(--universal-padding); } + +fieldset { + border: 0.0714285714rem solid var(--form-border-color); + border-radius: var(--universal-border-radius); + margin: calc(var(--universal-margin) / 4); + padding: var(--universal-padding); } + +legend { + box-sizing: border-box; + display: table; + max-width: 100%; + white-space: normal; + font-weight: 500; + padding: calc(var(--universal-padding) / 2); } + +label { + padding: calc(var(--universal-padding) / 2) var(--universal-padding); } + +.input-group { + display: inline-block; } + .input-group.fluid { + display: flex; + align-items: center; + justify-content: center; } + .input-group.fluid > input { + max-width: 100%; + flex-grow: 1; + flex-basis: 0px; } + @media screen and (max-width: 499px) { + .input-group.fluid { + align-items: stretch; + flex-direction: column; } } + .input-group.vertical { + display: flex; + align-items: stretch; + flex-direction: column; } + .input-group.vertical > input { + max-width: 100%; + flex-grow: 1; + flex-basis: 0px; } + +[type="number"]::-webkit-inner-spin-button, [type="number"]::-webkit-outer-spin-button { + height: auto; } + +[type="search"] { + -webkit-appearance: textfield; + outline-offset: -2px; } + +[type="search"]::-webkit-search-cancel-button, +[type="search"]::-webkit-search-decoration { + -webkit-appearance: none; } + +input:not([type]), [type="text"], [type="email"], [type="number"], [type="search"], +[type="password"], [type="url"], [type="tel"], [type="checkbox"], [type="radio"], textarea, select { + box-sizing: border-box; + background: var(--input-back-color); + color: var(--input-fore-color); + border: 0.0714285714rem solid var(--input-border-color); + border-radius: var(--universal-border-radius); + margin: calc(var(--universal-margin) / 2); + padding: var(--universal-padding) calc(1.5 * var(--universal-padding)); } + +input:not([type="button"]):not([type="submit"]):not([type="reset"]):hover, input:not([type="button"]):not([type="submit"]):not([type="reset"]):focus, textarea:hover, textarea:focus, select:hover, select:focus { + border-color: var(--input-focus-color); + box-shadow: none; } +input:not([type="button"]):not([type="submit"]):not([type="reset"]):invalid, input:not([type="button"]):not([type="submit"]):not([type="reset"]):focus:invalid, textarea:invalid, textarea:focus:invalid, select:invalid, select:focus:invalid { + border-color: var(--input-invalid-color); + box-shadow: none; } +input:not([type="button"]):not([type="submit"]):not([type="reset"])[readonly], textarea[readonly], select[readonly] { + background: var(--secondary-back-color); } + +select { + max-width: 100%; } + +option { + overflow: hidden; + text-overflow: ellipsis; } + +[type="checkbox"], [type="radio"] { + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; + position: relative; + height: calc(1rem + var(--universal-padding) / 2); + width: calc(1rem + var(--universal-padding) / 2); + vertical-align: text-bottom; + padding: 0; + flex-basis: calc(1rem + var(--universal-padding) / 2) !important; + flex-grow: 0 !important; } + [type="checkbox"]:checked:before, [type="radio"]:checked:before { + position: absolute; } + +[type="checkbox"]:checked:before { + content: '\2713'; + font-family: sans-serif; + font-size: calc(1rem + var(--universal-padding) / 2); + top: calc(0rem - var(--universal-padding)); + left: calc(var(--universal-padding) / 4); } + +[type="radio"] { + border-radius: 100%; } + [type="radio"]:checked:before { + border-radius: 100%; + content: ''; + top: calc(0.0714285714rem + var(--universal-padding) / 2); + left: calc(0.0714285714rem + var(--universal-padding) / 2); + background: var(--input-fore-color); + width: 0.5rem; + height: 0.5rem; } + +:placeholder-shown { + color: var(--input-fore-color); } + +::-ms-placeholder { + color: var(--input-fore-color); + opacity: 0.54; } + +button::-moz-focus-inner, [type="button"]::-moz-focus-inner, [type="reset"]::-moz-focus-inner, [type="submit"]::-moz-focus-inner { + border-style: none; + padding: 0; } + +button, html [type="button"], [type="reset"], [type="submit"] { + -webkit-appearance: button; } + +button { + overflow: visible; + text-transform: none; } + +button, [type="button"], [type="submit"], [type="reset"], +a.button, label.button, .button, +a[role="button"], label[role="button"], [role="button"] { + display: inline-block; + background: var(--button-back-color); + color: var(--button-fore-color); + border: 0.0714285714rem solid var(--button-border-color); + border-radius: var(--universal-border-radius); + padding: var(--universal-padding) calc(1.5 * var(--universal-padding)); + margin: var(--universal-margin); + text-decoration: none; + cursor: pointer; + transition: background 0.3s; } + button:hover, button:focus, [type="button"]:hover, [type="button"]:focus, [type="submit"]:hover, [type="submit"]:focus, [type="reset"]:hover, [type="reset"]:focus, + a.button:hover, + a.button:focus, label.button:hover, label.button:focus, .button:hover, .button:focus, + a[role="button"]:hover, + a[role="button"]:focus, label[role="button"]:hover, label[role="button"]:focus, [role="button"]:hover, [role="button"]:focus { + background: var(--button-hover-back-color); + border-color: var(--button-hover-border-color); } + +input:disabled, input[disabled], textarea:disabled, textarea[disabled], select:disabled, select[disabled], button:disabled, button[disabled], .button:disabled, .button[disabled], [role="button"]:disabled, [role="button"][disabled] { + cursor: not-allowed; + opacity: 0.75; } + +.button-group { + display: flex; + border: 0.0714285714rem solid var(--button-group-border-color); + border-radius: var(--universal-border-radius); + margin: var(--universal-margin); } + .button-group > button, .button-group [type="button"], .button-group > [type="submit"], .button-group > [type="reset"], .button-group > .button, .button-group > [role="button"] { + margin: 0; + max-width: 100%; + flex: 1 1 auto; + text-align: center; + border: 0; + border-radius: 0; + box-shadow: none; } + .button-group > :not(:first-child) { + border-left: 0.0714285714rem solid var(--button-group-border-color); } + @media screen and (max-width: 499px) { + .button-group { + flex-direction: column; } + .button-group > :not(:first-child) { + border: 0; + border-top: 0.0714285714rem solid var(--button-group-border-color); } } + +/* + Custom elements for forms and input elements. +*/ +button.primary, [type="button"].primary, [type="submit"].primary, [type="reset"].primary, .button.primary, [role="button"].primary { + --button-back-color: #1976d2; + --button-fore-color: #f8f8f8; } + button.primary:hover, button.primary:focus, [type="button"].primary:hover, [type="button"].primary:focus, [type="submit"].primary:hover, [type="submit"].primary:focus, [type="reset"].primary:hover, [type="reset"].primary:focus, .button.primary:hover, .button.primary:focus, [role="button"].primary:hover, [role="button"].primary:focus { + --button-hover-back-color: #1565c0; } + +button.secondary, [type="button"].secondary, [type="submit"].secondary, [type="reset"].secondary, .button.secondary, [role="button"].secondary { + --button-back-color: #d32f2f; + --button-fore-color: #f8f8f8; } + button.secondary:hover, button.secondary:focus, [type="button"].secondary:hover, [type="button"].secondary:focus, [type="submit"].secondary:hover, [type="submit"].secondary:focus, [type="reset"].secondary:hover, [type="reset"].secondary:focus, .button.secondary:hover, .button.secondary:focus, [role="button"].secondary:hover, [role="button"].secondary:focus { + --button-hover-back-color: #c62828; } + +button.tertiary, [type="button"].tertiary, [type="submit"].tertiary, [type="reset"].tertiary, .button.tertiary, [role="button"].tertiary { + --button-back-color: #308732; + --button-fore-color: #f8f8f8; } + button.tertiary:hover, button.tertiary:focus, [type="button"].tertiary:hover, [type="button"].tertiary:focus, [type="submit"].tertiary:hover, [type="submit"].tertiary:focus, [type="reset"].tertiary:hover, [type="reset"].tertiary:focus, .button.tertiary:hover, .button.tertiary:focus, [role="button"].tertiary:hover, [role="button"].tertiary:focus { + --button-hover-back-color: #277529; } + +button.inverse, [type="button"].inverse, [type="submit"].inverse, [type="reset"].inverse, .button.inverse, [role="button"].inverse { + --button-back-color: #212121; + --button-fore-color: #f8f8f8; } + button.inverse:hover, button.inverse:focus, [type="button"].inverse:hover, [type="button"].inverse:focus, [type="submit"].inverse:hover, [type="submit"].inverse:focus, [type="reset"].inverse:hover, [type="reset"].inverse:focus, .button.inverse:hover, .button.inverse:focus, [role="button"].inverse:hover, [role="button"].inverse:focus { + --button-hover-back-color: #111; } + +button.small, [type="button"].small, [type="submit"].small, [type="reset"].small, .button.small, [role="button"].small { + padding: calc(0.5 * var(--universal-padding)) calc(0.75 * var(--universal-padding)); + margin: var(--universal-margin); } + +button.large, [type="button"].large, [type="submit"].large, [type="reset"].large, .button.large, [role="button"].large { + padding: calc(1.5 * var(--universal-padding)) calc(2 * var(--universal-padding)); + margin: var(--universal-margin); } + +/* + Definitions for navigation elements. +*/ +/* Navigation module CSS variable definitions */ +:root { + --header-back-color: #03234b; + --header-hover-back-color: #ffd200; + --header-fore-color: #ffffff; + --header-border-color: #3cb4e6; + --nav-back-color: #ffffff; + --nav-hover-back-color: #ffe97f; + --nav-fore-color: #e6007e; + --nav-border-color: #3cb4e6; + --nav-link-color: #3cb4e6; + --footer-fore-color: #ffffff; + --footer-back-color: #03234b; + --footer-border-color: #3cb4e6; + --footer-link-color: #3cb4e6; + --drawer-back-color: #ffffff; + --drawer-hover-back-color: #ffe97f; + --drawer-border-color: #3cb4e6; + --drawer-close-color: #e6007e; } + +header { + height: 2.75rem; + background: var(--header-back-color); + color: var(--header-fore-color); + border-bottom: 0.0714285714rem solid var(--header-border-color); + padding: calc(var(--universal-padding) / 4) 0; + white-space: nowrap; + overflow-x: auto; + overflow-y: hidden; } + header.row { + box-sizing: content-box; } + header .logo { + color: var(--header-fore-color); + font-size: 1.75rem; + padding: var(--universal-padding) calc(2 * var(--universal-padding)); + text-decoration: none; } + header button, header [type="button"], header .button, header [role="button"] { + box-sizing: border-box; + position: relative; + top: calc(0rem - var(--universal-padding) / 4); + height: calc(3.1875rem + var(--universal-padding) / 2); + background: var(--header-back-color); + line-height: calc(3.1875rem - var(--universal-padding) * 1.5); + text-align: center; + color: var(--header-fore-color); + border: 0; + border-radius: 0; + margin: 0; + text-transform: uppercase; } + header button:hover, header button:focus, header [type="button"]:hover, header [type="button"]:focus, header .button:hover, header .button:focus, header [role="button"]:hover, header [role="button"]:focus { + background: var(--header-hover-back-color); } + +nav { + background: var(--nav-back-color); + color: var(--nav-fore-color); + border: 0.0714285714rem solid var(--nav-border-color); + border-radius: var(--universal-border-radius); + margin: var(--universal-margin); } + nav * { + padding: var(--universal-padding) calc(1.5 * var(--universal-padding)); } + nav a, nav a:visited { + display: block; + color: var(--nav-link-color); + border-radius: var(--universal-border-radius); + transition: background 0.3s; } + nav a:hover, nav a:focus, nav a:visited:hover, nav a:visited:focus { + text-decoration: none; + background: var(--nav-hover-back-color); } + nav .sublink-1 { + position: relative; + margin-left: calc(2 * var(--universal-padding)); } + nav .sublink-1:before { + position: absolute; + left: calc(var(--universal-padding) - 1 * var(--universal-padding)); + top: -0.0714285714rem; + content: ''; + height: 100%; + border: 0.0714285714rem solid var(--nav-border-color); + border-left: 0; } + nav .sublink-2 { + position: relative; + margin-left: calc(4 * var(--universal-padding)); } + nav .sublink-2:before { + position: absolute; + left: calc(var(--universal-padding) - 3 * var(--universal-padding)); + top: -0.0714285714rem; + content: ''; + height: 100%; + border: 0.0714285714rem solid var(--nav-border-color); + border-left: 0; } + +footer { + background: var(--footer-back-color); + color: var(--footer-fore-color); + border-top: 0.0714285714rem solid var(--footer-border-color); + padding: calc(2 * var(--universal-padding)) var(--universal-padding); + font-size: 0.875rem; } + footer a, footer a:visited { + color: var(--footer-link-color); } + +header.sticky { + position: -webkit-sticky; + position: sticky; + z-index: 1101; + top: 0; } + +footer.sticky { + position: -webkit-sticky; + position: sticky; + z-index: 1101; + bottom: 0; } + +.drawer-toggle:before { + display: inline-block; + position: relative; + vertical-align: bottom; + content: '\00a0\2261\00a0'; + font-family: sans-serif; + font-size: 1.5em; } +@media screen and (min-width: 500px) { + .drawer-toggle:not(.persistent) { + display: none; } } + +[type="checkbox"].drawer { + height: 1px; + width: 1px; + margin: -1px; + overflow: hidden; + position: absolute; + clip: rect(0 0 0 0); + -webkit-clip-path: inset(100%); + clip-path: inset(100%); } + [type="checkbox"].drawer + * { + display: block; + box-sizing: border-box; + position: fixed; + top: 0; + width: 320px; + height: 100vh; + overflow-y: auto; + background: var(--drawer-back-color); + border: 0.0714285714rem solid var(--drawer-border-color); + border-radius: 0; + margin: 0; + z-index: 1110; + right: -320px; + transition: right 0.3s; } + [type="checkbox"].drawer + * .drawer-close { + position: absolute; + top: var(--universal-margin); + right: var(--universal-margin); + z-index: 1111; + width: 2rem; + height: 2rem; + border-radius: var(--universal-border-radius); + padding: var(--universal-padding); + margin: 0; + cursor: pointer; + transition: background 0.3s; } + [type="checkbox"].drawer + * .drawer-close:before { + display: block; + content: '\00D7'; + color: var(--drawer-close-color); + position: relative; + font-family: sans-serif; + font-size: 2rem; + line-height: 1; + text-align: center; } + [type="checkbox"].drawer + * .drawer-close:hover, [type="checkbox"].drawer + * .drawer-close:focus { + background: var(--drawer-hover-back-color); } + @media screen and (max-width: 320px) { + [type="checkbox"].drawer + * { + width: 100%; } } + [type="checkbox"].drawer:checked + * { + right: 0; } + @media screen and (min-width: 500px) { + [type="checkbox"].drawer:not(.persistent) + * { + position: static; + height: 100%; + z-index: 1100; } + [type="checkbox"].drawer:not(.persistent) + * .drawer-close { + display: none; } } + +/* + Definitions for the responsive table component. +*/ +/* Table module CSS variable definitions. */ +:root { + --table-border-color: #03234b; + --table-border-separator-color: #03234b; + --table-head-back-color: #03234b; + --table-head-fore-color: #ffffff; + --table-body-back-color: #ffffff; + --table-body-fore-color: #03234b; + --table-body-alt-back-color: #f4f4f4; } + +table { + border-collapse: separate; + border-spacing: 0; + margin: 0; + display: flex; + flex: 0 1 auto; + flex-flow: row wrap; + padding: var(--universal-padding); + padding-top: 0; } + table caption { + font-size: 1rem; + margin: calc(2 * var(--universal-margin)) 0; + max-width: 100%; + flex: 0 0 100%; } + table thead, table tbody { + display: flex; + flex-flow: row wrap; + border: 0.0714285714rem solid var(--table-border-color); } + table thead { + z-index: 999; + border-radius: var(--universal-border-radius) var(--universal-border-radius) 0 0; + border-bottom: 0.0714285714rem solid var(--table-border-separator-color); } + table tbody { + border-top: 0; + margin-top: calc(0 - var(--universal-margin)); + border-radius: 0 0 var(--universal-border-radius) var(--universal-border-radius); } + table tr { + display: flex; + padding: 0; } + table th, table td { + padding: calc(0.5 * var(--universal-padding)); + font-size: 0.9rem; } + table th { + text-align: left; + background: var(--table-head-back-color); + color: var(--table-head-fore-color); } + table td { + background: var(--table-body-back-color); + color: var(--table-body-fore-color); + border-top: 0.0714285714rem solid var(--table-border-color); } + +table:not(.horizontal) { + overflow: auto; + max-height: 100%; } + table:not(.horizontal) thead, table:not(.horizontal) tbody { + max-width: 100%; + flex: 0 0 100%; } + table:not(.horizontal) tr { + flex-flow: row wrap; + flex: 0 0 100%; } + table:not(.horizontal) th, table:not(.horizontal) td { + flex: 1 0 0%; + overflow: hidden; + text-overflow: ellipsis; } + table:not(.horizontal) thead { + position: sticky; + top: 0; } + table:not(.horizontal) tbody tr:first-child td { + border-top: 0; } + +table.horizontal { + border: 0; } + table.horizontal thead, table.horizontal tbody { + border: 0; + flex: .2 0 0; + flex-flow: row nowrap; } + table.horizontal tbody { + overflow: auto; + justify-content: space-between; + flex: .8 0 0; + margin-left: 0; + padding-bottom: calc(var(--universal-padding) / 4); } + table.horizontal tr { + flex-direction: column; + flex: 1 0 auto; } + table.horizontal th, table.horizontal td { + width: auto; + border: 0; + border-bottom: 0.0714285714rem solid var(--table-border-color); } + table.horizontal th:not(:first-child), table.horizontal td:not(:first-child) { + border-top: 0; } + table.horizontal th { + text-align: right; + border-left: 0.0714285714rem solid var(--table-border-color); + border-right: 0.0714285714rem solid var(--table-border-separator-color); } + table.horizontal thead tr:first-child { + padding-left: 0; } + table.horizontal th:first-child, table.horizontal td:first-child { + border-top: 0.0714285714rem solid var(--table-border-color); } + table.horizontal tbody tr:last-child td { + border-right: 0.0714285714rem solid var(--table-border-color); } + table.horizontal tbody tr:last-child td:first-child { + border-top-right-radius: 0.25rem; } + table.horizontal tbody tr:last-child td:last-child { + border-bottom-right-radius: 0.25rem; } + table.horizontal thead tr:first-child th:first-child { + border-top-left-radius: 0.25rem; } + table.horizontal thead tr:first-child th:last-child { + border-bottom-left-radius: 0.25rem; } + +@media screen and (max-width: 499px) { + table, table.horizontal { + border-collapse: collapse; + border: 0; + width: 100%; + display: table; } + table thead, table th, table.horizontal thead, table.horizontal th { + border: 0; + height: 1px; + width: 1px; + margin: -1px; + overflow: hidden; + padding: 0; + position: absolute; + clip: rect(0 0 0 0); + -webkit-clip-path: inset(100%); + clip-path: inset(100%); } + table tbody, table.horizontal tbody { + border: 0; + display: table-row-group; } + table tr, table.horizontal tr { + display: block; + border: 0.0714285714rem solid var(--table-border-color); + border-radius: var(--universal-border-radius); + background: #ffffff; + padding: var(--universal-padding); + margin: var(--universal-margin); + margin-bottom: calc(1 * var(--universal-margin)); } + table th, table td, table.horizontal th, table.horizontal td { + width: auto; } + table td, table.horizontal td { + display: block; + border: 0; + text-align: right; } + table td:before, table.horizontal td:before { + content: attr(data-label); + float: left; + font-weight: 600; } + table th:first-child, table td:first-child, table.horizontal th:first-child, table.horizontal td:first-child { + border-top: 0; } + table tbody tr:last-child td, table.horizontal tbody tr:last-child td { + border-right: 0; } } +table tr:nth-of-type(2n) > td { + background: var(--table-body-alt-back-color); } + +@media screen and (max-width: 500px) { + table tr:nth-of-type(2n) { + background: var(--table-body-alt-back-color); } } +:root { + --table-body-hover-back-color: #90caf9; } + +table.hoverable tr:hover, table.hoverable tr:hover > td, table.hoverable tr:focus, table.hoverable tr:focus > td { + background: var(--table-body-hover-back-color); } + +@media screen and (max-width: 500px) { + table.hoverable tr:hover, table.hoverable tr:hover > td, table.hoverable tr:focus, table.hoverable tr:focus > td { + background: var(--table-body-hover-back-color); } } +/* + Definitions for contextual background elements, toasts and tooltips. +*/ +/* Contextual module CSS variable definitions */ +:root { + --mark-back-color: #3cb4e6; + --mark-fore-color: #ffffff; } + +mark { + background: var(--mark-back-color); + color: var(--mark-fore-color); + font-size: 0.95em; + line-height: 1em; + border-radius: var(--universal-border-radius); + padding: calc(var(--universal-padding) / 4) var(--universal-padding); } + mark.inline-block { + display: inline-block; + font-size: 1em; + line-height: 1.4; + padding: calc(var(--universal-padding) / 2) var(--universal-padding); } + +:root { + --toast-back-color: #424242; + --toast-fore-color: #fafafa; } + +.toast { + position: fixed; + bottom: calc(var(--universal-margin) * 3); + left: 50%; + transform: translate(-50%, -50%); + z-index: 1111; + color: var(--toast-fore-color); + background: var(--toast-back-color); + border-radius: calc(var(--universal-border-radius) * 16); + padding: var(--universal-padding) calc(var(--universal-padding) * 3); } + +:root { + --tooltip-back-color: #212121; + --tooltip-fore-color: #fafafa; } + +.tooltip { + position: relative; + display: inline-block; } + .tooltip:before, .tooltip:after { + position: absolute; + opacity: 0; + clip: rect(0 0 0 0); + -webkit-clip-path: inset(100%); + clip-path: inset(100%); + transition: all 0.3s; + z-index: 1010; + left: 50%; } + .tooltip:not(.bottom):before, .tooltip:not(.bottom):after { + bottom: 75%; } + .tooltip.bottom:before, .tooltip.bottom:after { + top: 75%; } + .tooltip:hover:before, .tooltip:hover:after, .tooltip:focus:before, .tooltip:focus:after { + opacity: 1; + clip: auto; + -webkit-clip-path: inset(0%); + clip-path: inset(0%); } + .tooltip:before { + content: ''; + background: transparent; + border: var(--universal-margin) solid transparent; + left: calc(50% - var(--universal-margin)); } + .tooltip:not(.bottom):before { + border-top-color: #212121; } + .tooltip.bottom:before { + border-bottom-color: #212121; } + .tooltip:after { + content: attr(aria-label); + color: var(--tooltip-fore-color); + background: var(--tooltip-back-color); + border-radius: var(--universal-border-radius); + padding: var(--universal-padding); + white-space: nowrap; + transform: translateX(-50%); } + .tooltip:not(.bottom):after { + margin-bottom: calc(2 * var(--universal-margin)); } + .tooltip.bottom:after { + margin-top: calc(2 * var(--universal-margin)); } + +:root { + --modal-overlay-color: rgba(0, 0, 0, 0.45); + --modal-close-color: #e6007e; + --modal-close-hover-color: #ffe97f; } + +[type="checkbox"].modal { + height: 1px; + width: 1px; + margin: -1px; + overflow: hidden; + position: absolute; + clip: rect(0 0 0 0); + -webkit-clip-path: inset(100%); + clip-path: inset(100%); } + [type="checkbox"].modal + div { + position: fixed; + top: 0; + left: 0; + display: none; + width: 100vw; + height: 100vh; + background: var(--modal-overlay-color); } + [type="checkbox"].modal + div .card { + margin: 0 auto; + max-height: 50vh; + overflow: auto; } + [type="checkbox"].modal + div .card .modal-close { + position: absolute; + top: 0; + right: 0; + width: 1.75rem; + height: 1.75rem; + border-radius: var(--universal-border-radius); + padding: var(--universal-padding); + margin: 0; + cursor: pointer; + transition: background 0.3s; } + [type="checkbox"].modal + div .card .modal-close:before { + display: block; + content: '\00D7'; + color: var(--modal-close-color); + position: relative; + font-family: sans-serif; + font-size: 1.75rem; + line-height: 1; + text-align: center; } + [type="checkbox"].modal + div .card .modal-close:hover, [type="checkbox"].modal + div .card .modal-close:focus { + background: var(--modal-close-hover-color); } + [type="checkbox"].modal:checked + div { + display: flex; + flex: 0 1 auto; + z-index: 1200; } + [type="checkbox"].modal:checked + div .card .modal-close { + z-index: 1211; } + +:root { + --collapse-label-back-color: #03234b; + --collapse-label-fore-color: #ffffff; + --collapse-label-hover-back-color: #3cb4e6; + --collapse-selected-label-back-color: #3cb4e6; + --collapse-border-color: var(--collapse-label-back-color); + --collapse-selected-border-color: #ceecf8; + --collapse-content-back-color: #ffffff; + --collapse-selected-label-border-color: #3cb4e6; } + +.collapse { + width: calc(100% - 2 * var(--universal-margin)); + opacity: 1; + display: flex; + flex-direction: column; + margin: var(--universal-margin); + border-radius: var(--universal-border-radius); } + .collapse > [type="radio"], .collapse > [type="checkbox"] { + height: 1px; + width: 1px; + margin: -1px; + overflow: hidden; + position: absolute; + clip: rect(0 0 0 0); + -webkit-clip-path: inset(100%); + clip-path: inset(100%); } + .collapse > label { + flex-grow: 1; + display: inline-block; + height: 1.25rem; + cursor: pointer; + transition: background 0.2s; + color: var(--collapse-label-fore-color); + background: var(--collapse-label-back-color); + border: 0.0714285714rem solid var(--collapse-selected-border-color); + padding: calc(1.25 * var(--universal-padding)); } + .collapse > label:hover, .collapse > label:focus { + background: var(--collapse-label-hover-back-color); } + .collapse > label + div { + flex-basis: auto; + height: 1px; + width: 1px; + margin: -1px; + overflow: hidden; + position: absolute; + clip: rect(0 0 0 0); + -webkit-clip-path: inset(100%); + clip-path: inset(100%); + transition: max-height 0.3s; + max-height: 1px; } + .collapse > :checked + label { + background: var(--collapse-selected-label-back-color); + border-color: var(--collapse-selected-label-border-color); } + .collapse > :checked + label + div { + box-sizing: border-box; + position: relative; + width: 100%; + height: auto; + overflow: auto; + margin: 0; + background: var(--collapse-content-back-color); + border: 0.0714285714rem solid var(--collapse-selected-border-color); + border-top: 0; + padding: var(--universal-padding); + clip: auto; + -webkit-clip-path: inset(0%); + clip-path: inset(0%); + max-height: 100%; } + .collapse > label:not(:first-of-type) { + border-top: 0; } + .collapse > label:first-of-type { + border-radius: var(--universal-border-radius) var(--universal-border-radius) 0 0; } + .collapse > label:last-of-type:not(:first-of-type) { + border-radius: 0 0 var(--universal-border-radius) var(--universal-border-radius); } + .collapse > label:last-of-type:first-of-type { + border-radius: var(--universal-border-radius); } + .collapse > :checked:last-of-type:not(:first-of-type) + label { + border-radius: 0; } + .collapse > :checked:last-of-type + label + div { + border-radius: 0 0 var(--universal-border-radius) var(--universal-border-radius); } + +/* + Custom elements for contextual background elements, toasts and tooltips. +*/ +mark.tertiary { + --mark-back-color: #3cb4e6; } + +mark.tag { + padding: calc(var(--universal-padding)/2) var(--universal-padding); + border-radius: 1em; } + +/* + Definitions for progress elements and spinners. +*/ +/* Progress module CSS variable definitions */ +:root { + --progress-back-color: #3cb4e6; + --progress-fore-color: #555; } + +progress { + display: block; + vertical-align: baseline; + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; + height: 0.75rem; + width: calc(100% - 2 * var(--universal-margin)); + margin: var(--universal-margin); + border: 0; + border-radius: calc(2 * var(--universal-border-radius)); + background: var(--progress-back-color); + color: var(--progress-fore-color); } + progress::-webkit-progress-value { + background: var(--progress-fore-color); + border-top-left-radius: calc(2 * var(--universal-border-radius)); + border-bottom-left-radius: calc(2 * var(--universal-border-radius)); } + progress::-webkit-progress-bar { + background: var(--progress-back-color); } + progress::-moz-progress-bar { + background: var(--progress-fore-color); + border-top-left-radius: calc(2 * var(--universal-border-radius)); + border-bottom-left-radius: calc(2 * var(--universal-border-radius)); } + progress[value="1000"]::-webkit-progress-value { + border-radius: calc(2 * var(--universal-border-radius)); } + progress[value="1000"]::-moz-progress-bar { + border-radius: calc(2 * var(--universal-border-radius)); } + progress.inline { + display: inline-block; + vertical-align: middle; + width: 60%; } + +:root { + --spinner-back-color: #ddd; + --spinner-fore-color: #555; } + +@keyframes spinner-donut-anim { + 0% { + transform: rotate(0deg); } + 100% { + transform: rotate(360deg); } } +.spinner { + display: inline-block; + margin: var(--universal-margin); + border: 0.25rem solid var(--spinner-back-color); + border-left: 0.25rem solid var(--spinner-fore-color); + border-radius: 50%; + width: 1.25rem; + height: 1.25rem; + animation: spinner-donut-anim 1.2s linear infinite; } + +/* + Custom elements for progress bars and spinners. +*/ +progress.primary { + --progress-fore-color: #1976d2; } + +progress.secondary { + --progress-fore-color: #d32f2f; } + +progress.tertiary { + --progress-fore-color: #308732; } + +.spinner.primary { + --spinner-fore-color: #1976d2; } + +.spinner.secondary { + --spinner-fore-color: #d32f2f; } + +.spinner.tertiary { + --spinner-fore-color: #308732; } + +/* + Definitions for icons - powered by Feather (https://feathericons.com/). +*/ +span[class^='icon-'] { + display: inline-block; + height: 1em; + width: 1em; + vertical-align: -0.125em; + background-size: contain; + margin: 0 calc(var(--universal-margin) / 4); } + span[class^='icon-'].secondary { + -webkit-filter: invert(25%); + filter: invert(25%); } + span[class^='icon-'].inverse { + -webkit-filter: invert(100%); + filter: invert(100%); } + +span.icon-alert { + background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2303234b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'%3E%3C/circle%3E%3Cline x1='12' y1='8' x2='12' y2='12'%3E%3C/line%3E%3Cline x1='12' y1='16' x2='12' y2='16'%3E%3C/line%3E%3C/svg%3E"); } +span.icon-bookmark { + background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2303234b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 21l-7-5-7 5V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z'%3E%3C/path%3E%3C/svg%3E"); } +span.icon-calendar { + background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2303234b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'%3E%3C/rect%3E%3Cline x1='16' y1='2' x2='16' y2='6'%3E%3C/line%3E%3Cline x1='8' y1='2' x2='8' y2='6'%3E%3C/line%3E%3Cline x1='3' y1='10' x2='21' y2='10'%3E%3C/line%3E%3C/svg%3E"); } +span.icon-credit { + background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2303234b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='1' y='4' width='22' height='16' rx='2' ry='2'%3E%3C/rect%3E%3Cline x1='1' y1='10' x2='23' y2='10'%3E%3C/line%3E%3C/svg%3E"); } +span.icon-edit { + background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2303234b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 14.66V20a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h5.34'%3E%3C/path%3E%3Cpolygon points='18 2 22 6 12 16 8 16 8 12 18 2'%3E%3C/polygon%3E%3C/svg%3E"); } +span.icon-link { + background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2303234b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6'%3E%3C/path%3E%3Cpolyline points='15 3 21 3 21 9'%3E%3C/polyline%3E%3Cline x1='10' y1='14' x2='21' y2='3'%3E%3C/line%3E%3C/svg%3E"); } +span.icon-help { + background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2303234b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3'%3E%3C/path%3E%3Ccircle cx='12' cy='12' r='10'%3E%3C/circle%3E%3Cline x1='12' y1='17' x2='12' y2='17'%3E%3C/line%3E%3C/svg%3E"); } +span.icon-home { + background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2303234b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z'%3E%3C/path%3E%3Cpolyline points='9 22 9 12 15 12 15 22'%3E%3C/polyline%3E%3C/svg%3E"); } +span.icon-info { + background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2303234b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'%3E%3C/circle%3E%3Cline x1='12' y1='16' x2='12' y2='12'%3E%3C/line%3E%3Cline x1='12' y1='8' x2='12' y2='8'%3E%3C/line%3E%3C/svg%3E"); } +span.icon-lock { + background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2303234b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='11' width='18' height='11' rx='2' ry='2'%3E%3C/rect%3E%3Cpath d='M7 11V7a5 5 0 0 1 10 0v4'%3E%3C/path%3E%3C/svg%3E"); } +span.icon-mail { + background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2303234b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z'%3E%3C/path%3E%3Cpolyline points='22,6 12,13 2,6'%3E%3C/polyline%3E%3C/svg%3E"); } +span.icon-location { + background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2303234b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z'%3E%3C/path%3E%3Ccircle cx='12' cy='10' r='3'%3E%3C/circle%3E%3C/svg%3E"); } +span.icon-phone { + background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2303234b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z'%3E%3C/path%3E%3C/svg%3E"); } +span.icon-rss { + background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2303234b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 11a9 9 0 0 1 9 9'%3E%3C/path%3E%3Cpath d='M4 4a16 16 0 0 1 16 16'%3E%3C/path%3E%3Ccircle cx='5' cy='19' r='1'%3E%3C/circle%3E%3C/svg%3E"); } +span.icon-search { + background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2303234b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'%3E%3C/line%3E%3C/svg%3E"); } +span.icon-settings { + background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2303234b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='3'%3E%3C/circle%3E%3Cpath d='M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z'%3E%3C/path%3E%3C/svg%3E"); } +span.icon-share { + background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2303234b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='18' cy='5' r='3'%3E%3C/circle%3E%3Ccircle cx='6' cy='12' r='3'%3E%3C/circle%3E%3Ccircle cx='18' cy='19' r='3'%3E%3C/circle%3E%3Cline x1='8.59' y1='13.51' x2='15.42' y2='17.49'%3E%3C/line%3E%3Cline x1='15.41' y1='6.51' x2='8.59' y2='10.49'%3E%3C/line%3E%3C/svg%3E"); } +span.icon-cart { + background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2303234b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='21' r='1'%3E%3C/circle%3E%3Ccircle cx='20' cy='21' r='1'%3E%3C/circle%3E%3Cpath d='M1 1h4l2.68 13.39a2 2 0 0 0 2 1.61h9.72a2 2 0 0 0 2-1.61L23 6H6'%3E%3C/path%3E%3C/svg%3E"); } +span.icon-upload { + background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2303234b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4'%3E%3C/path%3E%3Cpolyline points='17 8 12 3 7 8'%3E%3C/polyline%3E%3Cline x1='12' y1='3' x2='12' y2='15'%3E%3C/line%3E%3C/svg%3E"); } +span.icon-user { + background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2303234b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2'%3E%3C/path%3E%3Ccircle cx='12' cy='7' r='4'%3E%3C/circle%3E%3C/svg%3E"); } + +/* + Definitions for STMicroelectronics icons (https://brandportal.st.com/document/26). +*/ +span.icon-st-update { + background-image: url("Update.svg"); } +span.icon-st-add { + background-image: url("Add button.svg"); } + +/* + Definitions for utilities and helper classes. +*/ +/* Utility module CSS variable definitions */ +:root { + --generic-border-color: rgba(0, 0, 0, 0.3); + --generic-box-shadow: 0 0.2857142857rem 0.2857142857rem 0 rgba(0, 0, 0, 0.125), 0 0.1428571429rem 0.1428571429rem -0.1428571429rem rgba(0, 0, 0, 0.125); } + +.hidden { + display: none !important; } + +.visually-hidden { + position: absolute !important; + width: 1px !important; + height: 1px !important; + margin: -1px !important; + border: 0 !important; + padding: 0 !important; + clip: rect(0 0 0 0) !important; + -webkit-clip-path: inset(100%) !important; + clip-path: inset(100%) !important; + overflow: hidden !important; } + +.bordered { + border: 0.0714285714rem solid var(--generic-border-color) !important; } + +.rounded { + border-radius: var(--universal-border-radius) !important; } + +.circular { + border-radius: 50% !important; } + +.shadowed { + box-shadow: var(--generic-box-shadow) !important; } + +.responsive-margin { + margin: calc(var(--universal-margin) / 4) !important; } + @media screen and (min-width: 500px) { + .responsive-margin { + margin: calc(var(--universal-margin) / 2) !important; } } + @media screen and (min-width: 1280px) { + .responsive-margin { + margin: var(--universal-margin) !important; } } + +.responsive-padding { + padding: calc(var(--universal-padding) / 4) !important; } + @media screen and (min-width: 500px) { + .responsive-padding { + padding: calc(var(--universal-padding) / 2) !important; } } + @media screen and (min-width: 1280px) { + .responsive-padding { + padding: var(--universal-padding) !important; } } + +@media screen and (max-width: 499px) { + .hidden-sm { + display: none !important; } } +@media screen and (min-width: 500px) and (max-width: 1279px) { + .hidden-md { + display: none !important; } } +@media screen and (min-width: 1280px) { + .hidden-lg { + display: none !important; } } +@media screen and (max-width: 499px) { + .visually-hidden-sm { + position: absolute !important; + width: 1px !important; + height: 1px !important; + margin: -1px !important; + border: 0 !important; + padding: 0 !important; + clip: rect(0 0 0 0) !important; + -webkit-clip-path: inset(100%) !important; + clip-path: inset(100%) !important; + overflow: hidden !important; } } +@media screen and (min-width: 500px) and (max-width: 1279px) { + .visually-hidden-md { + position: absolute !important; + width: 1px !important; + height: 1px !important; + margin: -1px !important; + border: 0 !important; + padding: 0 !important; + clip: rect(0 0 0 0) !important; + -webkit-clip-path: inset(100%) !important; + clip-path: inset(100%) !important; + overflow: hidden !important; } } +@media screen and (min-width: 1280px) { + .visually-hidden-lg { + position: absolute !important; + width: 1px !important; + height: 1px !important; + margin: -1px !important; + border: 0 !important; + padding: 0 !important; + clip: rect(0 0 0 0) !important; + -webkit-clip-path: inset(100%) !important; + clip-path: inset(100%) !important; + overflow: hidden !important; } } + +/*# sourceMappingURL=mini-custom.css.map */ + +img[alt="ST logo"] { display: block; margin: auto; width: 75%; max-width: 250px; min-width: 71px; } +img[alt="Cube logo"] { float: right; width: 30%; max-width: 10rem; min-width: 8rem; padding-right: 1rem;} + +.figure { + display: block; + margin-left: auto; + margin-right: auto; + text-align: center; +} \ No newline at end of file diff --git a/lib/Drivers/lis2dh12-pid/_htmresc/st_logo_2020.png b/lib/Drivers/lis2dh12-pid/_htmresc/st_logo_2020.png new file mode 100644 index 0000000000000000000000000000000000000000..d6cebb5ac70e0594cbe37a6b60036a80ef3bed37 GIT binary patch literal 7520 zcmcI|WmKC@*KTl!K!Z~t6qn*&DDF_CK%q#B6QmH_DHL}I6b%;K-J$eBN|2xh0+bea zmtyV5bG|?CpZBcu=iF<}z4q*xz1LhL*PcBwx;m;Pgmi=e0DweYO-UaBz)*UWZ}4#+ zCC-V!SC16}H#HLv0Dy?%--0o{5_}H;Jf%=ql7H=+dziOk_)KzUSaiQ9L<^g!49k}} z?4y$V zrsn3Ul^TY`00G_J_8;F7Sr5c3Y)f-yOYl{fS0avfKJg7R%r!y-ohcBkr6XBZBkE)( z_t+tVV2}G1_CN!)yWes*wa-AGwk31N_T1`)4COlfz+o(9S90e?6jHV4)!>`j+oRqp z)gb?rtSdw<#&c?q!OKB+Ncn!kr5JR2EYan8HAPXBw*Oh-F(6GmaC!`$p7fl!_Cdu> z5@PUMR_K5&jgevDepWqepZVdMHR$q>ga=7k0ltW$HHVn>HRa!#(+BW_jN$5rx^MtR zzWT7tNWQeFzEp+86jOYI=I)*GZYEiXlf-Mw%tJ^ptL%2)%#PmUjxC4wx@%KxQ)8kO?|7E1 zd@5gd9_$*6nx?fj*iF_EJT*PYLFP}d8*Fw>cu3@&nm%V_C}V7HMmg|Nl#1J1^#)uz zZag|X>{6j-myvL}3(H8o3resNBq_jcuJuyT!QuXnNN&zG^tG? z>y*dy1#XfwyCE#UiLT(~LYAVwp)epErJLsHBA|l0xo)kxLAPob+7tFlr{7x8(#v|O zknK}QC6|~=cTJ0;x9MWMKua;LdTKIHX>35a@7{5y0MQ|zqsP64mM~`gJ&&R{pSUBA zf3Y>k>d|xdzBFztjtO~{y%@LUdwSgzEj=69hH3-NNWx7<|49%2%lvTEeE3_|$~iDd zlktnxf|NB>Bui)yY;%TXgWA;rhODxR!-4GzxKd473I)3;j zS4-Vun<^vqZ4)HbwVzq%5%)S!>Q(Y&PkF ze1ab_oy?_$PZT-mKJ3K^;6MrB*Wc$lkYJ_460AFYEq{AjlDxm;5GRwOsm>doJy3Z;a$FSu-q`X)Hw&o~?_`Dnpx4dOj6#)bGOdZbj4hD`l|&#v~K+WrGO zpLCVQg=*h=4H1sK)D*Pxtb#p`c+g-eK65k!CEZjLIrfm}5<4@KVqZ#8(S$vs{?Xv) zN(}CKeeLR%I)W!p(l-`utKmBbJk-On{)ciqUN5%?TS8uwKU(8}Mxhsb&qHL~DDcB@qi} z4z%efV#K69a#lShPt5}*7ME@^xunFR{k;|qp z`_Hgdj_Qle?%Ydlr3f^SdRkUncIj7qTiu85tA$v`#419Nlof8tjqUjO z!Rwyq$Krfh`(@MiE+)yie&jU^crprYV&?zN!2b33S2qtW+zB$nahDhVZiQ12bmcwYBcT8KS>v`jsuI@X zy^k^7>TM5Ndp@}pSl6vmkk*u`@C`z(gq||K2>y=Y#w1i`Nk2zAP7{_^ACq;bQmT<4 z;b~K3=?mhZX#~jQnZjdU={NFp^HRr~;^PXQ*UIHzkq}Xsn!56*ZCOOEt|^ zawUwGqs;zCEGKTz&(a(@h#0sCE+@`3Y<&}9!(;Pw&`C+d#D?`##&!@*ERaH0fksrh zfk2svh3!d~h{SC6BNKN2j6(lzC>S^_*eh{@gR zP$rV4$nqV1y|zYpd;nQr-`Vlp(5sQXx9AibC?xc7pUV)v2cWfHu3{KLbfP;;;`I&)mWqLcXt6s+5fps9R?K>hGR$5;=( zo#;zzQ5!w+(99p1_gh^?F#$tpMd+4%G|K`XG_#@A>30WD2L9!0a>wRASg`M?^z#)| zifb$d^KUD&3qLsr-@}r_7p${gdmRqhy819bj?yI-v({I?0o3_8d>CZmCzqH4{{QtD z|6dvgm<^~668G`6wLw4C4y-o9E9ZG3RiH^&;rrKSBT@bMR+!TlYo*9P;?Z>xORMV3ndQp9EyNn!!~j&x&$gDVke|t#!{QoegHm+sT7cSjwSu z)jZlx1pHrrx0&YCZWJ4xC&U%r_IwfJOxnYqYMcZn&_hgnKuls z>(Y$qjIhcweo^A_VVq_#UR&urF%UbI^><5L5zbV9owMQviM*_{@i|dke!!v8a_yG! zl%#ay{(6U_N3-)yeif3tx6>aQSf1r zO~OuNW<8a~bi6Xby0@tKw0@f1R!@+3S2nf#F&j~l0mrNCtjoZdPYob?g!Vx4F-uA2 z4uS>8eR?dA9i>C|cm-m5lO0m@$f(DB6Z<9Pe07xR`l4$ks3eZ@v5}1?^YNQy-tB(` zgUNZrGVf#b~`}jew;MQG1O~VDk_i*<)p9DfFfd;vLy4QZT zMYh|DxJg3-!{szUN*uo&`&DUkzq4qG2`Lj;Ar46DYUymcviS{Unhzmx z=LwZ-Lr{t1z?9Oip%!z{j+Z%_@u?C78I`V4fC`icG1c|2;`EoLK$ z)9|wrAV&V1Vgts~tQCw0X?X{74W"NJQ zW3BP!5c~4zzHJScwQK9L_%m%L`*q{1aW_3rObki~B~=Dwp`;@w`>xZ6;L_6oR^ecEcmup`yb}lgsmv zQByrxc)Qqm(Hwmq%fLjqcrJ5QR?z_*vb~Iy~RXUY8u-D8AqTzetwNNA8~N z$j&1>#IrkSslUqXW|l}q_TlTVKAjRI@~7(GLf4M>GM!3u_)y6ORe6BQUmrQ16%OdZKo(?AYXK$u@=)TPUi1EZaLBu zuEB(5GX2vcoHS%zMUW!DZ)&xRo@mhouk|hMgHIG>cO-Ah(0AMNlq@?cPpy==-!#qR zBov7l3G?P*KM(vU;Apo-(-Bw;sdQJkh~r)W$KRQKd!#(A8M34^MhD10Ra={AqSvjy z3>PkgA}f^@Rg1$dX=jaEB_V%_vn(W<111_s!g>CYrcwJTJ63Eeg6{_C`aMQIgKctR zHMjkr+y6gK!v6=6;CGl#?PqmiX`A@dmmvZ}-X$*q8}G(xq|voo`=$YZuQAa8f9ApK z1VQiEUQC=OO{|Nc8ZrXH208X|XCzIRO?+Nb55Jt@va9hqBpv)uY6ma-csvSlJoJOC zK;w~s?#r)K@gm*;((JsWHU-KvFTF)q>AzwPq)I+}OrSpxh!-CM1VEMfw1fpfVL7p{ z)I$rNp5kPYDsvXL>8nV{#0fa*lm`Z;0Z=c^1qveY2uk&7nhMRl`0EsvUuvwdF&o)PCVN3wmFBPegWzooF6y~b} zY>X2;LO~&rbvx59?(4^aR+s1C6hI4r&x9Q9jL9);KZEw_x%TWZXaMzK6|2XG9$IU% zkEq}t^YOaa4s`%7F31X-#SfMgNp+4R=g2G|O^W)6^2fEsmkTTaVhKCip+3qWuN8?y zaSD_k6%-@Ifhm`z02=ZWA-pi5`A=7ztHWpP2K5rCW{>!wIUOYrH``#bz>qVSH76=8 zyJ!sNBxt;dMTn}yzUTCq1!w;N7pzb?WJrQ50W+`meL{k8i0VhFsPUz(07k`l` zg1Ifl1fc-^p^MQCpK~Jk&L!*mWfNA!&MSu`sPmti>K-;I5Dk00nB3vOl4!JwjEx^X zWQsIp2Ea_>`9f@%zGl4i3FAO9=e$2^b_>_I*dqiLJ=@TejStM?^yX$9dW`#ha)PEF zPr0zUJX!j-juYK*olG_9axQniXhF|E}oSTG_S)FZ3sN4T@q zy{l;!{UGc};YVaT97tx3s7P$WsW2^*I+Hy;vqndG!9S?tZtDIRif1=bBsqtW-n7$O zWy}Z%jKSkgLX#1p>|#4l-!$c+kA`++Ixv(Rm`;Ilb3q3tD|QjaPQ8)BJ=8R*15?nL zJR{yuqOG&!JrSZ${#NY#b!k)yDajQ$A}fUQhe7ueN6h2Pj3wY5eo|7$PaJD zM69(ee1qlSyLn)Ln6)o53Lj)elqG}gb^c}qd(q&$8B5N%nSvEjUIoEXO^obv=A7QGZzNzjO*H=*b2!86Wnqdy~8ePkq@1D1)Q^O)JG;fUCV z`rgD}dJ{7BUyBbgoTL91w^q-CfBpDr?0R38`L%p9&Q#%r*@=9p-Ioqy+WscLq?jq5 zfyYNkxr7w)-(!c85mt!FjNJ4UE6P8p8sc#Kb4L1N3!yaCo9@t3n8s}K)1!w8x77xU zo-NY3SR*Pgt#~7F;y^J&Y%z^+C9wu;hN|TC7dqSHOB&kE)Q)6Ad(l&+tA@$@w0bhJ z6xc6EJ6nm{=|V7Vo&qcXc4i)D?X0Uk$p7~iI#ci?#fxvM z78`u%m5S@^_F;_foidufzP z&ueh-zU1yM&8~0lmOfkio-gBex`)?hCJcI8Jv*R0c|WUqSq z?RU?Rmm=3t_2C%%UW9c*D%T{T{EjryCKnsz9-*Bs0}M*xS&-odhCK5eS_Eqi&c6J4o|f&;uUT=p7Fedw#EUl4%Jv{w zq-cCF^otBvw~~$yj6O>>;VqU)3Ml&Atm$B(Ht8=+&x2VS5aWD&t*+04{@k^Gn~yHY zWYC%@ld;g_qz=k*;Iv&xs5M85cEZCU&n2Baf>R6*bN>V|!)eF&l#C93eAMLD=ZF7= zOISFfB5P;F!ngWD3jfMJE_53F&dFc{h2TwSbT*(h6!c}_5_UFeB_*DiyCrtQ7Byr@ z-aCWVt?J}YP7-lfelbrCgZ5mdv(^W&Yf^OvpI}#NbS1Lc`r4&t#3kM!utm&#a;?GR z-1FusfX7&?a9h`%8wf-ub7UXp44xm4w04)S$}}_hPqn-#IabO^bo6$K07>?%G5Xs( zA$*lz_K>lAJ_o<;fsP-*-%~O(716KRqVq+X@=5J~Z~bba(yWL`;EN`@Mr2it&Lkgb z&I|R5!`ZSk%)xFX*FYDaAh=5qWSY@rx1Du9J$$=lh#!~NcFJM&aOv)eqg_@`i^zJCR9a%_{k_i%msw5q z*3!~#Xx3r|VaAwiG}~9M#c`=$Uk6~xe)47ymW+;0DD_lV67L#ouJBa7mF{)X^?eIvPdOMu4ksr`jUP$~{x@?ev2 zdX#ite2RMim01PEg`;qfwg^;v8nx9F!CtNCvz)V{PVgCs*;_@_Rk*oLx@f7hJ7^^1 zu66b)mb!ZMXLZ%8dj-+JCMoWS-Wji-Q-~U7Pt~UiXMej8JcNjk<6?Wk9eLBIhu&Vo^0;AH> z;Q5^a!NZhP(vDfBv&?jdnQavv#8N0E{ZEgs>|1)qYo^t5 zIV$g~`C2%g$*(z4)8hJlK2mF-MJW#3%Cs6`uAvsgRtTo8n!Et)1pZx@_9I18 zw7ER9v~DyrC*R$do9aEw5r@B)YzHOLB^-c9Eu9D!sFmI8^VljVKE89{zY_8PTSF+J b^}%0^qYmp2WD(pA|JtZ4>nPPKybJpu3@X?! literal 0 HcmV?d00001 diff --git a/lib/Drivers/lis2dh12-pid/lis2dh12_reg.c b/lib/Drivers/lis2dh12-pid/lis2dh12_reg.c new file mode 100644 index 0000000000..60a8ac9652 --- /dev/null +++ b/lib/Drivers/lis2dh12-pid/lis2dh12_reg.c @@ -0,0 +1,2780 @@ +/** + ****************************************************************************** + * @file lis2dh12_reg.c + * @author Sensors Software Solution Team + * @brief LIS2DH12 driver file + ****************************************************************************** + * @attention + * + *

© Copyright (c) 2021 STMicroelectronics. + * All rights reserved.

+ * + * This software component is licensed by ST under BSD 3-Clause license, + * the "License"; You may not use this file except in compliance with the + * License. You may obtain a copy of the License at: + * opensource.org/licenses/BSD-3-Clause + * + ****************************************************************************** + */ + +#include "lis2dh12_reg.h" + +/** + * @defgroup LIS2DH12 + * @brief This file provides a set of functions needed to drive the + * lis2dh12 enanced inertial module. + * @{ + * + */ + +/** + * @defgroup LIS2DH12_Interfaces_Functions + * @brief This section provide a set of functions used to read and + * write a generic register of the device. + * MANDATORY: return 0 -> no Error. + * @{ + * + */ + +/** + * @brief Read generic device register + * + * @param ctx read / write interface definitions(ptr) + * @param reg register to read + * @param data pointer to buffer that store the data read(ptr) + * @param len number of consecutive register to read + * @retval interface status (MANDATORY: return 0 -> no Error) + * + */ +int32_t __weak lis2dh12_read_reg(stmdev_ctx_t *ctx, uint8_t reg, + uint8_t *data, + uint16_t len) +{ + int32_t ret; + + ret = ctx->read_reg(ctx->handle, reg, data, len); + + return ret; +} + +/** + * @brief Write generic device register + * + * @param ctx read / write interface definitions(ptr) + * @param reg register to write + * @param data pointer to data to write in register reg(ptr) + * @param len number of consecutive register to write + * @retval interface status (MANDATORY: return 0 -> no Error) + * + */ +int32_t __weak lis2dh12_write_reg(stmdev_ctx_t *ctx, uint8_t reg, + uint8_t *data, + uint16_t len) +{ + int32_t ret; + + ret = ctx->write_reg(ctx->handle, reg, data, len); + + return ret; +} + +/** + * @} + * + */ + +/** + * @defgroup LIS2DH12_Sensitivity + * @brief These functions convert raw-data into engineering units. + * @{ + * + */ + +float_t lis2dh12_from_fs2_hr_to_mg(int16_t lsb) +{ + return ((float_t)lsb / 16.0f) * 1.0f; +} + +float_t lis2dh12_from_fs4_hr_to_mg(int16_t lsb) +{ + return ((float_t)lsb / 16.0f) * 2.0f; +} + +float_t lis2dh12_from_fs8_hr_to_mg(int16_t lsb) +{ + return ((float_t)lsb / 16.0f) * 4.0f; +} + +float_t lis2dh12_from_fs16_hr_to_mg(int16_t lsb) +{ + return ((float_t)lsb / 16.0f) * 12.0f; +} + +float_t lis2dh12_from_lsb_hr_to_celsius(int16_t lsb) +{ + return (((float_t)lsb / 64.0f) / 4.0f) + 25.0f; +} + +float_t lis2dh12_from_fs2_nm_to_mg(int16_t lsb) +{ + return ((float_t)lsb / 64.0f) * 4.0f; +} + +float_t lis2dh12_from_fs4_nm_to_mg(int16_t lsb) +{ + return ((float_t)lsb / 64.0f) * 8.0f; +} + +float_t lis2dh12_from_fs8_nm_to_mg(int16_t lsb) +{ + return ((float_t)lsb / 64.0f) * 16.0f; +} + +float_t lis2dh12_from_fs16_nm_to_mg(int16_t lsb) +{ + return ((float_t)lsb / 64.0f) * 48.0f; +} + +float_t lis2dh12_from_lsb_nm_to_celsius(int16_t lsb) +{ + return (((float_t)lsb / 64.0f) / 4.0f) + 25.0f; +} + +float_t lis2dh12_from_fs2_lp_to_mg(int16_t lsb) +{ + return ((float_t)lsb / 256.0f) * 16.0f; +} + +float_t lis2dh12_from_fs4_lp_to_mg(int16_t lsb) +{ + return ((float_t)lsb / 256.0f) * 32.0f; +} + +float_t lis2dh12_from_fs8_lp_to_mg(int16_t lsb) +{ + return ((float_t)lsb / 256.0f) * 64.0f; +} + +float_t lis2dh12_from_fs16_lp_to_mg(int16_t lsb) +{ + return ((float_t)lsb / 256.0f) * 192.0f; +} + +float_t lis2dh12_from_lsb_lp_to_celsius(int16_t lsb) +{ + return (((float_t)lsb / 256.0f) * 1.0f) + 25.0f; +} + +/** + * @} + * + */ + +/** + * @defgroup LIS2DH12_Data_generation + * @brief This section group all the functions concerning data generation. + * @{ + * + */ + +/** + * @brief Temperature status register.[get] + * + * @param ctx read / write interface definitions + * @param buff buffer that stores data read + * @retval interface status (MANDATORY: return 0 -> no Error) + * + */ +int32_t lis2dh12_temp_status_reg_get(stmdev_ctx_t *ctx, uint8_t *buff) +{ + int32_t ret; + + ret = lis2dh12_read_reg(ctx, LIS2DH12_STATUS_REG_AUX, buff, 1); + + return ret; +} +/** + * @brief Temperature data available.[get] + * + * @param ctx read / write interface definitions + * @param val change the values of tda in reg STATUS_REG_AUX + * @retval interface status (MANDATORY: return 0 -> no Error) + * + */ +int32_t lis2dh12_temp_data_ready_get(stmdev_ctx_t *ctx, uint8_t *val) +{ + lis2dh12_status_reg_aux_t status_reg_aux; + int32_t ret; + + ret = lis2dh12_read_reg(ctx, LIS2DH12_STATUS_REG_AUX, + (uint8_t *)&status_reg_aux, 1); + *val = status_reg_aux.tda; + + return ret; +} +/** + * @brief Temperature data overrun.[get] + * + * @param ctx read / write interface definitions + * @param val change the values of tor in reg STATUS_REG_AUX + * @retval interface status (MANDATORY: return 0 -> no Error) + * + */ +int32_t lis2dh12_temp_data_ovr_get(stmdev_ctx_t *ctx, uint8_t *val) +{ + lis2dh12_status_reg_aux_t status_reg_aux; + int32_t ret; + + ret = lis2dh12_read_reg(ctx, LIS2DH12_STATUS_REG_AUX, + (uint8_t *)&status_reg_aux, 1); + *val = status_reg_aux.tor; + + return ret; +} +/** + * @brief Temperature output value.[get] + * + * @param ctx read / write interface definitions + * @param buff buffer that stores data read + * @retval interface status (MANDATORY: return 0 -> no Error) + * + */ +int32_t lis2dh12_temperature_raw_get(stmdev_ctx_t *ctx, int16_t *val) +{ + uint8_t buff[2]; + int32_t ret; + + ret = lis2dh12_read_reg(ctx, LIS2DH12_OUT_TEMP_L, buff, 2); + *val = (int16_t)buff[1]; + *val = (*val * 256) + (int16_t)buff[0]; + + return ret; +} +/** + * @brief Temperature sensor enable.[set] + * + * @param ctx read / write interface definitions + * @param val change the values of temp_en in reg TEMP_CFG_REG + * @retval interface status (MANDATORY: return 0 -> no Error) + * + */ +int32_t lis2dh12_temperature_meas_set(stmdev_ctx_t *ctx, + lis2dh12_temp_en_t val) +{ + lis2dh12_temp_cfg_reg_t temp_cfg_reg; + int32_t ret; + + ret = lis2dh12_read_reg(ctx, LIS2DH12_TEMP_CFG_REG, + (uint8_t *)&temp_cfg_reg, 1); + + if (ret == 0) + { + temp_cfg_reg.temp_en = (uint8_t) val; + ret = lis2dh12_write_reg(ctx, LIS2DH12_TEMP_CFG_REG, + (uint8_t *)&temp_cfg_reg, 1); + } + + return ret; +} + +/** + * @brief Temperature sensor enable.[get] + * + * @param ctx read / write interface definitions + * @param val get the values of temp_en in reg TEMP_CFG_REG + * @retval interface status (MANDATORY: return 0 -> no Error) + * + */ +int32_t lis2dh12_temperature_meas_get(stmdev_ctx_t *ctx, + lis2dh12_temp_en_t *val) +{ + lis2dh12_temp_cfg_reg_t temp_cfg_reg; + int32_t ret; + + ret = lis2dh12_read_reg(ctx, LIS2DH12_TEMP_CFG_REG, + (uint8_t *)&temp_cfg_reg, 1); + + switch (temp_cfg_reg.temp_en) + { + case LIS2DH12_TEMP_DISABLE: + *val = LIS2DH12_TEMP_DISABLE; + break; + + case LIS2DH12_TEMP_ENABLE: + *val = LIS2DH12_TEMP_ENABLE; + break; + + default: + *val = LIS2DH12_TEMP_DISABLE; + break; + } + + return ret; +} + +/** + * @brief Operating mode selection.[set] + * + * @param ctx read / write interface definitions + * @param val change the values of lpen in reg CTRL_REG1 + * and HR in reg CTRL_REG4 + * @retval interface status (MANDATORY: return 0 -> no Error) + * + */ +int32_t lis2dh12_operating_mode_set(stmdev_ctx_t *ctx, + lis2dh12_op_md_t val) +{ + lis2dh12_ctrl_reg1_t ctrl_reg1; + lis2dh12_ctrl_reg4_t ctrl_reg4; + int32_t ret; + + ret = lis2dh12_read_reg(ctx, LIS2DH12_CTRL_REG1, + (uint8_t *)&ctrl_reg1, 1); + + if (ret == 0) + { + ret = lis2dh12_read_reg(ctx, LIS2DH12_CTRL_REG4, + (uint8_t *)&ctrl_reg4, 1); + } + + if (ret == 0) + { + if (val == LIS2DH12_HR_12bit) + { + ctrl_reg1.lpen = 0; + ctrl_reg4.hr = 1; + } + + if (val == LIS2DH12_NM_10bit) + { + ctrl_reg1.lpen = 0; + ctrl_reg4.hr = 0; + } + + if (val == LIS2DH12_LP_8bit) + { + ctrl_reg1.lpen = 1; + ctrl_reg4.hr = 0; + } + + ret = lis2dh12_write_reg(ctx, LIS2DH12_CTRL_REG1, + (uint8_t *)&ctrl_reg1, 1); + } + + if (ret == 0) + { + ret = lis2dh12_write_reg(ctx, LIS2DH12_CTRL_REG4, + (uint8_t *)&ctrl_reg4, 1); + } + + return ret; +} + +/** + * @brief Operating mode selection.[get] + * + * @param ctx read / write interface definitions + * @param val change the values of lpen in reg CTRL_REG1 + * @retval interface status (MANDATORY: return 0 -> no Error) + * + */ +int32_t lis2dh12_operating_mode_get(stmdev_ctx_t *ctx, + lis2dh12_op_md_t *val) +{ + lis2dh12_ctrl_reg1_t ctrl_reg1; + lis2dh12_ctrl_reg4_t ctrl_reg4; + int32_t ret; + + ret = lis2dh12_read_reg(ctx, LIS2DH12_CTRL_REG1, + (uint8_t *)&ctrl_reg1, 1); + + if (ret == 0) + { + ret = lis2dh12_read_reg(ctx, LIS2DH12_CTRL_REG4, + (uint8_t *)&ctrl_reg4, 1); + + if (ctrl_reg1.lpen == PROPERTY_ENABLE) + { + *val = LIS2DH12_LP_8bit; + } + + else if (ctrl_reg4.hr == PROPERTY_ENABLE) + { + *val = LIS2DH12_HR_12bit; + } + + else + { + *val = LIS2DH12_NM_10bit; + } + } + + return ret; +} + +/** + * @brief Output data rate selection.[set] + * + * @param ctx read / write interface definitions + * @param val change the values of odr in reg CTRL_REG1 + * @retval interface status (MANDATORY: return 0 -> no Error) + * + */ +int32_t lis2dh12_data_rate_set(stmdev_ctx_t *ctx, lis2dh12_odr_t val) +{ + lis2dh12_ctrl_reg1_t ctrl_reg1; + int32_t ret; + + ret = lis2dh12_read_reg(ctx, LIS2DH12_CTRL_REG1, + (uint8_t *)&ctrl_reg1, 1); + + if (ret == 0) + { + ctrl_reg1.odr = (uint8_t)val; + ret = lis2dh12_write_reg(ctx, LIS2DH12_CTRL_REG1, + (uint8_t *)&ctrl_reg1, 1); + } + + return ret; +} + +/** + * @brief Output data rate selection.[get] + * + * @param ctx read / write interface definitions + * @param val get the values of odr in reg CTRL_REG1 + * @retval interface status (MANDATORY: return 0 -> no Error) + * + */ +int32_t lis2dh12_data_rate_get(stmdev_ctx_t *ctx, lis2dh12_odr_t *val) +{ + lis2dh12_ctrl_reg1_t ctrl_reg1; + int32_t ret; + + ret = lis2dh12_read_reg(ctx, LIS2DH12_CTRL_REG1, + (uint8_t *)&ctrl_reg1, 1); + + switch (ctrl_reg1.odr) + { + case LIS2DH12_POWER_DOWN: + *val = LIS2DH12_POWER_DOWN; + break; + + case LIS2DH12_ODR_1Hz: + *val = LIS2DH12_ODR_1Hz; + break; + + case LIS2DH12_ODR_10Hz: + *val = LIS2DH12_ODR_10Hz; + break; + + case LIS2DH12_ODR_25Hz: + *val = LIS2DH12_ODR_25Hz; + break; + + case LIS2DH12_ODR_50Hz: + *val = LIS2DH12_ODR_50Hz; + break; + + case LIS2DH12_ODR_100Hz: + *val = LIS2DH12_ODR_100Hz; + break; + + case LIS2DH12_ODR_200Hz: + *val = LIS2DH12_ODR_200Hz; + break; + + case LIS2DH12_ODR_400Hz: + *val = LIS2DH12_ODR_400Hz; + break; + + case LIS2DH12_ODR_1kHz620_LP: + *val = LIS2DH12_ODR_1kHz620_LP; + break; + + case LIS2DH12_ODR_5kHz376_LP_1kHz344_NM_HP: + *val = LIS2DH12_ODR_5kHz376_LP_1kHz344_NM_HP; + break; + + default: + *val = LIS2DH12_POWER_DOWN; + break; + } + + return ret; +} + +/** + * @brief High pass data from internal filter sent to output register + * and FIFO. + * + * @param ctx read / write interface definitions + * @param val change the values of fds in reg CTRL_REG2 + * @retval interface status (MANDATORY: return 0 -> no Error) + * + */ +int32_t lis2dh12_high_pass_on_outputs_set(stmdev_ctx_t *ctx, + uint8_t val) +{ + lis2dh12_ctrl_reg2_t ctrl_reg2; + int32_t ret; + + ret = lis2dh12_read_reg(ctx, LIS2DH12_CTRL_REG2, + (uint8_t *)&ctrl_reg2, 1); + + if (ret == 0) + { + ctrl_reg2.fds = val; + ret = lis2dh12_write_reg(ctx, LIS2DH12_CTRL_REG2, + (uint8_t *)&ctrl_reg2, 1); + } + + return ret; +} + +/** + * @brief High pass data from internal filter sent to output register + * and FIFO.[get] + * + * @param ctx read / write interface definitions + * @param val change the values of fds in reg CTRL_REG2 + * @retval interface status (MANDATORY: return 0 -> no Error) + * + */ +int32_t lis2dh12_high_pass_on_outputs_get(stmdev_ctx_t *ctx, + uint8_t *val) +{ + lis2dh12_ctrl_reg2_t ctrl_reg2; + int32_t ret; + + ret = lis2dh12_read_reg(ctx, LIS2DH12_CTRL_REG2, + (uint8_t *)&ctrl_reg2, 1); + *val = (uint8_t)ctrl_reg2.fds; + + return ret; +} + +/** + * @brief High-pass filter cutoff frequency selection.[set] + * + * HPCF[2:1]\ft @1Hz @10Hz @25Hz @50Hz @100Hz @200Hz @400Hz @1kHz6 ft@5kHz + * AGGRESSIVE 0.02Hz 0.2Hz 0.5Hz 1Hz 2Hz 4Hz 8Hz 32Hz 100Hz + * STRONG 0.008Hz 0.08Hz 0.2Hz 0.5Hz 1Hz 2Hz 4Hz 16Hz 50Hz + * MEDIUM 0.004Hz 0.04Hz 0.1Hz 0.2Hz 0.5Hz 1Hz 2Hz 8Hz 25Hz + * LIGHT 0.002Hz 0.02Hz 0.05Hz 0.1Hz 0.2Hz 0.5Hz 1Hz 4Hz 12Hz + * + * @param ctx read / write interface definitions + * @param val change the values of hpcf in reg CTRL_REG2 + * @retval interface status (MANDATORY: return 0 -> no Error) + * + */ +int32_t lis2dh12_high_pass_bandwidth_set(stmdev_ctx_t *ctx, + lis2dh12_hpcf_t val) +{ + lis2dh12_ctrl_reg2_t ctrl_reg2; + int32_t ret; + + ret = lis2dh12_read_reg(ctx, LIS2DH12_CTRL_REG2, + (uint8_t *)&ctrl_reg2, 1); + + if (ret == 0) + { + ctrl_reg2.hpcf = (uint8_t)val; + ret = lis2dh12_write_reg(ctx, LIS2DH12_CTRL_REG2, + (uint8_t *)&ctrl_reg2, 1); + } + + return ret; +} + +/** + * @brief High-pass filter cutoff frequency selection.[get] + * + * HPCF[2:1]\ft @1Hz @10Hz @25Hz @50Hz @100Hz @200Hz @400Hz @1kHz6 ft@5kHz + * AGGRESSIVE 0.02Hz 0.2Hz 0.5Hz 1Hz 2Hz 4Hz 8Hz 32Hz 100Hz + * STRONG 0.008Hz 0.08Hz 0.2Hz 0.5Hz 1Hz 2Hz 4Hz 16Hz 50Hz + * MEDIUM 0.004Hz 0.04Hz 0.1Hz 0.2Hz 0.5Hz 1Hz 2Hz 8Hz 25Hz + * LIGHT 0.002Hz 0.02Hz 0.05Hz 0.1Hz 0.2Hz 0.5Hz 1Hz 4Hz 12Hz + * + * @param ctx read / write interface definitions + * @param val get the values of hpcf in reg CTRL_REG2 + * @retval interface status (MANDATORY: return 0 -> no Error) + * + */ +int32_t lis2dh12_high_pass_bandwidth_get(stmdev_ctx_t *ctx, + lis2dh12_hpcf_t *val) +{ + lis2dh12_ctrl_reg2_t ctrl_reg2; + int32_t ret; + + ret = lis2dh12_read_reg(ctx, LIS2DH12_CTRL_REG2, + (uint8_t *)&ctrl_reg2, 1); + + switch (ctrl_reg2.hpcf) + { + case LIS2DH12_AGGRESSIVE: + *val = LIS2DH12_AGGRESSIVE; + break; + + case LIS2DH12_STRONG: + *val = LIS2DH12_STRONG; + break; + + case LIS2DH12_MEDIUM: + *val = LIS2DH12_MEDIUM; + break; + + case LIS2DH12_LIGHT: + *val = LIS2DH12_LIGHT; + break; + + default: + *val = LIS2DH12_LIGHT; + break; + } + + return ret; +} + +/** + * @brief High-pass filter mode selection.[set] + * + * @param ctx read / write interface definitions + * @param val change the values of hpm in reg CTRL_REG2 + * @retval interface status (MANDATORY: return 0 -> no Error) + * + */ +int32_t lis2dh12_high_pass_mode_set(stmdev_ctx_t *ctx, + lis2dh12_hpm_t val) +{ + lis2dh12_ctrl_reg2_t ctrl_reg2; + int32_t ret; + + ret = lis2dh12_read_reg(ctx, LIS2DH12_CTRL_REG2, + (uint8_t *)&ctrl_reg2, 1); + + if (ret == 0) + { + ctrl_reg2.hpm = (uint8_t)val; + ret = lis2dh12_write_reg(ctx, LIS2DH12_CTRL_REG2, + (uint8_t *)&ctrl_reg2, 1); + } + + return ret; +} + +/** + * @brief High-pass filter mode selection.[get] + * + * @param ctx read / write interface definitions + * @param val get the values of hpm in reg CTRL_REG2 + * @retval interface status (MANDATORY: return 0 -> no Error) + * + */ +int32_t lis2dh12_high_pass_mode_get(stmdev_ctx_t *ctx, + lis2dh12_hpm_t *val) +{ + lis2dh12_ctrl_reg2_t ctrl_reg2; + int32_t ret; + + ret = lis2dh12_read_reg(ctx, LIS2DH12_CTRL_REG2, + (uint8_t *)&ctrl_reg2, 1); + + switch (ctrl_reg2.hpm) + { + case LIS2DH12_NORMAL_WITH_RST: + *val = LIS2DH12_NORMAL_WITH_RST; + break; + + case LIS2DH12_REFERENCE_MODE: + *val = LIS2DH12_REFERENCE_MODE; + break; + + case LIS2DH12_NORMAL: + *val = LIS2DH12_NORMAL; + break; + + case LIS2DH12_AUTORST_ON_INT: + *val = LIS2DH12_AUTORST_ON_INT; + break; + + default: + *val = LIS2DH12_NORMAL_WITH_RST; + break; + } + + return ret; +} + +/** + * @brief Full-scale configuration.[set] + * + * @param ctx read / write interface definitions + * @param val change the values of fs in reg CTRL_REG4 + * @retval interface status (MANDATORY: return 0 -> no Error) + * + */ +int32_t lis2dh12_full_scale_set(stmdev_ctx_t *ctx, lis2dh12_fs_t val) +{ + lis2dh12_ctrl_reg4_t ctrl_reg4; + int32_t ret; + + ret = lis2dh12_read_reg(ctx, LIS2DH12_CTRL_REG4, + (uint8_t *)&ctrl_reg4, 1); + + if (ret == 0) + { + ctrl_reg4.fs = (uint8_t)val; + ret = lis2dh12_write_reg(ctx, LIS2DH12_CTRL_REG4, + (uint8_t *)&ctrl_reg4, 1); + } + + return ret; +} + +/** + * @brief Full-scale configuration.[get] + * + * @param ctx read / write interface definitions + * @param val get the values of fs in reg CTRL_REG4 + * @retval interface status (MANDATORY: return 0 -> no Error) + * + */ +int32_t lis2dh12_full_scale_get(stmdev_ctx_t *ctx, lis2dh12_fs_t *val) +{ + lis2dh12_ctrl_reg4_t ctrl_reg4; + int32_t ret; + + ret = lis2dh12_read_reg(ctx, LIS2DH12_CTRL_REG4, + (uint8_t *)&ctrl_reg4, 1); + + switch (ctrl_reg4.fs) + { + case LIS2DH12_2g: + *val = LIS2DH12_2g; + break; + + case LIS2DH12_4g: + *val = LIS2DH12_4g; + break; + + case LIS2DH12_8g: + *val = LIS2DH12_8g; + break; + + case LIS2DH12_16g: + *val = LIS2DH12_16g; + break; + + default: + *val = LIS2DH12_2g; + break; + } + + return ret; +} + +/** + * @brief Block Data Update.[set] + * + * @param ctx read / write interface definitions + * @param val change the values of bdu in reg CTRL_REG4 + * @retval interface status (MANDATORY: return 0 -> no Error) + * + */ +int32_t lis2dh12_block_data_update_set(stmdev_ctx_t *ctx, uint8_t val) +{ + lis2dh12_ctrl_reg4_t ctrl_reg4; + int32_t ret; + + ret = lis2dh12_read_reg(ctx, LIS2DH12_CTRL_REG4, + (uint8_t *)&ctrl_reg4, 1); + + if (ret == 0) + { + ctrl_reg4.bdu = val; + ret = lis2dh12_write_reg(ctx, LIS2DH12_CTRL_REG4, + (uint8_t *)&ctrl_reg4, 1); + } + + return ret; +} + +/** + * @brief Block Data Update.[get] + * + * @param ctx read / write interface definitions + * @param val change the values of bdu in reg CTRL_REG4 + * @retval interface status (MANDATORY: return 0 -> no Error) + * + */ +int32_t lis2dh12_block_data_update_get(stmdev_ctx_t *ctx, + uint8_t *val) +{ + lis2dh12_ctrl_reg4_t ctrl_reg4; + int32_t ret; + + ret = lis2dh12_read_reg(ctx, LIS2DH12_CTRL_REG4, + (uint8_t *)&ctrl_reg4, 1); + *val = (uint8_t)ctrl_reg4.bdu; + + return ret; +} + +/** + * @brief Reference value for interrupt generation.[set] + * LSB = ~16@2g / ~31@4g / ~63@8g / ~127@16g + * + * @param ctx read / write interface definitions + * @param buff buffer that contains data to write + * @retval interface status (MANDATORY: return 0 -> no Error) + * + */ +int32_t lis2dh12_filter_reference_set(stmdev_ctx_t *ctx, + uint8_t *buff) +{ + int32_t ret; + + ret = lis2dh12_write_reg(ctx, LIS2DH12_REFERENCE, buff, 1); + + return ret; +} + +/** + * @brief Reference value for interrupt generation.[get] + * LSB = ~16@2g / ~31@4g / ~63@8g / ~127@16g + * + * @param ctx read / write interface definitions + * @param buff buffer that stores data read + * @retval interface status (MANDATORY: return 0 -> no Error) + * + */ +int32_t lis2dh12_filter_reference_get(stmdev_ctx_t *ctx, + uint8_t *buff) +{ + int32_t ret; + + ret = lis2dh12_read_reg(ctx, LIS2DH12_REFERENCE, buff, 1); + + return ret; +} +/** + * @brief Acceleration set of data available.[get] + * + * @param ctx read / write interface definitions + * @param val change the values of zyxda in reg STATUS_REG + * @retval interface status (MANDATORY: return 0 -> no Error) + * + */ +int32_t lis2dh12_xl_data_ready_get(stmdev_ctx_t *ctx, uint8_t *val) +{ + lis2dh12_status_reg_t status_reg; + int32_t ret; + + ret = lis2dh12_read_reg(ctx, LIS2DH12_STATUS_REG, + (uint8_t *)&status_reg, 1); + *val = status_reg.zyxda; + + return ret; +} +/** + * @brief Acceleration set of data overrun.[get] + * + * @param ctx read / write interface definitions + * @param val change the values of zyxor in reg STATUS_REG + * @retval interface status (MANDATORY: return 0 -> no Error) + * + */ +int32_t lis2dh12_xl_data_ovr_get(stmdev_ctx_t *ctx, uint8_t *val) +{ + lis2dh12_status_reg_t status_reg; + int32_t ret; + + ret = lis2dh12_read_reg(ctx, LIS2DH12_STATUS_REG, + (uint8_t *)&status_reg, 1); + *val = status_reg.zyxor; + + return ret; +} +/** + * @brief Acceleration output value.[get] + * + * @param ctx read / write interface definitions + * @param buff buffer that stores data read + * @retval interface status (MANDATORY: return 0 -> no Error) + * + */ +int32_t lis2dh12_acceleration_raw_get(stmdev_ctx_t *ctx, int16_t *val) +{ + uint8_t buff[6]; + int32_t ret; + + ret = lis2dh12_read_reg(ctx, LIS2DH12_OUT_X_L, buff, 6); + val[0] = (int16_t)buff[1]; + val[0] = (val[0] * 256) + (int16_t)buff[0]; + val[1] = (int16_t)buff[3]; + val[1] = (val[1] * 256) + (int16_t)buff[2]; + val[2] = (int16_t)buff[5]; + val[2] = (val[2] * 256) + (int16_t)buff[4]; + + return ret; +} +/** + * @} + * + */ + +/** + * @defgroup LIS2DH12_Common + * @brief This section group common useful functions + * @{ + * + */ + +/** + * @brief DeviceWhoamI .[get] + * + * @param ctx read / write interface definitions + * @param buff buffer that stores data read + * @retval interface status (MANDATORY: return 0 -> no Error) + * + */ +int32_t lis2dh12_device_id_get(stmdev_ctx_t *ctx, uint8_t *buff) +{ + int32_t ret; + + ret = lis2dh12_read_reg(ctx, LIS2DH12_WHO_AM_I, buff, 1); + + return ret; +} +/** + * @brief Self Test.[set] + * + * @param ctx read / write interface definitions + * @param val change the values of st in reg CTRL_REG4 + * @retval interface status (MANDATORY: return 0 -> no Error) + * + */ +int32_t lis2dh12_self_test_set(stmdev_ctx_t *ctx, lis2dh12_st_t val) +{ + lis2dh12_ctrl_reg4_t ctrl_reg4; + int32_t ret; + + ret = lis2dh12_read_reg(ctx, LIS2DH12_CTRL_REG4, + (uint8_t *)&ctrl_reg4, 1); + + if (ret == 0) + { + ctrl_reg4.st = (uint8_t)val; + ret = lis2dh12_write_reg(ctx, LIS2DH12_CTRL_REG4, + (uint8_t *)&ctrl_reg4, 1); + } + + return ret; +} + +/** + * @brief Self Test.[get] + * + * @param ctx read / write interface definitions + * @param val Get the values of st in reg CTRL_REG4 + * @retval interface status (MANDATORY: return 0 -> no Error) + * + */ +int32_t lis2dh12_self_test_get(stmdev_ctx_t *ctx, lis2dh12_st_t *val) +{ + lis2dh12_ctrl_reg4_t ctrl_reg4; + int32_t ret; + + ret = lis2dh12_read_reg(ctx, LIS2DH12_CTRL_REG4, + (uint8_t *)&ctrl_reg4, 1); + + switch (ctrl_reg4.st) + { + case LIS2DH12_ST_DISABLE: + *val = LIS2DH12_ST_DISABLE; + break; + + case LIS2DH12_ST_POSITIVE: + *val = LIS2DH12_ST_POSITIVE; + break; + + case LIS2DH12_ST_NEGATIVE: + *val = LIS2DH12_ST_NEGATIVE; + break; + + default: + *val = LIS2DH12_ST_DISABLE; + break; + } + + return ret; +} + +/** + * @brief Big/Little Endian data selection.[set] + * + * @param ctx read / write interface definitions + * @param val change the values of ble in reg CTRL_REG4 + * @retval interface status (MANDATORY: return 0 -> no Error) + * + */ +int32_t lis2dh12_data_format_set(stmdev_ctx_t *ctx, + lis2dh12_ble_t val) +{ + lis2dh12_ctrl_reg4_t ctrl_reg4; + int32_t ret; + + ret = lis2dh12_read_reg(ctx, LIS2DH12_CTRL_REG4, + (uint8_t *)&ctrl_reg4, 1); + + if (ret == 0) + { + ctrl_reg4.ble = (uint8_t)val; + ret = lis2dh12_write_reg(ctx, LIS2DH12_CTRL_REG4, + (uint8_t *)&ctrl_reg4, 1); + } + + return ret; +} + +/** + * @brief Big/Little Endian data selection.[get] + * + * @param ctx read / write interface definitions + * @param val get the values of ble in reg CTRL_REG4 + * @retval interface status (MANDATORY: return 0 -> no Error) + * + */ +int32_t lis2dh12_data_format_get(stmdev_ctx_t *ctx, + lis2dh12_ble_t *val) +{ + lis2dh12_ctrl_reg4_t ctrl_reg4; + int32_t ret; + + ret = lis2dh12_read_reg(ctx, LIS2DH12_CTRL_REG4, + (uint8_t *)&ctrl_reg4, 1); + + switch (ctrl_reg4.ble) + { + case LIS2DH12_LSB_AT_LOW_ADD: + *val = LIS2DH12_LSB_AT_LOW_ADD; + break; + + case LIS2DH12_MSB_AT_LOW_ADD: + *val = LIS2DH12_MSB_AT_LOW_ADD; + break; + + default: + *val = LIS2DH12_LSB_AT_LOW_ADD; + break; + } + + return ret; +} + +/** + * @brief Reboot memory content. Reload the calibration parameters.[set] + * + * @param ctx read / write interface definitions + * @param val change the values of boot in reg CTRL_REG5 + * @retval interface status (MANDATORY: return 0 -> no Error) + * + */ +int32_t lis2dh12_boot_set(stmdev_ctx_t *ctx, uint8_t val) +{ + lis2dh12_ctrl_reg5_t ctrl_reg5; + int32_t ret; + + ret = lis2dh12_read_reg(ctx, LIS2DH12_CTRL_REG5, + (uint8_t *)&ctrl_reg5, 1); + + if (ret == 0) + { + ctrl_reg5.boot = val; + ret = lis2dh12_write_reg(ctx, LIS2DH12_CTRL_REG5, + (uint8_t *)&ctrl_reg5, 1); + } + + return ret; +} + +/** + * @brief Reboot memory content. Reload the calibration parameters.[get] + * + * @param ctx read / write interface definitions + * @param val change the values of boot in reg CTRL_REG5 + * @retval interface status (MANDATORY: return 0 -> no Error) + * + */ +int32_t lis2dh12_boot_get(stmdev_ctx_t *ctx, uint8_t *val) +{ + lis2dh12_ctrl_reg5_t ctrl_reg5; + int32_t ret; + + ret = lis2dh12_read_reg(ctx, LIS2DH12_CTRL_REG5, + (uint8_t *)&ctrl_reg5, 1); + *val = (uint8_t)ctrl_reg5.boot; + + return ret; +} + +/** + * @brief Info about device status.[get] + * + * @param ctx read / write interface definitions + * @param val register STATUS_REG + * @retval interface status (MANDATORY: return 0 -> no Error) + * + */ +int32_t lis2dh12_status_get(stmdev_ctx_t *ctx, + lis2dh12_status_reg_t *val) +{ + int32_t ret; + + ret = lis2dh12_read_reg(ctx, LIS2DH12_STATUS_REG, (uint8_t *) val, 1); + + return ret; +} +/** + * @} + * + */ + +/** + * @defgroup LIS2DH12_Interrupts_generator_1 + * @brief This section group all the functions that manage the first + * interrupts generator + * @{ + * + */ + +/** + * @brief Interrupt generator 1 configuration register.[set] + * + * @param ctx read / write interface definitions + * @param val register INT1_CFG + * @retval interface status (MANDATORY: return 0 -> no Error) + * + */ +int32_t lis2dh12_int1_gen_conf_set(stmdev_ctx_t *ctx, + lis2dh12_int1_cfg_t *val) +{ + int32_t ret; + + ret = lis2dh12_write_reg(ctx, LIS2DH12_INT1_CFG, (uint8_t *) val, 1); + + return ret; +} + +/** + * @brief Interrupt generator 1 configuration register.[get] + * + * @param ctx read / write interface definitions + * @param val register INT1_CFG + * @retval interface status (MANDATORY: return 0 -> no Error) + * + */ +int32_t lis2dh12_int1_gen_conf_get(stmdev_ctx_t *ctx, + lis2dh12_int1_cfg_t *val) +{ + int32_t ret; + + ret = lis2dh12_read_reg(ctx, LIS2DH12_INT1_CFG, (uint8_t *) val, 1); + + return ret; +} + +/** + * @brief Interrupt generator 1 source register.[get] + * + * @param ctx read / write interface definitions + * @param val Registers INT1_SRC + * @retval interface status (MANDATORY: return 0 -> no Error) + * + */ +int32_t lis2dh12_int1_gen_source_get(stmdev_ctx_t *ctx, + lis2dh12_int1_src_t *val) +{ + int32_t ret; + + ret = lis2dh12_read_reg(ctx, LIS2DH12_INT1_SRC, (uint8_t *) val, 1); + + return ret; +} +/** + * @brief User-defined threshold value for xl interrupt event on + * generator 1.[set] + * LSb = 16mg@2g / 32mg@4g / 62mg@8g / 186mg@16g + * + * @param ctx read / write interface definitions + * @param val change the values of ths in reg INT1_THS + * @retval interface status (MANDATORY: return 0 -> no Error) + * + */ +int32_t lis2dh12_int1_gen_threshold_set(stmdev_ctx_t *ctx, + uint8_t val) +{ + lis2dh12_int1_ths_t int1_ths; + int32_t ret; + + ret = lis2dh12_read_reg(ctx, LIS2DH12_INT1_THS, (uint8_t *)&int1_ths, 1); + + if (ret == 0) + { + int1_ths.ths = val; + ret = lis2dh12_write_reg(ctx, LIS2DH12_INT1_THS, (uint8_t *)&int1_ths, 1); + } + + return ret; +} + +/** + * @brief User-defined threshold value for xl interrupt event on + * generator 1.[get] + * LSb = 16mg@2g / 32mg@4g / 62mg@8g / 186mg@16g + * + * @param ctx read / write interface definitions + * @param val change the values of ths in reg INT1_THS + * @retval interface status (MANDATORY: return 0 -> no Error) + * + */ +int32_t lis2dh12_int1_gen_threshold_get(stmdev_ctx_t *ctx, + uint8_t *val) +{ + lis2dh12_int1_ths_t int1_ths; + int32_t ret; + + ret = lis2dh12_read_reg(ctx, LIS2DH12_INT1_THS, (uint8_t *)&int1_ths, 1); + *val = (uint8_t)int1_ths.ths; + + return ret; +} + +/** + * @brief The minimum duration (LSb = 1/ODR) of the Interrupt 1 event to be + * recognized.[set] + * + * @param ctx read / write interface definitions + * @param val change the values of d in reg INT1_DURATION + * @retval interface status (MANDATORY: return 0 -> no Error) + * + */ +int32_t lis2dh12_int1_gen_duration_set(stmdev_ctx_t *ctx, uint8_t val) +{ + lis2dh12_int1_duration_t int1_duration; + int32_t ret; + + ret = lis2dh12_read_reg(ctx, LIS2DH12_INT1_DURATION, + (uint8_t *)&int1_duration, 1); + + if (ret == 0) + { + int1_duration.d = val; + ret = lis2dh12_write_reg(ctx, LIS2DH12_INT1_DURATION, + (uint8_t *)&int1_duration, 1); + } + + return ret; +} + +/** + * @brief The minimum duration (LSb = 1/ODR) of the Interrupt 1 event to be + * recognized.[get] + * + * @param ctx read / write interface definitions + * @param val change the values of d in reg INT1_DURATION + * @retval interface status (MANDATORY: return 0 -> no Error) + * + */ +int32_t lis2dh12_int1_gen_duration_get(stmdev_ctx_t *ctx, + uint8_t *val) +{ + lis2dh12_int1_duration_t int1_duration; + int32_t ret; + + ret = lis2dh12_read_reg(ctx, LIS2DH12_INT1_DURATION, + (uint8_t *)&int1_duration, 1); + *val = (uint8_t)int1_duration.d; + + return ret; +} + +/** + * @} + * + */ + +/** + * @defgroup LIS2DH12_Interrupts_generator_2 + * @brief This section group all the functions that manage the second + * interrupts generator + * @{ + * + */ + +/** + * @brief Interrupt generator 2 configuration register.[set] + * + * @param ctx read / write interface definitions + * @param val registers INT2_CFG + * @retval interface status (MANDATORY: return 0 -> no Error) + * + */ +int32_t lis2dh12_int2_gen_conf_set(stmdev_ctx_t *ctx, + lis2dh12_int2_cfg_t *val) +{ + int32_t ret; + + ret = lis2dh12_write_reg(ctx, LIS2DH12_INT2_CFG, (uint8_t *) val, 1); + + return ret; +} + +/** + * @brief Interrupt generator 2 configuration register.[get] + * + * @param ctx read / write interface definitions + * @param val registers INT2_CFG + * @retval interface status (MANDATORY: return 0 -> no Error) + * + */ +int32_t lis2dh12_int2_gen_conf_get(stmdev_ctx_t *ctx, + lis2dh12_int2_cfg_t *val) +{ + int32_t ret; + + ret = lis2dh12_read_reg(ctx, LIS2DH12_INT2_CFG, (uint8_t *) val, 1); + + return ret; +} +/** + * @brief Interrupt generator 2 source register.[get] + * + * @param ctx read / write interface definitions + * @param val registers INT2_SRC + * @retval interface status (MANDATORY: return 0 -> no Error) + * + */ +int32_t lis2dh12_int2_gen_source_get(stmdev_ctx_t *ctx, + lis2dh12_int2_src_t *val) +{ + int32_t ret; + + ret = lis2dh12_read_reg(ctx, LIS2DH12_INT2_SRC, (uint8_t *) val, 1); + + return ret; +} +/** + * @brief User-defined threshold value for xl interrupt event on + * generator 2.[set] + * LSb = 16mg@2g / 32mg@4g / 62mg@8g / 186mg@16g + * + * @param ctx read / write interface definitions + * @param val change the values of ths in reg INT2_THS + * @retval interface status (MANDATORY: return 0 -> no Error) + * + */ +int32_t lis2dh12_int2_gen_threshold_set(stmdev_ctx_t *ctx, + uint8_t val) +{ + lis2dh12_int2_ths_t int2_ths; + int32_t ret; + + ret = lis2dh12_read_reg(ctx, LIS2DH12_INT2_THS, (uint8_t *)&int2_ths, 1); + + if (ret == 0) + { + int2_ths.ths = val; + ret = lis2dh12_write_reg(ctx, LIS2DH12_INT2_THS, (uint8_t *)&int2_ths, 1); + } + + return ret; +} + +/** + * @brief User-defined threshold value for xl interrupt event on + * generator 2.[get] + * LSb = 16mg@2g / 32mg@4g / 62mg@8g / 186mg@16g + * + * @param ctx read / write interface definitions + * @param val change the values of ths in reg INT2_THS + * @retval interface status (MANDATORY: return 0 -> no Error) + * + */ +int32_t lis2dh12_int2_gen_threshold_get(stmdev_ctx_t *ctx, + uint8_t *val) +{ + lis2dh12_int2_ths_t int2_ths; + int32_t ret; + + ret = lis2dh12_read_reg(ctx, LIS2DH12_INT2_THS, (uint8_t *)&int2_ths, 1); + *val = (uint8_t)int2_ths.ths; + + return ret; +} + +/** + * @brief The minimum duration (LSb = 1/ODR) of the Interrupt 1 event to be + * recognized .[set] + * + * @param ctx read / write interface definitions + * @param val change the values of d in reg INT2_DURATION + * @retval interface status (MANDATORY: return 0 -> no Error) + * + */ +int32_t lis2dh12_int2_gen_duration_set(stmdev_ctx_t *ctx, uint8_t val) +{ + lis2dh12_int2_duration_t int2_duration; + int32_t ret; + + ret = lis2dh12_read_reg(ctx, LIS2DH12_INT2_DURATION, + (uint8_t *)&int2_duration, 1); + + if (ret == 0) + { + int2_duration.d = val; + ret = lis2dh12_write_reg(ctx, LIS2DH12_INT2_DURATION, + (uint8_t *)&int2_duration, 1); + } + + return ret; +} + +/** + * @brief The minimum duration (LSb = 1/ODR) of the Interrupt 1 event to be + * recognized.[get] + * + * @param ctx read / write interface definitions + * @param val change the values of d in reg INT2_DURATION + * @retval interface status (MANDATORY: return 0 -> no Error) + * + */ +int32_t lis2dh12_int2_gen_duration_get(stmdev_ctx_t *ctx, + uint8_t *val) +{ + lis2dh12_int2_duration_t int2_duration; + int32_t ret; + + ret = lis2dh12_read_reg(ctx, LIS2DH12_INT2_DURATION, + (uint8_t *)&int2_duration, 1); + *val = (uint8_t)int2_duration.d; + + return ret; +} + +/** + * @} + * + */ + +/** + * @defgroup LIS2DH12_Interrupt_pins + * @brief This section group all the functions that manage interrupt pins + * @{ + * + */ + +/** + * @brief High-pass filter on interrupts/tap generator.[set] + * + * @param ctx read / write interface definitions + * @param val change the values of hp in reg CTRL_REG2 + * @retval interface status (MANDATORY: return 0 -> no Error) + * + */ +int32_t lis2dh12_high_pass_int_conf_set(stmdev_ctx_t *ctx, + lis2dh12_hp_t val) +{ + lis2dh12_ctrl_reg2_t ctrl_reg2; + int32_t ret; + + ret = lis2dh12_read_reg(ctx, LIS2DH12_CTRL_REG2, + (uint8_t *)&ctrl_reg2, 1); + + if (ret == 0) + { + ctrl_reg2.hp = (uint8_t)val; + ret = lis2dh12_write_reg(ctx, LIS2DH12_CTRL_REG2, + (uint8_t *)&ctrl_reg2, 1); + } + + return ret; +} + +/** + * @brief High-pass filter on interrupts/tap generator.[get] + * + * @param ctx read / write interface definitions + * @param val Get the values of hp in reg CTRL_REG2 + * @retval interface status (MANDATORY: return 0 -> no Error) + * + */ +int32_t lis2dh12_high_pass_int_conf_get(stmdev_ctx_t *ctx, + lis2dh12_hp_t *val) +{ + lis2dh12_ctrl_reg2_t ctrl_reg2; + int32_t ret; + + ret = lis2dh12_read_reg(ctx, LIS2DH12_CTRL_REG2, + (uint8_t *)&ctrl_reg2, 1); + + switch (ctrl_reg2.hp) + { + case LIS2DH12_DISC_FROM_INT_GENERATOR: + *val = LIS2DH12_DISC_FROM_INT_GENERATOR; + break; + + case LIS2DH12_ON_INT1_GEN: + *val = LIS2DH12_ON_INT1_GEN; + break; + + case LIS2DH12_ON_INT2_GEN: + *val = LIS2DH12_ON_INT2_GEN; + break; + + case LIS2DH12_ON_TAP_GEN: + *val = LIS2DH12_ON_TAP_GEN; + break; + + case LIS2DH12_ON_INT1_INT2_GEN: + *val = LIS2DH12_ON_INT1_INT2_GEN; + break; + + case LIS2DH12_ON_INT1_TAP_GEN: + *val = LIS2DH12_ON_INT1_TAP_GEN; + break; + + case LIS2DH12_ON_INT2_TAP_GEN: + *val = LIS2DH12_ON_INT2_TAP_GEN; + break; + + case LIS2DH12_ON_INT1_INT2_TAP_GEN: + *val = LIS2DH12_ON_INT1_INT2_TAP_GEN; + break; + + default: + *val = LIS2DH12_DISC_FROM_INT_GENERATOR; + break; + } + + return ret; +} + +/** + * @brief Int1 pin routing configuration register.[set] + * + * @param ctx read / write interface definitions + * @param val registers CTRL_REG3 + * @retval interface status (MANDATORY: return 0 -> no Error) + * + */ +int32_t lis2dh12_pin_int1_config_set(stmdev_ctx_t *ctx, + lis2dh12_ctrl_reg3_t *val) +{ + int32_t ret; + + ret = lis2dh12_write_reg(ctx, LIS2DH12_CTRL_REG3, (uint8_t *) val, 1); + + return ret; +} + +/** + * @brief Int1 pin routing configuration register.[get] + * + * @param ctx read / write interface definitions + * @param val registers CTRL_REG3 + * @retval interface status (MANDATORY: return 0 -> no Error) + * + */ +int32_t lis2dh12_pin_int1_config_get(stmdev_ctx_t *ctx, + lis2dh12_ctrl_reg3_t *val) +{ + int32_t ret; + + ret = lis2dh12_read_reg(ctx, LIS2DH12_CTRL_REG3, (uint8_t *) val, 1); + + return ret; +} +/** + * @brief int2_pin_detect_4d: [set] 4D enable: 4D detection is enabled + * on INT2 pin when 6D bit on + * INT2_CFG (34h) is set to 1. + * + * @param ctx read / write interface definitions + * @param val change the values of d4d_int2 in reg CTRL_REG5 + * @retval interface status (MANDATORY: return 0 -> no Error) + * + */ +int32_t lis2dh12_int2_pin_detect_4d_set(stmdev_ctx_t *ctx, + uint8_t val) +{ + lis2dh12_ctrl_reg5_t ctrl_reg5; + int32_t ret; + + ret = lis2dh12_read_reg(ctx, LIS2DH12_CTRL_REG5, + (uint8_t *)&ctrl_reg5, 1); + + if (ret == 0) + { + ctrl_reg5.d4d_int2 = val; + ret = lis2dh12_write_reg(ctx, LIS2DH12_CTRL_REG5, + (uint8_t *)&ctrl_reg5, 1); + } + + return ret; +} + +/** + * @brief 4D enable: 4D detection is enabled on INT2 pin when 6D bit on + * INT2_CFG (34h) is set to 1.[get] + * + * @param ctx read / write interface definitions + * @param val change the values of d4d_int2 in reg CTRL_REG5 + * @retval interface status (MANDATORY: return 0 -> no Error) + * + */ +int32_t lis2dh12_int2_pin_detect_4d_get(stmdev_ctx_t *ctx, + uint8_t *val) +{ + lis2dh12_ctrl_reg5_t ctrl_reg5; + int32_t ret; + + ret = lis2dh12_read_reg(ctx, LIS2DH12_CTRL_REG5, + (uint8_t *)&ctrl_reg5, 1); + *val = (uint8_t)ctrl_reg5.d4d_int2; + + return ret; +} + +/** + * @brief Latch interrupt request on INT2_SRC (35h) register, with + * INT2_SRC (35h) register cleared by reading INT2_SRC(35h) + * itself.[set] + * + * @param ctx read / write interface definitions + * @param val change the values of lir_int2 in reg CTRL_REG5 + * @retval interface status (MANDATORY: return 0 -> no Error) + * + */ +int32_t lis2dh12_int2_pin_notification_mode_set(stmdev_ctx_t *ctx, + lis2dh12_lir_int2_t val) +{ + lis2dh12_ctrl_reg5_t ctrl_reg5; + int32_t ret; + + ret = lis2dh12_read_reg(ctx, LIS2DH12_CTRL_REG5, + (uint8_t *)&ctrl_reg5, 1); + + if (ret == 0) + { + ctrl_reg5.lir_int2 = (uint8_t)val; + ret = lis2dh12_write_reg(ctx, LIS2DH12_CTRL_REG5, + (uint8_t *)&ctrl_reg5, 1); + } + + return ret; +} + +/** + * @brief Latch interrupt request on INT2_SRC (35h) register, with + * INT2_SRC (35h) register cleared by reading INT2_SRC(35h) + * itself.[get] + * + * @param ctx read / write interface definitions + * @param val Get the values of lir_int2 in reg CTRL_REG5 + * @retval interface status (MANDATORY: return 0 -> no Error) + * + */ +int32_t lis2dh12_int2_pin_notification_mode_get(stmdev_ctx_t *ctx, + lis2dh12_lir_int2_t *val) +{ + lis2dh12_ctrl_reg5_t ctrl_reg5; + int32_t ret; + + ret = lis2dh12_read_reg(ctx, LIS2DH12_CTRL_REG5, + (uint8_t *)&ctrl_reg5, 1); + + switch (ctrl_reg5.lir_int2) + { + case LIS2DH12_INT2_PULSED: + *val = LIS2DH12_INT2_PULSED; + break; + + case LIS2DH12_INT2_LATCHED: + *val = LIS2DH12_INT2_LATCHED; + break; + + default: + *val = LIS2DH12_INT2_PULSED; + break; + } + + return ret; +} + +/** + * @brief 4D enable: 4D detection is enabled on INT1 pin when 6D bit + * on INT1_CFG(30h) is set to 1.[set] + * + * @param ctx read / write interface definitions + * @param val change the values of d4d_int1 in reg CTRL_REG5 + * @retval interface status (MANDATORY: return 0 -> no Error) + * + */ +int32_t lis2dh12_int1_pin_detect_4d_set(stmdev_ctx_t *ctx, + uint8_t val) +{ + lis2dh12_ctrl_reg5_t ctrl_reg5; + int32_t ret; + + ret = lis2dh12_read_reg(ctx, LIS2DH12_CTRL_REG5, + (uint8_t *)&ctrl_reg5, 1); + + if (ret == 0) + { + ctrl_reg5.d4d_int1 = val; + ret = lis2dh12_write_reg(ctx, LIS2DH12_CTRL_REG5, + (uint8_t *)&ctrl_reg5, 1); + } + + return ret; +} + +/** + * @brief 4D enable: 4D detection is enabled on INT1 pin when 6D bit on + * INT1_CFG(30h) is set to 1.[get] + * + * @param ctx read / write interface definitions + * @param val change the values of d4d_int1 in reg CTRL_REG5 + * @retval interface status (MANDATORY: return 0 -> no Error) + * + */ +int32_t lis2dh12_int1_pin_detect_4d_get(stmdev_ctx_t *ctx, + uint8_t *val) +{ + lis2dh12_ctrl_reg5_t ctrl_reg5; + int32_t ret; + + ret = lis2dh12_read_reg(ctx, LIS2DH12_CTRL_REG5, + (uint8_t *)&ctrl_reg5, 1); + *val = (uint8_t)ctrl_reg5.d4d_int1; + + return ret; +} + +/** + * @brief Latch interrupt request on INT1_SRC (31h), with INT1_SRC(31h) + * register cleared by reading INT1_SRC (31h) itself.[set] + * + * @param ctx read / write interface definitions + * @param val change the values of lir_int1 in reg CTRL_REG5 + * @retval interface status (MANDATORY: return 0 -> no Error) + * + */ +int32_t lis2dh12_int1_pin_notification_mode_set(stmdev_ctx_t *ctx, + lis2dh12_lir_int1_t val) +{ + lis2dh12_ctrl_reg5_t ctrl_reg5; + int32_t ret; + + ret = lis2dh12_read_reg(ctx, LIS2DH12_CTRL_REG5, + (uint8_t *)&ctrl_reg5, 1); + + if (ret == 0) + { + ctrl_reg5.lir_int1 = (uint8_t)val; + ret = lis2dh12_write_reg(ctx, LIS2DH12_CTRL_REG5, + (uint8_t *)&ctrl_reg5, 1); + } + + return ret; +} + +/** + * @brief Latch interrupt request on INT1_SRC (31h), with INT1_SRC(31h) + * register cleared by reading INT1_SRC (31h) itself.[get] + * + * @param ctx read / write interface definitions + * @param val Get the values of lir_int1 in reg CTRL_REG5 + * @retval interface status (MANDATORY: return 0 -> no Error) + * + */ +int32_t lis2dh12_int1_pin_notification_mode_get(stmdev_ctx_t *ctx, + lis2dh12_lir_int1_t *val) +{ + lis2dh12_ctrl_reg5_t ctrl_reg5; + int32_t ret; + + ret = lis2dh12_read_reg(ctx, LIS2DH12_CTRL_REG5, + (uint8_t *)&ctrl_reg5, 1); + + switch (ctrl_reg5.lir_int1) + { + case LIS2DH12_INT1_PULSED: + *val = LIS2DH12_INT1_PULSED; + break; + + case LIS2DH12_INT1_LATCHED: + *val = LIS2DH12_INT1_LATCHED; + break; + + default: + *val = LIS2DH12_INT1_PULSED; + break; + } + + return ret; +} + +/** + * @brief Int2 pin routing configuration register.[set] + * + * @param ctx read / write interface definitions + * @param val registers CTRL_REG6 + * @retval interface status (MANDATORY: return 0 -> no Error) + * + */ +int32_t lis2dh12_pin_int2_config_set(stmdev_ctx_t *ctx, + lis2dh12_ctrl_reg6_t *val) +{ + int32_t ret; + + ret = lis2dh12_write_reg(ctx, LIS2DH12_CTRL_REG6, (uint8_t *) val, 1); + + return ret; +} + +/** + * @brief Int2 pin routing configuration register.[get] + * + * @param ctx read / write interface definitions + * @param val registers CTRL_REG6 + * @retval interface status (MANDATORY: return 0 -> no Error) + * + */ +int32_t lis2dh12_pin_int2_config_get(stmdev_ctx_t *ctx, + lis2dh12_ctrl_reg6_t *val) +{ + int32_t ret; + + ret = lis2dh12_read_reg(ctx, LIS2DH12_CTRL_REG6, (uint8_t *) val, 1); + + return ret; +} +/** + * @} + * + */ + +/** + * @defgroup LIS2DH12_Fifo + * @brief This section group all the functions concerning the fifo usage + * @{ + * + */ + +/** + * @brief FIFO enable.[set] + * + * @param ctx read / write interface definitions + * @param val change the values of fifo_en in reg CTRL_REG5 + * @retval interface status (MANDATORY: return 0 -> no Error) + * + */ +int32_t lis2dh12_fifo_set(stmdev_ctx_t *ctx, uint8_t val) +{ + lis2dh12_ctrl_reg5_t ctrl_reg5; + int32_t ret; + + ret = lis2dh12_read_reg(ctx, LIS2DH12_CTRL_REG5, + (uint8_t *)&ctrl_reg5, 1); + + if (ret == 0) + { + ctrl_reg5.fifo_en = val; + ret = lis2dh12_write_reg(ctx, LIS2DH12_CTRL_REG5, + (uint8_t *)&ctrl_reg5, 1); + } + + return ret; +} + +/** + * @brief FIFO enable.[get] + * + * @param ctx read / write interface definitions + * @param val change the values of fifo_en in reg CTRL_REG5 + * @retval interface status (MANDATORY: return 0 -> no Error) + * + */ +int32_t lis2dh12_fifo_get(stmdev_ctx_t *ctx, uint8_t *val) +{ + lis2dh12_ctrl_reg5_t ctrl_reg5; + int32_t ret; + + ret = lis2dh12_read_reg(ctx, LIS2DH12_CTRL_REG5, + (uint8_t *)&ctrl_reg5, 1); + *val = (uint8_t)ctrl_reg5.fifo_en; + + return ret; +} + +/** + * @brief FIFO watermark level selection.[set] + * + * @param ctx read / write interface definitions + * @param val change the values of fth in reg FIFO_CTRL_REG + * @retval interface status (MANDATORY: return 0 -> no Error) + * + */ +int32_t lis2dh12_fifo_watermark_set(stmdev_ctx_t *ctx, uint8_t val) +{ + lis2dh12_fifo_ctrl_reg_t fifo_ctrl_reg; + int32_t ret; + + ret = lis2dh12_read_reg(ctx, LIS2DH12_FIFO_CTRL_REG, + (uint8_t *)&fifo_ctrl_reg, 1); + + if (ret == 0) + { + fifo_ctrl_reg.fth = val; + ret = lis2dh12_write_reg(ctx, LIS2DH12_FIFO_CTRL_REG, + (uint8_t *)&fifo_ctrl_reg, 1); + } + + return ret; +} + +/** + * @brief FIFO watermark level selection.[get] + * + * @param ctx read / write interface definitions + * @param val change the values of fth in reg FIFO_CTRL_REG + * @retval interface status (MANDATORY: return 0 -> no Error) + * + */ +int32_t lis2dh12_fifo_watermark_get(stmdev_ctx_t *ctx, uint8_t *val) +{ + lis2dh12_fifo_ctrl_reg_t fifo_ctrl_reg; + int32_t ret; + + ret = lis2dh12_read_reg(ctx, LIS2DH12_FIFO_CTRL_REG, + (uint8_t *)&fifo_ctrl_reg, 1); + *val = (uint8_t)fifo_ctrl_reg.fth; + + return ret; +} + +/** + * @brief Trigger FIFO selection.[set] + * + * @param ctx read / write interface definitions + * @param val change the values of tr in reg FIFO_CTRL_REG + * @retval interface status (MANDATORY: return 0 -> no Error) + * + */ +int32_t lis2dh12_fifo_trigger_event_set(stmdev_ctx_t *ctx, + lis2dh12_tr_t val) +{ + lis2dh12_fifo_ctrl_reg_t fifo_ctrl_reg; + int32_t ret; + + ret = lis2dh12_read_reg(ctx, LIS2DH12_FIFO_CTRL_REG, + (uint8_t *)&fifo_ctrl_reg, 1); + + if (ret == 0) + { + fifo_ctrl_reg.tr = (uint8_t)val; + ret = lis2dh12_write_reg(ctx, LIS2DH12_FIFO_CTRL_REG, + (uint8_t *)&fifo_ctrl_reg, 1); + } + + return ret; +} + +/** + * @brief Trigger FIFO selection.[get] + * + * @param ctx read / write interface definitions + * @param val Get the values of tr in reg FIFO_CTRL_REG + * @retval interface status (MANDATORY: return 0 -> no Error) + * + */ +int32_t lis2dh12_fifo_trigger_event_get(stmdev_ctx_t *ctx, + lis2dh12_tr_t *val) +{ + lis2dh12_fifo_ctrl_reg_t fifo_ctrl_reg; + int32_t ret; + + ret = lis2dh12_read_reg(ctx, LIS2DH12_FIFO_CTRL_REG, + (uint8_t *)&fifo_ctrl_reg, 1); + + switch (fifo_ctrl_reg.tr) + { + case LIS2DH12_INT1_GEN: + *val = LIS2DH12_INT1_GEN; + break; + + case LIS2DH12_INT2_GEN: + *val = LIS2DH12_INT2_GEN; + break; + + default: + *val = LIS2DH12_INT1_GEN; + break; + } + + return ret; +} + +/** + * @brief FIFO mode selection.[set] + * + * @param ctx read / write interface definitions + * @param val change the values of fm in reg FIFO_CTRL_REG + * @retval interface status (MANDATORY: return 0 -> no Error) + * + */ +int32_t lis2dh12_fifo_mode_set(stmdev_ctx_t *ctx, lis2dh12_fm_t val) +{ + lis2dh12_fifo_ctrl_reg_t fifo_ctrl_reg; + int32_t ret; + + ret = lis2dh12_read_reg(ctx, LIS2DH12_FIFO_CTRL_REG, + (uint8_t *)&fifo_ctrl_reg, 1); + + if (ret == 0) + { + fifo_ctrl_reg.fm = (uint8_t)val; + ret = lis2dh12_write_reg(ctx, LIS2DH12_FIFO_CTRL_REG, + (uint8_t *)&fifo_ctrl_reg, 1); + } + + return ret; +} + +/** + * @brief FIFO mode selection.[get] + * + * @param ctx read / write interface definitions + * @param val Get the values of fm in reg FIFO_CTRL_REG + * @retval interface status (MANDATORY: return 0 -> no Error) + * + */ +int32_t lis2dh12_fifo_mode_get(stmdev_ctx_t *ctx, lis2dh12_fm_t *val) +{ + lis2dh12_fifo_ctrl_reg_t fifo_ctrl_reg; + int32_t ret; + + ret = lis2dh12_read_reg(ctx, LIS2DH12_FIFO_CTRL_REG, + (uint8_t *)&fifo_ctrl_reg, 1); + + switch (fifo_ctrl_reg.fm) + { + case LIS2DH12_BYPASS_MODE: + *val = LIS2DH12_BYPASS_MODE; + break; + + case LIS2DH12_FIFO_MODE: + *val = LIS2DH12_FIFO_MODE; + break; + + case LIS2DH12_DYNAMIC_STREAM_MODE: + *val = LIS2DH12_DYNAMIC_STREAM_MODE; + break; + + case LIS2DH12_STREAM_TO_FIFO_MODE: + *val = LIS2DH12_STREAM_TO_FIFO_MODE; + break; + + default: + *val = LIS2DH12_BYPASS_MODE; + break; + } + + return ret; +} + +/** + * @brief FIFO status register.[get] + * + * @param ctx read / write interface definitions + * @param val registers FIFO_SRC_REG + * @retval interface status (MANDATORY: return 0 -> no Error) + * + */ +int32_t lis2dh12_fifo_status_get(stmdev_ctx_t *ctx, + lis2dh12_fifo_src_reg_t *val) +{ + int32_t ret; + + ret = lis2dh12_read_reg(ctx, LIS2DH12_FIFO_SRC_REG, (uint8_t *) val, 1); + + return ret; +} +/** + * @brief FIFO stored data level.[get] + * + * @param ctx read / write interface definitions + * @param val change the values of fss in reg FIFO_SRC_REG + * @retval interface status (MANDATORY: return 0 -> no Error) + * + */ +int32_t lis2dh12_fifo_data_level_get(stmdev_ctx_t *ctx, uint8_t *val) +{ + lis2dh12_fifo_src_reg_t fifo_src_reg; + int32_t ret; + + ret = lis2dh12_read_reg(ctx, LIS2DH12_FIFO_SRC_REG, + (uint8_t *)&fifo_src_reg, 1); + *val = (uint8_t)fifo_src_reg.fss; + + return ret; +} +/** + * @brief Empty FIFO status flag.[get] + * + * @param ctx read / write interface definitions + * @param val change the values of empty in reg FIFO_SRC_REG + * @retval interface status (MANDATORY: return 0 -> no Error) + * + */ +int32_t lis2dh12_fifo_empty_flag_get(stmdev_ctx_t *ctx, uint8_t *val) +{ + lis2dh12_fifo_src_reg_t fifo_src_reg; + int32_t ret; + + ret = lis2dh12_read_reg(ctx, LIS2DH12_FIFO_SRC_REG, + (uint8_t *)&fifo_src_reg, 1); + *val = (uint8_t)fifo_src_reg.empty; + + return ret; +} +/** + * @brief FIFO overrun status flag.[get] + * + * @param ctx read / write interface definitions + * @param val change the values of ovrn_fifo in reg FIFO_SRC_REG + * @retval interface status (MANDATORY: return 0 -> no Error) + * + */ +int32_t lis2dh12_fifo_ovr_flag_get(stmdev_ctx_t *ctx, uint8_t *val) +{ + lis2dh12_fifo_src_reg_t fifo_src_reg; + int32_t ret; + + ret = lis2dh12_read_reg(ctx, LIS2DH12_FIFO_SRC_REG, + (uint8_t *)&fifo_src_reg, 1); + *val = (uint8_t)fifo_src_reg.ovrn_fifo; + + return ret; +} +/** + * @brief FIFO watermark status.[get] + * + * @param ctx read / write interface definitions + * @param val change the values of wtm in reg FIFO_SRC_REG + * @retval interface status (MANDATORY: return 0 -> no Error) + * + */ +int32_t lis2dh12_fifo_fth_flag_get(stmdev_ctx_t *ctx, uint8_t *val) +{ + lis2dh12_fifo_src_reg_t fifo_src_reg; + int32_t ret; + + ret = lis2dh12_read_reg(ctx, LIS2DH12_FIFO_SRC_REG, + (uint8_t *)&fifo_src_reg, 1); + *val = (uint8_t)fifo_src_reg.wtm; + + return ret; +} +/** + * @} + * + */ + +/** + * @defgroup LIS2DH12_Tap_generator + * @brief This section group all the functions that manage the tap and + * double tap event generation + * @{ + * + */ + +/** + * @brief Tap/Double Tap generator configuration register.[set] + * + * @param ctx read / write interface definitions + * @param val registers CLICK_CFG + * @retval interface status (MANDATORY: return 0 -> no Error) + * + */ +int32_t lis2dh12_tap_conf_set(stmdev_ctx_t *ctx, + lis2dh12_click_cfg_t *val) +{ + int32_t ret; + + ret = lis2dh12_write_reg(ctx, LIS2DH12_CLICK_CFG, (uint8_t *) val, 1); + + return ret; +} + +/** + * @brief Tap/Double Tap generator configuration register.[get] + * + * @param ctx read / write interface definitions + * @param val registers CLICK_CFG + * @retval interface status (MANDATORY: return 0 -> no Error) + * + */ +int32_t lis2dh12_tap_conf_get(stmdev_ctx_t *ctx, + lis2dh12_click_cfg_t *val) +{ + int32_t ret; + + ret = lis2dh12_read_reg(ctx, LIS2DH12_CLICK_CFG, (uint8_t *) val, 1); + + return ret; +} +/** + * @brief Tap/Double Tap generator source register.[get] + * + * @param ctx read / write interface definitions + * @param val registers CLICK_SRC + * @retval interface status (MANDATORY: return 0 -> no Error) + * + */ +int32_t lis2dh12_tap_source_get(stmdev_ctx_t *ctx, + lis2dh12_click_src_t *val) +{ + int32_t ret; + + ret = lis2dh12_read_reg(ctx, LIS2DH12_CLICK_SRC, (uint8_t *) val, 1); + + return ret; +} +/** + * @brief User-defined threshold value for Tap/Double Tap event.[set] + * 1 LSB = full scale/128 + * + * @param ctx read / write interface definitions + * @param val change the values of ths in reg CLICK_THS + * @retval interface status (MANDATORY: return 0 -> no Error) + * + */ +int32_t lis2dh12_tap_threshold_set(stmdev_ctx_t *ctx, uint8_t val) +{ + lis2dh12_click_ths_t click_ths; + int32_t ret; + + ret = lis2dh12_read_reg(ctx, LIS2DH12_CLICK_THS, + (uint8_t *)&click_ths, 1); + + if (ret == 0) + { + click_ths.ths = val; + ret = lis2dh12_write_reg(ctx, LIS2DH12_CLICK_THS, + (uint8_t *)&click_ths, 1); + } + + return ret; +} + +/** + * @brief User-defined threshold value for Tap/Double Tap event.[get] + * 1 LSB = full scale/128 + * + * @param ctx read / write interface definitions + * @param val change the values of ths in reg CLICK_THS + * @retval interface status (MANDATORY: return 0 -> no Error) + * + */ +int32_t lis2dh12_tap_threshold_get(stmdev_ctx_t *ctx, uint8_t *val) +{ + lis2dh12_click_ths_t click_ths; + int32_t ret; + + ret = lis2dh12_read_reg(ctx, LIS2DH12_CLICK_THS, + (uint8_t *)&click_ths, 1); + *val = (uint8_t)click_ths.ths; + + return ret; +} + +/** + * @brief If the LIR_Click bit is not set, the interrupt is kept high + * for the duration of the latency window. + * If the LIR_Click bit is set, the interrupt is kept high until the + * CLICK_SRC(39h) register is read.[set] + * + * @param ctx read / write interface definitions + * @param val change the values of lir_click in reg CLICK_THS + * @retval interface status (MANDATORY: return 0 -> no Error) + * + */ +int32_t lis2dh12_tap_notification_mode_set(stmdev_ctx_t *ctx, + lis2dh12_lir_click_t val) +{ + lis2dh12_click_ths_t click_ths; + int32_t ret; + + ret = lis2dh12_read_reg(ctx, LIS2DH12_CLICK_THS, + (uint8_t *)&click_ths, 1); + + if (ret == 0) + { + click_ths.lir_click = (uint8_t)val; + ret = lis2dh12_write_reg(ctx, LIS2DH12_CLICK_THS, + (uint8_t *)&click_ths, 1); + } + + return ret; +} + +/** + * @brief If the LIR_Click bit is not set, the interrupt is kept high + * for the duration of the latency window. + * If the LIR_Click bit is set, the interrupt is kept high until the + * CLICK_SRC(39h) register is read.[get] + * + * @param ctx read / write interface definitions + * @param val Get the values of lir_click in reg CLICK_THS + * @retval interface status (MANDATORY: return 0 -> no Error) + * + */ +int32_t lis2dh12_tap_notification_mode_get(stmdev_ctx_t *ctx, + lis2dh12_lir_click_t *val) +{ + lis2dh12_click_ths_t click_ths; + int32_t ret; + + ret = lis2dh12_read_reg(ctx, LIS2DH12_CLICK_THS, + (uint8_t *)&click_ths, 1); + + switch (click_ths.lir_click) + { + case LIS2DH12_TAP_PULSED: + *val = LIS2DH12_TAP_PULSED; + break; + + case LIS2DH12_TAP_LATCHED: + *val = LIS2DH12_TAP_LATCHED; + break; + + default: + *val = LIS2DH12_TAP_PULSED; + break; + } + + return ret; +} + +/** + * @brief The maximum time (1 LSB = 1/ODR) interval that can elapse + * between the start of the click-detection procedure and when the + * acceleration falls back below the threshold.[set] + * + * @param ctx read / write interface definitions + * @param val change the values of tli in reg TIME_LIMIT + * @retval interface status (MANDATORY: return 0 -> no Error) + * + */ +int32_t lis2dh12_shock_dur_set(stmdev_ctx_t *ctx, uint8_t val) +{ + lis2dh12_time_limit_t time_limit; + int32_t ret; + + ret = lis2dh12_read_reg(ctx, LIS2DH12_TIME_LIMIT, + (uint8_t *)&time_limit, 1); + + if (ret == 0) + { + time_limit.tli = val; + ret = lis2dh12_write_reg(ctx, LIS2DH12_TIME_LIMIT, + (uint8_t *)&time_limit, 1); + } + + return ret; +} + +/** + * @brief The maximum time (1 LSB = 1/ODR) interval that can elapse between + * the start of the click-detection procedure and when the + * acceleration falls back below the threshold.[get] + * + * @param ctx read / write interface definitions + * @param val change the values of tli in reg TIME_LIMIT + * @retval interface status (MANDATORY: return 0 -> no Error) + * + */ +int32_t lis2dh12_shock_dur_get(stmdev_ctx_t *ctx, uint8_t *val) +{ + lis2dh12_time_limit_t time_limit; + int32_t ret; + + ret = lis2dh12_read_reg(ctx, LIS2DH12_TIME_LIMIT, + (uint8_t *)&time_limit, 1); + *val = (uint8_t)time_limit.tli; + + return ret; +} + +/** + * @brief The time (1 LSB = 1/ODR) interval that starts after the first + * click detection where the click-detection procedure is + * disabled, in cases where the device is configured for + * double-click detection.[set] + * + * @param ctx read / write interface definitions + * @param val change the values of tla in reg TIME_LATENCY + * @retval interface status (MANDATORY: return 0 -> no Error) + * + */ +int32_t lis2dh12_quiet_dur_set(stmdev_ctx_t *ctx, uint8_t val) +{ + lis2dh12_time_latency_t time_latency; + int32_t ret; + + ret = lis2dh12_read_reg(ctx, LIS2DH12_TIME_LATENCY, + (uint8_t *)&time_latency, 1); + + if (ret == 0) + { + time_latency.tla = val; + ret = lis2dh12_write_reg(ctx, LIS2DH12_TIME_LATENCY, + (uint8_t *)&time_latency, 1); + } + + return ret; +} + +/** + * @brief The time (1 LSB = 1/ODR) interval that starts after the first + * click detection where the click-detection procedure is + * disabled, in cases where the device is configured for + * double-click detection.[get] + * + * @param ctx read / write interface definitions + * @param val change the values of tla in reg TIME_LATENCY + * @retval interface status (MANDATORY: return 0 -> no Error) + * + */ +int32_t lis2dh12_quiet_dur_get(stmdev_ctx_t *ctx, uint8_t *val) +{ + lis2dh12_time_latency_t time_latency; + int32_t ret; + + ret = lis2dh12_read_reg(ctx, LIS2DH12_TIME_LATENCY, + (uint8_t *)&time_latency, 1); + *val = (uint8_t)time_latency.tla; + + return ret; +} + +/** + * @brief The maximum interval of time (1 LSB = 1/ODR) that can elapse + * after the end of the latency interval in which the click-detection + * procedure can start, in cases where the device is configured + * for double-click detection.[set] + * + * @param ctx read / write interface definitions + * @param val change the values of tw in reg TIME_WINDOW + * @retval interface status (MANDATORY: return 0 -> no Error) + * + */ +int32_t lis2dh12_double_tap_timeout_set(stmdev_ctx_t *ctx, + uint8_t val) +{ + lis2dh12_time_window_t time_window; + int32_t ret; + + ret = lis2dh12_read_reg(ctx, LIS2DH12_TIME_WINDOW, + (uint8_t *)&time_window, 1); + + if (ret == 0) + { + time_window.tw = val; + ret = lis2dh12_write_reg(ctx, LIS2DH12_TIME_WINDOW, + (uint8_t *)&time_window, 1); + } + + return ret; +} + +/** + * @brief The maximum interval of time (1 LSB = 1/ODR) that can elapse + * after the end of the latency interval in which the + * click-detection procedure can start, in cases where the device + * is configured for double-click detection.[get] + * + * @param ctx read / write interface definitions + * @param val change the values of tw in reg TIME_WINDOW + * @retval interface status (MANDATORY: return 0 -> no Error) + * + */ +int32_t lis2dh12_double_tap_timeout_get(stmdev_ctx_t *ctx, + uint8_t *val) +{ + lis2dh12_time_window_t time_window; + int32_t ret; + + ret = lis2dh12_read_reg(ctx, LIS2DH12_TIME_WINDOW, + (uint8_t *)&time_window, 1); + *val = (uint8_t)time_window.tw; + + return ret; +} + +/** + * @} + * + */ + +/** + * @defgroup LIS2DH12_Activity_inactivity + * @brief This section group all the functions concerning activity + * inactivity functionality + * @{ + * + */ + +/** + * @brief Sleep-to-wake, return-to-sleep activation threshold in + * low-power mode.[set] + * 1 LSb = 16mg@2g / 32mg@4g / 62mg@8g / 186mg@16g + * + * @param ctx read / write interface definitions + * @param val change the values of acth in reg ACT_THS + * @retval interface status (MANDATORY: return 0 -> no Error) + * + */ +int32_t lis2dh12_act_threshold_set(stmdev_ctx_t *ctx, uint8_t val) +{ + lis2dh12_act_ths_t act_ths; + int32_t ret; + + ret = lis2dh12_read_reg(ctx, LIS2DH12_ACT_THS, (uint8_t *)&act_ths, 1); + + if (ret == 0) + { + act_ths.acth = val; + ret = lis2dh12_write_reg(ctx, LIS2DH12_ACT_THS, (uint8_t *)&act_ths, 1); + } + + return ret; +} + +/** + * @brief Sleep-to-wake, return-to-sleep activation threshold in low-power + * mode.[get] + * 1 LSb = 16mg@2g / 32mg@4g / 62mg@8g / 186mg@16g + * + * @param ctx read / write interface definitions + * @param val change the values of acth in reg ACT_THS + * @retval interface status (MANDATORY: return 0 -> no Error) + * + */ +int32_t lis2dh12_act_threshold_get(stmdev_ctx_t *ctx, uint8_t *val) +{ + lis2dh12_act_ths_t act_ths; + int32_t ret; + + ret = lis2dh12_read_reg(ctx, LIS2DH12_ACT_THS, (uint8_t *)&act_ths, 1); + *val = (uint8_t)act_ths.acth; + + return ret; +} + +/** + * @brief Sleep-to-wake, return-to-sleep.[set] + * duration = (8*1[LSb]+1)/ODR + * + * @param ctx read / write interface definitions + * @param val change the values of actd in reg ACT_DUR + * @retval interface status (MANDATORY: return 0 -> no Error) + * + */ +int32_t lis2dh12_act_timeout_set(stmdev_ctx_t *ctx, uint8_t val) +{ + lis2dh12_act_dur_t act_dur; + int32_t ret; + + ret = lis2dh12_read_reg(ctx, LIS2DH12_ACT_DUR, (uint8_t *)&act_dur, 1); + + if (ret == 0) + { + act_dur.actd = val; + ret = lis2dh12_write_reg(ctx, LIS2DH12_ACT_DUR, (uint8_t *)&act_dur, 1); + } + + return ret; +} + +/** + * @brief Sleep-to-wake, return-to-sleep.[get] + * duration = (8*1[LSb]+1)/ODR + * + * @param ctx read / write interface definitions + * @param val change the values of actd in reg ACT_DUR + * @retval interface status (MANDATORY: return 0 -> no Error) + * + */ +int32_t lis2dh12_act_timeout_get(stmdev_ctx_t *ctx, uint8_t *val) +{ + lis2dh12_act_dur_t act_dur; + int32_t ret; + + ret = lis2dh12_read_reg(ctx, LIS2DH12_ACT_DUR, (uint8_t *)&act_dur, 1); + *val = (uint8_t)act_dur.actd; + + return ret; +} + +/** + * @} + * + */ + +/** + * @defgroup LIS2DH12_Serial_interface + * @brief This section group all the functions concerning serial + * interface management + * @{ + * + */ + +/** + * @brief Connect/Disconnect SDO/SA0 internal pull-up.[set] + * + * @param ctx read / write interface definitions + * @param val change the values of sdo_pu_disc in reg CTRL_REG0 + * @retval interface status (MANDATORY: return 0 -> no Error) + * + */ +int32_t lis2dh12_pin_sdo_sa0_mode_set(stmdev_ctx_t *ctx, + lis2dh12_sdo_pu_disc_t val) +{ + lis2dh12_ctrl_reg0_t ctrl_reg0; + int32_t ret; + + ret = lis2dh12_read_reg(ctx, LIS2DH12_CTRL_REG0, + (uint8_t *)&ctrl_reg0, 1); + + if (ret == 0) + { + ctrl_reg0.sdo_pu_disc = (uint8_t)val; + ret = lis2dh12_write_reg(ctx, LIS2DH12_CTRL_REG0, + (uint8_t *)&ctrl_reg0, 1); + } + + return ret; +} + +/** + * @brief Connect/Disconnect SDO/SA0 internal pull-up.[get] + * + * @param ctx read / write interface definitions + * @param val Get the values of sdo_pu_disc in reg CTRL_REG0 + * @retval interface status (MANDATORY: return 0 -> no Error) + * + */ +int32_t lis2dh12_pin_sdo_sa0_mode_get(stmdev_ctx_t *ctx, + lis2dh12_sdo_pu_disc_t *val) +{ + lis2dh12_ctrl_reg0_t ctrl_reg0; + int32_t ret; + + ret = lis2dh12_read_reg(ctx, LIS2DH12_CTRL_REG0, + (uint8_t *)&ctrl_reg0, 1); + + switch (ctrl_reg0.sdo_pu_disc) + { + case LIS2DH12_PULL_UP_DISCONNECT: + *val = LIS2DH12_PULL_UP_DISCONNECT; + break; + + case LIS2DH12_PULL_UP_CONNECT: + *val = LIS2DH12_PULL_UP_CONNECT; + break; + + default: + *val = LIS2DH12_PULL_UP_DISCONNECT; + break; + } + + return ret; +} + +/** + * @brief SPI Serial Interface Mode selection.[set] + * + * @param ctx read / write interface definitions + * @param val change the values of sim in reg CTRL_REG4 + * @retval interface status (MANDATORY: return 0 -> no Error) + * + */ +int32_t lis2dh12_spi_mode_set(stmdev_ctx_t *ctx, lis2dh12_sim_t val) +{ + lis2dh12_ctrl_reg4_t ctrl_reg4; + int32_t ret; + + ret = lis2dh12_read_reg(ctx, LIS2DH12_CTRL_REG4, + (uint8_t *)&ctrl_reg4, 1); + + if (ret == 0) + { + ctrl_reg4.sim = (uint8_t)val; + ret = lis2dh12_write_reg(ctx, LIS2DH12_CTRL_REG4, + (uint8_t *)&ctrl_reg4, 1); + } + + return ret; +} + +/** + * @brief SPI Serial Interface Mode selection.[get] + * + * @param ctx read / write interface definitions + * @param val Get the values of sim in reg CTRL_REG4 + * @retval interface status (MANDATORY: return 0 -> no Error) + * + */ +int32_t lis2dh12_spi_mode_get(stmdev_ctx_t *ctx, lis2dh12_sim_t *val) +{ + lis2dh12_ctrl_reg4_t ctrl_reg4; + int32_t ret; + + ret = lis2dh12_read_reg(ctx, LIS2DH12_CTRL_REG4, + (uint8_t *)&ctrl_reg4, 1); + + switch (ctrl_reg4.sim) + { + case LIS2DH12_SPI_4_WIRE: + *val = LIS2DH12_SPI_4_WIRE; + break; + + case LIS2DH12_SPI_3_WIRE: + *val = LIS2DH12_SPI_3_WIRE; + break; + + default: + *val = LIS2DH12_SPI_4_WIRE; + break; + } + + return ret; +} + +/** + * @} + * + */ + +/** + * @} + * + */ + + +/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/lib/Drivers/lis2dh12-pid/lis2dh12_reg.h b/lib/Drivers/lis2dh12-pid/lis2dh12_reg.h new file mode 100644 index 0000000000..230af1726c --- /dev/null +++ b/lib/Drivers/lis2dh12-pid/lis2dh12_reg.h @@ -0,0 +1,1072 @@ +/** + ****************************************************************************** + * @file lis2dh12_reg.h + * @author Sensors Software Solution Team + * @brief This file contains all the functions prototypes for the + * lis2dh12_reg.c driver. + ****************************************************************************** + * @attention + * + *

© Copyright (c) 2021 STMicroelectronics. + * All rights reserved.

+ * + * This software component is licensed by ST under BSD 3-Clause license, + * the "License"; You may not use this file except in compliance with the + * License. You may obtain a copy of the License at: + * opensource.org/licenses/BSD-3-Clause + * + ****************************************************************************** + */ + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef LIS2DH12_REGS_H +#define LIS2DH12_REGS_H + +#ifdef __cplusplus +extern "C" { +#endif + +/* Includes ------------------------------------------------------------------*/ +#include +#include +#include + +/** @addtogroup LIS2DH12 + * @{ + * + */ + +/** @defgroup Endianness definitions + * @{ + * + */ + +#ifndef DRV_BYTE_ORDER +#ifndef __BYTE_ORDER__ + +#define DRV_LITTLE_ENDIAN 1234 +#define DRV_BIG_ENDIAN 4321 + +/** if _BYTE_ORDER is not defined, choose the endianness of your architecture + * by uncommenting the define which fits your platform endianness + */ +//#define DRV_BYTE_ORDER DRV_BIG_ENDIAN +#define DRV_BYTE_ORDER DRV_LITTLE_ENDIAN + +#else /* defined __BYTE_ORDER__ */ + +#define DRV_LITTLE_ENDIAN __ORDER_LITTLE_ENDIAN__ +#define DRV_BIG_ENDIAN __ORDER_BIG_ENDIAN__ +#define DRV_BYTE_ORDER __BYTE_ORDER__ + +#endif /* __BYTE_ORDER__*/ +#endif /* DRV_BYTE_ORDER */ + +/** + * @} + * + */ + +/** @defgroup STMicroelectronics sensors common types + * @{ + * + */ + +#ifndef MEMS_SHARED_TYPES +#define MEMS_SHARED_TYPES + +typedef struct +{ +#if DRV_BYTE_ORDER == DRV_LITTLE_ENDIAN + uint8_t bit0 : 1; + uint8_t bit1 : 1; + uint8_t bit2 : 1; + uint8_t bit3 : 1; + uint8_t bit4 : 1; + uint8_t bit5 : 1; + uint8_t bit6 : 1; + uint8_t bit7 : 1; +#elif DRV_BYTE_ORDER == DRV_BIG_ENDIAN + uint8_t bit7 : 1; + uint8_t bit6 : 1; + uint8_t bit5 : 1; + uint8_t bit4 : 1; + uint8_t bit3 : 1; + uint8_t bit2 : 1; + uint8_t bit1 : 1; + uint8_t bit0 : 1; +#endif /* DRV_BYTE_ORDER */ +} bitwise_t; + +#define PROPERTY_DISABLE (0U) +#define PROPERTY_ENABLE (1U) + +/** @addtogroup Interfaces_Functions + * @brief This section provide a set of functions used to read and + * write a generic register of the device. + * MANDATORY: return 0 -> no Error. + * @{ + * + */ +typedef int32_t (*stmdev_write_ptr)(void *, uint8_t, const uint8_t *, uint16_t); +typedef int32_t (*stmdev_read_ptr)(void *, uint8_t, uint8_t *, uint16_t); +typedef void (*stmdev_mdelay_ptr)(uint32_t millisec); + +typedef struct +{ + /** Component mandatory fields **/ + stmdev_write_ptr write_reg; + stmdev_read_ptr read_reg; + /** Component optional fields **/ + stmdev_mdelay_ptr mdelay; + /** Customizable optional pointer **/ + void *handle; +} stmdev_ctx_t; + +/** + * @} + * + */ + +#endif /* MEMS_SHARED_TYPES */ + +#ifndef MEMS_UCF_SHARED_TYPES +#define MEMS_UCF_SHARED_TYPES + +/** @defgroup Generic address-data structure definition + * @brief This structure is useful to load a predefined configuration + * of a sensor. + * You can create a sensor configuration by your own or using + * Unico / Unicleo tools available on STMicroelectronics + * web site. + * + * @{ + * + */ + +typedef struct +{ + uint8_t address; + uint8_t data; +} ucf_line_t; + +/** + * @} + * + */ + +#endif /* MEMS_UCF_SHARED_TYPES */ + +/** + * @} + * + */ + +/** @defgroup LIS2DH12_Infos + * @{ + * + */ + +/** I2C Device Address 8 bit format if SA0=0 -> 31 if SA0=1 -> 33 **/ +#define LIS2DH12_I2C_ADD_L 0x31U +#define LIS2DH12_I2C_ADD_H 0x33U + +/** Device Identification (Who am I) **/ +#define LIS2DH12_ID 0x33U + +/** + * @} + * + */ + +#define LIS2DH12_STATUS_REG_AUX 0x07U +typedef struct +{ +#if DRV_BYTE_ORDER == DRV_LITTLE_ENDIAN + uint8_t not_used_01 : 2; + uint8_t tda : 1; + uint8_t not_used_02 : 3; + uint8_t tor : 1; + uint8_t not_used_03 : 1; +#elif DRV_BYTE_ORDER == DRV_BIG_ENDIAN + uint8_t not_used_03 : 1; + uint8_t tor : 1; + uint8_t not_used_02 : 3; + uint8_t tda : 1; + uint8_t not_used_01 : 2; +#endif /* DRV_BYTE_ORDER */ +} lis2dh12_status_reg_aux_t; + +#define LIS2DH12_OUT_TEMP_L 0x0CU +#define LIS2DH12_OUT_TEMP_H 0x0DU +#define LIS2DH12_WHO_AM_I 0x0FU + +#define LIS2DH12_CTRL_REG0 0x1EU +typedef struct +{ +#if DRV_BYTE_ORDER == DRV_LITTLE_ENDIAN + uint8_t not_used_01 : 7; + uint8_t sdo_pu_disc : 1; +#elif DRV_BYTE_ORDER == DRV_BIG_ENDIAN + uint8_t sdo_pu_disc : 1; + uint8_t not_used_01 : 7; +#endif /* DRV_BYTE_ORDER */ +} lis2dh12_ctrl_reg0_t; + +#define LIS2DH12_TEMP_CFG_REG 0x1FU +typedef struct +{ +#if DRV_BYTE_ORDER == DRV_LITTLE_ENDIAN + uint8_t not_used_01 : 6; + uint8_t temp_en : 2; +#elif DRV_BYTE_ORDER == DRV_BIG_ENDIAN + uint8_t temp_en : 2; + uint8_t not_used_01 : 6; +#endif /* DRV_BYTE_ORDER */ +} lis2dh12_temp_cfg_reg_t; + +#define LIS2DH12_CTRL_REG1 0x20U +typedef struct +{ +#if DRV_BYTE_ORDER == DRV_LITTLE_ENDIAN + uint8_t xen : 1; + uint8_t yen : 1; + uint8_t zen : 1; + uint8_t lpen : 1; + uint8_t odr : 4; +#elif DRV_BYTE_ORDER == DRV_BIG_ENDIAN + uint8_t odr : 4; + uint8_t lpen : 1; + uint8_t zen : 1; + uint8_t yen : 1; + uint8_t xen : 1; +#endif /* DRV_BYTE_ORDER */ +} lis2dh12_ctrl_reg1_t; + +#define LIS2DH12_CTRL_REG2 0x21U +typedef struct +{ +#if DRV_BYTE_ORDER == DRV_LITTLE_ENDIAN + uint8_t hp : 3; /* HPCLICK + HP_IA2 + HP_IA1 -> HP */ + uint8_t fds : 1; + uint8_t hpcf : 2; + uint8_t hpm : 2; +#elif DRV_BYTE_ORDER == DRV_BIG_ENDIAN + uint8_t hpm : 2; + uint8_t hpcf : 2; + uint8_t fds : 1; + uint8_t hp : 3; /* HPCLICK + HP_IA2 + HP_IA1 -> HP */ +#endif /* DRV_BYTE_ORDER */ +} lis2dh12_ctrl_reg2_t; + +#define LIS2DH12_CTRL_REG3 0x22U +typedef struct +{ +#if DRV_BYTE_ORDER == DRV_LITTLE_ENDIAN + uint8_t not_used_01 : 1; + uint8_t i1_overrun : 1; + uint8_t i1_wtm : 1; + uint8_t not_used_02 : 1; + uint8_t i1_zyxda : 1; + uint8_t i1_ia2 : 1; + uint8_t i1_ia1 : 1; + uint8_t i1_click : 1; +#elif DRV_BYTE_ORDER == DRV_BIG_ENDIAN + uint8_t i1_click : 1; + uint8_t i1_ia1 : 1; + uint8_t i1_ia2 : 1; + uint8_t i1_zyxda : 1; + uint8_t not_used_02 : 1; + uint8_t i1_wtm : 1; + uint8_t i1_overrun : 1; + uint8_t not_used_01 : 1; +#endif /* DRV_BYTE_ORDER */ +} lis2dh12_ctrl_reg3_t; + +#define LIS2DH12_CTRL_REG4 0x23U +typedef struct +{ +#if DRV_BYTE_ORDER == DRV_LITTLE_ENDIAN + uint8_t sim : 1; + uint8_t st : 2; + uint8_t hr : 1; + uint8_t fs : 2; + uint8_t ble : 1; + uint8_t bdu : 1; +#elif DRV_BYTE_ORDER == DRV_BIG_ENDIAN + uint8_t bdu : 1; + uint8_t ble : 1; + uint8_t fs : 2; + uint8_t hr : 1; + uint8_t st : 2; + uint8_t sim : 1; +#endif /* DRV_BYTE_ORDER */ +} lis2dh12_ctrl_reg4_t; + +#define LIS2DH12_CTRL_REG5 0x24U +typedef struct +{ +#if DRV_BYTE_ORDER == DRV_LITTLE_ENDIAN + uint8_t d4d_int2 : 1; + uint8_t lir_int2 : 1; + uint8_t d4d_int1 : 1; + uint8_t lir_int1 : 1; + uint8_t not_used_01 : 2; + uint8_t fifo_en : 1; + uint8_t boot : 1; +#elif DRV_BYTE_ORDER == DRV_BIG_ENDIAN + uint8_t boot : 1; + uint8_t fifo_en : 1; + uint8_t not_used_01 : 2; + uint8_t lir_int1 : 1; + uint8_t d4d_int1 : 1; + uint8_t lir_int2 : 1; + uint8_t d4d_int2 : 1; +#endif /* DRV_BYTE_ORDER */ +} lis2dh12_ctrl_reg5_t; + +#define LIS2DH12_CTRL_REG6 0x25U +typedef struct +{ +#if DRV_BYTE_ORDER == DRV_LITTLE_ENDIAN + uint8_t not_used_01 : 1; + uint8_t int_polarity : 1; + uint8_t not_used_02 : 1; + uint8_t i2_act : 1; + uint8_t i2_boot : 1; + uint8_t i2_ia2 : 1; + uint8_t i2_ia1 : 1; + uint8_t i2_click : 1; +#elif DRV_BYTE_ORDER == DRV_BIG_ENDIAN + uint8_t i2_click : 1; + uint8_t i2_ia1 : 1; + uint8_t i2_ia2 : 1; + uint8_t i2_boot : 1; + uint8_t i2_act : 1; + uint8_t not_used_02 : 1; + uint8_t int_polarity : 1; + uint8_t not_used_01 : 1; +#endif /* DRV_BYTE_ORDER */ +} lis2dh12_ctrl_reg6_t; + +#define LIS2DH12_REFERENCE 0x26U +#define LIS2DH12_STATUS_REG 0x27U +typedef struct +{ +#if DRV_BYTE_ORDER == DRV_LITTLE_ENDIAN + uint8_t xda : 1; + uint8_t yda : 1; + uint8_t zda : 1; + uint8_t zyxda : 1; + uint8_t _xor : 1; + uint8_t yor : 1; + uint8_t zor : 1; + uint8_t zyxor : 1; +#elif DRV_BYTE_ORDER == DRV_BIG_ENDIAN + uint8_t zyxor : 1; + uint8_t zor : 1; + uint8_t yor : 1; + uint8_t _xor : 1; + uint8_t zyxda : 1; + uint8_t zda : 1; + uint8_t yda : 1; + uint8_t xda : 1; +#endif /* DRV_BYTE_ORDER */ +} lis2dh12_status_reg_t; + +#define LIS2DH12_OUT_X_L 0x28U +#define LIS2DH12_OUT_X_H 0x29U +#define LIS2DH12_OUT_Y_L 0x2AU +#define LIS2DH12_OUT_Y_H 0x2BU +#define LIS2DH12_OUT_Z_L 0x2CU +#define LIS2DH12_OUT_Z_H 0x2DU +#define LIS2DH12_FIFO_CTRL_REG 0x2EU +typedef struct +{ +#if DRV_BYTE_ORDER == DRV_LITTLE_ENDIAN + uint8_t fth : 5; + uint8_t tr : 1; + uint8_t fm : 2; +#elif DRV_BYTE_ORDER == DRV_BIG_ENDIAN + uint8_t fm : 2; + uint8_t tr : 1; + uint8_t fth : 5; +#endif /* DRV_BYTE_ORDER */ +} lis2dh12_fifo_ctrl_reg_t; + +#define LIS2DH12_FIFO_SRC_REG 0x2FU +typedef struct +{ +#if DRV_BYTE_ORDER == DRV_LITTLE_ENDIAN + uint8_t fss : 5; + uint8_t empty : 1; + uint8_t ovrn_fifo : 1; + uint8_t wtm : 1; +#elif DRV_BYTE_ORDER == DRV_BIG_ENDIAN + uint8_t wtm : 1; + uint8_t ovrn_fifo : 1; + uint8_t empty : 1; + uint8_t fss : 5; +#endif /* DRV_BYTE_ORDER */ +} lis2dh12_fifo_src_reg_t; + +#define LIS2DH12_INT1_CFG 0x30U +typedef struct +{ +#if DRV_BYTE_ORDER == DRV_LITTLE_ENDIAN + uint8_t xlie : 1; + uint8_t xhie : 1; + uint8_t ylie : 1; + uint8_t yhie : 1; + uint8_t zlie : 1; + uint8_t zhie : 1; + uint8_t _6d : 1; + uint8_t aoi : 1; +#elif DRV_BYTE_ORDER == DRV_BIG_ENDIAN + uint8_t aoi : 1; + uint8_t _6d : 1; + uint8_t zhie : 1; + uint8_t zlie : 1; + uint8_t yhie : 1; + uint8_t ylie : 1; + uint8_t xhie : 1; + uint8_t xlie : 1; +#endif /* DRV_BYTE_ORDER */ +} lis2dh12_int1_cfg_t; + +#define LIS2DH12_INT1_SRC 0x31U +typedef struct +{ +#if DRV_BYTE_ORDER == DRV_LITTLE_ENDIAN + uint8_t xl : 1; + uint8_t xh : 1; + uint8_t yl : 1; + uint8_t yh : 1; + uint8_t zl : 1; + uint8_t zh : 1; + uint8_t ia : 1; + uint8_t not_used_01 : 1; +#elif DRV_BYTE_ORDER == DRV_BIG_ENDIAN + uint8_t not_used_01 : 1; + uint8_t ia : 1; + uint8_t zh : 1; + uint8_t zl : 1; + uint8_t yh : 1; + uint8_t yl : 1; + uint8_t xh : 1; + uint8_t xl : 1; +#endif /* DRV_BYTE_ORDER */ +} lis2dh12_int1_src_t; + +#define LIS2DH12_INT1_THS 0x32U +typedef struct +{ +#if DRV_BYTE_ORDER == DRV_LITTLE_ENDIAN + uint8_t ths : 7; + uint8_t not_used_01 : 1; +#elif DRV_BYTE_ORDER == DRV_BIG_ENDIAN + uint8_t not_used_01 : 1; + uint8_t ths : 7; +#endif /* DRV_BYTE_ORDER */ +} lis2dh12_int1_ths_t; + +#define LIS2DH12_INT1_DURATION 0x33U +typedef struct +{ +#if DRV_BYTE_ORDER == DRV_LITTLE_ENDIAN + uint8_t d : 7; + uint8_t not_used_01 : 1; +#elif DRV_BYTE_ORDER == DRV_BIG_ENDIAN + uint8_t not_used_01 : 1; + uint8_t d : 7; +#endif /* DRV_BYTE_ORDER */ +} lis2dh12_int1_duration_t; + +#define LIS2DH12_INT2_CFG 0x34U +typedef struct +{ +#if DRV_BYTE_ORDER == DRV_LITTLE_ENDIAN + uint8_t xlie : 1; + uint8_t xhie : 1; + uint8_t ylie : 1; + uint8_t yhie : 1; + uint8_t zlie : 1; + uint8_t zhie : 1; + uint8_t _6d : 1; + uint8_t aoi : 1; +#elif DRV_BYTE_ORDER == DRV_BIG_ENDIAN + uint8_t aoi : 1; + uint8_t _6d : 1; + uint8_t zhie : 1; + uint8_t zlie : 1; + uint8_t yhie : 1; + uint8_t ylie : 1; + uint8_t xhie : 1; + uint8_t xlie : 1; +#endif /* DRV_BYTE_ORDER */ +} lis2dh12_int2_cfg_t; + +#define LIS2DH12_INT2_SRC 0x35U +typedef struct +{ +#if DRV_BYTE_ORDER == DRV_LITTLE_ENDIAN + uint8_t xl : 1; + uint8_t xh : 1; + uint8_t yl : 1; + uint8_t yh : 1; + uint8_t zl : 1; + uint8_t zh : 1; + uint8_t ia : 1; + uint8_t not_used_01 : 1; +#elif DRV_BYTE_ORDER == DRV_BIG_ENDIAN + uint8_t not_used_01 : 1; + uint8_t ia : 1; + uint8_t zh : 1; + uint8_t zl : 1; + uint8_t yh : 1; + uint8_t yl : 1; + uint8_t xh : 1; + uint8_t xl : 1; +#endif /* DRV_BYTE_ORDER */ +} lis2dh12_int2_src_t; + +#define LIS2DH12_INT2_THS 0x36U +typedef struct +{ +#if DRV_BYTE_ORDER == DRV_LITTLE_ENDIAN + uint8_t ths : 7; + uint8_t not_used_01 : 1; +#elif DRV_BYTE_ORDER == DRV_BIG_ENDIAN + uint8_t not_used_01 : 1; + uint8_t ths : 7; +#endif /* DRV_BYTE_ORDER */ +} lis2dh12_int2_ths_t; + +#define LIS2DH12_INT2_DURATION 0x37U +typedef struct +{ +#if DRV_BYTE_ORDER == DRV_LITTLE_ENDIAN + uint8_t d : 7; + uint8_t not_used_01 : 1; +#elif DRV_BYTE_ORDER == DRV_BIG_ENDIAN + uint8_t not_used_01 : 1; + uint8_t d : 7; +#endif /* DRV_BYTE_ORDER */ +} lis2dh12_int2_duration_t; + +#define LIS2DH12_CLICK_CFG 0x38U +typedef struct +{ +#if DRV_BYTE_ORDER == DRV_LITTLE_ENDIAN + uint8_t xs : 1; + uint8_t xd : 1; + uint8_t ys : 1; + uint8_t yd : 1; + uint8_t zs : 1; + uint8_t zd : 1; + uint8_t not_used_01 : 2; +#elif DRV_BYTE_ORDER == DRV_BIG_ENDIAN + uint8_t not_used_01 : 2; + uint8_t zd : 1; + uint8_t zs : 1; + uint8_t yd : 1; + uint8_t ys : 1; + uint8_t xd : 1; + uint8_t xs : 1; +#endif /* DRV_BYTE_ORDER */ +} lis2dh12_click_cfg_t; + +#define LIS2DH12_CLICK_SRC 0x39U +typedef struct +{ +#if DRV_BYTE_ORDER == DRV_LITTLE_ENDIAN + uint8_t x : 1; + uint8_t y : 1; + uint8_t z : 1; + uint8_t sign : 1; + uint8_t sclick : 1; + uint8_t dclick : 1; + uint8_t ia : 1; + uint8_t not_used_01 : 1; +#elif DRV_BYTE_ORDER == DRV_BIG_ENDIAN + uint8_t not_used_01 : 1; + uint8_t ia : 1; + uint8_t dclick : 1; + uint8_t sclick : 1; + uint8_t sign : 1; + uint8_t z : 1; + uint8_t y : 1; + uint8_t x : 1; +#endif /* DRV_BYTE_ORDER */ +} lis2dh12_click_src_t; + +#define LIS2DH12_CLICK_THS 0x3AU +typedef struct +{ +#if DRV_BYTE_ORDER == DRV_LITTLE_ENDIAN + uint8_t ths : 7; + uint8_t lir_click : 1; +#elif DRV_BYTE_ORDER == DRV_BIG_ENDIAN + uint8_t lir_click : 1; + uint8_t ths : 7; +#endif /* DRV_BYTE_ORDER */ +} lis2dh12_click_ths_t; + +#define LIS2DH12_TIME_LIMIT 0x3BU +typedef struct +{ +#if DRV_BYTE_ORDER == DRV_LITTLE_ENDIAN + uint8_t tli : 7; + uint8_t not_used_01 : 1; +#elif DRV_BYTE_ORDER == DRV_BIG_ENDIAN + uint8_t not_used_01 : 1; + uint8_t tli : 7; +#endif /* DRV_BYTE_ORDER */ +} lis2dh12_time_limit_t; + +#define LIS2DH12_TIME_LATENCY 0x3CU +typedef struct +{ + uint8_t tla : 8; +} lis2dh12_time_latency_t; + +#define LIS2DH12_TIME_WINDOW 0x3DU +typedef struct +{ + uint8_t tw : 8; +} lis2dh12_time_window_t; + +#define LIS2DH12_ACT_THS 0x3EU +typedef struct +{ +#if DRV_BYTE_ORDER == DRV_LITTLE_ENDIAN + uint8_t acth : 7; + uint8_t not_used_01 : 1; +#elif DRV_BYTE_ORDER == DRV_BIG_ENDIAN + uint8_t not_used_01 : 1; + uint8_t acth : 7; +#endif /* DRV_BYTE_ORDER */ +} lis2dh12_act_ths_t; + +#define LIS2DH12_ACT_DUR 0x3FU +typedef struct +{ + uint8_t actd : 8; +} lis2dh12_act_dur_t; + +/** + * @defgroup LIS2DH12_Register_Union + * @brief This union group all the registers having a bit-field + * description. + * This union is useful but it's not needed by the driver. + * + * REMOVING this union you are compliant with: + * MISRA-C 2012 [Rule 19.2] -> " Union are not allowed " + * + * @{ + * + */ +typedef union +{ + lis2dh12_status_reg_aux_t status_reg_aux; + lis2dh12_ctrl_reg0_t ctrl_reg0; + lis2dh12_temp_cfg_reg_t temp_cfg_reg; + lis2dh12_ctrl_reg1_t ctrl_reg1; + lis2dh12_ctrl_reg2_t ctrl_reg2; + lis2dh12_ctrl_reg3_t ctrl_reg3; + lis2dh12_ctrl_reg4_t ctrl_reg4; + lis2dh12_ctrl_reg5_t ctrl_reg5; + lis2dh12_ctrl_reg6_t ctrl_reg6; + lis2dh12_status_reg_t status_reg; + lis2dh12_fifo_ctrl_reg_t fifo_ctrl_reg; + lis2dh12_fifo_src_reg_t fifo_src_reg; + lis2dh12_int1_cfg_t int1_cfg; + lis2dh12_int1_src_t int1_src; + lis2dh12_int1_ths_t int1_ths; + lis2dh12_int1_duration_t int1_duration; + lis2dh12_int2_cfg_t int2_cfg; + lis2dh12_int2_src_t int2_src; + lis2dh12_int2_ths_t int2_ths; + lis2dh12_int2_duration_t int2_duration; + lis2dh12_click_cfg_t click_cfg; + lis2dh12_click_src_t click_src; + lis2dh12_click_ths_t click_ths; + lis2dh12_time_limit_t time_limit; + lis2dh12_time_latency_t time_latency; + lis2dh12_time_window_t time_window; + lis2dh12_act_ths_t act_ths; + lis2dh12_act_dur_t act_dur; + bitwise_t bitwise; + uint8_t byte; +} lis2dh12_reg_t; + +/** + * @} + * + */ + +#ifndef __weak +#define __weak __attribute__((weak)) +#endif /* __weak */ + +/* + * These are the basic platform dependent I/O routines to read + * and write device registers connected on a standard bus. + * The driver keeps offering a default implementation based on function + * pointers to read/write routines for backward compatibility. + * The __weak directive allows the final application to overwrite + * them with a custom implementation. + */ + +int32_t lis2dh12_read_reg(stmdev_ctx_t *ctx, uint8_t reg, + uint8_t *data, + uint16_t len); +int32_t lis2dh12_write_reg(stmdev_ctx_t *ctx, uint8_t reg, + uint8_t *data, + uint16_t len); + +float_t lis2dh12_from_fs2_hr_to_mg(int16_t lsb); +float_t lis2dh12_from_fs4_hr_to_mg(int16_t lsb); +float_t lis2dh12_from_fs8_hr_to_mg(int16_t lsb); +float_t lis2dh12_from_fs16_hr_to_mg(int16_t lsb); +float_t lis2dh12_from_lsb_hr_to_celsius(int16_t lsb); + +float_t lis2dh12_from_fs2_nm_to_mg(int16_t lsb); +float_t lis2dh12_from_fs4_nm_to_mg(int16_t lsb); +float_t lis2dh12_from_fs8_nm_to_mg(int16_t lsb); +float_t lis2dh12_from_fs16_nm_to_mg(int16_t lsb); +float_t lis2dh12_from_lsb_nm_to_celsius(int16_t lsb); + +float_t lis2dh12_from_fs2_lp_to_mg(int16_t lsb); +float_t lis2dh12_from_fs4_lp_to_mg(int16_t lsb); +float_t lis2dh12_from_fs8_lp_to_mg(int16_t lsb); +float_t lis2dh12_from_fs16_lp_to_mg(int16_t lsb); +float_t lis2dh12_from_lsb_lp_to_celsius(int16_t lsb); + +int32_t lis2dh12_temp_status_reg_get(stmdev_ctx_t *ctx, + uint8_t *buff); +int32_t lis2dh12_temp_data_ready_get(stmdev_ctx_t *ctx, uint8_t *val); + +int32_t lis2dh12_temp_data_ovr_get(stmdev_ctx_t *ctx, uint8_t *val); + +int32_t lis2dh12_temperature_raw_get(stmdev_ctx_t *ctx, int16_t *val); + +typedef enum +{ + LIS2DH12_TEMP_DISABLE = 0, + LIS2DH12_TEMP_ENABLE = 3, +} lis2dh12_temp_en_t; +int32_t lis2dh12_temperature_meas_set(stmdev_ctx_t *ctx, + lis2dh12_temp_en_t val); +int32_t lis2dh12_temperature_meas_get(stmdev_ctx_t *ctx, + lis2dh12_temp_en_t *val); + +typedef enum +{ + LIS2DH12_HR_12bit = 0, + LIS2DH12_NM_10bit = 1, + LIS2DH12_LP_8bit = 2, +} lis2dh12_op_md_t; +int32_t lis2dh12_operating_mode_set(stmdev_ctx_t *ctx, + lis2dh12_op_md_t val); +int32_t lis2dh12_operating_mode_get(stmdev_ctx_t *ctx, + lis2dh12_op_md_t *val); + +typedef enum +{ + LIS2DH12_POWER_DOWN = 0x00, + LIS2DH12_ODR_1Hz = 0x01, + LIS2DH12_ODR_10Hz = 0x02, + LIS2DH12_ODR_25Hz = 0x03, + LIS2DH12_ODR_50Hz = 0x04, + LIS2DH12_ODR_100Hz = 0x05, + LIS2DH12_ODR_200Hz = 0x06, + LIS2DH12_ODR_400Hz = 0x07, + LIS2DH12_ODR_1kHz620_LP = 0x08, + LIS2DH12_ODR_5kHz376_LP_1kHz344_NM_HP = 0x09, +} lis2dh12_odr_t; +int32_t lis2dh12_data_rate_set(stmdev_ctx_t *ctx, lis2dh12_odr_t val); +int32_t lis2dh12_data_rate_get(stmdev_ctx_t *ctx, + lis2dh12_odr_t *val); + +int32_t lis2dh12_high_pass_on_outputs_set(stmdev_ctx_t *ctx, + uint8_t val); +int32_t lis2dh12_high_pass_on_outputs_get(stmdev_ctx_t *ctx, + uint8_t *val); + +typedef enum +{ + LIS2DH12_AGGRESSIVE = 0, + LIS2DH12_STRONG = 1, + LIS2DH12_MEDIUM = 2, + LIS2DH12_LIGHT = 3, +} lis2dh12_hpcf_t; +int32_t lis2dh12_high_pass_bandwidth_set(stmdev_ctx_t *ctx, + lis2dh12_hpcf_t val); +int32_t lis2dh12_high_pass_bandwidth_get(stmdev_ctx_t *ctx, + lis2dh12_hpcf_t *val); + +typedef enum +{ + LIS2DH12_NORMAL_WITH_RST = 0, + LIS2DH12_REFERENCE_MODE = 1, + LIS2DH12_NORMAL = 2, + LIS2DH12_AUTORST_ON_INT = 3, +} lis2dh12_hpm_t; +int32_t lis2dh12_high_pass_mode_set(stmdev_ctx_t *ctx, + lis2dh12_hpm_t val); +int32_t lis2dh12_high_pass_mode_get(stmdev_ctx_t *ctx, + lis2dh12_hpm_t *val); + +typedef enum +{ + LIS2DH12_2g = 0, + LIS2DH12_4g = 1, + LIS2DH12_8g = 2, + LIS2DH12_16g = 3, +} lis2dh12_fs_t; +int32_t lis2dh12_full_scale_set(stmdev_ctx_t *ctx, lis2dh12_fs_t val); +int32_t lis2dh12_full_scale_get(stmdev_ctx_t *ctx, + lis2dh12_fs_t *val); + +int32_t lis2dh12_block_data_update_set(stmdev_ctx_t *ctx, + uint8_t val); +int32_t lis2dh12_block_data_update_get(stmdev_ctx_t *ctx, + uint8_t *val); + +int32_t lis2dh12_filter_reference_set(stmdev_ctx_t *ctx, + uint8_t *buff); +int32_t lis2dh12_filter_reference_get(stmdev_ctx_t *ctx, + uint8_t *buff); + +int32_t lis2dh12_xl_data_ready_get(stmdev_ctx_t *ctx, uint8_t *val); + +int32_t lis2dh12_xl_data_ovr_get(stmdev_ctx_t *ctx, uint8_t *val); + +int32_t lis2dh12_acceleration_raw_get(stmdev_ctx_t *ctx, + int16_t *val); + +int32_t lis2dh12_device_id_get(stmdev_ctx_t *ctx, uint8_t *buff); + +typedef enum +{ + LIS2DH12_ST_DISABLE = 0, + LIS2DH12_ST_POSITIVE = 1, + LIS2DH12_ST_NEGATIVE = 2, +} lis2dh12_st_t; +int32_t lis2dh12_self_test_set(stmdev_ctx_t *ctx, lis2dh12_st_t val); +int32_t lis2dh12_self_test_get(stmdev_ctx_t *ctx, lis2dh12_st_t *val); + +typedef enum +{ + LIS2DH12_LSB_AT_LOW_ADD = 0, + LIS2DH12_MSB_AT_LOW_ADD = 1, +} lis2dh12_ble_t; +int32_t lis2dh12_data_format_set(stmdev_ctx_t *ctx, + lis2dh12_ble_t val); +int32_t lis2dh12_data_format_get(stmdev_ctx_t *ctx, + lis2dh12_ble_t *val); + +int32_t lis2dh12_boot_set(stmdev_ctx_t *ctx, uint8_t val); +int32_t lis2dh12_boot_get(stmdev_ctx_t *ctx, uint8_t *val); + +int32_t lis2dh12_status_get(stmdev_ctx_t *ctx, + lis2dh12_status_reg_t *val); + +int32_t lis2dh12_int1_gen_conf_set(stmdev_ctx_t *ctx, + lis2dh12_int1_cfg_t *val); +int32_t lis2dh12_int1_gen_conf_get(stmdev_ctx_t *ctx, + lis2dh12_int1_cfg_t *val); + +int32_t lis2dh12_int1_gen_source_get(stmdev_ctx_t *ctx, + lis2dh12_int1_src_t *val); + +int32_t lis2dh12_int1_gen_threshold_set(stmdev_ctx_t *ctx, + uint8_t val); +int32_t lis2dh12_int1_gen_threshold_get(stmdev_ctx_t *ctx, + uint8_t *val); + +int32_t lis2dh12_int1_gen_duration_set(stmdev_ctx_t *ctx, + uint8_t val); +int32_t lis2dh12_int1_gen_duration_get(stmdev_ctx_t *ctx, + uint8_t *val); + +int32_t lis2dh12_int2_gen_conf_set(stmdev_ctx_t *ctx, + lis2dh12_int2_cfg_t *val); +int32_t lis2dh12_int2_gen_conf_get(stmdev_ctx_t *ctx, + lis2dh12_int2_cfg_t *val); + +int32_t lis2dh12_int2_gen_source_get(stmdev_ctx_t *ctx, + lis2dh12_int2_src_t *val); + +int32_t lis2dh12_int2_gen_threshold_set(stmdev_ctx_t *ctx, + uint8_t val); +int32_t lis2dh12_int2_gen_threshold_get(stmdev_ctx_t *ctx, + uint8_t *val); + +int32_t lis2dh12_int2_gen_duration_set(stmdev_ctx_t *ctx, + uint8_t val); +int32_t lis2dh12_int2_gen_duration_get(stmdev_ctx_t *ctx, + uint8_t *val); + +typedef enum +{ + LIS2DH12_DISC_FROM_INT_GENERATOR = 0, + LIS2DH12_ON_INT1_GEN = 1, + LIS2DH12_ON_INT2_GEN = 2, + LIS2DH12_ON_TAP_GEN = 4, + LIS2DH12_ON_INT1_INT2_GEN = 3, + LIS2DH12_ON_INT1_TAP_GEN = 5, + LIS2DH12_ON_INT2_TAP_GEN = 6, + LIS2DH12_ON_INT1_INT2_TAP_GEN = 7, +} lis2dh12_hp_t; +int32_t lis2dh12_high_pass_int_conf_set(stmdev_ctx_t *ctx, + lis2dh12_hp_t val); +int32_t lis2dh12_high_pass_int_conf_get(stmdev_ctx_t *ctx, + lis2dh12_hp_t *val); + +int32_t lis2dh12_pin_int1_config_set(stmdev_ctx_t *ctx, + lis2dh12_ctrl_reg3_t *val); +int32_t lis2dh12_pin_int1_config_get(stmdev_ctx_t *ctx, + lis2dh12_ctrl_reg3_t *val); + +int32_t lis2dh12_int2_pin_detect_4d_set(stmdev_ctx_t *ctx, + uint8_t val); +int32_t lis2dh12_int2_pin_detect_4d_get(stmdev_ctx_t *ctx, + uint8_t *val); + +typedef enum +{ + LIS2DH12_INT2_PULSED = 0, + LIS2DH12_INT2_LATCHED = 1, +} lis2dh12_lir_int2_t; +int32_t lis2dh12_int2_pin_notification_mode_set(stmdev_ctx_t *ctx, + lis2dh12_lir_int2_t val); +int32_t lis2dh12_int2_pin_notification_mode_get(stmdev_ctx_t *ctx, + lis2dh12_lir_int2_t *val); + +int32_t lis2dh12_int1_pin_detect_4d_set(stmdev_ctx_t *ctx, + uint8_t val); +int32_t lis2dh12_int1_pin_detect_4d_get(stmdev_ctx_t *ctx, + uint8_t *val); + +typedef enum +{ + LIS2DH12_INT1_PULSED = 0, + LIS2DH12_INT1_LATCHED = 1, +} lis2dh12_lir_int1_t; +int32_t lis2dh12_int1_pin_notification_mode_set(stmdev_ctx_t *ctx, + lis2dh12_lir_int1_t val); +int32_t lis2dh12_int1_pin_notification_mode_get(stmdev_ctx_t *ctx, + lis2dh12_lir_int1_t *val); + +int32_t lis2dh12_pin_int2_config_set(stmdev_ctx_t *ctx, + lis2dh12_ctrl_reg6_t *val); +int32_t lis2dh12_pin_int2_config_get(stmdev_ctx_t *ctx, + lis2dh12_ctrl_reg6_t *val); + +int32_t lis2dh12_fifo_set(stmdev_ctx_t *ctx, uint8_t val); +int32_t lis2dh12_fifo_get(stmdev_ctx_t *ctx, uint8_t *val); + +int32_t lis2dh12_fifo_watermark_set(stmdev_ctx_t *ctx, uint8_t val); +int32_t lis2dh12_fifo_watermark_get(stmdev_ctx_t *ctx, uint8_t *val); + +typedef enum +{ + LIS2DH12_INT1_GEN = 0, + LIS2DH12_INT2_GEN = 1, +} lis2dh12_tr_t; +int32_t lis2dh12_fifo_trigger_event_set(stmdev_ctx_t *ctx, + lis2dh12_tr_t val); +int32_t lis2dh12_fifo_trigger_event_get(stmdev_ctx_t *ctx, + lis2dh12_tr_t *val); + +typedef enum +{ + LIS2DH12_BYPASS_MODE = 0, + LIS2DH12_FIFO_MODE = 1, + LIS2DH12_DYNAMIC_STREAM_MODE = 2, + LIS2DH12_STREAM_TO_FIFO_MODE = 3, +} lis2dh12_fm_t; +int32_t lis2dh12_fifo_mode_set(stmdev_ctx_t *ctx, lis2dh12_fm_t val); +int32_t lis2dh12_fifo_mode_get(stmdev_ctx_t *ctx, lis2dh12_fm_t *val); + +int32_t lis2dh12_fifo_status_get(stmdev_ctx_t *ctx, + lis2dh12_fifo_src_reg_t *val); + +int32_t lis2dh12_fifo_data_level_get(stmdev_ctx_t *ctx, uint8_t *val); + +int32_t lis2dh12_fifo_empty_flag_get(stmdev_ctx_t *ctx, uint8_t *val); + +int32_t lis2dh12_fifo_ovr_flag_get(stmdev_ctx_t *ctx, uint8_t *val); + +int32_t lis2dh12_fifo_fth_flag_get(stmdev_ctx_t *ctx, uint8_t *val); + +int32_t lis2dh12_tap_conf_set(stmdev_ctx_t *ctx, + lis2dh12_click_cfg_t *val); +int32_t lis2dh12_tap_conf_get(stmdev_ctx_t *ctx, + lis2dh12_click_cfg_t *val); + +int32_t lis2dh12_tap_source_get(stmdev_ctx_t *ctx, + lis2dh12_click_src_t *val); + +int32_t lis2dh12_tap_threshold_set(stmdev_ctx_t *ctx, uint8_t val); +int32_t lis2dh12_tap_threshold_get(stmdev_ctx_t *ctx, uint8_t *val); + +typedef enum +{ + LIS2DH12_TAP_PULSED = 0, + LIS2DH12_TAP_LATCHED = 1, +} lis2dh12_lir_click_t; +int32_t lis2dh12_tap_notification_mode_set(stmdev_ctx_t *ctx, + lis2dh12_lir_click_t val); +int32_t lis2dh12_tap_notification_mode_get(stmdev_ctx_t *ctx, + lis2dh12_lir_click_t *val); + +int32_t lis2dh12_shock_dur_set(stmdev_ctx_t *ctx, uint8_t val); +int32_t lis2dh12_shock_dur_get(stmdev_ctx_t *ctx, uint8_t *val); + +int32_t lis2dh12_quiet_dur_set(stmdev_ctx_t *ctx, uint8_t val); +int32_t lis2dh12_quiet_dur_get(stmdev_ctx_t *ctx, uint8_t *val); + +int32_t lis2dh12_double_tap_timeout_set(stmdev_ctx_t *ctx, + uint8_t val); +int32_t lis2dh12_double_tap_timeout_get(stmdev_ctx_t *ctx, + uint8_t *val); + +int32_t lis2dh12_act_threshold_set(stmdev_ctx_t *ctx, uint8_t val); +int32_t lis2dh12_act_threshold_get(stmdev_ctx_t *ctx, uint8_t *val); + +int32_t lis2dh12_act_timeout_set(stmdev_ctx_t *ctx, uint8_t val); +int32_t lis2dh12_act_timeout_get(stmdev_ctx_t *ctx, uint8_t *val); + +typedef enum +{ + LIS2DH12_PULL_UP_DISCONNECT = 0, + LIS2DH12_PULL_UP_CONNECT = 1, +} lis2dh12_sdo_pu_disc_t; +int32_t lis2dh12_pin_sdo_sa0_mode_set(stmdev_ctx_t *ctx, + lis2dh12_sdo_pu_disc_t val); +int32_t lis2dh12_pin_sdo_sa0_mode_get(stmdev_ctx_t *ctx, + lis2dh12_sdo_pu_disc_t *val); + +typedef enum +{ + LIS2DH12_SPI_4_WIRE = 0, + LIS2DH12_SPI_3_WIRE = 1, +} lis2dh12_sim_t; +int32_t lis2dh12_spi_mode_set(stmdev_ctx_t *ctx, lis2dh12_sim_t val); +int32_t lis2dh12_spi_mode_get(stmdev_ctx_t *ctx, lis2dh12_sim_t *val); + +/** + * @} + * + */ + +#ifdef __cplusplus +} +#endif + +#endif /* LIS2DH12_REGS_H */ + +/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/lib/Marlin/Marlin/src/feature/input_shaper/input_shaper_config.cpp b/lib/Marlin/Marlin/src/feature/input_shaper/input_shaper_config.cpp index acf706bae8..3f297ad1cb 100644 --- a/lib/Marlin/Marlin/src/feature/input_shaper/input_shaper_config.cpp +++ b/lib/Marlin/Marlin/src/feature/input_shaper/input_shaper_config.cpp @@ -79,6 +79,9 @@ static std::pair get_input_shaper( #endif static void set_logical_axis_config_internal(const AxisEnum axis, std::optional axis_config) { + // ensure moves are not being processed as we change parameters + assert(PreciseStepping::move_segment_queue_size() == 0); + #ifdef COREXY if (axis_config) { if (axis == X_AXIS || axis == Y_AXIS) { diff --git a/lib/Marlin/Marlin/src/feature/input_shaper/input_shaper_config.hpp b/lib/Marlin/Marlin/src/feature/input_shaper/input_shaper_config.hpp index 41bf990588..99c9fc099c 100644 --- a/lib/Marlin/Marlin/src/feature/input_shaper/input_shaper_config.hpp +++ b/lib/Marlin/Marlin/src/feature/input_shaper/input_shaper_config.hpp @@ -98,12 +98,25 @@ inline constexpr AxisConfig axis_z_default { .damping_ratio = 0., .vibration_reduction = 0., }; + inline constexpr AxisConfig axis_defaults[3] = { axis_x_default, axis_y_default, axis_z_default }; +inline constexpr bool weight_adjust_enabled_default = { +// DO NOT CHANGE DEFAULTS WITHOUT CHANGING EEPROM CODE! +#if PRINTER_IS_PRUSA_XL + false +#else + true +#endif +}; + inline constexpr WeightAdjustConfig weight_adjust_y_default { // DO NOT CHANGE DEFAULTS WITHOUT CHANGING EEPROM CODE! - +#if PRINTER_IS_PRUSA_XL + .frequency_delta = 0, +#else .frequency_delta = -20.0f, +#endif .mass_limit = 800.0f, }; diff --git a/lib/Marlin/Marlin/src/feature/pressure_advance/pressure_advance.cpp b/lib/Marlin/Marlin/src/feature/pressure_advance/pressure_advance.cpp index 61f67fa20c..3e6a1d6907 100644 --- a/lib/Marlin/Marlin/src/feature/pressure_advance/pressure_advance.cpp +++ b/lib/Marlin/Marlin/src/feature/pressure_advance/pressure_advance.cpp @@ -352,9 +352,15 @@ void pressure_advance_reset_position(pressure_advance_step_generator_t &step_gen step_generator.pa_state->buffer.data[buffer_idx] += axis_diff; // Because this function is called when the next step position isn't within the interval (prev_position, next_position), - // we don't have to care about numeric issues. - step_generator.pa_state->prev_position += axis_diff; - step_generator.pa_state->next_position = pressure_advance_apply_filter(*step_generator.pa_state, PressureAdvance::pressure_advance_params); + // we don't have to care about numeric issues. We have to only ensure that when prev_position and next_position are equal, + // then after resetting, they will also equal. + float new_next_position = pressure_advance_apply_filter(*step_generator.pa_state, PressureAdvance::pressure_advance_params); + if (step_generator.pa_state->prev_position == step_generator.pa_state->next_position) + step_generator.pa_state->prev_position = new_next_position; + else + step_generator.pa_state->prev_position += axis_diff; + + step_generator.pa_state->next_position = new_next_position; // Because the pressure advance adds additional steps and there is a delay between the current move segment // and current_distance, we need to recalculate current_distance instead of just resetting to zero. @@ -394,6 +400,13 @@ step_event_info_t pressure_advance_step_generator_next_step_event(pressure_advan // So we never step into this branch when current_move is pointing to the ending empty move segment. assert(!is_ending_empty_move(*step_generator.pa_state->current_move)); + // We have to update start_post before we reset the pressure advance position because + // we are using it during the resetting position. + if (is_pressure_advance_active(*next_move)) + step_generator.pa_state->start_pos = float(get_move_start_pos(*next_move, step_generator.axis)) + float(get_move_start_v(*next_move, step_generator.axis)) * PressureAdvance::pressure_advance_params.pressure_advance_value; + else + step_generator.pa_state->start_pos = float(get_move_start_pos(*next_move, step_generator.axis)); + // Apply reset of position on the pressure advance data structure and adjust position in steps (current_distance). if (next_move->flags & (MOVE_FLAG_RESET_POSITION_X << step_generator.axis)) pressure_advance_reset_position(step_generator, step_generator_state, *next_move); @@ -402,11 +415,6 @@ step_event_info_t pressure_advance_step_generator_next_step_event(pressure_advan step_generator.pa_state->current_move = next_move; ++step_generator.pa_state->current_move->reference_cnt; - if (is_pressure_advance_active(*next_move)) - step_generator.pa_state->start_pos = float(get_move_start_pos(*next_move, step_generator.axis)) + float(get_move_start_v(*next_move, step_generator.axis)) * PressureAdvance::pressure_advance_params.pressure_advance_value; - else - step_generator.pa_state->start_pos = float(get_move_start_pos(*next_move, step_generator.axis)); - step_generator.pa_state->local_sample_idx = 0; step_generator.pa_state->local_sample_time_left = std::max(float((step_generator.pa_state->total_sample_idx * PressureAdvance::pressure_advance_params.sampling_rate) - step_generator.pa_state->current_move->print_time), 0.f); diff --git a/lib/Marlin/Marlin/src/feature/prusa/MMU2/mmu2_mk4.cpp b/lib/Marlin/Marlin/src/feature/prusa/MMU2/mmu2_mk4.cpp index f511c9cfaf..9759ff3809 100644 --- a/lib/Marlin/Marlin/src/feature/prusa/MMU2/mmu2_mk4.cpp +++ b/lib/Marlin/Marlin/src/feature/prusa/MMU2/mmu2_mk4.cpp @@ -135,7 +135,7 @@ MMU2::MMU2() void MMU2::Start() { mmu2Serial.begin(MMU_BAUD); - PowerOn(); // I repurposed this to serve as our EEPROM disable toggle. + PowerOn(); mmu2Serial.flush(); // make sure the UART buffer is clear before starting communication extruder = MMU2_NO_TOOL; @@ -143,19 +143,25 @@ void MMU2::Start() { // start the communication logic.Start(); - logic.ResetRetryAttempts(); + logic.ResetCommunicationTimeoutAttempts(); } void MMU2::Stop() { StopKeepPowered(); - PowerOff(); // This also disables the MMU in the EEPROM. + PowerOff(); } void MMU2::StopKeepPowered() { state = xState::Stopped; logic.Stop(); mmu2Serial.close(); + + // This should reset the error reporter to no error + ReportProgressHook(CommandInProgress::Reset, ProgressCode::OK); + + // Deactivate the FSM + EndReport(CommandInProgress::Reset, ProgressCode::OK); } void MMU2::Tune() { @@ -205,11 +211,9 @@ void MMU2::TriggerResetPin() { void MMU2::PowerCycle() { // cut the power to the MMU and after a while restore it // Sadly, MK3/S/+ cannot do this - // NOTE: the below will toggle the EEPROM var. Should we - // assert this function is never called in the MK3 FW? Do we even care? - PowerOff(); + Stop(); safe_delay_keep_alive(1000); - PowerOn(); + Start(); } void MMU2::PowerOff() { @@ -271,12 +275,7 @@ void MMU2::mmu_loop() { void __attribute__((noinline)) MMU2::mmu_loop_inner(bool reportErrors) { logicStepLastStatus = LogicStep(reportErrors); // it looks like the mmu_loop doesn't need to be a blocking call - - if (isErrorScreenRunning()) { - // Call this every iteration to keep the knob rotation responsive - // This includes when mmu_loop is called within manage_response - ReportErrorHook((CommandInProgress)logic.CommandInProgress(), lastErrorCode, uint8_t(lastErrorSource)); - } + CheckErrorScreenUserInput(); } #else @@ -912,7 +911,8 @@ void MMU2::CheckUserInput() { // ... but mmu2_power.cpp knows this and triggers a soft-reset instead. break; case Buttons::DisableMMU: - Stop(); // Poweroff handles updating the EEPROM shutoff. + Stop(); + DisableMMUInSettings(); break; case Buttons::StopPrint: // @@TODO not sure if we shall handle this high level operation at this spot @@ -1015,45 +1015,58 @@ bool MMU2::manage_response(const bool move_axes, const bool turn_off_nozzle) { } StepStatus MMU2::LogicStep(bool reportErrors) { - CheckUserInput(); // Process any buttons before proceeding with another MMU Query - StepStatus ss = logic.Step(); + // Process any buttons before proceeding with another MMU Query + CheckUserInput(); + + const StepStatus ss = logic.Step(); switch (ss) { + case Finished: // At this point it is safe to trigger a runout and not interrupt the MMU protocol CheckFINDARunout(); [[fallthrough]]; // let Finished be reported the same way like Processing + case Processing: OnMMUProgressMsg(logic.Progress()); break; + case ButtonPushed: lastButton = logic.Button(); LogEchoEvent_P(PSTR("MMU Button pushed")); CheckUserInput(); // Process the button immediately break; + case Interrupted: // can be silently handed over to a higher layer, no processing necessary at this spot break; + default: if (reportErrors) { switch (ss) { + case CommandError: ReportError(logic.Error(), ErrorSourceMMU); break; + case CommunicationTimeout: state = xState::Connecting; ReportError(ErrorCode::MMU_NOT_RESPONDING, ErrorSourcePrinter); break; + case ProtocolError: state = xState::Connecting; ReportError(ErrorCode::PROTOCOL_ERROR, ErrorSourcePrinter); break; + case VersionMismatch: StopKeepPowered(); ReportError(ErrorCode::VERSION_MISMATCH, ErrorSourcePrinter); break; + case PrinterError: ReportError(logic.PrinterError(), ErrorSourcePrinter); break; + default: break; } @@ -1063,6 +1076,7 @@ StepStatus MMU2::LogicStep(bool reportErrors) { if (logic.Running()) { state = xState::Active; } + return ss; } diff --git a/lib/Marlin/Marlin/src/feature/prusa/MMU2/mmu2_reporting.h b/lib/Marlin/Marlin/src/feature/prusa/MMU2/mmu2_reporting.h index 6d4ced72b9..0413d9050c 100644 --- a/lib/Marlin/Marlin/src/feature/prusa/MMU2/mmu2_reporting.h +++ b/lib/Marlin/Marlin/src/feature/prusa/MMU2/mmu2_reporting.h @@ -30,8 +30,8 @@ void BeginReport(CommandInProgress cip, ProgressCode ec); /// Called at the end of every MMU operation void EndReport(CommandInProgress cip, ProgressCode ec); -/// Return true if the printer's LCD is drawing the error screen -bool isErrorScreenRunning(); +/// Checks for error screen user input, if the error screen is open +void CheckErrorScreenUserInput(); /// Return true if the error screen is sleeping in the background /// Error screen sleeps when the firmware is rendering complementary @@ -92,6 +92,9 @@ bool MMUAvailable(); /// Global Enable/Disable use MMU (to be stored in EEPROM) bool UseMMU(); +/// Disables MMU in EEPROM +void DisableMMUInSettings(); + /// Increments EEPROM cell - number of failed loads into the nozzle /// Note: technically, this is not an MMU error but an error of the printer. void IncrementLoadFails(); diff --git a/lib/Marlin/Marlin/src/feature/prusa/MMU2/protocol_logic.cpp b/lib/Marlin/Marlin/src/feature/prusa/MMU2/protocol_logic.cpp index 47a8536be4..9c6f81aa7e 100644 --- a/lib/Marlin/Marlin/src/feature/prusa/MMU2/protocol_logic.cpp +++ b/lib/Marlin/Marlin/src/feature/prusa/MMU2/protocol_logic.cpp @@ -256,7 +256,7 @@ StepStatus ProtocolLogic::ProcessVersionResponse(uint8_t stage) { SendVersion(stage); } } else { - dataTO.Reset(); // got a meaningful response from the MMU, stop data layer timeout tracking + ResetCommunicationTimeoutAttempts(); // got a meaningful response from the MMU, stop data layer timeout tracking SendVersion(stage + 1); } } @@ -776,7 +776,7 @@ void ProtocolLogic::LogResponse() { StepStatus ProtocolLogic::SuppressShortDropOuts(const char *msg_P, StepStatus ss) { if (dataTO.Record(ss)) { LogError(msg_P); - dataTO.Reset(); // prepare for another run of consecutive retries before firing an error + ResetCommunicationTimeoutAttempts(); // prepare for another run of consecutive retries before firing an error return dataTO.InitialCause(); } else { return Processing; // suppress short drop outs of communication @@ -867,6 +867,11 @@ void ProtocolLogic::ResetRetryAttempts() { retryAttempts = MAX_RETRIES; } +void ProtocolLogic::ResetCommunicationTimeoutAttempts() { + SERIAL_ECHOLNPGM("RSTCommTimeout"); + dataTO.Reset(); +} + bool DropOutFilter::Record(StepStatus ss) { if (occurrences == maxOccurrences) { cause = ss; diff --git a/lib/Marlin/Marlin/src/feature/prusa/MMU2/protocol_logic.h b/lib/Marlin/Marlin/src/feature/prusa/MMU2/protocol_logic.h index 1bf9399797..b22c56f7c4 100644 --- a/lib/Marlin/Marlin/src/feature/prusa/MMU2/protocol_logic.h +++ b/lib/Marlin/Marlin/src/feature/prusa/MMU2/protocol_logic.h @@ -186,6 +186,8 @@ class ProtocolLogic { /// Reset the retryAttempts back to the default value void ResetRetryAttempts(); + void ResetCommunicationTimeoutAttempts(); + constexpr bool InAutoRetry() const { return inAutoRetry; } void SetInAutoRetry(bool iar) { inAutoRetry = iar; diff --git a/lib/Marlin/Marlin/src/feature/prusa/crash_recovery.cpp b/lib/Marlin/Marlin/src/feature/prusa/crash_recovery.cpp index f2fa123904..0173329fd0 100644 --- a/lib/Marlin/Marlin/src/feature/prusa/crash_recovery.cpp +++ b/lib/Marlin/Marlin/src/feature/prusa/crash_recovery.cpp @@ -330,10 +330,10 @@ void Crash_s::send_reports() { float speed = -1; if (axis_hit == X_AXIS) { - speed = tmc_period_to_feedrate(get_microsteps_x(), stepperX.TSTEP(), get_steps_per_unit_x()); + speed = tmc_period_to_feedrate(X_AXIS, get_microsteps_x(), stepperX.TSTEP(), get_steps_per_unit_x()); } if (axis_hit == Y_AXIS) { - speed = tmc_period_to_feedrate(get_microsteps_y(), stepperY.TSTEP(), get_steps_per_unit_y()); + speed = tmc_period_to_feedrate(Y_AXIS, get_microsteps_y(), stepperY.TSTEP(), get_steps_per_unit_y()); } static metric_t crash_metric = METRIC("crash", METRIC_VALUE_CUSTOM, 0, METRIC_HANDLER_ENABLE_ALL); diff --git a/lib/Marlin/Marlin/src/feature/tmc_util.cpp b/lib/Marlin/Marlin/src/feature/tmc_util.cpp index ec0fef16d9..741f7f475f 100644 --- a/lib/Marlin/Marlin/src/feature/tmc_util.cpp +++ b/lib/Marlin/Marlin/src/feature/tmc_util.cpp @@ -55,17 +55,35 @@ #endif #endif -static inline uint32_t get_tmc_freq() { - #if PRINTER_IS_PRUSA_MK4 - return buddy::hw::Configuration::Instance().has_trinamic_oscillators() ? 16000000 : 12650000; - #else - return 12650000; - #endif +#include +#if BOARD_IS_XBUDDY + #include +#endif + +static constexpr uint32_t TMC2130_INT_OSC_FREQ = 12650000; +static constexpr uint32_t TMC2130_EXT_OSC_FREQ = 16000000; + +static inline uint32_t get_tmc_freq(AxisEnum axis_id) { + switch (axis_id) { + case X_AXIS: + case Y_AXIS: + case Z_AXIS: +#if BOARD_IS_XBUDDY + return buddy::hw::Configuration::Instance().has_trinamic_oscillators() ? TMC2130_EXT_OSC_FREQ : TMC2130_INT_OSC_FREQ; +#elif BOARD_IS_XLBUDDY + return TMC2130_EXT_OSC_FREQ; +#else + return TMC2130_INT_OSC_FREQ; +#endif + + default: + return TMC2130_INT_OSC_FREQ; + } } // The conversion between period and feedrate is symmetric, use a shared // implementation and just do a cast from float to uint32_t when needed. -static float period_feedrate_conversion(uint16_t msteps, const float value, const uint32_t steps_per_mm) { +static float period_feedrate_conversion(AxisEnum axis_id, uint16_t msteps, const float value, const uint32_t steps_per_mm) { if (value == 0) { return std::numeric_limits::infinity(); } @@ -74,15 +92,15 @@ static float period_feedrate_conversion(uint16_t msteps, const float value, cons } msteps = std::max(1, msteps); // 0 msteps is infact 1 - return get_tmc_freq() * msteps / (256.f * value * steps_per_mm); + return get_tmc_freq(axis_id) * msteps / (256.f * value * steps_per_mm); } -float tmc_period_to_feedrate(uint16_t msteps, const uint32_t period, const uint32_t steps_per_mm) { - return period_feedrate_conversion(msteps, period, steps_per_mm); +float tmc_period_to_feedrate(AxisEnum axis_id, uint16_t msteps, const uint32_t period, const uint32_t steps_per_mm) { + return period_feedrate_conversion(axis_id, msteps, period, steps_per_mm); } -uint32_t tmc_feedrate_to_period(uint16_t msteps, const float feedrate, const uint32_t steps_per_mm) { - return static_cast(period_feedrate_conversion(msteps, feedrate, steps_per_mm)); +uint32_t tmc_feedrate_to_period(AxisEnum axis_id, uint16_t msteps, const float feedrate, const uint32_t steps_per_mm) { + return static_cast(period_feedrate_conversion(axis_id, msteps, feedrate, steps_per_mm)); } /** diff --git a/lib/Marlin/Marlin/src/feature/tmc_util.h b/lib/Marlin/Marlin/src/feature/tmc_util.h index 1e4123af14..aaa497fc38 100644 --- a/lib/Marlin/Marlin/src/feature/tmc_util.h +++ b/lib/Marlin/Marlin/src/feature/tmc_util.h @@ -64,7 +64,7 @@ * @param steps_per_mm Axis steps per mm * @return Feedrate in mm/s */ -float tmc_period_to_feedrate(uint16_t msteps, const uint32_t period, const uint32_t steps_per_mm); +float tmc_period_to_feedrate(AxisEnum axis_id, uint16_t msteps, const uint32_t period, const uint32_t steps_per_mm); /** * @brief Return the TMC period value for a given feedrate `feedrate`. @@ -73,7 +73,7 @@ float tmc_period_to_feedrate(uint16_t msteps, const uint32_t period, const uint3 * @param steps_per_mm Axis steps per mm * @return TMC period value */ -uint32_t tmc_feedrate_to_period(uint16_t msteps, const float feedrate, const uint32_t steps_per_mm); +uint32_t tmc_feedrate_to_period(AxisEnum axis_id, uint16_t msteps, const float feedrate, const uint32_t steps_per_mm); class TMCStorage { protected: @@ -165,10 +165,10 @@ class TMCMarlinBase : public TMC, public TMCStorage { #endif #if ENABLED(HYBRID_THRESHOLD) uint32_t get_pwm_thrs() { - return tmc_feedrate_to_period(this->microsteps(), this->TPWMTHRS(), planner.settings.axis_steps_per_mm[axis_id]); + return tmc_feedrate_to_period(axis_id, this->microsteps(), this->TPWMTHRS(), planner.settings.axis_steps_per_mm[axis_id]); } void set_pwm_thrs(const uint32_t thrs) { - TMC::TPWMTHRS(tmc_feedrate_to_period(this->microsteps(), thrs, planner.settings.axis_steps_per_mm[axis_id])); + TMC::TPWMTHRS(tmc_feedrate_to_period(axis_id, this->microsteps(), thrs, planner.settings.axis_steps_per_mm[axis_id])); #if HAS_LCD_MENU this->stored.hybrid_thrs = thrs; #endif diff --git a/lib/Marlin/Marlin/src/gcode/calibrate/M958.cpp b/lib/Marlin/Marlin/src/gcode/calibrate/M958.cpp index 111931ca77..57f80e2da0 100644 --- a/lib/Marlin/Marlin/src/gcode/calibrate/M958.cpp +++ b/lib/Marlin/Marlin/src/gcode/calibrate/M958.cpp @@ -356,6 +356,7 @@ static case PrusaAccelerometer::Error::corrupted_transmission_error: case PrusaAccelerometer::Error::corrupted_dwarf_overflow: #endif + case PrusaAccelerometer::Error::corrupted_sample_overrun: case PrusaAccelerometer::Error::corrupted_buddy_overflow: SERIAL_ERROR_MSG("corrupted"); break; diff --git a/lib/Marlin/Marlin/src/gcode/queue.cpp b/lib/Marlin/Marlin/src/gcode/queue.cpp index 90f1912bc9..de098417d9 100644 --- a/lib/Marlin/Marlin/src/gcode/queue.cpp +++ b/lib/Marlin/Marlin/src/gcode/queue.cpp @@ -34,6 +34,7 @@ GCodeQueue queue; #include "../module/planner.h" #include "../module/temperature.h" #include "../Marlin.h" +#include "serial_printing.hpp" #if ENABLED(PRINTER_EVENT_LEDS) #include "../feature/leds/printer_event_leds.h" @@ -456,6 +457,9 @@ void GCodeQueue::get_serial_commands() { last_command_time = ms; #endif + // notify serial printing about command + SerialPrinting::serial_command_hook(command); + // Add the command to the queue _enqueue(serial_line_buffer[i], true #if NUM_SERIAL > 1 diff --git a/lib/Marlin/Marlin/src/module/planner.cpp b/lib/Marlin/Marlin/src/module/planner.cpp index 0eaba85dd2..80716fecba 100644 --- a/lib/Marlin/Marlin/src/module/planner.cpp +++ b/lib/Marlin/Marlin/src/module/planner.cpp @@ -1136,6 +1136,13 @@ void Planner::synchronize() { bool emptying_buffer_orig = emptying(); emptying_buffer = true; while (busy()) idle(true); + + // Perform at least one call of PreciseStepping::loop() to ensure that all queues will + // be reset when stop_pending is set. Because otherwise, it could happen that due to + // wrong timing, another G-code could be processed before all queues are reset. + if (PreciseStepping::stopping()) + PreciseStepping::loop(); + emptying_buffer = emptying_buffer_orig; } diff --git a/lib/Marlin/Marlin/src/module/probe.cpp b/lib/Marlin/Marlin/src/module/probe.cpp index d3066051b2..4dee09a983 100644 --- a/lib/Marlin/Marlin/src/module/probe.cpp +++ b/lib/Marlin/Marlin/src/module/probe.cpp @@ -746,7 +746,7 @@ float run_z_probe(float expected_trigger_z, bool single_only, bool *endstop_trig // Return slowly back float move_back = 0.09f; do_blocking_move_to_z(current_position.z + move_back, MMM_TO_MMS(Z_PROBE_SPEED_BACK_MOVE)); - uint32_t move_back_end = millis(); + uint32_t move_back_end = micros(); #endif #if ENABLED(MEASURE_BACKLASH_WHEN_PROBING) @@ -769,7 +769,7 @@ float run_z_probe(float expected_trigger_z, bool single_only, bool *endstop_trig } #elif ENABLED(NOZZLE_LOAD_CELL) // wait until the analysis' window fully includes the move-back period - uint32_t window_end = move_back_end + static_cast((loadcell.analysis.analysisLookahead + loadcell.analysis.loadDelay) * 1000.f); + uint32_t window_end = move_back_end + static_cast((loadcell.analysis.analysisLookahead + loadcell.analysis.loadDelay) * 1000000.f); loadcell.WaitBarrier(window_end); static metric_t analysis_result = METRIC("probe_analysis", METRIC_VALUE_CUSTOM, 0, METRIC_HANDLER_ENABLE_ALL); @@ -1040,7 +1040,7 @@ float probe_at_point(const float &rx, const float &ry, const ProbePtRaise raise_ { int logical_x = LOGICAL_X_POSITION(rx); int logical_y = LOGICAL_Y_POSITION(ry); - metric_record_custom(&metric_probe_z, ",x=%i,y=%i v=%.3f", logical_x, logical_y, (double)measured_z); + metric_record_custom(&metric_probe_z, " x=%i,y=%i,v=%.3f", logical_x, logical_y, (double)measured_z); } feedrate_mm_s = old_feedrate_mm_s; diff --git a/lib/Marlin/Marlin/src/module/prusa/accelerometer.h b/lib/Marlin/Marlin/src/module/prusa/accelerometer.h index 87cd170f5e..6bf81940c5 100644 --- a/lib/Marlin/Marlin/src/module/prusa/accelerometer.h +++ b/lib/Marlin/Marlin/src/module/prusa/accelerometer.h @@ -21,7 +21,8 @@ class PrusaAccelerometer { #else struct Acceleration { float val[3]; - bool corrupted; + bool buffer_overflow; + bool sample_overrun; }; #endif @@ -35,6 +36,7 @@ class PrusaAccelerometer { corrupted_dwarf_overflow, // Data not consistent, sample missed on dwarf corrupted_transmission_error, // Data not consistent, sample possibly lost in transfer #endif + corrupted_sample_overrun, // Data not consistent, sample overrun }; PrusaAccelerometer(); diff --git a/lib/Marlin/Marlin/src/module/prusa/accelerometer_remote.cpp b/lib/Marlin/Marlin/src/module/prusa/accelerometer_remote.cpp index c1bc927201..f3d505c425 100644 --- a/lib/Marlin/Marlin/src/module/prusa/accelerometer_remote.cpp +++ b/lib/Marlin/Marlin/src/module/prusa/accelerometer_remote.cpp @@ -64,6 +64,7 @@ PrusaAccelerometer::~PrusaAccelerometer() { case Error::communication: case Error::corrupted_buddy_overflow: case Error::corrupted_dwarf_overflow: + case Error::corrupted_sample_overrun: case Error::corrupted_transmission_error: { buddy::puppies::Dwarf *dwarf = prusa_toolchanger.get_marlin_picked_tool(); if (!dwarf) @@ -93,9 +94,12 @@ int PrusaAccelerometer::get_sample(Acceleration &acceleration) { bool ret_val = m_sample_buffer.ConsumeFirst(sample); if (ret_val) { acceleration = AccelerometerUtils::unpack_sample(sample); - if (acceleration.corrupted) { + if (acceleration.buffer_overflow) { mark_corrupted(Error::corrupted_dwarf_overflow); } + if (acceleration.sample_overrun) { + mark_corrupted(Error::corrupted_sample_overrun); + } } return ret_val; } @@ -108,7 +112,10 @@ void PrusaAccelerometer::put_sample(common::puppies::fifo::AccelerometerXyzSampl } } void PrusaAccelerometer::mark_corrupted(const Error error) { - assert(error == Error::corrupted_dwarf_overflow || error == Error::corrupted_buddy_overflow || error == Error::corrupted_transmission_error); + assert(error == Error::corrupted_dwarf_overflow + || error == Error::corrupted_buddy_overflow + || error == Error::corrupted_transmission_error + || error == Error::corrupted_sample_overrun); m_error = error; } PrusaAccelerometer::Error PrusaAccelerometer::m_error = Error::none; diff --git a/lib/Marlin/Marlin/src/module/prusa/accelerometer_utils.cpp b/lib/Marlin/Marlin/src/module/prusa/accelerometer_utils.cpp index bcb2b2cee8..e943fecaca 100644 --- a/lib/Marlin/Marlin/src/module/prusa/accelerometer_utils.cpp +++ b/lib/Marlin/Marlin/src/module/prusa/accelerometer_utils.cpp @@ -21,7 +21,8 @@ PrusaAccelerometer::Acceleration AccelerometerUtils::unpack_sample(common::puppi accelerometer_sample.val[1] = static_cast(acceleration) * factor2g; acceleration = (sample >> z_left_shift) & top_10_bits; accelerometer_sample.val[0] = static_cast(acceleration) * factor2g; - accelerometer_sample.corrupted = sample & corrupted_mask; + accelerometer_sample.buffer_overflow = sample & buffer_overflow_mask; + accelerometer_sample.sample_overrun = sample & sample_overrun_mask; return accelerometer_sample; } #endif diff --git a/lib/Marlin/Marlin/src/module/prusa/accelerometer_utils.h b/lib/Marlin/Marlin/src/module/prusa/accelerometer_utils.h index d456a735b9..bd41c68021 100644 --- a/lib/Marlin/Marlin/src/module/prusa/accelerometer_utils.h +++ b/lib/Marlin/Marlin/src/module/prusa/accelerometer_utils.h @@ -16,9 +16,10 @@ class AccelerometerUtils { static constexpr unsigned y_left_shift = 4; /// Z raw acceleration will occupy bits 20 .. 29 (LSB first) static constexpr unsigned z_left_shift = 14; - /// Reserved bit 30 - /// Corrupted bit will occupy bit 31 - static constexpr uint_least32_t corrupted_mask = 1 << 31; + /// Buffer overflow bit will occupy bit 30 + static constexpr uint_least32_t buffer_overflow_mask = 1 << 30; + /// Sample overrun bit will occupy bit 31 + static constexpr uint_least32_t sample_overrun_mask = 1 << 31; public: /** @@ -33,7 +34,8 @@ class AccelerometerUtils { return ((static_cast(record.z) << z_left_shift) & z_mask) | ((static_cast(record.y) << y_left_shift) & y_mask) | ((static_cast(record.x) >> x_right_shift) & x_mask) - | (record.corrupted ? corrupted_mask : 0); + | (record.buffer_overflow ? buffer_overflow_mask : 0) + | (record.sample_overrun ? sample_overrun_mask : 0); } #if ENABLED(REMOTE_ACCELEROMETER) diff --git a/lib/Marlin/Marlin/src/module/prusa/toolchanger.cpp b/lib/Marlin/Marlin/src/module/prusa/toolchanger.cpp index 74c6534440..8cc7d5de89 100644 --- a/lib/Marlin/Marlin/src/module/prusa/toolchanger.cpp +++ b/lib/Marlin/Marlin/src/module/prusa/toolchanger.cpp @@ -14,6 +14,7 @@ #include #include #include + #include #include "module/temperature.h" // for fan control #if ENABLED(CRASH_RECOVERY) @@ -515,7 +516,7 @@ bool PrusaToolChanger::purge_tool(Dwarf &dwarf) { return true; } -void PrusaToolChanger::loop(bool printing) { +void PrusaToolChanger::loop(bool printing, bool paused) { // WARNING: called from default(marlin) task if (block_tool_check.load() // This function can be blocked @@ -532,7 +533,7 @@ void PrusaToolChanger::loop(bool printing) { // Automatically change tool if (force_toolchange_gcode.load() // Force toolchange after reset to force all marlin tool variables || ((picked != active) // When user parked or picked manually - && (printing == false) // Only if not printing + && (printing == false) && (paused == false) // Only if not printing and not in pause && (queue.has_commands_queued() == false) && (planner.processing() == false))) { // And nothing is in queue force_toolchange_gcode = false; @@ -543,10 +544,9 @@ void PrusaToolChanger::loop(bool printing) { // Check that all tools are where they should be if (printing // Only while printing #if ENABLED(CRASH_RECOVERY) - // Do not check during crash recovery - && (crash_s.get_state() == Crash_s::PRINTING) + && (crash_s.get_state() == Crash_s::PRINTING) // Do not check during crash recovery #endif /*ENABLED(CRASH_RECOVERY)*/ - ) { + && !Pause::Instance().get_mode().has_value()) { // Do not check during filament change bool all_good = true; if (picked != active) { tool_check_fails++; // Tool switched diff --git a/lib/Marlin/Marlin/src/module/prusa/toolchanger.h b/lib/Marlin/Marlin/src/module/prusa/toolchanger.h index 3722f99325..0aff36644f 100644 --- a/lib/Marlin/Marlin/src/module/prusa/toolchanger.h +++ b/lib/Marlin/Marlin/src/module/prusa/toolchanger.h @@ -61,8 +61,9 @@ class PrusaToolChanger : public PrusaToolChangerUtils { * @brief Loop that checks toolchanger state. * @warning Called only directly from marlin server. * @param printing true if currently printing, to not start toolchange spontaneously + * @param paused true if currently paused (not printing), to not start toolchange spontaneously */ - void loop(bool printing); + void loop(bool printing, bool paused); /** * @brief Move to a XY position diff --git a/lib/Marlin/Marlin/src/module/temperature.cpp b/lib/Marlin/Marlin/src/module/temperature.cpp index 45386aec02..e27907de65 100644 --- a/lib/Marlin/Marlin/src/module/temperature.cpp +++ b/lib/Marlin/Marlin/src/module/temperature.cpp @@ -3690,6 +3690,7 @@ void Temperature::isr() { if (e == H_CHAMBER) k = 'C'; #endif #if HAS_TEMP_HOTEND + if (e == INDEX_NONE) k = 'T'; if (e >= H_E0 && e <= H_E5) { k = 'T'; tool_nr = e - H_E0; diff --git a/lib/Marlin/Marlin/src/module/temperature.h b/lib/Marlin/Marlin/src/module/temperature.h index 5096ca495b..45814c512f 100644 --- a/lib/Marlin/Marlin/src/module/temperature.h +++ b/lib/Marlin/Marlin/src/module/temperature.h @@ -933,6 +933,12 @@ class Temperature { #if ENABLED(PID_EXTRUSION_SCALING) last_e_position = 0; #endif + #if ENABLED(PRUSA_TOOLCHANGER) + // Set PID parameters to all dwarves + HOTEND_LOOP() { + buddy::puppies::dwarfs[e].set_pid(Temperature::temp_hotend[e].pid.Kp, Temperature::temp_hotend[e].pid.Ki, Temperature::temp_hotend[e].pid.Kd); + } + #endif /*HAS_DWARF()*/ } #endif diff --git a/lib/Middlewares/ST/STM32_USB_Host_Library/Class/MSC/Src/usbh_msc.c b/lib/Middlewares/ST/STM32_USB_Host_Library/Class/MSC/Src/usbh_msc.c index 9d47ff709b..08ca60a5bc 100644 --- a/lib/Middlewares/ST/STM32_USB_Host_Library/Class/MSC/Src/usbh_msc.c +++ b/lib/Middlewares/ST/STM32_USB_Host_Library/Class/MSC/Src/usbh_msc.c @@ -118,6 +118,7 @@ USBH_ClassTypeDef USBH_msc = NULL, }; +uint32_t ticks_ms(); /** * @} @@ -794,7 +795,7 @@ USBH_StatusTypeDef USBH_MSC_Read(USBH_HandleTypeDef *phost, (void)USBH_MSC_SCSI_Read(phost, lun, address, pbuf, length); - timeout = phost->Timer; + timeout = ticks_ms(); while (USBH_MSC_RdWrProcess(phost, lun) == USBH_BUSY) { @@ -804,7 +805,7 @@ USBH_StatusTypeDef USBH_MSC_Read(USBH_HandleTypeDef *phost, ulTaskNotifyTake(pdFALSE, 500 / portTICK_PERIOD_MS); } - if (((phost->Timer - timeout) > (USBH_MSC_IO_TIMEOUT * length)) || (phost->device.is_connected == 0U)) + if (((ticks_ms() - timeout) > (USBH_MSC_IO_TIMEOUT * length)) || (phost->device.is_connected == 0U)) { MSC_Handle->state = MSC_IDLE; return USBH_FAIL; diff --git a/lib/Middlewares/ST/STM32_USB_Host_Library/Core/Inc/usbh_def.h b/lib/Middlewares/ST/STM32_USB_Host_Library/Core/Inc/usbh_def.h index f6a85204eb..07c0d7a0c1 100644 --- a/lib/Middlewares/ST/STM32_USB_Host_Library/Core/Inc/usbh_def.h +++ b/lib/Middlewares/ST/STM32_USB_Host_Library/Core/Inc/usbh_def.h @@ -192,7 +192,7 @@ extern "C" { #define USBH_MAX_ERROR_COUNT 0x50U #if (USBH_USE_OS == 1U) -#define MSGQUEUE_OBJECTS 0x10U +#define MSGQUEUE_OBJECTS 0x30U #endif @@ -489,7 +489,7 @@ typedef struct _USBH_HandleTypeDef #endif uint32_t os_msg; #endif - + bool stealth_reset; } USBH_HandleTypeDef; diff --git a/lib/Middlewares/ST/STM32_USB_Host_Library/Core/Src/usbh_core.c b/lib/Middlewares/ST/STM32_USB_Host_Library/Core/Src/usbh_core.c index 59fb5fd1fa..e5b40c2d7b 100644 --- a/lib/Middlewares/ST/STM32_USB_Host_Library/Core/Src/usbh_core.c +++ b/lib/Middlewares/ST/STM32_USB_Host_Library/Core/Src/usbh_core.c @@ -120,6 +120,8 @@ USBH_StatusTypeDef USBH_Init(USBH_HandleTypeDef *phost, phost->device.is_disconnected = 0U; phost->device.is_ReEnumerated = 0U; + phost->stealth_reset = false; + /* Assign User process */ if (pUsrFunc != NULL) { diff --git a/lib/Prusa-Error-Codes/.gitrepo b/lib/Prusa-Error-Codes/.gitrepo index f5b1f86aa9..59657fe659 100644 --- a/lib/Prusa-Error-Codes/.gitrepo +++ b/lib/Prusa-Error-Codes/.gitrepo @@ -6,7 +6,7 @@ [subrepo] remote = git@github.com:prusa3d/Prusa-Error-Codes.git branch = master - commit = 008dce1329d524e4a726a43f5571735cc4345cd5 - parent = 3d8d11500b38eea9b5f09c3ba176959f9ddce00d + commit = 95837d125fd5bbc1ab98b628b21a6f0c809f6bdb + parent = 76ed1e965faf4d237df6e95683b2acc236ede19e method = merge cmdver = 0.4.6 diff --git a/lib/Prusa-Error-Codes/04_MMU/error-codes.yaml b/lib/Prusa-Error-Codes/04_MMU/error-codes.yaml index 614628f958..8ec2b81768 100644 --- a/lib/Prusa-Error-Codes/04_MMU/error-codes.yaml +++ b/lib/Prusa-Error-Codes/04_MMU/error-codes.yaml @@ -28,6 +28,7 @@ Errors: action: [Retry] id: "FINDA_DIDNT_TRIGGER" approved: true + type: WARNING - code: "04102" title: "FINDA FILAM. STUCK" @@ -114,6 +115,7 @@ Errors: action: [Continue,ResetMMU] id: "WARNING_TMC_PULLEY_TOO_HOT" approved: true + type: ERROR - code: "04211" title: "WARNING TMC TOO HOT" @@ -284,6 +286,14 @@ Errors: id: "MCU_POWER_ERROR" approved: true +- code: "04307" + title: "MMU MCU UNDERPOWER" + text: "MMU MCU detected a 5V undervoltage. There might be an issue with the electronics. Check the wiring and connectors" + text_short: "More details online." + action: [ResetMMU] + id: "MCU_UNDERVOLTAGE_VCC" + approved: true + # CONNECTIVITY - code: "04401" title: "MMU NOT RESPONDING" @@ -324,7 +334,7 @@ Errors: - code: "04504" title: "MMU FW UPDATE NEEDED" text: "The MMU firmware version is incompatible with the printer's FW. Update to compatible version." - text_short: "MMU FW version is incompatible with printer FW.Update to version 3.0.0." + text_short: "MMU FW version is incompatible with printer FW.Update to version 3.0.1." action: [ResetMMU,DisableMMU] id: "FW_UPDATE_NEEDED" approved: true @@ -349,6 +359,7 @@ Errors: action: [Continue] id: "FILAMENT_EJECTED" approved: true + type: USER_ACTION - code: "04900" title: "UNKNOWN ERROR" diff --git a/lib/Prusa-Error-Codes/12_MINI/error-codes.yaml b/lib/Prusa-Error-Codes/12_MINI/error-codes.yaml index 61cc21f13e..a7eb499b36 100644 --- a/lib/Prusa-Error-Codes/12_MINI/error-codes.yaml +++ b/lib/Prusa-Error-Codes/12_MINI/error-codes.yaml @@ -158,6 +158,11 @@ Errors: id: "I2C_RX_UNDEFINED" approved: true # XX319-XX320 reserved +- code: "12401" + title: "CONNECT REGISTRATION FAILED" + text: "Registration to Prusa Connect failed due to:" + id: "CONNECT_REGISTRATION_FAILED" + approved: true # XX501-XX503 reserved - code: "12504" title: "ESP ERROR" @@ -210,6 +215,11 @@ Errors: text: "ESP doesn't seem to be connected." id: "ESP_NOT_CONNECTED" approved: false +- code: "12601" + title: "" + text: "This error code\nis not found in\nour database.\nContact the support." + id: "UNKNOWN_ERROR_CODE" + approved: true - code: "12602" title: "" text: "USB drive not\nconnected! Please\ninsert a USB drive\nwith a valid\nfirmware file." @@ -245,6 +255,11 @@ Errors: text: "Firmware in the\ninternal flash\ncorrupted! Please\nreflash the\nfirmware." id: "FW_IN_INTERNAL_FLASH_CORRUPTED" approved: true +- code: "12609" + title: "" + text: "Firmware and hardware\nversions do not\nmatch. Make sure\nyou have the right\nfirmware file for\nyour printer." + id: "HW_VERSION_ERR" + approved: true - code: "12610" title: "" text: "Firmware/printer\ntypes do not match.\nMake sure you have\nthe right firmware\nfile for your\nprinter model." diff --git a/lib/Prusa-Error-Codes/13_MK4/error-codes.yaml b/lib/Prusa-Error-Codes/13_MK4/error-codes.yaml index a1bb8d3082..4dbbfbbff4 100644 --- a/lib/Prusa-Error-Codes/13_MK4/error-codes.yaml +++ b/lib/Prusa-Error-Codes/13_MK4/error-codes.yaml @@ -208,6 +208,13 @@ Errors: id: "ACF_AT_INIT" approved: false +# CONNECTIVITY xx4xx + +- code: "13401" + title: "CONNECT REGISTRATION FAILED" + text: "Registration to Prusa Connect failed due to:" + id: "CONNECT_REGISTRATION_FAILED" + approved: true # SYSTEM xx5xx # XX501-XX503 reserved @@ -316,6 +323,12 @@ Errors: id: "ESP_NOT_CONNECTED" approved: false +- code: "13601" + title: "" + text: "This error code is not found\nin our database.\nContact the support." + id: "UNKNOWN_ERROR_CODE" + approved: true + - code: "13602" title: "" text: "USB drive not\nconnected! Please\ninsert a USB drive\nwith a valid\nfirmware file." @@ -357,6 +370,12 @@ Errors: id: "FW_IN_INTERNAL_FLASH_CORRUPTED" approved: true +- code: "13609" + title: "" + text: "Firmware and hardware versions do\nnot match. Make sure you have\nthe right firmware file for\nyour printer." + id: "HW_VERSION_ERR" + approved: true + - code: "13610" title: "" text: "Firmware/printer\ntypes do not match.\nMake sure you have\nthe right firmware\nfile for your\nprinter model." diff --git a/lib/Prusa-Error-Codes/16_iX/error-codes.yaml b/lib/Prusa-Error-Codes/16_iX/error-codes.yaml index ee0b8bb2d6..56b6fffb48 100644 --- a/lib/Prusa-Error-Codes/16_iX/error-codes.yaml +++ b/lib/Prusa-Error-Codes/16_iX/error-codes.yaml @@ -230,6 +230,11 @@ Errors: text: "Power panic has been detected during printer initialization. Inspect wiring of PP-cable." id: "ACF_AT_INIT" approved: false +- code: "16401" + title: "CONNECT REGISTRATION FAILED" + text: "Registration to Prusa Connect failed due to:" + id: "CONNECT_REGISTRATION_FAILED" + approved: true - code: "16501" title: "MODULAR BED ERROR" text: "Heatbed tile no. %d:\nUnknown error: %d" @@ -379,6 +384,11 @@ Errors: title: "ESP NOT CONNECTED" text: "ESP doesn't seem to be connected." id: "ESP_NOT_CONNECTED" +- code: "16601" + title: "" + text: "This error code is not found\nin our database.\nContact the support." + id: "UNKNOWN_ERROR_CODE" + approved: true - code: "16602" title: "" text: "USB drive not\nconnected! Please\ninsert a USB drive\nwith a valid\nfirmware file." @@ -414,6 +424,11 @@ Errors: text: "Firmware in the\ninternal flash\ncorrupted! Please\nreflash the\nfirmware." id: "FW_IN_INTERNAL_FLASH_CORRUPTED" approved: true +- code: "16609" + title: "" + text: "Firmware and hardware versions do\nnot match. Make sure you have\nthe right firmware file for\nyour printer." + id: "HW_VERSION_ERR" + approved: true - code: "16610" title: "" text: "Firmware/printer\ntypes do not match.\nMake sure you have\nthe right firmware\nfile for your\nprinter model." diff --git a/lib/Prusa-Error-Codes/17_XL/error-codes.yaml b/lib/Prusa-Error-Codes/17_XL/error-codes.yaml index 5d279dd464..0333f020b9 100644 --- a/lib/Prusa-Error-Codes/17_XL/error-codes.yaml +++ b/lib/Prusa-Error-Codes/17_XL/error-codes.yaml @@ -230,6 +230,11 @@ Errors: text: "%s Check hotend heater and control electronics for possible damage" id: "HEATER_HOTEND_OVERCURRENT" approved: false +- code: "17401" + title: "CONNECT REGISTRATION FAILED" + text: "Registration to Prusa Connect failed due to:" + id: "CONNECT_REGISTRATION_FAILED" + approved: true - code: "17501" title: "MODULAR BED ERROR" text: "Heatbed tile no. %d:\nUnknown error: %d" @@ -390,6 +395,11 @@ Errors: text: "ESP doesn't seem to be connected." id: "ESP_NOT_CONNECTED" approved: false +- code: "17601" + title: "" + text: "This error code is not found\nin our database.\nContact the support." + id: "UNKNOWN_ERROR_CODE" + approved: true - code: "17602" title: "USB FLASH DRIVE NOT CONNECTED" text: "USB drive not connected! \nPlease insert a USB drive with a valid firmware file." @@ -425,6 +435,11 @@ Errors: text: "Firmware in the\ninternal flash\ncorrupted! Please\nreflash the\nfirmware." id: "FW_IN_INTERNAL_FLASH_CORRUPTED" approved: true +- code: "17609" + title: "" + text: "Firmware and hardware versions do\nnot match. Make sure you have\nthe right firmware file for\nyour printer." + id: "HW_VERSION_ERR" + approved: true - code: "17610" title: "UNSUPPORTED PRINTER MODEL" text: "Firmware/printer\ntypes do not match.\nMake sure you have\nthe right firmware\nfile for your\nprinter model." diff --git a/lib/Prusa-Error-Codes/20_MK3.5/error-codes.yaml b/lib/Prusa-Error-Codes/20_MK3.5/error-codes.yaml index 261b19caf5..76bcc609f0 100644 --- a/lib/Prusa-Error-Codes/20_MK3.5/error-codes.yaml +++ b/lib/Prusa-Error-Codes/20_MK3.5/error-codes.yaml @@ -162,6 +162,11 @@ Errors: text: "Power panic has been detected during printer initialization. Inspect wiring of PP-cable." id: "ACF_AT_INIT" approved: false +- code: "20401" + title: "CONNECT REGISTRATION FAILED" + text: "Registration to Prusa Connect failed due to:" + id: "CONNECT_REGISTRATION_FAILED" + approved: true # XX501-XX503 reserved - code: "20504" title: "ESP ERROR" @@ -249,6 +254,11 @@ Errors: text: "ESP doesn't seem to be connected." id: "ESP_NOT_CONNECTED" approved: false +- code: "20601" + title: "" + text: "This error code is not found\nin our database.\nContact the support." + id: "UNKNOWN_ERROR_CODE" + approved: true - code: "20602" title: "" text: "USB drive not\nconnected! Please\ninsert a USB drive\nwith a valid\nfirmware file." @@ -284,6 +294,11 @@ Errors: text: "Firmware in the\ninternal flash\ncorrupted! Please\nreflash the\nfirmware." id: "FW_IN_INTERNAL_FLASH_CORRUPTED" approved: true +- code: "20609" + title: "" + text: "Firmware and hardware versions do\nnot match. Make sure you have\nthe right firmware file for\nyour printer." + id: "HW_VERSION_ERR" + approved: true - code: "20610" title: "" text: "Firmware/printer\ntypes do not match.\nMake sure you have\nthe right firmware\nfile for your\nprinter model." diff --git a/lib/Prusa-Error-Codes/20_MK35/error-codes.yaml b/lib/Prusa-Error-Codes/20_MK35/error-codes.yaml deleted file mode 100644 index 261b19caf5..0000000000 --- a/lib/Prusa-Error-Codes/20_MK35/error-codes.yaml +++ /dev/null @@ -1,311 +0,0 @@ ---- -# Error codes list for Original Prusa MK3.5 printer -# GitHub repo https://github.com/prusa3d/Prusa-Error-Codes -# Printer code -# MK3.5 20xxx -# Error categories -# MECHANICAL xx1xx # Mechanical failures, engines XYZ, tower -# TEMPERATURE xx2xx # Temperature measurement, thermistors, heating -# ELECTRICAL xx3xx # Electrical, MINDA, FINDA, Motion Controller, … -# CONNECTIVITY xx4xx # Connectivity - Wi - Fi, LAN, Prusa Connect Cloud -# SYSTEM xx5xx # System - BSOD, ... -# BOOTLOADER xx6xx # -# WARNINGS xx7xx # Category-less warnings - -Errors: -# XX103 reserved -- code: "20201" - title: "PREHEAT ERROR" - text: "Check the heatbed heater & thermistor wiring for possible damage." - id: "BED_PREHEAT_ERROR" - approved: true -- code: "20202" - title: "PREHEAT ERROR" - text: "Check the print head heater & thermistor wiring for possible damage." - id: "HOTEND_PREHEAT_ERROR" - approved: true -- code: "20203" - title: "THERMAL RUNAWAY" - text: "Check the heatbed thermistor wiring for possible damage." - id: "BED_THERMAL_RUNAWAY" - approved: true -- code: "20204" - title: "THERMAL RUNAWAY" - text: "Check the print head thermistor wiring for possible damage." - id: "HOTEND_THERMAL_RUNAWAY" - approved: true -- code: "20205" - title: "MAXTEMP ERROR" - text: "Check the heatbed thermistor wiring for possible damage." - id: "BED_MAXTEMP_ERROR" - approved: true -- code: "20206" - title: "MAXTEMP ERROR" - text: "Check the print head thermistor wiring for possible damage." - id: "HOTEND_MAXTEMP_ERROR" - approved: true -- code: "20207" - title: "MINTEMP ERROR" - text: "Check the heatbed thermistor wiring for possible damage." - id: "BED_MINTEMP_ERROR" - approved: true -- code: "20208" - title: "MINTEMP ERROR" - text: "Check the print head thermistor wiring for possible damage." - id: "HOTEND_MINTEMP_ERROR" - approved: true -- code: "20209" - title: "TEMP NOT MATCHING" - text: "Measured temperature is not matching expected value. Check the thermistor is in contact with heatbed. In case of damage, replace it." - id: "BED_TEMP_NOT_MATCHING" - approved: true -- code: "20210" - title: "TEMP NOT MATCHING" - text: "Measured temperature is not matching expected value. Check the thermistor is in contact with hotend. In case of damage, replace it." - id: "HOTEND_TEMP_NOT_MATCHING" - approved: true -- code: "20211" - title: "HEATBREAK MINTEMP ERROR" - text: "Check the heatbreak thermistor wiring for possible damage." - id: "HEATBREAK_MINTEMP_ERR" - approved: true -- code: "20212" - title: "HEATBREAK MAXTEMP ERROR" - text: "Check the heatbreak thermistor wiring for possible damage." - id: "HEATBREAK_MAXTEMP_ERR" - approved: true - # XX250-XX257 reserved -- code: "20301" - title: "HOMING ERROR Z" - text: "Failed to home the extruder in Z-axis, make sure the loadcell is working." - id: "HOMING_ERROR_Z" - approved: true - # XX302-XX303 reserved -- code: "20304" - title: "HOMING ERROR X" - text: "Failed to home the extruder in X-axis, make sure there is no obstacle on X-axis." - id: "HOMING_ERROR_X" - approved: true -- code: "20305" - title: "HOMING ERROR Y" - text: "Failed to home the Y-axis, make sure there is no obstacle on Y-axis." - id: "HOMING_ERROR_Y" - approved: true -- code: "20306" - title: "USB PORT OVERCURRENT" - text: "Overcurrent detected on USB port." - id: "USB_HOST_OVERCURRENT" - approved: true -- code: "20307" - title: "USB DEVICE OVERCURRENT" - text: "Overcurrent detected on connected USB device, disconnect it." - id: "USB_DEVICE_OVERCURRENT" - approved: true -- code: "20308" - title: "NOZZLE HEATER OVERCURRENT" - text: "Overcurrent detected on nozzle heater." - id: "NOZZLE_OVERCURRENT" - approved: true -- code: "20309" - title: "HEATBED PORT OVERCURRENT" - text: "Overcurrent detected on xBuddy heatbed port, disconnect the device." - id: "INPUT_OVERCURRENT" - approved: true -- code: "20310" - title: "MMU OVERCURRENT" - text: "Overcurrent detected on the MMU port, disconnect the device." - id: "MMU_OVERCURRENT" - approved: true -- code: "20311" - title: "I2C SEND FAILED" - text: "HAL detected an I2C error when sending data via I2C." - id: "I2C_TX_ERROR" - approved: true -- code: "20312" - title: "I2C SEND BUSY" - text: "HAL detected an I2C busy when sending data via I2C." - id: "I2C_TX_BUSY" - approved: true -- code: "20313" - title: "I2C SEND TIMEOUT" - text: "HAL detected an I2C timeout when sending data via I2C." - id: "I2C_TX_TIMEOUT" - approved: true -- code: "20314" - title: "I2C SEND UNDEFINED" - text: "HAL detected an I2C undefined error when sending data via I2C." - id: "I2C_TX_UNDEFINED" - approved: true -- code: "20315" - title: "I2C RECEIVE FAILED" - text: "HAL detected an I2C error when receiving data via I2C." - id: "I2C_RX_ERROR" - approved: true -- code: "20316" - title: "I2C RECEIVE BUSY" - text: "HAL detected an I2C busy when receiving data via I2C." - id: "I2C_RX_BUSY" - approved: true -- code: "20317" - title: "I2C RECEIVE TIMEOUT" - text: "HAL detected an I2C timeout when receiving data via I2C." - id: "I2C_RX_TIMEOUT" - approved: true -- code: "20318" - title: "I2C RECEIVE UNDEFINED" - text: "HAL detected an I2C undefined error when receiving data via I2C." - id: "I2C_RX_UNDEFINED" - approved: true - # XX319-XX320 reserved -- code: "20321" - title: "POWER PANIC" - text: "Power panic has been detected during printer initialization. Inspect wiring of PP-cable." - id: "ACF_AT_INIT" - approved: false - # XX501-XX503 reserved -- code: "20504" - title: "ESP ERROR" - text: "Reading ESP firmware failed." - id: "ESP_FW_READ" - approved: true -- code: "20505" - title: "ESP ERROR" - text: "ESP detected command error." - id: "ESP_COMMAND_ERR" - approved: true -- code: "20506" - title: "ESP ERROR" - text: "ESP detected unknown error." - id: "ESP_UNKNOWN_ERR" - approved: true -- code: "20507" - title: "OUT OF MEMORY" - text: "Dynamic allocation failed - out of memory. Reset the printer." - id: "MALLOC_ERROR" - approved: true -- code: "20508" - title: "PNG BUFFER FULL" - text: "Allocation of dynamic buffer for PNG failed - out of memory." - id: "PNG_MALLOC_ERROR" - approved: true -- code: "20510" - title: "EMERGENCY STOP" - text: "Emergency stop invoked from G-code (M112)." - id: "EMERGENCY_STOP" - approved: true - # XX511-XX522 reserved -- code: "20523" - title: "LOADCELL NOT CALIBRATED" - text: "Loadcell calibration is incomplete. Restart the printer." - id: "LOADCELL_INCOMPLETE_CONFIGURATION_ERROR" - approved: true -- code: "20524" - title: "LOADCELL TARE ERROR" - text: "There was an error requesting the tare for loadcell." - id: "LOADCELL_TARE_ALREADY_REQUESTED" - approved: true -- code: "20525" - title: "LOADCELL TARE FAILED" - text: "Setting the tare failed. Check the loadcell wiring and connection." - id: "LOADCELL_TARE_FAILED" - approved: true -- code: "20526" - title: "LOADCELL MEASURE FAILED" - text: "Loadcell measured an inifinite or undefined load value." - id: "LOADCELL_INFINITE_LOAD" - approved: true -- code: "20527" - title: "LOADCELL BAD CONFIGURATION" - text: "The loadcell configuration is incorrect." - id: "LOADCELL_BAD_CONFIGURATION" - approved: true -- code: "20528" - title: "LOADCELL TIMEOUT" - text: "There was a timeout while waiting for measurement sample, please repeat the action." - id: "LOADCELL_TIMEOUT" - approved: true -- code: "20529" - title: "LED MEMORY ERROR" - text: "Memory allocation failed for scheduled LED animation" - id: "LED_ANIMATION_BAD_SPACE_MANAGEMENT" - approved: true -- code: "20530" - title: "MARLIN REQUEST TIMEOUT" - text: "Marlin client could not send message to Marlin server and timeout was reached." - id: "MARLIN_CLIENT_SERVER_REQUEST_TIMEOUT" - approved: true -- code: "20531" - title: "BBF ALLOCATION FAILED" - text: "Space allocation for firmware BBF file failed. Repeat the action or try another USB drive." - id: "BBF_ALLOCATION_FAILED" - approved: true -- code: "20532" - title: "BBF INITIALIZATION FAILED" - text: "BBF initialization failed, repeat the action or try another USB drive." - id: "BBF_INIT_FAILED" - approved: true -- code: "20533" - title: "ESP NOT CONNECTED" - text: "ESP doesn't seem to be connected." - id: "ESP_NOT_CONNECTED" - approved: false -- code: "20602" - title: "" - text: "USB drive not\nconnected! Please\ninsert a USB drive\nwith a valid\nfirmware file." - id: "USB_NOT_CONNECTED" - approved: true -- code: "20603" - title: "" - text: "Firmware file has\ninvalid size!\nCheck the file\non the USB drive\nand try again." - id: "INVALID_FW_SIZE_ON_USB" - approved: true -- code: "20604" - title: "" - text: "Firmware file\nmissing in the USB\nflash!" - id: "NO_FW_ON_USB" - approved: true -- code: "20605" - title: "" - text: "Error erasing\n flash! Restart\nthe printer and\ntry again." - id: "FLASH_ERASE_ERROR" - approved: true -- code: "20606" - title: "" - text: "Firmware signature\nverification failed!\nOnly official\nsigned firmware can\nbe flashed." - id: "SIGNATURE_VERIFICATION_FAILED" - approved: true -- code: "20607" - title: "" - text: "Firmware hash\nverification failed!\nFirmware file is\ndamaged. Try\ndownloading and\ncopying it onto the\nUSB drive again." - id: "HASH_VERIFICATION_FAILED" - approved: true -- code: "20608" - title: "" - text: "Firmware in the\ninternal flash\ncorrupted! Please\nreflash the\nfirmware." - id: "FW_IN_INTERNAL_FLASH_CORRUPTED" - approved: true -- code: "20610" - title: "" - text: "Firmware/printer\ntypes do not match.\nMake sure you have\nthe right firmware\nfile for your\nprinter model." - id: "UNSUPPORTED_PRINTER_TYPE" - approved: true -- code: "20611" - title: "" - text: "Firmware/printer\nversions do not\nmatch! You are\ntrying to flash\nFW meant for other\nrevision of the\nBuddy board." - id: "UNSUPPORTED_PRINTER_VERSION" - approved: true -- code: "20612" - title: "" - text: "No firmware found\nin the internal\nflash! Please\nflash firmware\nfirst!" - id: "NO_FW_IN_INTERNAL_FLASH" - approved: true -- code: "20613" - title: "" - text: "File system error!\nTry a different USB\ndrive or format the\ndrive with FAT32\nfilesystem (all \ndata will be lost)!" - id: "FILE_SYSTEM_ERROR" - approved: true -- code: "20614" - title: "" - text: "USB flash drive contains\nunsupported firmware BBF file." - id: "UNSUPPORTED_BBF_VERSION" - approved: true diff --git a/lib/Prusa-Error-Codes/README.md b/lib/Prusa-Error-Codes/README.md index 2cc65cb226..40f5f8d249 100644 --- a/lib/Prusa-Error-Codes/README.md +++ b/lib/Prusa-Error-Codes/README.md @@ -17,6 +17,8 @@ Example: 12201 01 - specific error code: Heatbed heating failed ## Printer number +04 - Original Prusa MMU + 10 - Original Prusa SL1/SL1S 12 - Original Prusa MINI/MINI+ diff --git a/lib/Prusa-Error-Codes/generate_buddy_headers.py b/lib/Prusa-Error-Codes/generate_buddy_headers.py index fa01d8946a..2fa642a6d3 100644 --- a/lib/Prusa-Error-Codes/generate_buddy_headers.py +++ b/lib/Prusa-Error-Codes/generate_buddy_headers.py @@ -31,6 +31,12 @@ inline constexpr uint8_t ERR_MMU_CODE = {printer_code}; +enum class ErrType : uint8_t {{ + ERROR = 0, + WARNING, + USER_ACTION +}}; + enum class ErrCode : uint16_t {{ ERR_UNDEF = 0, {enum_items} @@ -43,6 +49,7 @@ // 16 bit ErrCode err_code; std::array buttons; + ErrType type; }}; }} // namespace MMU2 @@ -137,16 +144,21 @@ def generate_header_file(yaml_file_name, header_file_name, mmu, list, includes): if len(btns) == 2: btns.append("ButtonOperations::NoOperation") - btns_text = f",\n {{{', '.join(btns)}}}" + mmu_extra_text = f",\n {{{', '.join(btns)}}}" + + if "type" not in err: + err["type"] = "ERROR" + + mmu_extra_text += f",\n ErrType::{err['type']}" else: - btns_text = "" + mmu_extra_text = "" err_dict[err_code] = { "id": err_id, "code": err_code, "title": err["title"], "text": err["text"].replace("\n", "\\n"), - "btns": btns_text + "mmu_extra_text": mmu_extra_text } os.makedirs(header_file_name.parent, exist_ok=True) @@ -157,7 +169,7 @@ def generate_header_file(yaml_file_name, header_file_name, mmu, list, includes): {{ N_("{err['title']}"), N_("{err['text']}"), - ErrCode::{err['id']}{err['btns']} + ErrCode::{err['id']}{err['mmu_extra_text']} }}""" for err in err_dict.values()) include_items = "\n".join([f"#include <{item}>" for item in includes]) diff --git a/lib/Prusa-Firmware-MMU/cmake/Utilities.cmake b/lib/Prusa-Firmware-MMU/cmake/Utilities.cmake index 881ae05339..4890eeba4a 100644 --- a/lib/Prusa-Firmware-MMU/cmake/Utilities.cmake +++ b/lib/Prusa-Firmware-MMU/cmake/Utilities.cmake @@ -75,7 +75,7 @@ function(pack_firmware target fw_version build_number printer_type signing_key) COMMAND echo "" # visually separate the output COMMAND "${Python3_EXECUTABLE}" "${CMAKE_SOURCE_DIR}/utils/pack_fw.py" --version="${fw_version}" - --printer-type "${printer_type}" --printer-version "1" ${sign_opts} "${bin_firmware_path}" + --printer-type "${printer_type}" --printer-version "1" --printer-subversion "0" ${sign_opts} "${bin_firmware_path}" --build-number "${build_number}" ) endfunction() diff --git a/lib/WUI/CMakeLists.txt b/lib/WUI/CMakeLists.txt index edf549bf87..0bb1de690b 100644 --- a/lib/WUI/CMakeLists.txt +++ b/lib/WUI/CMakeLists.txt @@ -30,13 +30,13 @@ target_sources( nhttp/send_file.cpp nhttp/send_json.cpp nhttp/server.cpp + nhttp/splice.cpp nhttp/static_mem.cpp nhttp/status_page.cpp nhttp/status_renderer.cpp nhttp/transfer_renderer.cpp nhttp/upload_state.cpp pbuf_rx.c - random.cpp sntp/sntp.c sntp/sntp_client.c wui.cpp @@ -54,11 +54,6 @@ if(NETWORKING_BENCHMARK_ENABLED) target_compile_definitions(WUI INTERFACE NETWORKING_BENCHMARK_ENABLED) endif() -if(USE_ASYNCIO) - target_sources(WUI INTERFACE nhttp/splice.cpp) - target_compile_definitions(WUI INTERFACE USE_ASYNCIO) -endif() - file(GLOB AUTOMATA_GENERATORS ${PROJECT_ROOT_DIR}/utils/gen-automata/*.py) add_custom_command( diff --git a/lib/WUI/espif.cpp b/lib/WUI/espif.cpp index 0bc64d6e43..34d5d67d70 100644 --- a/lib/WUI/espif.cpp +++ b/lib/WUI/espif.cpp @@ -23,8 +23,7 @@ #include "wui.h" #include #include