diff --git a/code/l452_code/.mxproject b/code/l452_code/.mxproject index 54cf06e..c65d228 100644 --- a/code/l452_code/.mxproject +++ b/code/l452_code/.mxproject @@ -1,5 +1,5 @@ [PreviousLibFiles] -LibFiles=Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_pcd.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_pcd_ex.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_ll_usb.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_def.h;Drivers/STM32L4xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_rcc.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_rcc_ex.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_ll_bus.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_ll_rcc.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_ll_crs.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_ll_system.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_ll_utils.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_flash.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_flash_ex.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_flash_ramfunc.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_gpio.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_gpio_ex.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_ll_gpio.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_i2c.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_i2c_ex.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_dma.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_dma_ex.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_ll_dma.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_ll_dmamux.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_pwr.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_pwr_ex.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_ll_pwr.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_cortex.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_ll_cortex.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_exti.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_ll_exti.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_adc.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_ll_adc.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_adc_ex.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_ll_i2c.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_rtc.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_ll_rtc.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_rtc_ex.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_ll_sdmmc.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_sd.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_sd_ex.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_mmc.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_mmc_ex.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_spi.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_ll_spi.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_spi_ex.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_tim.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_ll_tim.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_tim_ex.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_uart.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_ll_usart.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_ll_lpuart.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_uart_ex.h;Middlewares/Third_Party/FatFs/src/diskio.h;Middlewares/Third_Party/FatFs/src/ff.h;Middlewares/Third_Party/FatFs/src/ff_gen_drv.h;Middlewares/Third_Party/FatFs/src/integer.h;Middlewares/ST/STM32_USB_Device_Library/Core/Inc/usbd_core.h;Middlewares/ST/STM32_USB_Device_Library/Core/Inc/usbd_ctlreq.h;Middlewares/ST/STM32_USB_Device_Library/Core/Inc/usbd_def.h;Middlewares/ST/STM32_USB_Device_Library/Core/Inc/usbd_ioreq.h;Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Inc/usbd_cdc.h;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_pcd.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_pcd_ex.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_ll_usb.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_rcc.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_rcc_ex.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_flash.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_flash_ex.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_flash_ramfunc.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_gpio.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_i2c.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_i2c_ex.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_dma.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_dma_ex.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_pwr.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_pwr_ex.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_cortex.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_exti.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_adc.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_adc_ex.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_rtc.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_rtc_ex.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_ll_sdmmc.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_sd.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_sd_ex.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_mmc.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_mmc_ex.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_spi.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_spi_ex.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_tim.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_tim_ex.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart_ex.c;Middlewares/Third_Party/FatFs/src/diskio.c;Middlewares/Third_Party/FatFs/src/ff.c;Middlewares/Third_Party/FatFs/src/ff_gen_drv.c;Middlewares/Third_Party/FatFs/src/option/syscall.c;Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_core.c;Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_ctlreq.c;Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_ioreq.c;Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Src/usbd_cdc.c;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_pcd.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_pcd_ex.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_ll_usb.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_def.h;Drivers/STM32L4xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_rcc.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_rcc_ex.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_ll_bus.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_ll_rcc.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_ll_crs.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_ll_system.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_ll_utils.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_flash.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_flash_ex.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_flash_ramfunc.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_gpio.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_gpio_ex.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_ll_gpio.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_i2c.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_i2c_ex.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_dma.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_dma_ex.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_ll_dma.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_ll_dmamux.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_pwr.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_pwr_ex.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_ll_pwr.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_cortex.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_ll_cortex.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_exti.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_ll_exti.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_adc.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_ll_adc.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_adc_ex.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_ll_i2c.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_rtc.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_ll_rtc.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_rtc_ex.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_ll_sdmmc.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_sd.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_sd_ex.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_mmc.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_mmc_ex.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_spi.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_ll_spi.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_spi_ex.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_tim.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_ll_tim.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_tim_ex.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_uart.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_ll_usart.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_ll_lpuart.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_uart_ex.h;Middlewares/Third_Party/FatFs/src/diskio.h;Middlewares/Third_Party/FatFs/src/ff.h;Middlewares/Third_Party/FatFs/src/ff_gen_drv.h;Middlewares/Third_Party/FatFs/src/integer.h;Middlewares/ST/STM32_USB_Device_Library/Core/Inc/usbd_core.h;Middlewares/ST/STM32_USB_Device_Library/Core/Inc/usbd_ctlreq.h;Middlewares/ST/STM32_USB_Device_Library/Core/Inc/usbd_def.h;Middlewares/ST/STM32_USB_Device_Library/Core/Inc/usbd_ioreq.h;Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Inc/usbd_cdc.h;Drivers/CMSIS/Device/ST/STM32L4xx/Include/stm32l452xx.h;Drivers/CMSIS/Device/ST/STM32L4xx/Include/stm32l4xx.h;Drivers/CMSIS/Device/ST/STM32L4xx/Include/system_stm32l4xx.h;Drivers/CMSIS/Device/ST/STM32L4xx/Include/system_stm32l4xx.h;Drivers/CMSIS/Device/ST/STM32L4xx/Source/Templates/system_stm32l4xx.c;Drivers/CMSIS/Include/core_cm23.h;Drivers/CMSIS/Include/core_cm33.h;Drivers/CMSIS/Include/cmsis_compiler.h;Drivers/CMSIS/Include/core_sc000.h;Drivers/CMSIS/Include/cmsis_gcc.h;Drivers/CMSIS/Include/cmsis_iccarm.h;Drivers/CMSIS/Include/core_armv8mml.h;Drivers/CMSIS/Include/core_cm0plus.h;Drivers/CMSIS/Include/core_sc300.h;Drivers/CMSIS/Include/cmsis_version.h;Drivers/CMSIS/Include/core_cm0.h;Drivers/CMSIS/Include/core_cm7.h;Drivers/CMSIS/Include/core_cm1.h;Drivers/CMSIS/Include/tz_context.h;Drivers/CMSIS/Include/cmsis_armclang.h;Drivers/CMSIS/Include/core_armv8mbl.h;Drivers/CMSIS/Include/core_cm35p.h;Drivers/CMSIS/Include/cmsis_armclang_ltm.h;Drivers/CMSIS/Include/core_cm3.h;Drivers/CMSIS/Include/core_cm4.h;Drivers/CMSIS/Include/mpu_armv7.h;Drivers/CMSIS/Include/core_armv81mml.h;Drivers/CMSIS/Include/mpu_armv8.h;Drivers/CMSIS/Include/cmsis_armcc.h; +LibFiles=Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_pcd.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_pcd_ex.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_ll_usb.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_def.h;Drivers/STM32L4xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_rcc.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_rcc_ex.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_ll_bus.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_ll_rcc.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_ll_crs.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_ll_system.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_ll_utils.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_flash.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_flash_ex.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_flash_ramfunc.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_gpio.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_gpio_ex.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_ll_gpio.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_i2c.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_i2c_ex.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_dma.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_dma_ex.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_ll_dma.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_ll_dmamux.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_pwr.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_pwr_ex.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_ll_pwr.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_cortex.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_ll_cortex.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_exti.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_ll_exti.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_adc.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_ll_adc.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_adc_ex.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_ll_i2c.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_rtc.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_ll_rtc.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_rtc_ex.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_ll_sdmmc.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_sd.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_sd_ex.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_mmc.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_mmc_ex.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_spi.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_ll_spi.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_spi_ex.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_tim.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_ll_tim.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_tim_ex.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_uart.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_ll_usart.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_ll_lpuart.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_uart_ex.h;Middlewares/Third_Party/FatFs/src/diskio.h;Middlewares/Third_Party/FatFs/src/ff.h;Middlewares/Third_Party/FatFs/src/ff_gen_drv.h;Middlewares/Third_Party/FatFs/src/integer.h;Middlewares/ST/STM32_USB_Device_Library/Core/Inc/usbd_core.h;Middlewares/ST/STM32_USB_Device_Library/Core/Inc/usbd_ctlreq.h;Middlewares/ST/STM32_USB_Device_Library/Core/Inc/usbd_def.h;Middlewares/ST/STM32_USB_Device_Library/Core/Inc/usbd_ioreq.h;Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Inc/usbd_cdc.h;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_pcd.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_pcd_ex.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_ll_usb.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_rcc.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_rcc_ex.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_flash.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_flash_ex.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_flash_ramfunc.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_gpio.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_i2c.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_i2c_ex.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_dma.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_dma_ex.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_pwr.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_pwr_ex.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_cortex.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_exti.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_adc.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_adc_ex.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_rtc.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_rtc_ex.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_ll_sdmmc.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_sd.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_sd_ex.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_mmc.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_mmc_ex.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_spi.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_spi_ex.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_tim.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_tim_ex.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart_ex.c;Middlewares/Third_Party/FatFs/src/diskio.c;Middlewares/Third_Party/FatFs/src/ff.c;Middlewares/Third_Party/FatFs/src/ff_gen_drv.c;Middlewares/Third_Party/FatFs/src/option/syscall.c;Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_core.c;Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_ctlreq.c;Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_ioreq.c;Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Src/usbd_cdc.c;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_pcd.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_pcd_ex.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_ll_usb.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_def.h;Drivers/STM32L4xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_rcc.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_rcc_ex.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_ll_bus.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_ll_rcc.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_ll_crs.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_ll_system.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_ll_utils.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_flash.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_flash_ex.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_flash_ramfunc.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_gpio.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_gpio_ex.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_ll_gpio.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_i2c.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_i2c_ex.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_dma.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_dma_ex.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_ll_dma.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_ll_dmamux.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_pwr.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_pwr_ex.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_ll_pwr.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_cortex.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_ll_cortex.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_exti.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_ll_exti.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_adc.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_ll_adc.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_adc_ex.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_ll_i2c.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_rtc.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_ll_rtc.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_rtc_ex.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_ll_sdmmc.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_sd.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_sd_ex.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_mmc.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_mmc_ex.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_spi.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_ll_spi.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_spi_ex.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_tim.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_ll_tim.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_tim_ex.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_uart.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_ll_usart.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_ll_lpuart.h;Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_uart_ex.h;Middlewares/Third_Party/FatFs/src/diskio.h;Middlewares/Third_Party/FatFs/src/ff.h;Middlewares/Third_Party/FatFs/src/ff_gen_drv.h;Middlewares/Third_Party/FatFs/src/integer.h;Middlewares/ST/STM32_USB_Device_Library/Core/Inc/usbd_core.h;Middlewares/ST/STM32_USB_Device_Library/Core/Inc/usbd_ctlreq.h;Middlewares/ST/STM32_USB_Device_Library/Core/Inc/usbd_def.h;Middlewares/ST/STM32_USB_Device_Library/Core/Inc/usbd_ioreq.h;Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Inc/usbd_cdc.h;Drivers/CMSIS/Device/ST/STM32L4xx/Include/stm32l452xx.h;Drivers/CMSIS/Device/ST/STM32L4xx/Include/stm32l4xx.h;Drivers/CMSIS/Device/ST/STM32L4xx/Include/system_stm32l4xx.h;Drivers/CMSIS/Device/ST/STM32L4xx/Include/system_stm32l4xx.h;Drivers/CMSIS/Device/ST/STM32L4xx/Source/Templates/system_stm32l4xx.c;Drivers/CMSIS/Include/core_cm3.h;Drivers/CMSIS/Include/cmsis_gcc.h;Drivers/CMSIS/Include/core_armv8mbl.h;Drivers/CMSIS/Include/core_cm23.h;Drivers/CMSIS/Include/cmsis_iccarm.h;Drivers/CMSIS/Include/core_cm33.h;Drivers/CMSIS/Include/core_armv81mml.h;Drivers/CMSIS/Include/core_sc300.h;Drivers/CMSIS/Include/cmsis_armclang_ltm.h;Drivers/CMSIS/Include/cmsis_compiler.h;Drivers/CMSIS/Include/core_sc000.h;Drivers/CMSIS/Include/tz_context.h;Drivers/CMSIS/Include/core_cm0plus.h;Drivers/CMSIS/Include/cmsis_version.h;Drivers/CMSIS/Include/core_cm7.h;Drivers/CMSIS/Include/core_cm4.h;Drivers/CMSIS/Include/mpu_armv8.h;Drivers/CMSIS/Include/cmsis_armcc.h;Drivers/CMSIS/Include/core_cm35p.h;Drivers/CMSIS/Include/core_cm0.h;Drivers/CMSIS/Include/core_armv8mml.h;Drivers/CMSIS/Include/cmsis_armclang.h;Drivers/CMSIS/Include/mpu_armv7.h;Drivers/CMSIS/Include/core_cm1.h; [PreviousUsedMakefileFiles] SourceFiles=Core/Src/main.c;Core/Src/gpio.c;Core/Src/adc.c;FATFS/Target/bsp_driver_sd.c;FATFS/Target/sd_diskio.c;FATFS/App/fatfs.c;FATFS/Target/fatfs_platform.c;Core/Src/i2c.c;Core/Src/rtc.c;Core/Src/sdmmc.c;Core/Src/spi.c;Core/Src/tim.c;Core/Src/usart.c;USB_DEVICE/App/usb_device.c;USB_DEVICE/Target/usbd_conf.c;USB_DEVICE/App/usbd_desc.c;USB_DEVICE/App/usbd_cdc_if.c;Core/Src/stm32l4xx_it.c;Core/Src/stm32l4xx_hal_msp.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_pcd.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_pcd_ex.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_ll_usb.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_rcc.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_rcc_ex.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_flash.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_flash_ex.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_flash_ramfunc.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_gpio.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_i2c.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_i2c_ex.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_dma.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_dma_ex.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_pwr.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_pwr_ex.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_cortex.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_exti.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_adc.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_adc_ex.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_rtc.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_rtc_ex.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_ll_sdmmc.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_sd.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_sd_ex.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_mmc.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_mmc_ex.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_spi.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_spi_ex.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_tim.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_tim_ex.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart_ex.c;Middlewares/Third_Party/FatFs/src/diskio.c;Middlewares/Third_Party/FatFs/src/ff.c;Middlewares/Third_Party/FatFs/src/ff_gen_drv.c;Middlewares/Third_Party/FatFs/src/option/syscall.c;Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_core.c;Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_ctlreq.c;Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_ioreq.c;Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Src/usbd_cdc.c;Drivers/CMSIS/Device/ST/STM32L4xx/Source/Templates/system_stm32l4xx.c;Core/Src/system_stm32l4xx.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_pcd.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_pcd_ex.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_ll_usb.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_rcc.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_rcc_ex.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_flash.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_flash_ex.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_flash_ramfunc.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_gpio.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_i2c.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_i2c_ex.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_dma.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_dma_ex.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_pwr.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_pwr_ex.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_cortex.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_exti.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_adc.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_adc_ex.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_rtc.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_rtc_ex.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_ll_sdmmc.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_sd.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_sd_ex.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_mmc.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_mmc_ex.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_spi.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_spi_ex.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_tim.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_tim_ex.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c;Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart_ex.c;Middlewares/Third_Party/FatFs/src/diskio.c;Middlewares/Third_Party/FatFs/src/ff.c;Middlewares/Third_Party/FatFs/src/ff_gen_drv.c;Middlewares/Third_Party/FatFs/src/option/syscall.c;Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_core.c;Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_ctlreq.c;Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_ioreq.c;Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Src/usbd_cdc.c;Drivers/CMSIS/Device/ST/STM32L4xx/Source/Templates/system_stm32l4xx.c;Core/Src/system_stm32l4xx.c;;;Middlewares/Third_Party/FatFs/src/diskio.c;Middlewares/Third_Party/FatFs/src/ff.c;Middlewares/Third_Party/FatFs/src/ff_gen_drv.c;Middlewares/Third_Party/FatFs/src/option/syscall.c;Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_core.c;Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_ctlreq.c;Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_ioreq.c;Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Src/usbd_cdc.c; diff --git a/code/l452_code/Core/Inc/buff.hpp b/code/l452_code/Core/Inc/buff.hpp index 744ea37..7fbf9e5 100644 --- a/code/l452_code/Core/Inc/buff.hpp +++ b/code/l452_code/Core/Inc/buff.hpp @@ -13,11 +13,10 @@ volatile extern bool usb_ready; // if not we switch banks and write out the now unactive databank template void write(packet_type packet) { - if (pos + sizeof(packet) + 4 < sizeof(databank1)) { - *(uint16_t*)(&databank1[pos]) = sizeof(packet); - *(uint16_t*)(&databank1[pos + 2]) = typecode(packet); - memcpy(databank1 + pos + 4, &packet, sizeof(packet)); - pos += sizeof(packet) + 4; + if (pos + sizeof(packet) + 2 < sizeof(databank1)) { + *(uint16_t*)(&databank1[pos]) = typecode(); + memcpy(databank1 + pos + 2, &packet, sizeof(packet)); + pos += sizeof(packet) + 2; return; } else if (pos < sizeof(databank1)) { if (usb_ready) { @@ -27,12 +26,11 @@ void write(packet_type packet) { memset(databank2, 0, sizeof(databank2)); pos = sizeof(databank1); return write(packet); - } else if (pos + sizeof(packet) + 4 < + } else if (pos + sizeof(packet) + 2 < sizeof(databank1) + sizeof(databank2)) { - *(uint16_t*)(&databank2[pos - sizeof(databank1)]) = sizeof(packet); - *(uint16_t*)(&databank2[pos + 2 - sizeof(databank1)]) = typecode(packet); - memcpy(databank2 + pos + 4 - sizeof(databank1), &packet, sizeof(packet)); - pos += sizeof(packet) + 4; + *(uint16_t*)(&databank2[pos - sizeof(databank1)]) = typecode(); + memcpy(databank2 + pos + 2 - sizeof(databank1), &packet, sizeof(packet)); + pos += sizeof(packet) + 2; return; } else { if (usb_ready) { diff --git a/code/l452_code/Core/Inc/datadescriptor.hpp b/code/l452_code/Core/Inc/datadescriptor.hpp new file mode 100644 index 0000000..2e67e0e --- /dev/null +++ b/code/l452_code/Core/Inc/datadescriptor.hpp @@ -0,0 +1,2 @@ + +void data_description(); diff --git a/code/l452_code/Core/Inc/packet.hpp b/code/l452_code/Core/Inc/packet.hpp index 9e5f8f5..67455f6 100644 --- a/code/l452_code/Core/Inc/packet.hpp +++ b/code/l452_code/Core/Inc/packet.hpp @@ -1,102 +1,105 @@ -//#pragma once +#pragma once -//#include "rtc.h" - -//#include -//#include -//#include -//#include -#include - -struct timer_time { - uint16_t tim6_value; - uint16_t tim6_reloads; -}; +#include "rtc.h" struct packet_rtc { - struct timer_time t; + uint32_t t; RTC_TimeTypeDef sTime; RTC_DateTypeDef sDate; }; struct packet_vbatt { - struct timer_time t; + uint32_t t; uint16_t vbatt_cnts; }; struct packet_imu { - struct timer_time t; + uint32_t t; uint16_t readings_cnts[4]; }; struct packet_ekg { - struct timer_time t; + uint32_t t; uint8_t index; uint32_t readings_cnts[50]; }; struct packet_strain { - struct timer_time t; + uint32_t t; uint8_t index; uint32_t readings_cnts[5]; }; struct packet_outsideT { - struct timer_time t; + uint32_t t; uint8_t index; uint32_t readings_cnts[5]; }; struct packet_insideT { - struct timer_time t; + uint32_t t; uint8_t index; uint32_t readings_cnts[5]; }; struct packet_button { - struct timer_time t; + uint32_t t; uint8_t button_vec; }; struct packet_spo2 { - struct timer_time t; + uint32_t t; uint32_t green_cnts[25]; uint32_t red_cnts[25]; uint32_t ir_cnts[25]; }; -// __inline__ uint8_t typecode(struct packet_rtc) { -// return 1; -// } +template +__inline__ uint8_t typecode() { + return 0; +} -// __inline__ uint8_t typecode(struct packet_vbatt) { -// return 2; -// } +template<> +__inline__ uint8_t typecode() { + return 1; +} -// __inline__ uint8_t typecode(struct packet_ekg) { -// return 3; -// } +template<> +__inline__ uint8_t typecode() { + return 2; +} -// __inline__ uint8_t typecode(struct packet_strain) { -// return 4; -// } +template<> +__inline__ uint8_t typecode() { + return 3; +} -// __inline__ uint8_t typecode(struct packet_outsideT) { -// return 5; -// } +template<> +__inline__ uint8_t typecode() { + return 4; +} -// __inline__ uint8_t typecode(struct packet_insideT) { -// return 6; -// } +template<> +__inline__ uint8_t typecode() { + return 5; +} -// __inline__ uint8_t typecode(struct packet_button) { -// return 7; -// } +template<> +__inline__ uint8_t typecode() { + return 6; +} -// __inline__ uint8_t typecode(struct packet_spo2) { -// return 8; -// } +template<> +__inline__ uint8_t typecode() { + return 7; +} -// __inline__ uint8_t typecode(struct packet_imu) { -// return 9; -// } +template<> +__inline__ uint8_t typecode() { + return 8; +} + +template<> +__inline__ uint8_t typecode() { + return 9; +} diff --git a/code/l452_code/Core/Inc/refl.hpp b/code/l452_code/Core/Inc/refl.hpp deleted file mode 100644 index 3c39f88..0000000 --- a/code/l452_code/Core/Inc/refl.hpp +++ /dev/null @@ -1,4788 +0,0 @@ -// The MIT License (MIT) -// -// Copyright (c) 2020 Veselin Karaganev (@veselink1) and Contributors -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in all -// copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -// SOFTWARE. - -#ifndef REFL_INCLUDE_HPP -#define REFL_INCLUDE_HPP - -#include // size_t -#include -#include -#include // std::move, std::forward -#include -#include -#include -#include -#include -#include // std::quoted -#include -#include - -#ifdef _MSC_VER -// Disable VS warning for "Not enough arguments for macro" -// (emitted when a REFL_ macro is not provided any attributes) -#pragma warning( disable : 4003 ) -#endif - -#if defined(__clang__) - #if __has_feature(cxx_rtti) - #define REFL_RTTI_ENABLED - #endif -#elif defined(__GNUG__) - #if defined(__GXX_RTTI) - #define REFL_RTTI_ENABLED - #endif -#elif defined(_MSC_VER) - #if defined(_CPPRTTI) - #define REFL_RTTI_ENABLED - #endif -#endif - -/** - * @brief The top-level refl-cpp namespace - * It contains a few core refl-cpp namespaces and directly exposes core classes and functions. - *
    - *
  • util - utility functions (for_each, map_to_tuple, etc.)
  • - *
  • trait - type-traits and other operations on types (is_function_v, map_t, etc.)
  • - *
  • runtime - utility functions and classes that always have a runtime overhead (proxy, debug_str, etc.)
  • - *
  • member - contains the empty classes member and function (used for tagging)
  • - *
  • descriptor - contains the non-specialized member types (type|field_descriptor, and operations on them (get_property, get_display_name, etc.))
  • - *
- * - * using util::type_list;
- * using descriptor::type_descriptor;
- * using descriptor::field_descriptor;
- * using descriptor::function_descriptor;
- * using util::const_string;
- * using util::make_const_string;
- */ -namespace refl -{ - /** - * @brief Contains utility types and functions for working with those types. - */ - namespace util - { - /** - * Converts a compile-time available const char* value to a const_string. - * The argument must be a *core constant expression* and be null-terminated. - * - * @see refl::util::const_string - */ -#define REFL_MAKE_CONST_STRING(CString) \ - (::refl::util::detail::copy_from_unsized<::refl::util::detail::strlen(CString)>(CString)) - - /** - * Represents a compile-time string. Used in refl-cpp - * for representing names of reflected types and members. - * Supports constexpr concatenation and substring, - * and is explicitly-convertible to const char* and std::string. - * REFL_MAKE_CONST_STRING can be used to create an instance from a literal string. - * - * @typeparam The length of the string excluding the terminating '\0' character. - * @see refl::descriptor::base_member_descriptor::name - */ - template - struct const_string - { - /** The largest positive value size_t can hold. */ - static constexpr size_t npos = static_cast(-1); - - /** The length of the string excluding the terminating '\0' character. */ - static constexpr size_t size = N; - - /** - * The statically-sized character buffer used for storing the string. - */ - char data[N + 1]; - - /** - * Creates an empty const_string. - */ - constexpr const_string() noexcept - : data{} - { - } - - /** - * Creates a copy of a const_string. - */ - constexpr const_string(const const_string& other) noexcept - : const_string(other, std::make_index_sequence()) - { - } - - /** - * Creates a const_string by copying the contents of data. - */ - constexpr const_string(const char(&data)[N + 1]) noexcept - : const_string(data, std::make_index_sequence()) - { - } - - /** - * Explicitly converts to const char*. - */ - explicit constexpr operator const char*() const noexcept - { - return data; - } - - /** - * Explicitly converts to std::string. - */ - explicit operator std::string() const noexcept - { - return data; - } - - /** - * Returns a pointer to the contained zero-terminated string. - */ - constexpr const char* c_str() const noexcept - { - return data; - } - - /** - * Returns the contained string as an std::string. - */ - std::string str() const noexcept - { - return data; - } - - /** - * A constexpr version of std::string::substr. - * - * \code{.cpp} - * make_const_string("Hello, World!").template substr<0, 4>() -> (const_string<4>) "Hell" - * make_const_string("Hello, World!").template substr<1, 4>() -> (const_string<3>) "ell" - * \endcode - */ - template - constexpr auto substr() const noexcept - { - static_assert(Pos <= N); - constexpr size_t NewSize = (std::min)(Count, N - Pos); - - char buf[NewSize + 1]{}; - for (size_t i = 0; i < NewSize; i++) { - buf[i] = data[Pos + i]; - } - - return const_string(buf); - } - - /** - * Searches the string for the first occurrence of the character and returns its position. - * - * \code{.cpp} - * make_const_string("Hello, World!").find('e') -> 1 - * make_const_string("Hello, World!").find('z') -> static_cast(-1) - * \endcode - */ - constexpr auto find(char ch, size_t pos = 0) const noexcept - { - for (size_t i = pos; i < N; i++) { - if (data[i] == ch) { - return i; - } - } - return npos; - } - - /** - * Searches the string for the last occurrence of the character and returns its position. - * - * \code{.cpp} - * make_const_string("Hello, World!").rfind('o') -> 8 - * make_const_string("Hello, World!").rfind('z') -> static_cast(-1) - * \endcode - */ - constexpr auto rfind(char ch, size_t pos = npos) const noexcept - { - for (size_t i = (pos == npos ? N - 1 : pos); i + 1 > 0; i--) { - if (data[i] == ch) { - return i; - } - } - return npos; - } - - private: - - /** - * Creates a copy of a const_string. - */ - template - constexpr const_string(const const_string& other, std::index_sequence) noexcept - : data{ other.data[Idx]... } - { - } - - /** - * Creates a const_string by copying the contents of data. - */ - template - constexpr const_string(const char(&data)[sizeof...(Idx) + 1], std::index_sequence) noexcept - : data{ data[Idx]... } - { - } - - }; - - /** - * Creates an empty instance of const_string - * - * @see refl::util::const_string - */ - constexpr const_string<0> make_const_string() noexcept - { - return {}; - } - - /** - * Creates an instance of const_string - * - * @see refl::util::const_string - */ - template - constexpr const_string make_const_string(const char(&str)[N]) noexcept - { - return str; - } - - /** - * Creates an instance of const_string - * - * @see refl::util::const_string - */ - constexpr const_string<1> make_const_string(char ch) noexcept - { - const char str[2]{ ch, '\0' }; - return make_const_string(str); - } - - /** - * Concatenates two const_strings together. - * - * @see refl::util::const_string - */ - template - constexpr const_string operator+(const const_string& a, const const_string& b) noexcept - { - char data[N + M + 1] { }; - for (size_t i = 0; i < N; i++) - data[i] = a.data[i]; - for (size_t i = 0; i < M; i++) - data[N + i] = b.data[i]; - return data; - } - - /** - * Concatenates a const_string with a C-style string. - * - * @see refl::util::const_string - */ - template - constexpr const_string operator+(const const_string& a, const char(&b)[M]) noexcept - { - return a + make_const_string(b); - } - - /** - * Concatenates a C-style string with a const_string. - * - * @see refl::util::const_string - */ - template - constexpr const_string operator+(const char(&a)[N], const const_string& b) noexcept - { - return make_const_string(a) + b; - } - - /** - * Compares two const_strings for equality. - * - * @see refl::util::const_string - */ - template - constexpr bool operator==(const const_string& a, const const_string& b) noexcept - { - if constexpr (N != M) { - return false; - } - else { - for (size_t i = 0; i < M; i++) { - if (a.data[i] != b.data[i]) { - return false; - } - } - return true; - } - } - - /** - * Compares two const_strings for equality. - * - * @see refl::util::const_string - */ - template - constexpr bool operator!=(const const_string& a, const const_string& b) noexcept - { - return !(a == b); - } - - /** - * Compares a const_string with a C-style string for equality. - * - * @see refl::util::const_string - */ - template - constexpr bool operator==(const const_string& a, const char(&b)[M]) noexcept - { - return a == make_const_string(b); - } - - /** - * Compares a const_string with a C-style string for equality. - * - * @see refl::util::const_string - */ - template - constexpr bool operator!=(const const_string& a, const char(&b)[M]) noexcept - { - return a != make_const_string(b); - } - - /** - * Compares a C-style string with a const_string for equality. - * - * @see refl::util::const_string - */ - template - constexpr bool operator==(const char(&a)[N], const const_string& b) noexcept - { - return make_const_string(a) == b; - } - - /** - * Compares a C-style string with a const_string for equality. - * - * @see refl::util::const_string - */ - template - constexpr bool operator!=(const char(&a)[N], const const_string& b) noexcept - { - return make_const_string(a) != b; - } - - template - constexpr std::ostream& operator<<(std::ostream& os, const const_string& str) noexcept - { - return os << str.c_str(); - } - - namespace detail - { - constexpr size_t strlen(const char* const str) - { - return *str ? 1 + strlen(str + 1) : 0; - } - - template - constexpr const_string copy_from_unsized(const char* const str) - { - const_string cstr; - for (size_t i = 0; i < N; i++) { - cstr.data[i] = str[i]; - } - return cstr; - } - } // namespace detail - - /** - * Represents a compile-time list of types provided as variadic template parameters. - * type_list is an empty TrivialType. Instances of it can freely be created to communicate - * the list of represented types. type_lists support many standard operations that are - * implicitly available with ADL-lookup. type_list is used by refl-cpp mostly to represent - * the list of refl::field_descriptor, refl::function_descriptor specializations that - * allow the compile-time reflection of a type's members. - * - * @see refl::util::for_each - * @see refl::util::map_to_array - * @see refl::util::map_to_tuple - * @see refl::member_list - * - * # Examples - * ``` - * for_each(type_list(), [](auto) { ... }); - * ``` - */ - template - struct type_list - { - /** The number of types in this type_list */ - static constexpr intptr_t size = sizeof...(Ts); - }; - - template - struct type_list - { - typedef T type; - static constexpr intptr_t size = 1; - }; - - template - using type_tag = type_list; - - } // namespace util - - using util::const_string; - using util::make_const_string; - using util::type_list; - using util::type_tag; - - /** - * The contents of the refl::detail::macro_exports namespace - * is implicitly available in the context of REFL_TYPE/FIELD/FUNC macros. - * It is used to export the refl::attr:: standard attributes. - */ - namespace detail - { - namespace macro_exports - { - } - } - -} // namespace refl - -/** - * refl_impl is an internal namespace that should not be used by the users of refl-cpp. - */ -namespace refl_impl -{ - /** - * Contains the generated metadata types. - * (i.e. type_info__) - */ - namespace metadata - { - // Import everyting from macro_exports here to make it visible in REFL_ macro context. - using namespace refl::detail::macro_exports; - - /** - * The core reflection metadata type. - * type_info__ holds data for a type T. - * - * The non-specialized type_info__ type has a member typedef invalid_marker - * that can be used to detect it. - * - * Specializations of this type should provide all members of this - * generic definition, except invalid_marker. - * - * @typeparam The reflected type. - */ - template - struct type_info__ - { - /** Used for detecting this non-specialized type_info__ instance. */ - struct invalid_marker{}; - - /** - * This is a placeholder definition of which no type instances should be created. - */ - template - struct member; - - /** The number of reflected members of the target type T. */ - static constexpr size_t member_count{ 0 }; - - /** This is a placeholder definition which shold not be referenced by well-formed programs. */ - static constexpr refl::const_string<0> name{ "" }; - - /** This is a placeholder definition which shold not be referenced by well-formed programs. */ - static constexpr std::tuple<> attributes{ }; - }; - - /** - * Specializes type_info__ so that a type's const-qualification is effectively discarded. - */ - template - struct type_info__ : public type_info__ {}; - - /** - * Specializes type_info__ so that a type's volatile-qualification is effectively discarded. - */ - template - struct type_info__ : public type_info__ {}; - - /** - * Specializes type_info__ so that a type's const-volatile-qualification is effectively discarded. - */ - template - struct type_info__ : public type_info__ {}; - - } // namespace metadata - -} // namespace refl_impl - -namespace refl -{ - namespace detail - { - template - using type_info = refl_impl::metadata::type_info__; - - template - using member_info = typename type_info::template member; - } // namespace detail - - /** - * @brief Contains tag types denoting the different types of reflectable members. - * - * This namespace contains a number of empty types that correspond to - * the different member types that refl-cpp supports reflection over. - */ - namespace member - { - /** - * An empty type which is equivalent to refl::member_descriptor_base::member_type - * when the reflected member is a field. - * - * @see refl::descriptor::field_descriptor - */ - struct field {}; - - /** - * An empty type which is equivalent to refl::member_descriptor_base::member_type - * when the reflected member is a function. - * - * @see refl::descriptor::function_descriptor - */ - struct function {}; - } - - namespace descriptor - { - template - class type_descriptor; - - template - class field_descriptor; - - template - class function_descriptor; - } // namespace descriptor - - /** - * @brief Provides type-level operations for refl-cpp related use-cases. - * - * The refl::trait namespace provides type-level operations useful - * for compile-time metaprogramming. - */ - namespace trait - {/** - * Removes all reference and cv-qualifiers from T. - * Equivalent to std::remove_cvref which is not currently - * available on all C++17 compilers. - */ - template - struct remove_qualifiers - { - typedef std::remove_cv_t> type; - }; - - /** - * Removes all reference and cv-qualifiers from T. - * Equivalent to std::remove_cvref_t which is not currently - * available on all C++17 compilers. - */ - template - using remove_qualifiers_t = typename remove_qualifiers::type; - - namespace detail - { - /** SFIANE support for detecting whether there is a type_info__ specialization for T. */ - template - decltype(typename refl::detail::type_info::invalid_marker{}, std::false_type{}) is_reflectable_test(int); - - /** SFIANE support for detecting whether there is a type_info__ specialization for T. */ - template - std::true_type is_reflectable_test(...); - } // namespace detail - - /** - * Checks whether there is reflection metadata for the type T. - * Inherits from std::bool_constant<> - * - * @see REFL_TYPE - * @see REFL_AUTO - * @see refl::is_reflectable - */ - template - struct is_reflectable : decltype(detail::is_reflectable_test(0)) - { - }; - - /** - * Checks whether there is reflection metadata for the type T. - * Inherits from std::bool_constant<> - * - * @see refl::trait::is_reflectable - */ - template - [[maybe_unused]] static constexpr bool is_reflectable_v{ is_reflectable::value }; - - namespace detail - { - /** SFIANE support for detecting whether the type T supports member .begin() and .end() operations. */ - template - [[maybe_unused]] static auto is_container_test(int) -> decltype(std::declval().begin(), std::declval().end(), std::true_type{}); - - /** SFIANE support for detecting whether the type T supports member .begin() and .end() operations. */ - template - [[maybe_unused]] static std::false_type is_container_test(...); - } - - /** - * Checks whether objects of the type T support member .begin() and .end() operations. - */ - template - struct is_container : decltype(detail::is_container_test(0)) - { - }; - - /** - * Checks whether objects of the type T support member .begin() and .end() operations. - */ - template - [[maybe_unused]] static constexpr bool is_container_v{ is_container::value }; - - namespace detail - { - - template - struct get; - - template - struct get - { - static_assert(N > 0, "Missing arguments list for get!"); - }; - - template - struct get<1, N, T, Ts...> : public get< - (N > 16 ? (N > 64 ? 64 : 16) : 1), - N - 1, Ts...> - { - }; - - template - struct get<1, 0, T, Ts...> - { - typedef T type; - }; - - template - struct get<16, 0, T, Ts...> - { - typedef T type; - }; - - template - struct get<64, 0, T, Ts...> - { - typedef T type; - }; - - template < - size_t N, typename T0, typename T1, typename T2, typename T3, - typename T4, typename T5, typename T6, typename T7, typename T8, - typename T9, typename T10, typename T11, typename T12, - typename T13, typename T14, typename T15, typename... Ts> - struct get< - 16, N, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, - T13, T14, T15, Ts...> : get<1, N - 16, Ts...> - { - }; - - template < - size_t N, typename T0, typename T1, typename T2, typename T3, - typename T4, typename T5, typename T6, typename T7, typename T8, - typename T9, typename T10, typename T11, typename T12, - typename T13, typename T14, typename T15, typename T16, - typename T17, typename T18, typename T19, typename T20, - typename T21, typename T22, typename T23, typename T24, - typename T25, typename T26, typename T27, typename T28, - typename T29, typename T30, typename T31, typename T32, - typename T33, typename T34, typename T35, typename T36, - typename T37, typename T38, typename T39, typename T40, - typename T41, typename T42, typename T43, typename T44, - typename T45, typename T46, typename T47, typename T48, - typename T49, typename T50, typename T51, typename T52, - typename T53, typename T54, typename T55, typename T56, - typename T57, typename T58, typename T59, typename T60, - typename T61, typename T62, typename T63, typename... Ts> - struct get< - 64, N, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, - T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, - T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, - T39, T40, T41, T42, T43, T44, T45, T46, T47, T48, T49, T50, T51, - T52, T53, T54, T55, T56, T57, T58, T59, T60, T61, T62, T63, - Ts...> : get<1, N - 64, Ts...> - { - }; - - template - struct skip; - - template - struct skip : skip - { - }; - - template - struct skip<0, T, Ts...> - { - typedef type_list type; - }; - - template <> - struct skip<0> - { - typedef type_list<> type; - }; - } - - /// \private - template - struct get; - - /** - * Provides a member typedef type which is the - * N-th type in the provided type_list. - * - * \code{.cpp} - * typename get<0, type_list>::type -> int - * typename get<1, type_list>::type -> float - * \endcode - */ - template - struct get> : detail::get<1, N, Ts...> - { - }; - - /** - * The N-th type in the provided type_list. - * @see get - */ - template - using get_t = typename get::type; - - /// \private - template - struct skip; - - /** - * Skips the first N types in the provided type_list. - * Provides a member typedef equivalent to the resuling type_list. - * - * \code{.cpp} - * typename skip<1, type_list>::type -> type_list - * typename skip<0, type_list>::type -> type_list - * \endcode - */ - template - struct skip> : detail::skip - { - }; - - /** - * Skips the first N types in the provided type_list. - * @see skip - */ - template - using skip_t = typename skip::type; - - /// \private - template - struct as_type_list; - - /** - * Provides a member typedef type which is a type_list with - * template type parameters equivalent to the type parameters of the provided - * type. The provided type must be a template instance. - * - * \code{.cpp} - * typename as_type_list>::type -> type_list - * \endcode - */ - template