diff --git a/.cproject b/.cproject
new file mode 100644
index 0000000000000000000000000000000000000000..1f1e9ec11b03c586216b524cbfbd56a2c4ca6b73
--- /dev/null
+++ b/.cproject
@@ -0,0 +1,216 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.mxproject b/.mxproject
new file mode 100644
index 0000000000000000000000000000000000000000..c6a625f9fd6acee5b8215b9f7b698d7fe2e1f0dc
--- /dev/null
+++ b/.mxproject
@@ -0,0 +1,31 @@
+[PreviousLibFiles]
+LibFiles=Drivers\STM32F1xx_HAL_Driver\Inc\stm32f1xx_hal_tim.h;Drivers\STM32F1xx_HAL_Driver\Inc\stm32f1xx_hal_tim_ex.h;Drivers\STM32F1xx_HAL_Driver\Inc\stm32f1xx_ll_tim.h;Drivers\STM32F1xx_HAL_Driver\Inc\Legacy\stm32_hal_legacy.h;Drivers\STM32F1xx_HAL_Driver\Inc\stm32f1xx_hal.h;Drivers\STM32F1xx_HAL_Driver\Inc\stm32f1xx_hal_def.h;Drivers\STM32F1xx_HAL_Driver\Inc\stm32f1xx_hal_rcc.h;Drivers\STM32F1xx_HAL_Driver\Inc\stm32f1xx_hal_rcc_ex.h;Drivers\STM32F1xx_HAL_Driver\Inc\stm32f1xx_ll_bus.h;Drivers\STM32F1xx_HAL_Driver\Inc\stm32f1xx_ll_rcc.h;Drivers\STM32F1xx_HAL_Driver\Inc\stm32f1xx_ll_system.h;Drivers\STM32F1xx_HAL_Driver\Inc\stm32f1xx_ll_utils.h;Drivers\STM32F1xx_HAL_Driver\Inc\stm32f1xx_hal_gpio.h;Drivers\STM32F1xx_HAL_Driver\Inc\stm32f1xx_hal_gpio_ex.h;Drivers\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_gpio_ex.c;Drivers\STM32F1xx_HAL_Driver\Inc\stm32f1xx_ll_gpio.h;Drivers\STM32F1xx_HAL_Driver\Inc\stm32f1xx_hal_dma_ex.h;Drivers\STM32F1xx_HAL_Driver\Inc\stm32f1xx_hal_dma.h;Drivers\STM32F1xx_HAL_Driver\Inc\stm32f1xx_ll_dma.h;Drivers\STM32F1xx_HAL_Driver\Inc\stm32f1xx_hal_cortex.h;Drivers\STM32F1xx_HAL_Driver\Inc\stm32f1xx_ll_cortex.h;Drivers\STM32F1xx_HAL_Driver\Inc\stm32f1xx_hal_pwr.h;Drivers\STM32F1xx_HAL_Driver\Inc\stm32f1xx_ll_pwr.h;Drivers\STM32F1xx_HAL_Driver\Inc\stm32f1xx_hal_flash.h;Drivers\STM32F1xx_HAL_Driver\Inc\stm32f1xx_hal_flash_ex.h;Drivers\STM32F1xx_HAL_Driver\Inc\stm32f1xx_hal_exti.h;Drivers\STM32F1xx_HAL_Driver\Inc\stm32f1xx_ll_exti.h;Drivers\STM32F1xx_HAL_Driver\Inc\stm32f1xx_hal_uart.h;Drivers\STM32F1xx_HAL_Driver\Inc\stm32f1xx_ll_usart.h;Drivers\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_tim.c;Drivers\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_tim_ex.c;Drivers\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal.c;Drivers\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_rcc.c;Drivers\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_rcc_ex.c;Drivers\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_gpio.c;Drivers\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_dma.c;Drivers\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_cortex.c;Drivers\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_pwr.c;Drivers\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_flash.c;Drivers\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_flash_ex.c;Drivers\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_exti.c;Drivers\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_uart.c;Drivers\STM32F1xx_HAL_Driver\Inc\stm32f1xx_hal_tim.h;Drivers\STM32F1xx_HAL_Driver\Inc\stm32f1xx_hal_tim_ex.h;Drivers\STM32F1xx_HAL_Driver\Inc\stm32f1xx_ll_tim.h;Drivers\STM32F1xx_HAL_Driver\Inc\Legacy\stm32_hal_legacy.h;Drivers\STM32F1xx_HAL_Driver\Inc\stm32f1xx_hal.h;Drivers\STM32F1xx_HAL_Driver\Inc\stm32f1xx_hal_def.h;Drivers\STM32F1xx_HAL_Driver\Inc\stm32f1xx_hal_rcc.h;Drivers\STM32F1xx_HAL_Driver\Inc\stm32f1xx_hal_rcc_ex.h;Drivers\STM32F1xx_HAL_Driver\Inc\stm32f1xx_ll_bus.h;Drivers\STM32F1xx_HAL_Driver\Inc\stm32f1xx_ll_rcc.h;Drivers\STM32F1xx_HAL_Driver\Inc\stm32f1xx_ll_system.h;Drivers\STM32F1xx_HAL_Driver\Inc\stm32f1xx_ll_utils.h;Drivers\STM32F1xx_HAL_Driver\Inc\stm32f1xx_hal_gpio.h;Drivers\STM32F1xx_HAL_Driver\Inc\stm32f1xx_hal_gpio_ex.h;Drivers\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_gpio_ex.c;Drivers\STM32F1xx_HAL_Driver\Inc\stm32f1xx_ll_gpio.h;Drivers\STM32F1xx_HAL_Driver\Inc\stm32f1xx_hal_dma_ex.h;Drivers\STM32F1xx_HAL_Driver\Inc\stm32f1xx_hal_dma.h;Drivers\STM32F1xx_HAL_Driver\Inc\stm32f1xx_ll_dma.h;Drivers\STM32F1xx_HAL_Driver\Inc\stm32f1xx_hal_cortex.h;Drivers\STM32F1xx_HAL_Driver\Inc\stm32f1xx_ll_cortex.h;Drivers\STM32F1xx_HAL_Driver\Inc\stm32f1xx_hal_pwr.h;Drivers\STM32F1xx_HAL_Driver\Inc\stm32f1xx_ll_pwr.h;Drivers\STM32F1xx_HAL_Driver\Inc\stm32f1xx_hal_flash.h;Drivers\STM32F1xx_HAL_Driver\Inc\stm32f1xx_hal_flash_ex.h;Drivers\STM32F1xx_HAL_Driver\Inc\stm32f1xx_hal_exti.h;Drivers\STM32F1xx_HAL_Driver\Inc\stm32f1xx_ll_exti.h;Drivers\STM32F1xx_HAL_Driver\Inc\stm32f1xx_hal_uart.h;Drivers\STM32F1xx_HAL_Driver\Inc\stm32f1xx_ll_usart.h;Drivers\CMSIS\Device\ST\STM32F1xx\Include\stm32f103xb.h;Drivers\CMSIS\Device\ST\STM32F1xx\Include\stm32f1xx.h;Drivers\CMSIS\Device\ST\STM32F1xx\Include\system_stm32f1xx.h;Drivers\CMSIS\Device\ST\STM32F1xx\Source\Templates\system_stm32f1xx.c;Drivers\CMSIS\Include\cmsis_armcc.h;Drivers\CMSIS\Include\cmsis_armclang.h;Drivers\CMSIS\Include\cmsis_compiler.h;Drivers\CMSIS\Include\cmsis_gcc.h;Drivers\CMSIS\Include\cmsis_iccarm.h;Drivers\CMSIS\Include\cmsis_version.h;Drivers\CMSIS\Include\core_armv8mbl.h;Drivers\CMSIS\Include\core_armv8mml.h;Drivers\CMSIS\Include\core_cm0.h;Drivers\CMSIS\Include\core_cm0plus.h;Drivers\CMSIS\Include\core_cm1.h;Drivers\CMSIS\Include\core_cm23.h;Drivers\CMSIS\Include\core_cm3.h;Drivers\CMSIS\Include\core_cm33.h;Drivers\CMSIS\Include\core_cm4.h;Drivers\CMSIS\Include\core_cm7.h;Drivers\CMSIS\Include\core_sc000.h;Drivers\CMSIS\Include\core_sc300.h;Drivers\CMSIS\Include\mpu_armv7.h;Drivers\CMSIS\Include\mpu_armv8.h;Drivers\CMSIS\Include\tz_context.h;
+
+[PreviousUsedCubeIDEFiles]
+SourceFiles=Core\Src\main.c;Core\Src\gpio.c;Core\Src\tim.c;Core\Src\usart.c;Core\Src\stm32f1xx_it.c;Core\Src\stm32f1xx_hal_msp.c;Drivers\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_gpio_ex.c;Drivers\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_tim.c;Drivers\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_tim_ex.c;Drivers\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal.c;Drivers\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_rcc.c;Drivers\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_rcc_ex.c;Drivers\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_gpio.c;Drivers\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_dma.c;Drivers\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_cortex.c;Drivers\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_pwr.c;Drivers\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_flash.c;Drivers\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_flash_ex.c;Drivers\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_exti.c;Drivers\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_uart.c;Drivers\CMSIS\Device\ST\STM32F1xx\Source\Templates\system_stm32f1xx.c;Core\Src\system_stm32f1xx.c;Drivers\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_gpio_ex.c;Drivers\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_tim.c;Drivers\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_tim_ex.c;Drivers\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal.c;Drivers\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_rcc.c;Drivers\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_rcc_ex.c;Drivers\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_gpio.c;Drivers\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_dma.c;Drivers\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_cortex.c;Drivers\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_pwr.c;Drivers\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_flash.c;Drivers\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_flash_ex.c;Drivers\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_exti.c;Drivers\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_uart.c;Drivers\CMSIS\Device\ST\STM32F1xx\Source\Templates\system_stm32f1xx.c;Core\Src\system_stm32f1xx.c;;;
+HeaderPath=Drivers\STM32F1xx_HAL_Driver\Inc;Drivers\STM32F1xx_HAL_Driver\Inc\Legacy;Drivers\CMSIS\Device\ST\STM32F1xx\Include;Drivers\CMSIS\Include;Core\Inc;
+CDefines=USE_HAL_DRIVER;STM32F103xB;USE_HAL_DRIVER;USE_HAL_DRIVER;
+
+[PreviousGenFiles]
+AdvancedFolderStructure=true
+HeaderFileListSize=6
+HeaderFiles#0=..\Core\Inc\gpio.h
+HeaderFiles#1=..\Core\Inc\tim.h
+HeaderFiles#2=..\Core\Inc\usart.h
+HeaderFiles#3=..\Core\Inc\stm32f1xx_it.h
+HeaderFiles#4=..\Core\Inc\stm32f1xx_hal_conf.h
+HeaderFiles#5=..\Core\Inc\main.h
+HeaderFolderListSize=1
+HeaderPath#0=..\Core\Inc
+HeaderFiles=;
+SourceFileListSize=6
+SourceFiles#0=..\Core\Src\gpio.c
+SourceFiles#1=..\Core\Src\tim.c
+SourceFiles#2=..\Core\Src\usart.c
+SourceFiles#3=..\Core\Src\stm32f1xx_it.c
+SourceFiles#4=..\Core\Src\stm32f1xx_hal_msp.c
+SourceFiles#5=..\Core\Src\main.c
+SourceFolderListSize=1
+SourcePath#0=..\Core\Src
+SourceFiles=;
+
diff --git a/.project b/.project
new file mode 100644
index 0000000000000000000000000000000000000000..5ebaebec2a292f75062fe6b001a47e5a2f388590
--- /dev/null
+++ b/.project
@@ -0,0 +1,32 @@
+
+
+ pjsspoon
+
+
+
+
+
+ org.eclipse.cdt.managedbuilder.core.genmakebuilder
+ clean,full,incremental,
+
+
+
+
+ org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder
+ full,incremental,
+
+
+
+
+
+ com.st.stm32cube.ide.mcu.MCUProjectNature
+ com.st.stm32cube.ide.mcu.MCUCubeProjectNature
+ org.eclipse.cdt.core.cnature
+ com.st.stm32cube.ide.mcu.MCUCubeIdeServicesRevAev2ProjectNature
+ com.st.stm32cube.ide.mcu.MCUAdvancedStructureProjectNature
+ com.st.stm32cube.ide.mcu.MCUSingleCpuProjectNature
+ com.st.stm32cube.ide.mcu.MCURootProjectNature
+ org.eclipse.cdt.managedbuilder.core.managedBuildNature
+ org.eclipse.cdt.managedbuilder.core.ScannerConfigNature
+
+
diff --git a/.settings/language.settings.xml b/.settings/language.settings.xml
new file mode 100644
index 0000000000000000000000000000000000000000..1c203848479691ad480455736c1bd6db696bbbf3
--- /dev/null
+++ b/.settings/language.settings.xml
@@ -0,0 +1,25 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.settings/stm32cubeide.project.prefs b/.settings/stm32cubeide.project.prefs
new file mode 100644
index 0000000000000000000000000000000000000000..eef901c20565c20325b995b04707a1b6c72b2185
--- /dev/null
+++ b/.settings/stm32cubeide.project.prefs
@@ -0,0 +1,4 @@
+66BE74F758C12D739921AEA421D593D3=4
+8DF89ED150041C4CBC7CB9A9CAA90856=BD81A38ABCB6A8D22A0F87C5AFB577AD
+DC22A860405A8BF2F2C095E5B6529F12=BD81A38ABCB6A8D22A0F87C5AFB577AD
+eclipse.preferences.version=1
diff --git a/.vscode/settings.json b/.vscode/settings.json
new file mode 100644
index 0000000000000000000000000000000000000000..2f6cc865accf3bb6ae5aaf038260da439b82bc7e
--- /dev/null
+++ b/.vscode/settings.json
@@ -0,0 +1,21 @@
+{
+ "MicroPython.executeButton": [
+ {
+ "text": "▶",
+ "tooltip": "运行",
+ "alignment": "left",
+ "command": "extension.executeFile",
+ "priority": 3.5
+ }
+ ],
+ "MicroPython.syncButton": [
+ {
+ "text": "$(sync)",
+ "tooltip": "同步",
+ "alignment": "left",
+ "command": "extension.execute",
+ "priority": 4
+ }
+ ],
+ "stm32-for-vscode.makePath": false
+}
\ No newline at end of file
diff --git a/Core/Inc/IIC.h b/Core/Inc/IIC.h
new file mode 100644
index 0000000000000000000000000000000000000000..ece8d0e5649e1d00840818e1d9cf464491b57562
--- /dev/null
+++ b/Core/Inc/IIC.h
@@ -0,0 +1,26 @@
+/*
+ * IIC.h
+ *
+ * Created on: Jul 11, 2023
+ * Author: zzy
+ */
+
+#ifndef INC_IIC_H_
+#define INC_IIC_H_
+
+#include
+#include "main.h"
+#define IIC_WR 0 /* 写控制bit */
+#define IIC_RD 1 /* 读控制bit */
+
+void IIC_Start(void);
+void IIC_Stop(void);
+void IIC_Send_Byte(uint8_t _ucByte);
+uint8_t IIC_Read_Byte(uint8_t ack);
+uint8_t IIC_Wait_Ack(void);
+void IIC_Ack(void);
+void IIC_NAck(void);
+uint8_t IIC_CheckDevice(uint8_t _Address);
+void IIC_GPIO_Init(void);
+
+#endif /* INC_IIC_H_ */
diff --git a/Core/Inc/dmpKey.h b/Core/Inc/dmpKey.h
new file mode 100644
index 0000000000000000000000000000000000000000..d499293bc6e076a1a3cfcdc90623545f7461aee4
--- /dev/null
+++ b/Core/Inc/dmpKey.h
@@ -0,0 +1,501 @@
+/*
+ * dmpKey.h
+ *
+ * Created on: Jul 11, 2023
+ * Author: zzy
+ */
+
+#ifndef INC_DMPKEY_H_
+#define INC_DMPKEY_H_
+
+/*
+ $License:
+ Copyright (C) 2011 InvenSense Corporation, All Rights Reserved.
+ $
+ */
+
+#define KEY_CFG_25 (0)
+#define KEY_CFG_24 (KEY_CFG_25 + 1)
+#define KEY_CFG_26 (KEY_CFG_24 + 1)
+#define KEY_CFG_27 (KEY_CFG_26 + 1)
+#define KEY_CFG_21 (KEY_CFG_27 + 1)
+#define KEY_CFG_20 (KEY_CFG_21 + 1)
+#define KEY_CFG_TAP4 (KEY_CFG_20 + 1)
+#define KEY_CFG_TAP5 (KEY_CFG_TAP4 + 1)
+#define KEY_CFG_TAP6 (KEY_CFG_TAP5 + 1)
+#define KEY_CFG_TAP7 (KEY_CFG_TAP6 + 1)
+#define KEY_CFG_TAP0 (KEY_CFG_TAP7 + 1)
+#define KEY_CFG_TAP1 (KEY_CFG_TAP0 + 1)
+#define KEY_CFG_TAP2 (KEY_CFG_TAP1 + 1)
+#define KEY_CFG_TAP3 (KEY_CFG_TAP2 + 1)
+#define KEY_CFG_TAP_QUANTIZE (KEY_CFG_TAP3 + 1)
+#define KEY_CFG_TAP_JERK (KEY_CFG_TAP_QUANTIZE + 1)
+#define KEY_CFG_DR_INT (KEY_CFG_TAP_JERK + 1)
+#define KEY_CFG_AUTH (KEY_CFG_DR_INT + 1)
+#define KEY_CFG_TAP_SAVE_ACCB (KEY_CFG_AUTH + 1)
+#define KEY_CFG_TAP_CLEAR_STICKY (KEY_CFG_TAP_SAVE_ACCB + 1)
+#define KEY_CFG_FIFO_ON_EVENT (KEY_CFG_TAP_CLEAR_STICKY + 1)
+#define KEY_FCFG_ACCEL_INPUT (KEY_CFG_FIFO_ON_EVENT + 1)
+#define KEY_FCFG_ACCEL_INIT (KEY_FCFG_ACCEL_INPUT + 1)
+#define KEY_CFG_23 (KEY_FCFG_ACCEL_INIT + 1)
+#define KEY_FCFG_1 (KEY_CFG_23 + 1)
+#define KEY_FCFG_3 (KEY_FCFG_1 + 1)
+#define KEY_FCFG_2 (KEY_FCFG_3 + 1)
+#define KEY_CFG_3D (KEY_FCFG_2 + 1)
+#define KEY_CFG_3B (KEY_CFG_3D + 1)
+#define KEY_CFG_3C (KEY_CFG_3B + 1)
+#define KEY_FCFG_5 (KEY_CFG_3C + 1)
+#define KEY_FCFG_4 (KEY_FCFG_5 + 1)
+#define KEY_FCFG_7 (KEY_FCFG_4 + 1)
+#define KEY_FCFG_FSCALE (KEY_FCFG_7 + 1)
+#define KEY_FCFG_AZ (KEY_FCFG_FSCALE + 1)
+#define KEY_FCFG_6 (KEY_FCFG_AZ + 1)
+#define KEY_FCFG_LSB4 (KEY_FCFG_6 + 1)
+#define KEY_CFG_12 (KEY_FCFG_LSB4 + 1)
+#define KEY_CFG_14 (KEY_CFG_12 + 1)
+#define KEY_CFG_15 (KEY_CFG_14 + 1)
+#define KEY_CFG_16 (KEY_CFG_15 + 1)
+#define KEY_CFG_18 (KEY_CFG_16 + 1)
+#define KEY_CFG_6 (KEY_CFG_18 + 1)
+#define KEY_CFG_7 (KEY_CFG_6 + 1)
+#define KEY_CFG_4 (KEY_CFG_7 + 1)
+#define KEY_CFG_5 (KEY_CFG_4 + 1)
+#define KEY_CFG_2 (KEY_CFG_5 + 1)
+#define KEY_CFG_3 (KEY_CFG_2 + 1)
+#define KEY_CFG_1 (KEY_CFG_3 + 1)
+#define KEY_CFG_EXTERNAL (KEY_CFG_1 + 1)
+#define KEY_CFG_8 (KEY_CFG_EXTERNAL + 1)
+#define KEY_CFG_9 (KEY_CFG_8 + 1)
+#define KEY_CFG_ORIENT_3 (KEY_CFG_9 + 1)
+#define KEY_CFG_ORIENT_2 (KEY_CFG_ORIENT_3 + 1)
+#define KEY_CFG_ORIENT_1 (KEY_CFG_ORIENT_2 + 1)
+#define KEY_CFG_GYRO_SOURCE (KEY_CFG_ORIENT_1 + 1)
+#define KEY_CFG_ORIENT_IRQ_1 (KEY_CFG_GYRO_SOURCE + 1)
+#define KEY_CFG_ORIENT_IRQ_2 (KEY_CFG_ORIENT_IRQ_1 + 1)
+#define KEY_CFG_ORIENT_IRQ_3 (KEY_CFG_ORIENT_IRQ_2 + 1)
+#define KEY_FCFG_MAG_VAL (KEY_CFG_ORIENT_IRQ_3 + 1)
+#define KEY_FCFG_MAG_MOV (KEY_FCFG_MAG_VAL + 1)
+#define KEY_CFG_LP_QUAT (KEY_FCFG_MAG_MOV + 1)
+
+/* MPU6050 keys */
+#define KEY_CFG_ACCEL_FILTER (KEY_CFG_LP_QUAT + 1)
+#define KEY_CFG_MOTION_BIAS (KEY_CFG_ACCEL_FILTER + 1)
+#define KEY_TEMPLABEL (KEY_CFG_MOTION_BIAS + 1)
+
+#define KEY_D_0_22 (KEY_TEMPLABEL + 1)
+#define KEY_D_0_24 (KEY_D_0_22 + 1)
+#define KEY_D_0_36 (KEY_D_0_24 + 1)
+#define KEY_D_0_52 (KEY_D_0_36 + 1)
+#define KEY_D_0_96 (KEY_D_0_52 + 1)
+#define KEY_D_0_104 (KEY_D_0_96 + 1)
+#define KEY_D_0_108 (KEY_D_0_104 + 1)
+#define KEY_D_0_163 (KEY_D_0_108 + 1)
+#define KEY_D_0_188 (KEY_D_0_163 + 1)
+#define KEY_D_0_192 (KEY_D_0_188 + 1)
+#define KEY_D_0_224 (KEY_D_0_192 + 1)
+#define KEY_D_0_228 (KEY_D_0_224 + 1)
+#define KEY_D_0_232 (KEY_D_0_228 + 1)
+#define KEY_D_0_236 (KEY_D_0_232 + 1)
+
+#define KEY_DMP_PREVPTAT (KEY_D_0_236 + 1)
+#define KEY_D_1_2 (KEY_DMP_PREVPTAT + 1)
+#define KEY_D_1_4 (KEY_D_1_2 + 1)
+#define KEY_D_1_8 (KEY_D_1_4 + 1)
+#define KEY_D_1_10 (KEY_D_1_8 + 1)
+#define KEY_D_1_24 (KEY_D_1_10 + 1)
+#define KEY_D_1_28 (KEY_D_1_24 + 1)
+#define KEY_D_1_36 (KEY_D_1_28 + 1)
+#define KEY_D_1_40 (KEY_D_1_36 + 1)
+#define KEY_D_1_44 (KEY_D_1_40 + 1)
+#define KEY_D_1_72 (KEY_D_1_44 + 1)
+#define KEY_D_1_74 (KEY_D_1_72 + 1)
+#define KEY_D_1_79 (KEY_D_1_74 + 1)
+#define KEY_D_1_88 (KEY_D_1_79 + 1)
+#define KEY_D_1_90 (KEY_D_1_88 + 1)
+#define KEY_D_1_92 (KEY_D_1_90 + 1)
+#define KEY_D_1_96 (KEY_D_1_92 + 1)
+#define KEY_D_1_98 (KEY_D_1_96 + 1)
+#define KEY_D_1_100 (KEY_D_1_98 + 1)
+#define KEY_D_1_106 (KEY_D_1_100 + 1)
+#define KEY_D_1_108 (KEY_D_1_106 + 1)
+#define KEY_D_1_112 (KEY_D_1_108 + 1)
+#define KEY_D_1_128 (KEY_D_1_112 + 1)
+#define KEY_D_1_152 (KEY_D_1_128 + 1)
+#define KEY_D_1_160 (KEY_D_1_152 + 1)
+#define KEY_D_1_168 (KEY_D_1_160 + 1)
+#define KEY_D_1_175 (KEY_D_1_168 + 1)
+#define KEY_D_1_176 (KEY_D_1_175 + 1)
+#define KEY_D_1_178 (KEY_D_1_176 + 1)
+#define KEY_D_1_179 (KEY_D_1_178 + 1)
+#define KEY_D_1_218 (KEY_D_1_179 + 1)
+#define KEY_D_1_232 (KEY_D_1_218 + 1)
+#define KEY_D_1_236 (KEY_D_1_232 + 1)
+#define KEY_D_1_240 (KEY_D_1_236 + 1)
+#define KEY_D_1_244 (KEY_D_1_240 + 1)
+#define KEY_D_1_250 (KEY_D_1_244 + 1)
+#define KEY_D_1_252 (KEY_D_1_250 + 1)
+#define KEY_D_2_12 (KEY_D_1_252 + 1)
+#define KEY_D_2_96 (KEY_D_2_12 + 1)
+#define KEY_D_2_108 (KEY_D_2_96 + 1)
+#define KEY_D_2_208 (KEY_D_2_108 + 1)
+#define KEY_FLICK_MSG (KEY_D_2_208 + 1)
+#define KEY_FLICK_COUNTER (KEY_FLICK_MSG + 1)
+#define KEY_FLICK_LOWER (KEY_FLICK_COUNTER + 1)
+#define KEY_CFG_FLICK_IN (KEY_FLICK_LOWER + 1)
+#define KEY_FLICK_UPPER (KEY_CFG_FLICK_IN + 1)
+#define KEY_CGNOTICE_INTR (KEY_FLICK_UPPER + 1)
+#define KEY_D_2_224 (KEY_CGNOTICE_INTR + 1)
+#define KEY_D_2_244 (KEY_D_2_224 + 1)
+#define KEY_D_2_248 (KEY_D_2_244 + 1)
+#define KEY_D_2_252 (KEY_D_2_248 + 1)
+
+#define KEY_D_GYRO_BIAS_X (KEY_D_2_252 + 1)
+#define KEY_D_GYRO_BIAS_Y (KEY_D_GYRO_BIAS_X + 1)
+#define KEY_D_GYRO_BIAS_Z (KEY_D_GYRO_BIAS_Y + 1)
+#define KEY_D_ACC_BIAS_X (KEY_D_GYRO_BIAS_Z + 1)
+#define KEY_D_ACC_BIAS_Y (KEY_D_ACC_BIAS_X + 1)
+#define KEY_D_ACC_BIAS_Z (KEY_D_ACC_BIAS_Y + 1)
+#define KEY_D_GYRO_ENABLE (KEY_D_ACC_BIAS_Z + 1)
+#define KEY_D_ACCEL_ENABLE (KEY_D_GYRO_ENABLE + 1)
+#define KEY_D_QUAT_ENABLE (KEY_D_ACCEL_ENABLE + 1)
+#define KEY_D_OUTPUT_ENABLE (KEY_D_QUAT_ENABLE + 1)
+#define KEY_D_CR_TIME_G (KEY_D_OUTPUT_ENABLE + 1)
+#define KEY_D_CR_TIME_A (KEY_D_CR_TIME_G + 1)
+#define KEY_D_CR_TIME_Q (KEY_D_CR_TIME_A + 1)
+#define KEY_D_CS_TAX (KEY_D_CR_TIME_Q + 1)
+#define KEY_D_CS_TAY (KEY_D_CS_TAX + 1)
+#define KEY_D_CS_TAZ (KEY_D_CS_TAY + 1)
+#define KEY_D_CS_TGX (KEY_D_CS_TAZ + 1)
+#define KEY_D_CS_TGY (KEY_D_CS_TGX + 1)
+#define KEY_D_CS_TGZ (KEY_D_CS_TGY + 1)
+#define KEY_D_CS_TQ0 (KEY_D_CS_TGZ + 1)
+#define KEY_D_CS_TQ1 (KEY_D_CS_TQ0 + 1)
+#define KEY_D_CS_TQ2 (KEY_D_CS_TQ1 + 1)
+#define KEY_D_CS_TQ3 (KEY_D_CS_TQ2 + 1)
+
+/* Compass keys */
+#define KEY_CPASS_BIAS_X (KEY_D_CS_TQ3 + 1)
+#define KEY_CPASS_BIAS_Y (KEY_CPASS_BIAS_X + 1)
+#define KEY_CPASS_BIAS_Z (KEY_CPASS_BIAS_Y + 1)
+#define KEY_CPASS_MTX_00 (KEY_CPASS_BIAS_Z + 1)
+#define KEY_CPASS_MTX_01 (KEY_CPASS_MTX_00 + 1)
+#define KEY_CPASS_MTX_02 (KEY_CPASS_MTX_01 + 1)
+#define KEY_CPASS_MTX_10 (KEY_CPASS_MTX_02 + 1)
+#define KEY_CPASS_MTX_11 (KEY_CPASS_MTX_10 + 1)
+#define KEY_CPASS_MTX_12 (KEY_CPASS_MTX_11 + 1)
+#define KEY_CPASS_MTX_20 (KEY_CPASS_MTX_12 + 1)
+#define KEY_CPASS_MTX_21 (KEY_CPASS_MTX_20 + 1)
+#define KEY_CPASS_MTX_22 (KEY_CPASS_MTX_21 + 1)
+
+/* Gesture Keys */
+#define KEY_DMP_TAPW_MIN (KEY_CPASS_MTX_22 + 1)
+#define KEY_DMP_TAP_THR_X (KEY_DMP_TAPW_MIN + 1)
+#define KEY_DMP_TAP_THR_Y (KEY_DMP_TAP_THR_X + 1)
+#define KEY_DMP_TAP_THR_Z (KEY_DMP_TAP_THR_Y + 1)
+#define KEY_DMP_SH_TH_Y (KEY_DMP_TAP_THR_Z + 1)
+#define KEY_DMP_SH_TH_X (KEY_DMP_SH_TH_Y + 1)
+#define KEY_DMP_SH_TH_Z (KEY_DMP_SH_TH_X + 1)
+#define KEY_DMP_ORIENT (KEY_DMP_SH_TH_Z + 1)
+#define KEY_D_ACT0 (KEY_DMP_ORIENT + 1)
+#define KEY_D_ACSX (KEY_D_ACT0 + 1)
+#define KEY_D_ACSY (KEY_D_ACSX + 1)
+#define KEY_D_ACSZ (KEY_D_ACSY + 1)
+
+#define KEY_X_GRT_Y_TMP (KEY_D_ACSZ + 1)
+#define KEY_SKIP_X_GRT_Y_TMP (KEY_X_GRT_Y_TMP + 1)
+#define KEY_SKIP_END_COMPARE (KEY_SKIP_X_GRT_Y_TMP + 1)
+#define KEY_END_COMPARE_Y_X_TMP2 (KEY_SKIP_END_COMPARE + 1)
+#define KEY_CFG_ANDROID_ORIENT_INT (KEY_END_COMPARE_Y_X_TMP2 + 1)
+#define KEY_NO_ORIENT_INTERRUPT (KEY_CFG_ANDROID_ORIENT_INT + 1)
+#define KEY_END_COMPARE_Y_X_TMP (KEY_NO_ORIENT_INTERRUPT + 1)
+#define KEY_END_ORIENT_1 (KEY_END_COMPARE_Y_X_TMP + 1)
+#define KEY_END_COMPARE_Y_X (KEY_END_ORIENT_1 + 1)
+#define KEY_END_ORIENT (KEY_END_COMPARE_Y_X + 1)
+#define KEY_X_GRT_Y (KEY_END_ORIENT + 1)
+#define KEY_NOT_TIME_MINUS_1 (KEY_X_GRT_Y + 1)
+#define KEY_END_COMPARE_Y_X_TMP3 (KEY_NOT_TIME_MINUS_1 + 1)
+#define KEY_X_GRT_Y_TMP2 (KEY_END_COMPARE_Y_X_TMP3 + 1)
+
+/* Authenticate Keys */
+#define KEY_D_AUTH_OUT (KEY_X_GRT_Y_TMP2 + 1)
+#define KEY_D_AUTH_IN (KEY_D_AUTH_OUT + 1)
+#define KEY_D_AUTH_A (KEY_D_AUTH_IN + 1)
+#define KEY_D_AUTH_B (KEY_D_AUTH_A + 1)
+
+/* Pedometer standalone only keys */
+#define KEY_D_PEDSTD_BP_B (KEY_D_AUTH_B + 1)
+#define KEY_D_PEDSTD_HP_A (KEY_D_PEDSTD_BP_B + 1)
+#define KEY_D_PEDSTD_HP_B (KEY_D_PEDSTD_HP_A + 1)
+#define KEY_D_PEDSTD_BP_A4 (KEY_D_PEDSTD_HP_B + 1)
+#define KEY_D_PEDSTD_BP_A3 (KEY_D_PEDSTD_BP_A4 + 1)
+#define KEY_D_PEDSTD_BP_A2 (KEY_D_PEDSTD_BP_A3 + 1)
+#define KEY_D_PEDSTD_BP_A1 (KEY_D_PEDSTD_BP_A2 + 1)
+#define KEY_D_PEDSTD_INT_THRSH (KEY_D_PEDSTD_BP_A1 + 1)
+#define KEY_D_PEDSTD_CLIP (KEY_D_PEDSTD_INT_THRSH + 1)
+#define KEY_D_PEDSTD_SB (KEY_D_PEDSTD_CLIP + 1)
+#define KEY_D_PEDSTD_SB_TIME (KEY_D_PEDSTD_SB + 1)
+#define KEY_D_PEDSTD_PEAKTHRSH (KEY_D_PEDSTD_SB_TIME + 1)
+#define KEY_D_PEDSTD_TIML (KEY_D_PEDSTD_PEAKTHRSH + 1)
+#define KEY_D_PEDSTD_TIMH (KEY_D_PEDSTD_TIML + 1)
+#define KEY_D_PEDSTD_PEAK (KEY_D_PEDSTD_TIMH + 1)
+#define KEY_D_PEDSTD_TIMECTR (KEY_D_PEDSTD_PEAK + 1)
+#define KEY_D_PEDSTD_STEPCTR (KEY_D_PEDSTD_TIMECTR + 1)
+#define KEY_D_PEDSTD_WALKTIME (KEY_D_PEDSTD_STEPCTR + 1)
+#define KEY_D_PEDSTD_DECI (KEY_D_PEDSTD_WALKTIME + 1)
+
+/*Host Based No Motion*/
+#define KEY_D_HOST_NO_MOT (KEY_D_PEDSTD_DECI + 1)
+
+/* EIS keys */
+#define KEY_P_EIS_FIFO_FOOTER (KEY_D_HOST_NO_MOT + 1)
+#define KEY_P_EIS_FIFO_YSHIFT (KEY_P_EIS_FIFO_FOOTER + 1)
+#define KEY_P_EIS_DATA_RATE (KEY_P_EIS_FIFO_YSHIFT + 1)
+#define KEY_P_EIS_FIFO_XSHIFT (KEY_P_EIS_DATA_RATE + 1)
+#define KEY_P_EIS_FIFO_SYNC (KEY_P_EIS_FIFO_XSHIFT + 1)
+#define KEY_P_EIS_FIFO_ZSHIFT (KEY_P_EIS_FIFO_SYNC + 1)
+#define KEY_P_EIS_FIFO_READY (KEY_P_EIS_FIFO_ZSHIFT + 1)
+#define KEY_DMP_FOOTER (KEY_P_EIS_FIFO_READY + 1)
+#define KEY_DMP_INTX_HC (KEY_DMP_FOOTER + 1)
+#define KEY_DMP_INTX_PH (KEY_DMP_INTX_HC + 1)
+#define KEY_DMP_INTX_SH (KEY_DMP_INTX_PH + 1)
+#define KEY_DMP_AINV_SH (KEY_DMP_INTX_SH + 1)
+#define KEY_DMP_A_INV_XH (KEY_DMP_AINV_SH + 1)
+#define KEY_DMP_AINV_PH (KEY_DMP_A_INV_XH + 1)
+#define KEY_DMP_CTHX_H (KEY_DMP_AINV_PH + 1)
+#define KEY_DMP_CTHY_H (KEY_DMP_CTHX_H + 1)
+#define KEY_DMP_CTHZ_H (KEY_DMP_CTHY_H + 1)
+#define KEY_DMP_NCTHX_H (KEY_DMP_CTHZ_H + 1)
+#define KEY_DMP_NCTHY_H (KEY_DMP_NCTHX_H + 1)
+#define KEY_DMP_NCTHZ_H (KEY_DMP_NCTHY_H + 1)
+#define KEY_DMP_CTSQ_XH (KEY_DMP_NCTHZ_H + 1)
+#define KEY_DMP_CTSQ_YH (KEY_DMP_CTSQ_XH + 1)
+#define KEY_DMP_CTSQ_ZH (KEY_DMP_CTSQ_YH + 1)
+#define KEY_DMP_INTX_H (KEY_DMP_CTSQ_ZH + 1)
+#define KEY_DMP_INTY_H (KEY_DMP_INTX_H + 1)
+#define KEY_DMP_INTZ_H (KEY_DMP_INTY_H + 1)
+// #define KEY_DMP_HPX_H (KEY_DMP_INTZ_H + 1)
+// #define KEY_DMP_HPY_H (KEY_DMP_HPX_H + 1)
+// #define KEY_DMP_HPZ_H (KEY_DMP_HPY_H + 1)
+
+/* Stream keys */
+#define KEY_STREAM_P_GYRO_Z (KEY_DMP_INTZ_H + 1)
+#define KEY_STREAM_P_GYRO_Y (KEY_STREAM_P_GYRO_Z + 1)
+#define KEY_STREAM_P_GYRO_X (KEY_STREAM_P_GYRO_Y + 1)
+#define KEY_STREAM_P_TEMP (KEY_STREAM_P_GYRO_X + 1)
+#define KEY_STREAM_P_AUX_Y (KEY_STREAM_P_TEMP + 1)
+#define KEY_STREAM_P_AUX_X (KEY_STREAM_P_AUX_Y + 1)
+#define KEY_STREAM_P_AUX_Z (KEY_STREAM_P_AUX_X + 1)
+#define KEY_STREAM_P_ACCEL_Y (KEY_STREAM_P_AUX_Z + 1)
+#define KEY_STREAM_P_ACCEL_X (KEY_STREAM_P_ACCEL_Y + 1)
+#define KEY_STREAM_P_FOOTER (KEY_STREAM_P_ACCEL_X + 1)
+#define KEY_STREAM_P_ACCEL_Z (KEY_STREAM_P_FOOTER + 1)
+
+#define NUM_KEYS (KEY_STREAM_P_ACCEL_Z + 1)
+
+typedef struct
+{
+ unsigned short key;
+ unsigned short addr;
+} tKeyLabel;
+
+#define DINA0A 0x0a
+#define DINA22 0x22
+#define DINA42 0x42
+#define DINA5A 0x5a
+
+#define DINA06 0x06
+#define DINA0E 0x0e
+#define DINA16 0x16
+#define DINA1E 0x1e
+#define DINA26 0x26
+#define DINA2E 0x2e
+#define DINA36 0x36
+#define DINA3E 0x3e
+#define DINA46 0x46
+#define DINA4E 0x4e
+#define DINA56 0x56
+#define DINA5E 0x5e
+#define DINA66 0x66
+#define DINA6E 0x6e
+#define DINA76 0x76
+#define DINA7E 0x7e
+
+#define DINA00 0x00
+#define DINA08 0x08
+#define DINA10 0x10
+#define DINA18 0x18
+#define DINA20 0x20
+#define DINA28 0x28
+#define DINA30 0x30
+#define DINA38 0x38
+#define DINA40 0x40
+#define DINA48 0x48
+#define DINA50 0x50
+#define DINA58 0x58
+#define DINA60 0x60
+#define DINA68 0x68
+#define DINA70 0x70
+#define DINA78 0x78
+
+#define DINA04 0x04
+#define DINA0C 0x0c
+#define DINA14 0x14
+#define DINA1C 0x1C
+#define DINA24 0x24
+#define DINA2C 0x2c
+#define DINA34 0x34
+#define DINA3C 0x3c
+#define DINA44 0x44
+#define DINA4C 0x4c
+#define DINA54 0x54
+#define DINA5C 0x5c
+#define DINA64 0x64
+#define DINA6C 0x6c
+#define DINA74 0x74
+#define DINA7C 0x7c
+
+#define DINA01 0x01
+#define DINA09 0x09
+#define DINA11 0x11
+#define DINA19 0x19
+#define DINA21 0x21
+#define DINA29 0x29
+#define DINA31 0x31
+#define DINA39 0x39
+#define DINA41 0x41
+#define DINA49 0x49
+#define DINA51 0x51
+#define DINA59 0x59
+#define DINA61 0x61
+#define DINA69 0x69
+#define DINA71 0x71
+#define DINA79 0x79
+
+#define DINA25 0x25
+#define DINA2D 0x2d
+#define DINA35 0x35
+#define DINA3D 0x3d
+#define DINA4D 0x4d
+#define DINA55 0x55
+#define DINA5D 0x5D
+#define DINA6D 0x6d
+#define DINA75 0x75
+#define DINA7D 0x7d
+
+#define DINADC 0xdc
+#define DINAF2 0xf2
+#define DINAAB 0xab
+#define DINAAA 0xaa
+#define DINAF1 0xf1
+#define DINADF 0xdf
+#define DINADA 0xda
+#define DINAB1 0xb1
+#define DINAB9 0xb9
+#define DINAF3 0xf3
+#define DINA8B 0x8b
+#define DINAA3 0xa3
+#define DINA91 0x91
+#define DINAB6 0xb6
+#define DINAB4 0xb4
+
+#define DINC00 0x00
+#define DINC01 0x01
+#define DINC02 0x02
+#define DINC03 0x03
+#define DINC08 0x08
+#define DINC09 0x09
+#define DINC0A 0x0a
+#define DINC0B 0x0b
+#define DINC10 0x10
+#define DINC11 0x11
+#define DINC12 0x12
+#define DINC13 0x13
+#define DINC18 0x18
+#define DINC19 0x19
+#define DINC1A 0x1a
+#define DINC1B 0x1b
+
+#define DINC20 0x20
+#define DINC21 0x21
+#define DINC22 0x22
+#define DINC23 0x23
+#define DINC28 0x28
+#define DINC29 0x29
+#define DINC2A 0x2a
+#define DINC2B 0x2b
+#define DINC30 0x30
+#define DINC31 0x31
+#define DINC32 0x32
+#define DINC33 0x33
+#define DINC38 0x38
+#define DINC39 0x39
+#define DINC3A 0x3a
+#define DINC3B 0x3b
+
+#define DINC40 0x40
+#define DINC41 0x41
+#define DINC42 0x42
+#define DINC43 0x43
+#define DINC48 0x48
+#define DINC49 0x49
+#define DINC4A 0x4a
+#define DINC4B 0x4b
+#define DINC50 0x50
+#define DINC51 0x51
+#define DINC52 0x52
+#define DINC53 0x53
+#define DINC58 0x58
+#define DINC59 0x59
+#define DINC5A 0x5a
+#define DINC5B 0x5b
+
+#define DINC60 0x60
+#define DINC61 0x61
+#define DINC62 0x62
+#define DINC63 0x63
+#define DINC68 0x68
+#define DINC69 0x69
+#define DINC6A 0x6a
+#define DINC6B 0x6b
+#define DINC70 0x70
+#define DINC71 0x71
+#define DINC72 0x72
+#define DINC73 0x73
+#define DINC78 0x78
+#define DINC79 0x79
+#define DINC7A 0x7a
+#define DINC7B 0x7b
+
+#define DIND40 0x40
+
+#define DINA80 0x80
+#define DINA90 0x90
+#define DINAA0 0xa0
+#define DINAC9 0xc9
+#define DINACB 0xcb
+#define DINACD 0xcd
+#define DINACF 0xcf
+#define DINAC8 0xc8
+#define DINACA 0xca
+#define DINACC 0xcc
+#define DINACE 0xce
+#define DINAD8 0xd8
+#define DINADD 0xdd
+#define DINAF8 0xf0
+#define DINAFE 0xfe
+
+#define DINBF8 0xf8
+#define DINAC0 0xb0
+#define DINAC1 0xb1
+#define DINAC2 0xb4
+#define DINAC3 0xb5
+#define DINAC4 0xb8
+#define DINAC5 0xb9
+#define DINBC0 0xc0
+#define DINBC2 0xc2
+#define DINBC4 0xc4
+#define DINBC6 0xc6
+
+
+
+#endif /* INC_DMPKEY_H_ */
diff --git a/Core/Inc/dmpmap.h b/Core/Inc/dmpmap.h
new file mode 100644
index 0000000000000000000000000000000000000000..71995d02d422b64dcabecf22a7c5f1cfdc581cf0
--- /dev/null
+++ b/Core/Inc/dmpmap.h
@@ -0,0 +1,267 @@
+/*
+ * dmpmap.h
+ *
+ * Created on: Jul 11, 2023
+ * Author: zzy
+ */
+
+#ifndef INC_DMPMAP_H_
+#define INC_DMPMAP_H_
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+#define DMP_PTAT 0
+#define DMP_XGYR 2
+#define DMP_YGYR 4
+#define DMP_ZGYR 6
+#define DMP_XACC 8
+#define DMP_YACC 10
+#define DMP_ZACC 12
+#define DMP_ADC1 14
+#define DMP_ADC2 16
+#define DMP_ADC3 18
+#define DMP_BIASUNC 20
+#define DMP_FIFORT 22
+#define DMP_INVGSFH 24
+#define DMP_INVGSFL 26
+#define DMP_1H 28
+#define DMP_1L 30
+#define DMP_BLPFSTCH 32
+#define DMP_BLPFSTCL 34
+#define DMP_BLPFSXH 36
+#define DMP_BLPFSXL 38
+#define DMP_BLPFSYH 40
+#define DMP_BLPFSYL 42
+#define DMP_BLPFSZH 44
+#define DMP_BLPFSZL 46
+#define DMP_BLPFMTC 48
+#define DMP_SMC 50
+#define DMP_BLPFMXH 52
+#define DMP_BLPFMXL 54
+#define DMP_BLPFMYH 56
+#define DMP_BLPFMYL 58
+#define DMP_BLPFMZH 60
+#define DMP_BLPFMZL 62
+#define DMP_BLPFC 64
+#define DMP_SMCTH 66
+#define DMP_0H2 68
+#define DMP_0L2 70
+#define DMP_BERR2H 72
+#define DMP_BERR2L 74
+#define DMP_BERR2NH 76
+#define DMP_SMCINC 78
+#define DMP_ANGVBXH 80
+#define DMP_ANGVBXL 82
+#define DMP_ANGVBYH 84
+#define DMP_ANGVBYL 86
+#define DMP_ANGVBZH 88
+#define DMP_ANGVBZL 90
+#define DMP_BERR1H 92
+#define DMP_BERR1L 94
+#define DMP_ATCH 96
+#define DMP_BIASUNCSF 98
+#define DMP_ACT2H 100
+#define DMP_ACT2L 102
+#define DMP_GSFH 104
+#define DMP_GSFL 106
+#define DMP_GH 108
+#define DMP_GL 110
+#define DMP_0_5H 112
+#define DMP_0_5L 114
+#define DMP_0_0H 116
+#define DMP_0_0L 118
+#define DMP_1_0H 120
+#define DMP_1_0L 122
+#define DMP_1_5H 124
+#define DMP_1_5L 126
+#define DMP_TMP1AH 128
+#define DMP_TMP1AL 130
+#define DMP_TMP2AH 132
+#define DMP_TMP2AL 134
+#define DMP_TMP3AH 136
+#define DMP_TMP3AL 138
+#define DMP_TMP4AH 140
+#define DMP_TMP4AL 142
+#define DMP_XACCW 144
+#define DMP_TMP5 146
+#define DMP_XACCB 148
+#define DMP_TMP8 150
+#define DMP_YACCB 152
+#define DMP_TMP9 154
+#define DMP_ZACCB 156
+#define DMP_TMP10 158
+#define DMP_DZH 160
+#define DMP_DZL 162
+#define DMP_XGCH 164
+#define DMP_XGCL 166
+#define DMP_YGCH 168
+#define DMP_YGCL 170
+#define DMP_ZGCH 172
+#define DMP_ZGCL 174
+#define DMP_YACCW 176
+#define DMP_TMP7 178
+#define DMP_AFB1H 180
+#define DMP_AFB1L 182
+#define DMP_AFB2H 184
+#define DMP_AFB2L 186
+#define DMP_MAGFBH 188
+#define DMP_MAGFBL 190
+#define DMP_QT1H 192
+#define DMP_QT1L 194
+#define DMP_QT2H 196
+#define DMP_QT2L 198
+#define DMP_QT3H 200
+#define DMP_QT3L 202
+#define DMP_QT4H 204
+#define DMP_QT4L 206
+#define DMP_CTRL1H 208
+#define DMP_CTRL1L 210
+#define DMP_CTRL2H 212
+#define DMP_CTRL2L 214
+#define DMP_CTRL3H 216
+#define DMP_CTRL3L 218
+#define DMP_CTRL4H 220
+#define DMP_CTRL4L 222
+#define DMP_CTRLS1 224
+#define DMP_CTRLSF1 226
+#define DMP_CTRLS2 228
+#define DMP_CTRLSF2 230
+#define DMP_CTRLS3 232
+#define DMP_CTRLSFNLL 234
+#define DMP_CTRLS4 236
+#define DMP_CTRLSFNL2 238
+#define DMP_CTRLSFNL 240
+#define DMP_TMP30 242
+#define DMP_CTRLSFJT 244
+#define DMP_TMP31 246
+#define DMP_TMP11 248
+#define DMP_CTRLSF2_2 250
+#define DMP_TMP12 252
+#define DMP_CTRLSF1_2 254
+#define DMP_PREVPTAT 256
+#define DMP_ACCZB 258
+#define DMP_ACCXB 264
+#define DMP_ACCYB 266
+#define DMP_1HB 272
+#define DMP_1LB 274
+#define DMP_0H 276
+#define DMP_0L 278
+#define DMP_ASR22H 280
+#define DMP_ASR22L 282
+#define DMP_ASR6H 284
+#define DMP_ASR6L 286
+#define DMP_TMP13 288
+#define DMP_TMP14 290
+#define DMP_FINTXH 292
+#define DMP_FINTXL 294
+#define DMP_FINTYH 296
+#define DMP_FINTYL 298
+#define DMP_FINTZH 300
+#define DMP_FINTZL 302
+#define DMP_TMP1BH 304
+#define DMP_TMP1BL 306
+#define DMP_TMP2BH 308
+#define DMP_TMP2BL 310
+#define DMP_TMP3BH 312
+#define DMP_TMP3BL 314
+#define DMP_TMP4BH 316
+#define DMP_TMP4BL 318
+#define DMP_STXG 320
+#define DMP_ZCTXG 322
+#define DMP_STYG 324
+#define DMP_ZCTYG 326
+#define DMP_STZG 328
+#define DMP_ZCTZG 330
+#define DMP_CTRLSFJT2 332
+#define DMP_CTRLSFJTCNT 334
+#define DMP_PVXG 336
+#define DMP_TMP15 338
+#define DMP_PVYG 340
+#define DMP_TMP16 342
+#define DMP_PVZG 344
+#define DMP_TMP17 346
+#define DMP_MNMFLAGH 352
+#define DMP_MNMFLAGL 354
+#define DMP_MNMTMH 356
+#define DMP_MNMTML 358
+#define DMP_MNMTMTHRH 360
+#define DMP_MNMTMTHRL 362
+#define DMP_MNMTHRH 364
+#define DMP_MNMTHRL 366
+#define DMP_ACCQD4H 368
+#define DMP_ACCQD4L 370
+#define DMP_ACCQD5H 372
+#define DMP_ACCQD5L 374
+#define DMP_ACCQD6H 376
+#define DMP_ACCQD6L 378
+#define DMP_ACCQD7H 380
+#define DMP_ACCQD7L 382
+#define DMP_ACCQD0H 384
+#define DMP_ACCQD0L 386
+#define DMP_ACCQD1H 388
+#define DMP_ACCQD1L 390
+#define DMP_ACCQD2H 392
+#define DMP_ACCQD2L 394
+#define DMP_ACCQD3H 396
+#define DMP_ACCQD3L 398
+#define DMP_XN2H 400
+#define DMP_XN2L 402
+#define DMP_XN1H 404
+#define DMP_XN1L 406
+#define DMP_YN2H 408
+#define DMP_YN2L 410
+#define DMP_YN1H 412
+#define DMP_YN1L 414
+#define DMP_YH 416
+#define DMP_YL 418
+#define DMP_B0H 420
+#define DMP_B0L 422
+#define DMP_A1H 424
+#define DMP_A1L 426
+#define DMP_A2H 428
+#define DMP_A2L 430
+#define DMP_SEM1 432
+#define DMP_FIFOCNT 434
+#define DMP_SH_TH_X 436
+#define DMP_PACKET 438
+#define DMP_SH_TH_Y 440
+#define DMP_FOOTER 442
+#define DMP_SH_TH_Z 444
+#define DMP_TEMP29 448
+#define DMP_TEMP30 450
+#define DMP_XACCB_PRE 452
+#define DMP_XACCB_PREL 454
+#define DMP_YACCB_PRE 456
+#define DMP_YACCB_PREL 458
+#define DMP_ZACCB_PRE 460
+#define DMP_ZACCB_PREL 462
+#define DMP_TMP22 464
+#define DMP_TAP_TIMER 466
+#define DMP_TAP_THX 468
+#define DMP_TAP_THY 472
+#define DMP_TAP_THZ 476
+#define DMP_TAPW_MIN 478
+#define DMP_TMP25 480
+#define DMP_TMP26 482
+#define DMP_TMP27 484
+#define DMP_TMP28 486
+#define DMP_ORIENT 488
+#define DMP_THRSH 490
+#define DMP_ENDIANH 492
+#define DMP_ENDIANL 494
+#define DMP_BLPFNMTCH 496
+#define DMP_BLPFNMTCL 498
+#define DMP_BLPFNMXH 500
+#define DMP_BLPFNMXL 502
+#define DMP_BLPFNMYH 504
+#define DMP_BLPFNMYL 506
+#define DMP_BLPFNMZH 508
+#define DMP_BLPFNMZL 510
+#ifdef __cplusplus
+}
+
+#endif
+#endif /* INC_DMPMAP_H_ */
diff --git a/Core/Inc/gpio.h b/Core/Inc/gpio.h
new file mode 100644
index 0000000000000000000000000000000000000000..6c03ac7f18edca3654f82f84b60526997652bdbe
--- /dev/null
+++ b/Core/Inc/gpio.h
@@ -0,0 +1,49 @@
+/* USER CODE BEGIN Header */
+/**
+ ******************************************************************************
+ * @file gpio.h
+ * @brief This file contains all the function prototypes for
+ * the gpio.c file
+ ******************************************************************************
+ * @attention
+ *
+ * Copyright (c) 2023 STMicroelectronics.
+ * All rights reserved.
+ *
+ * This software is licensed under terms that can be found in the LICENSE file
+ * in the root directory of this software component.
+ * If no LICENSE file comes with this software, it is provided AS-IS.
+ *
+ ******************************************************************************
+ */
+/* USER CODE END Header */
+/* Define to prevent recursive inclusion -------------------------------------*/
+#ifndef __GPIO_H__
+#define __GPIO_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Includes ------------------------------------------------------------------*/
+#include "main.h"
+
+/* USER CODE BEGIN Includes */
+
+/* USER CODE END Includes */
+
+/* USER CODE BEGIN Private defines */
+
+/* USER CODE END Private defines */
+
+void MX_GPIO_Init(void);
+
+/* USER CODE BEGIN Prototypes */
+
+/* USER CODE END Prototypes */
+
+#ifdef __cplusplus
+}
+#endif
+#endif /*__ GPIO_H__ */
+
diff --git a/Core/Inc/inv_mpu.h b/Core/Inc/inv_mpu.h
new file mode 100644
index 0000000000000000000000000000000000000000..083ee4ed48539c56e8bd6c0897599ec4ddeb55ff
--- /dev/null
+++ b/Core/Inc/inv_mpu.h
@@ -0,0 +1,126 @@
+/*
+ * inv_mpu.h
+ *
+ * Created on: Jul 11, 2023
+ * Author: zzy
+ */
+
+#ifndef INC_INV_MPU_H_
+#define INC_INV_MPU_H_
+
+#include "main.h"
+
+//定义输出速度
+#define DEFAULT_MPU_HZ (100) //100Hz
+
+#define INV_X_GYRO (0x40)
+#define INV_Y_GYRO (0x20)
+#define INV_Z_GYRO (0x10)
+#define INV_XYZ_GYRO (INV_X_GYRO | INV_Y_GYRO | INV_Z_GYRO)
+#define INV_XYZ_ACCEL (0x08)
+#define INV_XYZ_COMPASS (0x01)
+
+//移植官方MSP430 DMP驱动过来
+struct int_param_s {
+//#if defined EMPL_TARGET_MSP430 || defined MOTION_DRIVER_TARGET_MSP430
+ void (*cb)(void);
+ unsigned short pin;
+ unsigned char lp_exit;
+ unsigned char active_low;
+//#elif defined EMPL_TARGET_UC3L0
+// unsigned long pin;
+// void (*cb)(volatile void*);
+// void *arg;
+//#endif
+};
+
+#define MPU_INT_STATUS_DATA_READY (0x0001)
+#define MPU_INT_STATUS_DMP (0x0002)
+#define MPU_INT_STATUS_PLL_READY (0x0004)
+#define MPU_INT_STATUS_I2C_MST (0x0008)
+#define MPU_INT_STATUS_FIFO_OVERFLOW (0x0010)
+#define MPU_INT_STATUS_ZMOT (0x0020)
+#define MPU_INT_STATUS_MOT (0x0040)
+#define MPU_INT_STATUS_FREE_FALL (0x0080)
+#define MPU_INT_STATUS_DMP_0 (0x0100)
+#define MPU_INT_STATUS_DMP_1 (0x0200)
+#define MPU_INT_STATUS_DMP_2 (0x0400)
+#define MPU_INT_STATUS_DMP_3 (0x0800)
+#define MPU_INT_STATUS_DMP_4 (0x1000)
+#define MPU_INT_STATUS_DMP_5 (0x2000)
+
+/* Set up APIs */
+int mpu_init(void);
+int mpu_init_slave(void);
+int mpu_set_bypass(unsigned char bypass_on);
+
+/* Configuration APIs */
+int mpu_lp_accel_mode(unsigned char rate);
+int mpu_lp_motion_interrupt(unsigned short thresh, unsigned char time,
+ unsigned char lpa_freq);
+int mpu_set_int_level(unsigned char active_low);
+int mpu_set_int_latched(unsigned char enable);
+
+int mpu_set_dmp_state(unsigned char enable);
+int mpu_get_dmp_state(unsigned char *enabled);
+
+int mpu_get_lpf(unsigned short *lpf);
+int mpu_set_lpf(unsigned short lpf);
+
+int mpu_get_gyro_fsr(unsigned short *fsr);
+int mpu_set_gyro_fsr(unsigned short fsr);
+
+int mpu_get_accel_fsr(unsigned char *fsr);
+int mpu_set_accel_fsr(unsigned char fsr);
+
+int mpu_get_compass_fsr(unsigned short *fsr);
+
+int mpu_get_gyro_sens(float *sens);
+int mpu_get_accel_sens(unsigned short *sens);
+
+int mpu_get_sample_rate(unsigned short *rate);
+int mpu_set_sample_rate(unsigned short rate);
+int mpu_get_compass_sample_rate(unsigned short *rate);
+int mpu_set_compass_sample_rate(unsigned short rate);
+
+int mpu_get_fifo_config(unsigned char *sensors);
+int mpu_configure_fifo(unsigned char sensors);
+
+int mpu_get_power_state(unsigned char *power_on);
+int mpu_set_sensors(unsigned char sensors);
+
+int mpu_set_accel_bias(const long *accel_bias);
+
+/* Data getter/setter APIs */
+int mpu_get_gyro_reg(short *data, unsigned long *timestamp);
+int mpu_get_accel_reg(short *data, unsigned long *timestamp);
+int mpu_get_compass_reg(short *data, unsigned long *timestamp);
+int mpu_get_temperature(long *data, unsigned long *timestamp);
+
+int mpu_get_int_status(short *status);
+int mpu_read_fifo(short *gyro, short *accel, unsigned long *timestamp,
+ unsigned char *sensors, unsigned char *more);
+int mpu_read_fifo_stream(unsigned short length, unsigned char *data,
+ unsigned char *more);
+int mpu_reset_fifo(void);
+
+int mpu_write_mem(unsigned short mem_addr, unsigned short length,
+ unsigned char *data);
+int mpu_read_mem(unsigned short mem_addr, unsigned short length,
+ unsigned char *data);
+int mpu_load_firmware(unsigned short length, const unsigned char *firmware,
+ unsigned short start_addr, unsigned short sample_rate);
+
+int mpu_reg_dump(void);
+int mpu_read_reg(unsigned char reg, unsigned char *data);
+int mpu_run_self_test(long *gyro, long *accel);
+int mpu_register_tap_cb(void (*func)(unsigned char, unsigned char));
+//自行添加的一些函数
+void mget_ms(unsigned long *time);
+unsigned short inv_row_2_scale(const signed char *row);
+unsigned short inv_orientation_matrix_to_scalar(const signed char *mtx);
+uint8_t run_self_test(void);
+uint8_t mpu_dmp_init(void);
+uint8_t mpu_dmp_get_data(float *pitch,float *roll,float *yaw);
+
+#endif /* INC_INV_MPU_H_ */
diff --git a/Core/Inc/inv_mpu_dmp_motion_driver.h b/Core/Inc/inv_mpu_dmp_motion_driver.h
new file mode 100644
index 0000000000000000000000000000000000000000..4e75db8f15d113284a4ee1599761b7bfcfa9742e
--- /dev/null
+++ b/Core/Inc/inv_mpu_dmp_motion_driver.h
@@ -0,0 +1,87 @@
+/*
+ * inv__mpu_dmp_motion_driver.h
+ *
+ * Created on: Jul 11, 2023
+ * Author: zzy
+ */
+
+#ifndef INC_INV_MPU_DMP_MOTION_DRIVER_H_
+#define INC_INV_MPU_DMP_MOTION_DRIVER_H_
+
+#define TAP_X (0x01)
+#define TAP_Y (0x02)
+#define TAP_Z (0x04)
+#define TAP_XYZ (0x07)
+
+#define TAP_X_UP (0x01)
+#define TAP_X_DOWN (0x02)
+#define TAP_Y_UP (0x03)
+#define TAP_Y_DOWN (0x04)
+#define TAP_Z_UP (0x05)
+#define TAP_Z_DOWN (0x06)
+
+#define ANDROID_ORIENT_PORTRAIT (0x00)
+#define ANDROID_ORIENT_LANDSCAPE (0x01)
+#define ANDROID_ORIENT_REVERSE_PORTRAIT (0x02)
+#define ANDROID_ORIENT_REVERSE_LANDSCAPE (0x03)
+
+#define DMP_INT_GESTURE (0x01)
+#define DMP_INT_CONTINUOUS (0x02)
+
+#define DMP_FEATURE_TAP (0x001)
+#define DMP_FEATURE_ANDROID_ORIENT (0x002)
+#define DMP_FEATURE_LP_QUAT (0x004)
+#define DMP_FEATURE_PEDOMETER (0x008)
+#define DMP_FEATURE_6X_LP_QUAT (0x010)
+#define DMP_FEATURE_GYRO_CAL (0x020)
+#define DMP_FEATURE_SEND_RAW_ACCEL (0x040)
+#define DMP_FEATURE_SEND_RAW_GYRO (0x080)
+#define DMP_FEATURE_SEND_CAL_GYRO (0x100)
+
+#define INV_WXYZ_QUAT (0x100)
+
+/* Set up functions. */
+int dmp_load_motion_driver_firmware(void);
+int dmp_set_fifo_rate(unsigned short rate);
+int dmp_get_fifo_rate(unsigned short *rate);
+int dmp_enable_feature(unsigned short mask);
+int dmp_get_enabled_features(unsigned short *mask);
+int dmp_set_interrupt_mode(unsigned char mode);
+int dmp_set_orientation(unsigned short orient);
+int dmp_set_gyro_bias(long *bias);
+int dmp_set_accel_bias(long *bias);
+
+/* Tap functions. */
+int dmp_register_tap_cb(void (*func)(unsigned char, unsigned char));
+int dmp_set_tap_thresh(unsigned char axis, unsigned short thresh);
+int dmp_set_tap_axes(unsigned char axis);
+int dmp_set_tap_count(unsigned char min_taps);
+int dmp_set_tap_time(unsigned short time);
+int dmp_set_tap_time_multi(unsigned short time);
+int dmp_set_shake_reject_thresh(long sf, unsigned short thresh);
+int dmp_set_shake_reject_time(unsigned short time);
+int dmp_set_shake_reject_timeout(unsigned short time);
+
+/* Android orientation functions. */
+int dmp_register_android_orient_cb(void (*func)(unsigned char));
+
+/* LP quaternion functions. */
+int dmp_enable_lp_quat(unsigned char enable);
+int dmp_enable_6x_lp_quat(unsigned char enable);
+
+/* Pedometer functions. */
+int dmp_get_pedometer_step_count(unsigned long *count);
+int dmp_set_pedometer_step_count(unsigned long count);
+int dmp_get_pedometer_walk_time(unsigned long *time);
+int dmp_set_pedometer_walk_time(unsigned long time);
+
+/* DMP gyro calibration functions. */
+int dmp_enable_gyro_cal(unsigned char enable);
+
+/* Read function. This function should be called whenever the MPU interrupt is
+ * detected.
+ */
+int dmp_read_fifo(short *gyro, short *accel, long *quat,
+ unsigned long *timestamp, short *sensors, unsigned char *more);
+
+#endif /* INC_INV_MPU_DMP_MOTION_DRIVER_H_ */
diff --git a/Core/Inc/main.h b/Core/Inc/main.h
new file mode 100644
index 0000000000000000000000000000000000000000..eed952bebb2a57b6d57524b3786f44810acfea0a
--- /dev/null
+++ b/Core/Inc/main.h
@@ -0,0 +1,68 @@
+/* USER CODE BEGIN Header */
+/**
+ ******************************************************************************
+ * @file : main.h
+ * @brief : Header for main.c file.
+ * This file contains the common defines of the application.
+ ******************************************************************************
+ * @attention
+ *
+ * Copyright (c) 2023 STMicroelectronics.
+ * All rights reserved.
+ *
+ * This software is licensed under terms that can be found in the LICENSE file
+ * in the root directory of this software component.
+ * If no LICENSE file comes with this software, it is provided AS-IS.
+ *
+ ******************************************************************************
+ */
+/* USER CODE END Header */
+
+/* Define to prevent recursive inclusion -------------------------------------*/
+#ifndef __MAIN_H
+#define __MAIN_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Includes ------------------------------------------------------------------*/
+#include "stm32f1xx_hal.h"
+
+/* Private includes ----------------------------------------------------------*/
+/* USER CODE BEGIN Includes */
+
+/* USER CODE END Includes */
+
+/* Exported types ------------------------------------------------------------*/
+/* USER CODE BEGIN ET */
+
+/* USER CODE END ET */
+
+/* Exported constants --------------------------------------------------------*/
+/* USER CODE BEGIN EC */
+
+/* USER CODE END EC */
+
+/* Exported macro ------------------------------------------------------------*/
+/* USER CODE BEGIN EM */
+
+/* USER CODE END EM */
+
+/* Exported functions prototypes ---------------------------------------------*/
+void Error_Handler(void);
+
+/* USER CODE BEGIN EFP */
+
+/* USER CODE END EFP */
+
+/* Private defines -----------------------------------------------------------*/
+/* USER CODE BEGIN Private defines */
+
+/* USER CODE END Private defines */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __MAIN_H */
diff --git a/Core/Inc/mpu6050.h b/Core/Inc/mpu6050.h
new file mode 100644
index 0000000000000000000000000000000000000000..b039ac91e1e471ea9011ff79cf4c95d03dafd252
--- /dev/null
+++ b/Core/Inc/mpu6050.h
@@ -0,0 +1,113 @@
+/*
+ * mpu6050.h
+ *
+ * Created on: Jul 11, 2023
+ * Author: zzy
+ */
+
+#ifndef INC_MPU6050_H_
+#define INC_MPU6050_H_
+
+#include "IIC.h"
+#include "main.h"
+
+#define delay_ms HAL_Delay
+#define MPU_IIC_Init IIC_GPIO_Init
+#define MPU_IIC_Start IIC_Start
+#define MPU_IIC_Stop IIC_Stop
+#define MPU_IIC_Send_Byte IIC_Send_Byte
+#define MPU_IIC_Read_Byte IIC_Read_Byte
+#define MPU_IIC_Wait_Ack IIC_Wait_Ack
+
+#define MPU_SELF_TESTX_REG 0X0D // 自检寄存器X
+#define MPU_SELF_TESTY_REG 0X0E // 自检寄存器Y
+#define MPU_SELF_TESTZ_REG 0X0F // 自检寄存器Z
+#define MPU_SELF_TESTA_REG 0X10 // 自检寄存器A
+#define MPU_SAMPLE_RATE_REG 0X19 // 采样频率分频器
+#define MPU_CFG_REG 0X1A // 配置寄存器
+#define MPU_GYRO_CFG_REG 0X1B // 陀螺仪配置寄存器
+#define MPU_ACCEL_CFG_REG 0X1C // 加速度计配置寄存器
+#define MPU_MOTION_DET_REG 0X1F // 运动检测阀值设置寄存器
+#define MPU_FIFO_EN_REG 0X23 // FIFO使能寄存器
+#define MPU_I2CMST_CTRL_REG 0X24 // IIC主机控制寄存器
+#define MPU_I2CSLV0_ADDR_REG 0X25 // IIC从机0器件地址寄存器
+#define MPU_I2CSLV0_REG 0X26 // IIC从机0数据地址寄存器
+#define MPU_I2CSLV0_CTRL_REG 0X27 // IIC从机0控制寄存器
+#define MPU_I2CSLV1_ADDR_REG 0X28 // IIC从机1器件地址寄存器
+#define MPU_I2CSLV1_REG 0X29 // IIC从机1数据地址寄存器
+#define MPU_I2CSLV1_CTRL_REG 0X2A // IIC从机1控制寄存器
+#define MPU_I2CSLV2_ADDR_REG 0X2B // IIC从机2器件地址寄存器
+#define MPU_I2CSLV2_REG 0X2C // IIC从机2数据地址寄存器
+#define MPU_I2CSLV2_CTRL_REG 0X2D // IIC从机2控制寄存器
+#define MPU_I2CSLV3_ADDR_REG 0X2E // IIC从机3器件地址寄存器
+#define MPU_I2CSLV3_REG 0X2F // IIC从机3数据地址寄存器
+#define MPU_I2CSLV3_CTRL_REG 0X30 // IIC从机3控制寄存器
+#define MPU_I2CSLV4_ADDR_REG 0X31 // IIC从机4器件地址寄存器
+#define MPU_I2CSLV4_REG 0X32 // IIC从机4数据地址寄存器
+#define MPU_I2CSLV4_DO_REG 0X33 // IIC从机4写数据寄存器
+#define MPU_I2CSLV4_CTRL_REG 0X34 // IIC从机4控制寄存器
+#define MPU_I2CSLV4_DI_REG 0X35 // IIC从机4读数据寄存器
+
+#define MPU_I2CMST_STA_REG 0X36 // IIC主机状态寄存器
+#define MPU_INTBP_CFG_REG 0X37 // 中断/旁路设置寄存器
+#define MPU_INT_EN_REG 0X38 // 中断使能寄存器
+#define MPU_INT_STA_REG 0X3A // 中断状态寄存器
+
+#define MPU_ACCEL_XOUTH_REG 0X3B // 加速度值,X轴高8位寄存器
+#define MPU_ACCEL_XOUTL_REG 0X3C // 加速度值,X轴低8位寄存器
+#define MPU_ACCEL_YOUTH_REG 0X3D // 加速度值,Y轴高8位寄存器
+#define MPU_ACCEL_YOUTL_REG 0X3E // 加速度值,Y轴低8位寄存器
+#define MPU_ACCEL_ZOUTH_REG 0X3F // 加速度值,Z轴高8位寄存器
+#define MPU_ACCEL_ZOUTL_REG 0X40 // 加速度值,Z轴低8位寄存器
+
+#define MPU_TEMP_OUTH_REG 0X41 // 温度值高八位寄存器
+#define MPU_TEMP_OUTL_REG 0X42 // 温度值低8位寄存器
+
+#define MPU_GYRO_XOUTH_REG 0X43 // 陀螺仪值,X轴高8位寄存器
+#define MPU_GYRO_XOUTL_REG 0X44 // 陀螺仪值,X轴低8位寄存器
+#define MPU_GYRO_YOUTH_REG 0X45 // 陀螺仪值,Y轴高8位寄存器
+#define MPU_GYRO_YOUTL_REG 0X46 // 陀螺仪值,Y轴低8位寄存器
+#define MPU_GYRO_ZOUTH_REG 0X47 // 陀螺仪值,Z轴高8位寄存器
+#define MPU_GYRO_ZOUTL_REG 0X48 // 陀螺仪值,Z轴低8位寄存器
+
+#define MPU_I2CSLV0_DO_REG 0X63 // IIC从机0数据寄存器
+#define MPU_I2CSLV1_DO_REG 0X64 // IIC从机1数据寄存器
+#define MPU_I2CSLV2_DO_REG 0X65 // IIC从机2数据寄存器
+#define MPU_I2CSLV3_DO_REG 0X66 // IIC从机3数据寄存器
+
+#define MPU_I2CMST_DELAY_REG 0X67 // IIC主机延时管理寄存器
+#define MPU_SIGPATH_RST_REG 0X68 // 信号通道复位寄存器
+#define MPU_MDETECT_CTRL_REG 0X69 // 运动检测控制寄存器
+#define MPU_USER_CTRL_REG 0X6A // 用户控制寄存器
+#define MPU_PWR_MGMT1_REG 0X6B // 电源管理寄存器1
+#define MPU_PWR_MGMT2_REG 0X6C // 电源管理寄存器2
+#define MPU_FIFO_CNTH_REG 0X72 // FIFO计数寄存器高八位
+#define MPU_FIFO_CNTL_REG 0X73 // FIFO计数寄存器低八位
+#define MPU_FIFO_RW_REG 0X74 // FIFO读写寄存器
+#define MPU_DEVICE_ID_REG 0X75 // 器件ID寄存器
+
+// 如果AD0脚(9脚)接地,IIC地址为0X68(不包含最低位).
+// 如果接V3.3,则IIC地址为0X69(不包含最低位).
+#define MPU_ADDR 0X68
+
+// 因为模块AD0默认接GND,所以转为读写地址后,为0XD1和0XD0(如果接VCC,则为0XD3和0XD2)
+// #define MPU_READ 0XD1
+// #define MPU_WRITE 0XD0
+
+uint8_t MPU_Init(void); // 初始化MPU6050
+uint8_t MPU_Write_Len(uint8_t addr, uint8_t reg, uint8_t len, uint8_t *buf); // IIC连续写
+uint8_t MPU_Read_Len(uint8_t addr, uint8_t reg, uint8_t len, uint8_t *buf); // IIC连续读
+uint8_t MPU_Write_Byte(uint8_t reg, uint8_t data); // IIC写一个字节
+uint8_t MPU_Read_Byte(uint8_t reg); // IIC读一个字节
+
+uint8_t MPU_Set_Gyro_Fsr(uint8_t fsr);
+uint8_t MPU_Set_Accel_Fsr(uint8_t fsr);
+uint8_t MPU_Set_LPF(uint16_t lpf);
+uint8_t MPU_Set_Rate(uint16_t rate);
+uint8_t MPU_Set_Fifo(uint8_t sens);
+
+short MPU_Get_Temperature(void);
+uint8_t MPU_Get_Gyroscope(short *gx, short *gy, short *gz);
+uint8_t MPU_Get_Accelerometer(short *ax, short *ay, short *az);
+
+#endif /* INC_MPU6050_H_ */
diff --git a/Core/Inc/stm32f1xx_hal_conf.h b/Core/Inc/stm32f1xx_hal_conf.h
new file mode 100644
index 0000000000000000000000000000000000000000..192f89f73356094079d4b13849af261ce89b1e4b
--- /dev/null
+++ b/Core/Inc/stm32f1xx_hal_conf.h
@@ -0,0 +1,391 @@
+/* USER CODE BEGIN Header */
+/**
+ ******************************************************************************
+ * @file stm32f1xx_hal_conf.h
+ * @brief HAL configuration file.
+ ******************************************************************************
+ * @attention
+ *
+ * Copyright (c) 2017 STMicroelectronics.
+ * All rights reserved.
+ *
+ * This software is licensed under terms that can be found in the LICENSE file
+ * in the root directory of this software component.
+ * If no LICENSE file comes with this software, it is provided AS-IS.
+ *
+ ******************************************************************************
+ */
+/* USER CODE END Header */
+
+/* Define to prevent recursive inclusion -------------------------------------*/
+#ifndef __STM32F1xx_HAL_CONF_H
+#define __STM32F1xx_HAL_CONF_H
+
+#ifdef __cplusplus
+ extern "C" {
+#endif
+
+/* Exported types ------------------------------------------------------------*/
+/* Exported constants --------------------------------------------------------*/
+
+/* ########################## Module Selection ############################## */
+/**
+ * @brief This is the list of modules to be used in the HAL driver
+ */
+
+#define HAL_MODULE_ENABLED
+ /*#define HAL_ADC_MODULE_ENABLED */
+/*#define HAL_CRYP_MODULE_ENABLED */
+/*#define HAL_CAN_MODULE_ENABLED */
+/*#define HAL_CAN_LEGACY_MODULE_ENABLED */
+/*#define HAL_CEC_MODULE_ENABLED */
+/*#define HAL_CORTEX_MODULE_ENABLED */
+/*#define HAL_CRC_MODULE_ENABLED */
+/*#define HAL_DAC_MODULE_ENABLED */
+/*#define HAL_DMA_MODULE_ENABLED */
+/*#define HAL_ETH_MODULE_ENABLED */
+/*#define HAL_FLASH_MODULE_ENABLED */
+#define HAL_GPIO_MODULE_ENABLED
+/*#define HAL_I2C_MODULE_ENABLED */
+/*#define HAL_I2S_MODULE_ENABLED */
+/*#define HAL_IRDA_MODULE_ENABLED */
+/*#define HAL_IWDG_MODULE_ENABLED */
+/*#define HAL_NOR_MODULE_ENABLED */
+/*#define HAL_NAND_MODULE_ENABLED */
+/*#define HAL_PCCARD_MODULE_ENABLED */
+/*#define HAL_PCD_MODULE_ENABLED */
+/*#define HAL_HCD_MODULE_ENABLED */
+/*#define HAL_PWR_MODULE_ENABLED */
+/*#define HAL_RCC_MODULE_ENABLED */
+/*#define HAL_RTC_MODULE_ENABLED */
+/*#define HAL_SD_MODULE_ENABLED */
+/*#define HAL_MMC_MODULE_ENABLED */
+/*#define HAL_SDRAM_MODULE_ENABLED */
+/*#define HAL_SMARTCARD_MODULE_ENABLED */
+/*#define HAL_SPI_MODULE_ENABLED */
+/*#define HAL_SRAM_MODULE_ENABLED */
+#define HAL_TIM_MODULE_ENABLED
+#define HAL_UART_MODULE_ENABLED
+/*#define HAL_USART_MODULE_ENABLED */
+/*#define HAL_WWDG_MODULE_ENABLED */
+
+#define HAL_CORTEX_MODULE_ENABLED
+#define HAL_DMA_MODULE_ENABLED
+#define HAL_FLASH_MODULE_ENABLED
+#define HAL_EXTI_MODULE_ENABLED
+#define HAL_GPIO_MODULE_ENABLED
+#define HAL_PWR_MODULE_ENABLED
+#define HAL_RCC_MODULE_ENABLED
+
+/* ########################## Oscillator Values adaptation ####################*/
+/**
+ * @brief Adjust the value of External High Speed oscillator (HSE) used in your application.
+ * This value is used by the RCC HAL module to compute the system frequency
+ * (when HSE is used as system clock source, directly or through the PLL).
+ */
+#if !defined (HSE_VALUE)
+ #define HSE_VALUE 8000000U /*!< Value of the External oscillator in Hz */
+#endif /* HSE_VALUE */
+
+#if !defined (HSE_STARTUP_TIMEOUT)
+ #define HSE_STARTUP_TIMEOUT 100U /*!< Time out for HSE start up, in ms */
+#endif /* HSE_STARTUP_TIMEOUT */
+
+/**
+ * @brief Internal High Speed oscillator (HSI) value.
+ * This value is used by the RCC HAL module to compute the system frequency
+ * (when HSI is used as system clock source, directly or through the PLL).
+ */
+#if !defined (HSI_VALUE)
+ #define HSI_VALUE 8000000U /*!< Value of the Internal oscillator in Hz*/
+#endif /* HSI_VALUE */
+
+/**
+ * @brief Internal Low Speed oscillator (LSI) value.
+ */
+#if !defined (LSI_VALUE)
+ #define LSI_VALUE 40000U /*!< LSI Typical Value in Hz */
+#endif /* LSI_VALUE */ /*!< Value of the Internal Low Speed oscillator in Hz
+ The real value may vary depending on the variations
+ in voltage and temperature. */
+
+/**
+ * @brief External Low Speed oscillator (LSE) value.
+ * This value is used by the UART, RTC HAL module to compute the system frequency
+ */
+#if !defined (LSE_VALUE)
+ #define LSE_VALUE 32768U /*!< Value of the External oscillator in Hz*/
+#endif /* LSE_VALUE */
+
+#if !defined (LSE_STARTUP_TIMEOUT)
+ #define LSE_STARTUP_TIMEOUT 5000U /*!< Time out for LSE start up, in ms */
+#endif /* LSE_STARTUP_TIMEOUT */
+
+/* Tip: To avoid modifying this file each time you need to use different HSE,
+ === you can define the HSE value in your toolchain compiler preprocessor. */
+
+/* ########################### System Configuration ######################### */
+/**
+ * @brief This is the HAL system configuration section
+ */
+#define VDD_VALUE 3300U /*!< Value of VDD in mv */
+#define TICK_INT_PRIORITY 15U /*!< tick interrupt priority (lowest by default) */
+#define USE_RTOS 0U
+#define PREFETCH_ENABLE 1U
+
+#define USE_HAL_ADC_REGISTER_CALLBACKS 0U /* ADC register callback disabled */
+#define USE_HAL_CAN_REGISTER_CALLBACKS 0U /* CAN register callback disabled */
+#define USE_HAL_CEC_REGISTER_CALLBACKS 0U /* CEC register callback disabled */
+#define USE_HAL_DAC_REGISTER_CALLBACKS 0U /* DAC register callback disabled */
+#define USE_HAL_ETH_REGISTER_CALLBACKS 0U /* ETH register callback disabled */
+#define USE_HAL_HCD_REGISTER_CALLBACKS 0U /* HCD register callback disabled */
+#define USE_HAL_I2C_REGISTER_CALLBACKS 0U /* I2C register callback disabled */
+#define USE_HAL_I2S_REGISTER_CALLBACKS 0U /* I2S register callback disabled */
+#define USE_HAL_MMC_REGISTER_CALLBACKS 0U /* MMC register callback disabled */
+#define USE_HAL_NAND_REGISTER_CALLBACKS 0U /* NAND register callback disabled */
+#define USE_HAL_NOR_REGISTER_CALLBACKS 0U /* NOR register callback disabled */
+#define USE_HAL_PCCARD_REGISTER_CALLBACKS 0U /* PCCARD register callback disabled */
+#define USE_HAL_PCD_REGISTER_CALLBACKS 0U /* PCD register callback disabled */
+#define USE_HAL_RTC_REGISTER_CALLBACKS 0U /* RTC register callback disabled */
+#define USE_HAL_SD_REGISTER_CALLBACKS 0U /* SD register callback disabled */
+#define USE_HAL_SMARTCARD_REGISTER_CALLBACKS 0U /* SMARTCARD register callback disabled */
+#define USE_HAL_IRDA_REGISTER_CALLBACKS 0U /* IRDA register callback disabled */
+#define USE_HAL_SRAM_REGISTER_CALLBACKS 0U /* SRAM register callback disabled */
+#define USE_HAL_SPI_REGISTER_CALLBACKS 0U /* SPI register callback disabled */
+#define USE_HAL_TIM_REGISTER_CALLBACKS 0U /* TIM register callback disabled */
+#define USE_HAL_UART_REGISTER_CALLBACKS 0U /* UART register callback disabled */
+#define USE_HAL_USART_REGISTER_CALLBACKS 0U /* USART register callback disabled */
+#define USE_HAL_WWDG_REGISTER_CALLBACKS 0U /* WWDG register callback disabled */
+
+/* ########################## Assert Selection ############################## */
+/**
+ * @brief Uncomment the line below to expanse the "assert_param" macro in the
+ * HAL drivers code
+ */
+/* #define USE_FULL_ASSERT 1U */
+
+/* ################## Ethernet peripheral configuration ##################### */
+
+/* Section 1 : Ethernet peripheral configuration */
+
+/* MAC ADDRESS: MAC_ADDR0:MAC_ADDR1:MAC_ADDR2:MAC_ADDR3:MAC_ADDR4:MAC_ADDR5 */
+#define MAC_ADDR0 2U
+#define MAC_ADDR1 0U
+#define MAC_ADDR2 0U
+#define MAC_ADDR3 0U
+#define MAC_ADDR4 0U
+#define MAC_ADDR5 0U
+
+/* Definition of the Ethernet driver buffers size and count */
+#define ETH_RX_BUF_SIZE ETH_MAX_PACKET_SIZE /* buffer size for receive */
+#define ETH_TX_BUF_SIZE ETH_MAX_PACKET_SIZE /* buffer size for transmit */
+#define ETH_RXBUFNB 8U /* 4 Rx buffers of size ETH_RX_BUF_SIZE */
+#define ETH_TXBUFNB 4U /* 4 Tx buffers of size ETH_TX_BUF_SIZE */
+
+/* Section 2: PHY configuration section */
+
+/* DP83848_PHY_ADDRESS Address*/
+#define DP83848_PHY_ADDRESS 0x01U
+/* PHY Reset delay these values are based on a 1 ms Systick interrupt*/
+#define PHY_RESET_DELAY 0x000000FFU
+/* PHY Configuration delay */
+#define PHY_CONFIG_DELAY 0x00000FFFU
+
+#define PHY_READ_TO 0x0000FFFFU
+#define PHY_WRITE_TO 0x0000FFFFU
+
+/* Section 3: Common PHY Registers */
+
+#define PHY_BCR ((uint16_t)0x00) /*!< Transceiver Basic Control Register */
+#define PHY_BSR ((uint16_t)0x01) /*!< Transceiver Basic Status Register */
+
+#define PHY_RESET ((uint16_t)0x8000) /*!< PHY Reset */
+#define PHY_LOOPBACK ((uint16_t)0x4000) /*!< Select loop-back mode */
+#define PHY_FULLDUPLEX_100M ((uint16_t)0x2100) /*!< Set the full-duplex mode at 100 Mb/s */
+#define PHY_HALFDUPLEX_100M ((uint16_t)0x2000) /*!< Set the half-duplex mode at 100 Mb/s */
+#define PHY_FULLDUPLEX_10M ((uint16_t)0x0100) /*!< Set the full-duplex mode at 10 Mb/s */
+#define PHY_HALFDUPLEX_10M ((uint16_t)0x0000) /*!< Set the half-duplex mode at 10 Mb/s */
+#define PHY_AUTONEGOTIATION ((uint16_t)0x1000) /*!< Enable auto-negotiation function */
+#define PHY_RESTART_AUTONEGOTIATION ((uint16_t)0x0200) /*!< Restart auto-negotiation function */
+#define PHY_POWERDOWN ((uint16_t)0x0800) /*!< Select the power down mode */
+#define PHY_ISOLATE ((uint16_t)0x0400) /*!< Isolate PHY from MII */
+
+#define PHY_AUTONEGO_COMPLETE ((uint16_t)0x0020) /*!< Auto-Negotiation process completed */
+#define PHY_LINKED_STATUS ((uint16_t)0x0004) /*!< Valid link established */
+#define PHY_JABBER_DETECTION ((uint16_t)0x0002) /*!< Jabber condition detected */
+
+/* Section 4: Extended PHY Registers */
+#define PHY_SR ((uint16_t)0x10U) /*!< PHY status register Offset */
+
+#define PHY_SPEED_STATUS ((uint16_t)0x0002U) /*!< PHY Speed mask */
+#define PHY_DUPLEX_STATUS ((uint16_t)0x0004U) /*!< PHY Duplex mask */
+
+/* ################## SPI peripheral configuration ########################## */
+
+/* CRC FEATURE: Use to activate CRC feature inside HAL SPI Driver
+* Activated: CRC code is present inside driver
+* Deactivated: CRC code cleaned from driver
+*/
+
+#define USE_SPI_CRC 0U
+
+/* Includes ------------------------------------------------------------------*/
+/**
+ * @brief Include module's header file
+ */
+
+#ifdef HAL_RCC_MODULE_ENABLED
+#include "stm32f1xx_hal_rcc.h"
+#endif /* HAL_RCC_MODULE_ENABLED */
+
+#ifdef HAL_GPIO_MODULE_ENABLED
+#include "stm32f1xx_hal_gpio.h"
+#endif /* HAL_GPIO_MODULE_ENABLED */
+
+#ifdef HAL_EXTI_MODULE_ENABLED
+#include "stm32f1xx_hal_exti.h"
+#endif /* HAL_EXTI_MODULE_ENABLED */
+
+#ifdef HAL_DMA_MODULE_ENABLED
+#include "stm32f1xx_hal_dma.h"
+#endif /* HAL_DMA_MODULE_ENABLED */
+
+#ifdef HAL_ETH_MODULE_ENABLED
+#include "stm32f1xx_hal_eth.h"
+#endif /* HAL_ETH_MODULE_ENABLED */
+
+#ifdef HAL_CAN_MODULE_ENABLED
+#include "stm32f1xx_hal_can.h"
+#endif /* HAL_CAN_MODULE_ENABLED */
+
+#ifdef HAL_CAN_LEGACY_MODULE_ENABLED
+ #include "Legacy/stm32f1xx_hal_can_legacy.h"
+#endif /* HAL_CAN_LEGACY_MODULE_ENABLED */
+
+#ifdef HAL_CEC_MODULE_ENABLED
+#include "stm32f1xx_hal_cec.h"
+#endif /* HAL_CEC_MODULE_ENABLED */
+
+#ifdef HAL_CORTEX_MODULE_ENABLED
+#include "stm32f1xx_hal_cortex.h"
+#endif /* HAL_CORTEX_MODULE_ENABLED */
+
+#ifdef HAL_ADC_MODULE_ENABLED
+#include "stm32f1xx_hal_adc.h"
+#endif /* HAL_ADC_MODULE_ENABLED */
+
+#ifdef HAL_CRC_MODULE_ENABLED
+#include "stm32f1xx_hal_crc.h"
+#endif /* HAL_CRC_MODULE_ENABLED */
+
+#ifdef HAL_DAC_MODULE_ENABLED
+#include "stm32f1xx_hal_dac.h"
+#endif /* HAL_DAC_MODULE_ENABLED */
+
+#ifdef HAL_FLASH_MODULE_ENABLED
+#include "stm32f1xx_hal_flash.h"
+#endif /* HAL_FLASH_MODULE_ENABLED */
+
+#ifdef HAL_SRAM_MODULE_ENABLED
+#include "stm32f1xx_hal_sram.h"
+#endif /* HAL_SRAM_MODULE_ENABLED */
+
+#ifdef HAL_NOR_MODULE_ENABLED
+#include "stm32f1xx_hal_nor.h"
+#endif /* HAL_NOR_MODULE_ENABLED */
+
+#ifdef HAL_I2C_MODULE_ENABLED
+#include "stm32f1xx_hal_i2c.h"
+#endif /* HAL_I2C_MODULE_ENABLED */
+
+#ifdef HAL_I2S_MODULE_ENABLED
+#include "stm32f1xx_hal_i2s.h"
+#endif /* HAL_I2S_MODULE_ENABLED */
+
+#ifdef HAL_IWDG_MODULE_ENABLED
+#include "stm32f1xx_hal_iwdg.h"
+#endif /* HAL_IWDG_MODULE_ENABLED */
+
+#ifdef HAL_PWR_MODULE_ENABLED
+#include "stm32f1xx_hal_pwr.h"
+#endif /* HAL_PWR_MODULE_ENABLED */
+
+#ifdef HAL_RTC_MODULE_ENABLED
+#include "stm32f1xx_hal_rtc.h"
+#endif /* HAL_RTC_MODULE_ENABLED */
+
+#ifdef HAL_PCCARD_MODULE_ENABLED
+#include "stm32f1xx_hal_pccard.h"
+#endif /* HAL_PCCARD_MODULE_ENABLED */
+
+#ifdef HAL_SD_MODULE_ENABLED
+#include "stm32f1xx_hal_sd.h"
+#endif /* HAL_SD_MODULE_ENABLED */
+
+#ifdef HAL_NAND_MODULE_ENABLED
+#include "stm32f1xx_hal_nand.h"
+#endif /* HAL_NAND_MODULE_ENABLED */
+
+#ifdef HAL_SPI_MODULE_ENABLED
+#include "stm32f1xx_hal_spi.h"
+#endif /* HAL_SPI_MODULE_ENABLED */
+
+#ifdef HAL_TIM_MODULE_ENABLED
+#include "stm32f1xx_hal_tim.h"
+#endif /* HAL_TIM_MODULE_ENABLED */
+
+#ifdef HAL_UART_MODULE_ENABLED
+#include "stm32f1xx_hal_uart.h"
+#endif /* HAL_UART_MODULE_ENABLED */
+
+#ifdef HAL_USART_MODULE_ENABLED
+#include "stm32f1xx_hal_usart.h"
+#endif /* HAL_USART_MODULE_ENABLED */
+
+#ifdef HAL_IRDA_MODULE_ENABLED
+#include "stm32f1xx_hal_irda.h"
+#endif /* HAL_IRDA_MODULE_ENABLED */
+
+#ifdef HAL_SMARTCARD_MODULE_ENABLED
+#include "stm32f1xx_hal_smartcard.h"
+#endif /* HAL_SMARTCARD_MODULE_ENABLED */
+
+#ifdef HAL_WWDG_MODULE_ENABLED
+#include "stm32f1xx_hal_wwdg.h"
+#endif /* HAL_WWDG_MODULE_ENABLED */
+
+#ifdef HAL_PCD_MODULE_ENABLED
+#include "stm32f1xx_hal_pcd.h"
+#endif /* HAL_PCD_MODULE_ENABLED */
+
+#ifdef HAL_HCD_MODULE_ENABLED
+#include "stm32f1xx_hal_hcd.h"
+#endif /* HAL_HCD_MODULE_ENABLED */
+
+#ifdef HAL_MMC_MODULE_ENABLED
+#include "stm32f1xx_hal_mmc.h"
+#endif /* HAL_MMC_MODULE_ENABLED */
+
+/* Exported macro ------------------------------------------------------------*/
+#ifdef USE_FULL_ASSERT
+/**
+ * @brief The assert_param macro is used for function's parameters check.
+ * @param expr If expr is false, it calls assert_failed function
+ * which reports the name of the source file and the source
+ * line number of the call that failed.
+ * If expr is true, it returns no value.
+ * @retval None
+ */
+#define assert_param(expr) ((expr) ? (void)0U : assert_failed((uint8_t *)__FILE__, __LINE__))
+/* Exported functions ------------------------------------------------------- */
+void assert_failed(uint8_t* file, uint32_t line);
+#else
+#define assert_param(expr) ((void)0U)
+#endif /* USE_FULL_ASSERT */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __STM32F1xx_HAL_CONF_H */
+
diff --git a/Core/Inc/stm32f1xx_it.h b/Core/Inc/stm32f1xx_it.h
new file mode 100644
index 0000000000000000000000000000000000000000..a11bc0516797b5a9ae72ca4f11d411705315b8a6
--- /dev/null
+++ b/Core/Inc/stm32f1xx_it.h
@@ -0,0 +1,66 @@
+/* USER CODE BEGIN Header */
+/**
+ ******************************************************************************
+ * @file stm32f1xx_it.h
+ * @brief This file contains the headers of the interrupt handlers.
+ ******************************************************************************
+ * @attention
+ *
+ * Copyright (c) 2023 STMicroelectronics.
+ * All rights reserved.
+ *
+ * This software is licensed under terms that can be found in the LICENSE file
+ * in the root directory of this software component.
+ * If no LICENSE file comes with this software, it is provided AS-IS.
+ *
+ ******************************************************************************
+ */
+/* USER CODE END Header */
+
+/* Define to prevent recursive inclusion -------------------------------------*/
+#ifndef __STM32F1xx_IT_H
+#define __STM32F1xx_IT_H
+
+#ifdef __cplusplus
+ extern "C" {
+#endif
+
+/* Private includes ----------------------------------------------------------*/
+/* USER CODE BEGIN Includes */
+
+/* USER CODE END Includes */
+
+/* Exported types ------------------------------------------------------------*/
+/* USER CODE BEGIN ET */
+
+/* USER CODE END ET */
+
+/* Exported constants --------------------------------------------------------*/
+/* USER CODE BEGIN EC */
+
+/* USER CODE END EC */
+
+/* Exported macro ------------------------------------------------------------*/
+/* USER CODE BEGIN EM */
+
+/* USER CODE END EM */
+
+/* Exported functions prototypes ---------------------------------------------*/
+void NMI_Handler(void);
+void HardFault_Handler(void);
+void MemManage_Handler(void);
+void BusFault_Handler(void);
+void UsageFault_Handler(void);
+void SVC_Handler(void);
+void DebugMon_Handler(void);
+void PendSV_Handler(void);
+void SysTick_Handler(void);
+/* USER CODE BEGIN EFP */
+
+/* USER CODE END EFP */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __STM32F1xx_IT_H */
diff --git a/Core/Inc/tim.h b/Core/Inc/tim.h
new file mode 100644
index 0000000000000000000000000000000000000000..3b683bb80f8231c15e95af0086a46ad12ce4a614
--- /dev/null
+++ b/Core/Inc/tim.h
@@ -0,0 +1,55 @@
+/* USER CODE BEGIN Header */
+/**
+ ******************************************************************************
+ * @file tim.h
+ * @brief This file contains all the function prototypes for
+ * the tim.c file
+ ******************************************************************************
+ * @attention
+ *
+ * Copyright (c) 2023 STMicroelectronics.
+ * All rights reserved.
+ *
+ * This software is licensed under terms that can be found in the LICENSE file
+ * in the root directory of this software component.
+ * If no LICENSE file comes with this software, it is provided AS-IS.
+ *
+ ******************************************************************************
+ */
+/* USER CODE END Header */
+/* Define to prevent recursive inclusion -------------------------------------*/
+#ifndef __TIM_H__
+#define __TIM_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Includes ------------------------------------------------------------------*/
+#include "main.h"
+
+/* USER CODE BEGIN Includes */
+
+/* USER CODE END Includes */
+
+extern TIM_HandleTypeDef htim1;
+
+extern TIM_HandleTypeDef htim4;
+
+/* USER CODE BEGIN Private defines */
+
+/* USER CODE END Private defines */
+
+void MX_TIM1_Init(void);
+void MX_TIM4_Init(void);
+
+/* USER CODE BEGIN Prototypes */
+
+/* USER CODE END Prototypes */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __TIM_H__ */
+
diff --git a/Core/Inc/usart.h b/Core/Inc/usart.h
new file mode 100644
index 0000000000000000000000000000000000000000..b86eff0ec22f1f45842d0bc6de08b7fd5230981b
--- /dev/null
+++ b/Core/Inc/usart.h
@@ -0,0 +1,52 @@
+/* USER CODE BEGIN Header */
+/**
+ ******************************************************************************
+ * @file usart.h
+ * @brief This file contains all the function prototypes for
+ * the usart.c file
+ ******************************************************************************
+ * @attention
+ *
+ * Copyright (c) 2023 STMicroelectronics.
+ * All rights reserved.
+ *
+ * This software is licensed under terms that can be found in the LICENSE file
+ * in the root directory of this software component.
+ * If no LICENSE file comes with this software, it is provided AS-IS.
+ *
+ ******************************************************************************
+ */
+/* USER CODE END Header */
+/* Define to prevent recursive inclusion -------------------------------------*/
+#ifndef __USART_H__
+#define __USART_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Includes ------------------------------------------------------------------*/
+#include "main.h"
+
+/* USER CODE BEGIN Includes */
+
+/* USER CODE END Includes */
+
+extern UART_HandleTypeDef huart1;
+
+/* USER CODE BEGIN Private defines */
+
+/* USER CODE END Private defines */
+
+void MX_USART1_UART_Init(void);
+
+/* USER CODE BEGIN Prototypes */
+
+/* USER CODE END Prototypes */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __USART_H__ */
+
diff --git a/Core/Src/IIC.c b/Core/Src/IIC.c
new file mode 100644
index 0000000000000000000000000000000000000000..65aa625f8c514b66b4028f7effd6746af311c3bc
--- /dev/null
+++ b/Core/Src/IIC.c
@@ -0,0 +1,292 @@
+/*
+ * IIC.c
+ *
+ * Created on: Jul 11, 2023
+ * Author: zzy
+ */
+
+#include "IIC.h"
+
+/* 定义IIC总线连接的GPIO端口, 用户只需要修改下面4行代码即可任意改变SCL和SDA的引脚 */
+#define GPIO_PORT_IIC GPIOB /* GPIO端口 */
+#define RCC_IIC_ENABLE __HAL_RCC_GPIOB_CLK_ENABLE() /* GPIO端口时钟 */
+#define IIC_SCL_PIN GPIO_PIN_8 /* 连接到SCL时钟线的GPIO */
+#define IIC_SDA_PIN GPIO_PIN_9 /* 连接到SDA数据线的GPIO */
+
+/* 定义读写SCL和SDA的宏,已增加代码的可移植性和可阅读性 */
+#if 1 /* 条件编译: 1 选择GPIO的库函数实现IO读写 */
+#define IIC_SCL_1() HAL_GPIO_WritePin(GPIO_PORT_IIC, IIC_SCL_PIN, GPIO_PIN_SET) /* SCL = 1 */
+#define IIC_SCL_0() HAL_GPIO_WritePin(GPIO_PORT_IIC, IIC_SCL_PIN, GPIO_PIN_RESET) /* SCL = 0 */
+
+#define IIC_SDA_1() HAL_GPIO_WritePin(GPIO_PORT_IIC, IIC_SDA_PIN, GPIO_PIN_SET) /* SDA = 1 */
+#define IIC_SDA_0() HAL_GPIO_WritePin(GPIO_PORT_IIC, IIC_SDA_PIN, GPIO_PIN_RESET) /* SDA = 0 */
+
+#define IIC_SDA_READ() HAL_GPIO_ReadPin(GPIO_PORT_IIC, IIC_SDA_PIN) /* 读SDA口线状态 */
+#else /* 这个分支选择直接寄存器操作实现IO读写 */
+/* 注意:如下写法,在IAR最高级别优化时,会被编译器错误优化 */
+#define IIC_SCL_1() GPIO_PORT_IIC->BSRR = IIC_SCL_PIN /* SCL = 1 */
+#define IIC_SCL_0() GPIO_PORT_IIC->BRR = IIC_SCL_PIN /* SCL = 0 */
+
+#define IIC_SDA_1() GPIO_PORT_IIC->BSRR = IIC_SDA_PIN /* SDA = 1 */
+#define IIC_SDA_0() GPIO_PORT_IIC->BRR = IIC_SDA_PIN /* SDA = 0 */
+
+#define IIC_SDA_READ() ((GPIO_PORT_IIC->IDR & IIC_SDA_PIN) != 0) /* 读SDA口线状态 */
+#endif
+
+void IIC_GPIO_Init(void);
+
+/*
+*********************************************************************************************************
+* 函 数 名: IIC_Delay
+* 功能说明: IIC总线位延迟,最快400KHz
+* 形 参:无
+* 返 回 值: 无
+*********************************************************************************************************
+*/
+static void IIC_Delay(void)
+{
+ uint8_t i;
+
+ /*
+ 下面的时间是通过安富莱AX-Pro逻辑分析仪测试得到的。
+ CPU主频72MHz时,在内部Flash运行, MDK工程不优化
+ 循环次数为10时,SCL频率 = 205KHz
+ 循环次数为7时,SCL频率 = 347KHz, SCL高电平时间1.5us,SCL低电平时间2.87us
+ 循环次数为5时,SCL频率 = 421KHz, SCL高电平时间1.25us,SCL低电平时间2.375us
+
+ IAR工程编译效率高,不能设置为7
+ */
+ for (i = 0; i < 10; i++)
+ ;
+}
+
+/*
+*********************************************************************************************************
+* 函 数 名: IIC_Start
+* 功能说明: CPU发起IIC总线启动信号
+* 形 参:无
+* 返 回 值: 无
+*********************************************************************************************************
+*/
+void IIC_Start(void)
+{
+ /* 当SCL高电平时,SDA出现一个下跳沿表示IIC总线启动信号 */
+ IIC_SDA_1();
+ IIC_SCL_1();
+ IIC_Delay();
+ IIC_SDA_0();
+ IIC_Delay();
+ IIC_SCL_0();
+ IIC_Delay();
+}
+
+/*
+*********************************************************************************************************
+* 函 数 名: IIC_Start
+* 功能说明: CPU发起IIC总线停止信号
+* 形 参:无
+* 返 回 值: 无
+*********************************************************************************************************
+*/
+void IIC_Stop(void)
+{
+ /* 当SCL高电平时,SDA出现一个上跳沿表示IIC总线停止信号 */
+ IIC_SDA_0();
+ IIC_SCL_1();
+ IIC_Delay();
+ IIC_SDA_1();
+}
+
+/*
+*********************************************************************************************************
+* 函 数 名: IIC_SendByte
+* 功能说明: CPU向IIC总线设备发送8bit数据
+* 形 参:_ucByte : 等待发送的字节
+* 返 回 值: 无
+*********************************************************************************************************
+*/
+void IIC_Send_Byte(uint8_t _ucByte)
+{
+ uint8_t i;
+
+ /* 先发送字节的高位bit7 */
+ for (i = 0; i < 8; i++)
+ {
+ if (_ucByte & 0x80)
+ {
+ IIC_SDA_1();
+ }
+ else
+ {
+ IIC_SDA_0();
+ }
+ IIC_Delay();
+ IIC_SCL_1();
+ IIC_Delay();
+ IIC_SCL_0();
+ if (i == 7)
+ {
+ IIC_SDA_1(); // 释放总线
+ }
+ _ucByte <<= 1; /* 左移一个bit */
+ IIC_Delay();
+ }
+}
+
+/*
+*********************************************************************************************************
+* 函 数 名: IIC_ReadByte
+* 功能说明: CPU从IIC总线设备读取8bit数据
+* 形 参:无
+* 返 回 值: 读到的数据
+*********************************************************************************************************
+*/
+uint8_t IIC_Read_Byte(uint8_t ack)
+{
+ uint8_t i;
+ uint8_t value;
+
+ /* 读到第1个bit为数据的bit7 */
+ value = 0;
+ for (i = 0; i < 8; i++)
+ {
+ value <<= 1;
+ IIC_SCL_1();
+ IIC_Delay();
+ if (IIC_SDA_READ())
+ {
+ value++;
+ }
+ IIC_SCL_0();
+ IIC_Delay();
+ }
+ if (ack == 0)
+ IIC_NAck();
+ else
+ IIC_Ack();
+ return value;
+}
+
+/*
+*********************************************************************************************************
+* 函 数 名: IIC_WaitAck
+* 功能说明: CPU产生一个时钟,并读取器件的ACK应答信号
+* 形 参:无
+* 返 回 值: 返回0表示正确应答,1表示无器件响应
+*********************************************************************************************************
+*/
+uint8_t IIC_Wait_Ack(void)
+{
+ uint8_t re;
+
+ IIC_SDA_1(); /* CPU释放SDA总线 */
+ IIC_Delay();
+ IIC_SCL_1(); /* CPU驱动SCL = 1, 此时器件会返回ACK应答 */
+ IIC_Delay();
+ if (IIC_SDA_READ()) /* CPU读取SDA口线状态 */
+ {
+ re = 1;
+ }
+ else
+ {
+ re = 0;
+ }
+ IIC_SCL_0();
+ IIC_Delay();
+ return re;
+}
+
+/*
+*********************************************************************************************************
+* 函 数 名: IIC_Ack
+* 功能说明: CPU产生一个ACK信号
+* 形 参:无
+* 返 回 值: 无
+*********************************************************************************************************
+*/
+void IIC_Ack(void)
+{
+ IIC_SDA_0(); /* CPU驱动SDA = 0 */
+ IIC_Delay();
+ IIC_SCL_1(); /* CPU产生1个时钟 */
+ IIC_Delay();
+ IIC_SCL_0();
+ IIC_Delay();
+ IIC_SDA_1(); /* CPU释放SDA总线 */
+}
+
+/*
+*********************************************************************************************************
+* 函 数 名: IIC_NAck
+* 功能说明: CPU产生1个NACK信号
+* 形 参:无
+* 返 回 值: 无
+*********************************************************************************************************
+*/
+void IIC_NAck(void)
+{
+ IIC_SDA_1(); /* CPU驱动SDA = 1 */
+ IIC_Delay();
+ IIC_SCL_1(); /* CPU产生1个时钟 */
+ IIC_Delay();
+ IIC_SCL_0();
+ IIC_Delay();
+}
+
+/*
+*********************************************************************************************************
+* 函 数 名: IIC_GPIO_Config
+* 功能说明: 配置IIC总线的GPIO,采用模拟IO的方式实现
+* 形 参:无
+* 返 回 值: 无
+*********************************************************************************************************
+*/
+void IIC_GPIO_Init(void)
+{
+ GPIO_InitTypeDef GPIO_InitStructure;
+
+ RCC_IIC_ENABLE; /* 打开GPIO时钟 */
+
+ GPIO_InitStructure.Pin = IIC_SDA_PIN;
+ GPIO_InitStructure.Speed = GPIO_SPEED_FREQ_HIGH;
+ GPIO_InitStructure.Mode = GPIO_MODE_OUTPUT_OD; /* 开漏输出 */
+
+ HAL_GPIO_Init(GPIO_PORT_IIC, &GPIO_InitStructure);
+
+ RCC_IIC_ENABLE; /* 打开GPIO时钟 */
+
+ GPIO_InitStructure.Pin = IIC_SCL_PIN;
+ GPIO_InitStructure.Speed = GPIO_SPEED_FREQ_HIGH;
+ GPIO_InitStructure.Mode = GPIO_MODE_OUTPUT_PP; /* 推挽输出 */
+
+ HAL_GPIO_Init(GPIO_PORT_IIC, &GPIO_InitStructure);
+
+ /* 给一个停止信号, 复位IIC总线上的所有设备到待机模式 */
+ IIC_Stop();
+}
+
+/*
+*********************************************************************************************************
+* 函 数 名: IIC_CheckDevice
+* 功能说明: 检测IIC总线设备,CPU向发送设备地址,然后读取设备应答来判断该设备是否存在
+* 形 参:_Address:设备的IIC总线地址
+* 返 回 值: 返回值 0 表示正确, 返回1表示未探测到
+*********************************************************************************************************
+*/
+uint8_t IIC_CheckDevice(uint8_t _Address)
+{
+ uint8_t ucAck;
+
+ IIC_GPIO_Init(); /* 配置GPIO */
+
+ IIC_Start(); /* 发送启动信号 */
+
+ /* 发送设备地址+读写控制bit(0 = w, 1 = r) bit7 先传 */
+ IIC_Send_Byte(_Address | IIC_WR);
+ ucAck = IIC_Wait_Ack(); /* 检测设备的ACK应答 */
+
+ IIC_Stop(); /* 发送停止信号 */
+
+ return ucAck;
+}
+
diff --git a/Core/Src/gpio.c b/Core/Src/gpio.c
new file mode 100644
index 0000000000000000000000000000000000000000..21dce665e600a7ed2b31d4e5b34f3db85bf34048
--- /dev/null
+++ b/Core/Src/gpio.c
@@ -0,0 +1,92 @@
+/* USER CODE BEGIN Header */
+/**
+ ******************************************************************************
+ * @file gpio.c
+ * @brief This file provides code for the configuration
+ * of all used GPIO pins.
+ ******************************************************************************
+ * @attention
+ *
+ * Copyright (c) 2023 STMicroelectronics.
+ * All rights reserved.
+ *
+ * This software is licensed under terms that can be found in the LICENSE file
+ * in the root directory of this software component.
+ * If no LICENSE file comes with this software, it is provided AS-IS.
+ *
+ ******************************************************************************
+ */
+/* USER CODE END Header */
+
+/* Includes ------------------------------------------------------------------*/
+#include "gpio.h"
+
+/* USER CODE BEGIN 0 */
+
+/* USER CODE END 0 */
+
+/*----------------------------------------------------------------------------*/
+/* Configure GPIO */
+/*----------------------------------------------------------------------------*/
+/* USER CODE BEGIN 1 */
+
+/* USER CODE END 1 */
+
+/** Configure pins as
+ * Analog
+ * Input
+ * Output
+ * EVENT_OUT
+ * EXTI
+*/
+void MX_GPIO_Init(void)
+{
+
+ GPIO_InitTypeDef GPIO_InitStruct = {0};
+
+ /* GPIO Ports Clock Enable */
+ __HAL_RCC_GPIOC_CLK_ENABLE();
+ __HAL_RCC_GPIOD_CLK_ENABLE();
+ __HAL_RCC_GPIOA_CLK_ENABLE();
+ __HAL_RCC_GPIOB_CLK_ENABLE();
+
+ /*Configure GPIO pin Output Level */
+ HAL_GPIO_WritePin(GPIOA, GPIO_PIN_1|GPIO_PIN_7, GPIO_PIN_SET);
+
+ /*Configure GPIO pin Output Level */
+ HAL_GPIO_WritePin(GPIOA, GPIO_PIN_5, GPIO_PIN_RESET);
+
+ /*Configure GPIO pin Output Level */
+ HAL_GPIO_WritePin(GPIOB, GPIO_PIN_11|GPIO_PIN_8|GPIO_PIN_9, GPIO_PIN_SET);
+
+ /*Configure GPIO pins : PA1 PA7 */
+ GPIO_InitStruct.Pin = GPIO_PIN_1|GPIO_PIN_7;
+ GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
+ GPIO_InitStruct.Pull = GPIO_NOPULL;
+ GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH;
+ HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
+
+ /*Configure GPIO pin : PA5 */
+ GPIO_InitStruct.Pin = GPIO_PIN_5;
+ GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
+ GPIO_InitStruct.Pull = GPIO_NOPULL;
+ GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
+ HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
+
+ /*Configure GPIO pins : PB11 PB8 PB9 */
+ GPIO_InitStruct.Pin = GPIO_PIN_11|GPIO_PIN_8|GPIO_PIN_9;
+ GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
+ GPIO_InitStruct.Pull = GPIO_NOPULL;
+ GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH;
+ HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
+
+ /*Configure GPIO pin : PB7 */
+ GPIO_InitStruct.Pin = GPIO_PIN_7;
+ GPIO_InitStruct.Mode = GPIO_MODE_ANALOG;
+ HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
+
+}
+
+/* USER CODE BEGIN 2 */
+
+/* USER CODE END 2 */
diff --git a/Core/Src/inv_mpu.c b/Core/Src/inv_mpu.c
new file mode 100644
index 0000000000000000000000000000000000000000..2efe2e7776ee1e0c752624700535970dd6c8e89c
--- /dev/null
+++ b/Core/Src/inv_mpu.c
@@ -0,0 +1,3130 @@
+/*
+ * inv_mpu.c
+ *
+ * Created on: Jul 11, 2023
+ * Author: zzy
+ */
+
+/*
+ $License:
+ Copyright (C) 2011-2012 InvenSense Corporation, All Rights Reserved.
+ See included License.txt for License information.
+ $
+ */
+/**
+ * @addtogroup DRIVERS Sensor Driver Layer
+ * @brief Hardware drivers to communicate with sensors via I2C.
+ *
+ * @{
+ * @file inv_mpu.c
+ * @brief An I2C-based driver for Invensense gyroscopes.
+ * @details This driver currently works for the following devices:
+ * MPU6050
+ * MPU6500
+ * MPU9150 (or MPU6050 w/ AK8975 on the auxiliary bus)
+ * MPU9250 (or MPU6500 w/ AK8963 on the auxiliary bus)
+ */
+#include
+#include
+#include
+#include
+#include
+#include "inv_mpu.h"
+#include "inv_mpu_dmp_motion_driver.h"
+#include "MPU6050.h"
+#include "usart.h"
+
+#define MPU6050 // 定义我们使用的传感器为MPU6050
+#define MOTION_DRIVER_TARGET_MSP430 // 定义驱动部分,采用MSP430的驱动(移植到STM32F1)
+
+/* The following functions must be defined for this platform:
+ * i2c_write(unsigned char slave_addr, unsigned char reg_addr,
+ * unsigned char length, unsigned char const *data)
+ * i2c_read(unsigned char slave_addr, unsigned char reg_addr,
+ * unsigned char length, unsigned char *data)
+ * delay_ms(unsigned long num_ms)
+ * get_ms(unsigned long *count)
+ * reg_int_cb(void (*cb)(void), unsigned char port, unsigned char pin)
+ * labs(long x)
+ * fabsf(float x)
+ * min(int a, int b)
+ */
+#if defined MOTION_DRIVER_TARGET_MSP430
+// #include "msp430.h"
+// #include "msp430_i2c.h"
+// #include "msp430_clock.h"
+// #include "msp430_interrupt.h"
+
+#define i2c_write MPU_Write_Len
+#define i2c_read MPU_Read_Len
+#define delay_ms delay_ms
+#define get_ms mget_ms
+// static inline int reg_int_cb(struct int_param_s *int_param)
+//{
+// return msp430_reg_int_cb(int_param->cb, int_param->pin, int_param->lp_exit,
+// int_param->active_low);
+// }
+#define log_i printf // 打印信息
+#define log_e printf // 打印信息
+/* labs is already defined by TI's toolchain. */
+/* fabs is for doubles. fabsf is for floats. */
+#define fabs fabsf
+#define min(a, b) ((a < b) ? a : b)
+#elif defined EMPL_TARGET_MSP430
+#include "msp430.h"
+#include "msp430_i2c.h"
+#include "msp430_clock.h"
+#include "msp430_interrupt.h"
+#include "log.h"
+#define i2c_write msp430_i2c_write
+#define i2c_read msp430_i2c_read
+#define delay_ms msp430_delay_ms
+#define get_ms msp430_get_clock_ms
+static inline int reg_int_cb(struct int_param_s *int_param)
+{
+ return msp430_reg_int_cb(int_param->cb, int_param->pin, int_param->lp_exit,
+ int_param->active_low);
+}
+#define log_i MPL_LOGI
+#define log_e MPL_LOGE
+/* labs is already defined by TI's toolchain. */
+/* fabs is for doubles. fabsf is for floats. */
+#define fabs fabsf
+#define min(a, b) ((a < b) ? a : b)
+#elif defined EMPL_TARGET_UC3L0
+/* Instead of using the standard TWI driver from the ASF library, we're using
+ * a TWI driver that follows the slave address + register address convention.
+ */
+#include "twi.h"
+#include "delay.h"
+#include "sysclk.h"
+#include "log.h"
+#include "sensors_xplained.h"
+#include "uc3l0_clock.h"
+#define i2c_write(a, b, c, d) twi_write(a, b, d, c)
+#define i2c_read(a, b, c, d) twi_read(a, b, d, c)
+/* delay_ms is a function already defined in ASF. */
+#define get_ms uc3l0_get_clock_ms
+static inline int reg_int_cb(struct int_param_s *int_param)
+{
+ sensor_board_irq_connect(int_param->pin, int_param->cb, int_param->arg);
+ return 0;
+}
+#define log_i MPL_LOGI
+#define log_e MPL_LOGE
+/* UC3 is a 32-bit processor, so abs and labs are equivalent. */
+#define labs abs
+#define fabs(x) (((x) > 0) ? (x) : -(x))
+#else
+#error Gyro driver is missing the system layer implementations.
+#endif
+
+#if !defined MPU6050 && !defined MPU9150 && !defined MPU6500 && !defined MPU9250
+#error Which gyro are you using? Define MPUxxxx in your compiler options.
+#endif
+
+/* Time for some messy macro work. =]
+ * #define MPU9150
+ * is equivalent to..
+ * #define MPU6050
+ * #define AK8975_SECONDARY
+ *
+ * #define MPU9250
+ * is equivalent to..
+ * #define MPU6500
+ * #define AK8963_SECONDARY
+ */
+#if defined MPU9150
+#ifndef MPU6050
+#define MPU6050
+#endif /* #ifndef MPU6050 */
+#if defined AK8963_SECONDARY
+#error "MPU9150 and AK8963_SECONDARY cannot both be defined."
+#elif !defined AK8975_SECONDARY /* #if defined AK8963_SECONDARY */
+#define AK8975_SECONDARY
+#endif /* #if defined AK8963_SECONDARY */
+#elif defined MPU9250 /* #if defined MPU9150 */
+#ifndef MPU6500
+#define MPU6500
+#endif /* #ifndef MPU6500 */
+#if defined AK8975_SECONDARY
+#error "MPU9250 and AK8975_SECONDARY cannot both be defined."
+#elif !defined AK8963_SECONDARY /* #if defined AK8975_SECONDARY */
+#define AK8963_SECONDARY
+#endif /* #if defined AK8975_SECONDARY */
+#endif /* #if defined MPU9150 */
+
+#if defined AK8975_SECONDARY || defined AK8963_SECONDARY
+#define AK89xx_SECONDARY
+#else
+/* #warning "No compass = less profit for Invensense. Lame." */
+#endif
+
+static int set_int_enable(unsigned char enable);
+
+/* Hardware registers needed by driver. */
+struct gyro_reg_s
+{
+ unsigned char who_am_i;
+ unsigned char rate_div;
+ unsigned char lpf;
+ unsigned char prod_id;
+ unsigned char user_ctrl;
+ unsigned char fifo_en;
+ unsigned char gyro_cfg;
+ unsigned char accel_cfg;
+ // unsigned char accel_cfg2;
+ // unsigned char lp_accel_odr;
+ unsigned char motion_thr;
+ unsigned char motion_dur;
+ unsigned char fifo_count_h;
+ unsigned char fifo_r_w;
+ unsigned char raw_gyro;
+ unsigned char raw_accel;
+ unsigned char temp;
+ unsigned char int_enable;
+ unsigned char dmp_int_status;
+ unsigned char int_status;
+ // unsigned char accel_intel;
+ unsigned char pwr_mgmt_1;
+ unsigned char pwr_mgmt_2;
+ unsigned char int_pin_cfg;
+ unsigned char mem_r_w;
+ unsigned char accel_offs;
+ unsigned char i2c_mst;
+ unsigned char bank_sel;
+ unsigned char mem_start_addr;
+ unsigned char prgm_start_h;
+#if defined AK89xx_SECONDARY
+ unsigned char s0_addr;
+ unsigned char s0_reg;
+ unsigned char s0_ctrl;
+ unsigned char s1_addr;
+ unsigned char s1_reg;
+ unsigned char s1_ctrl;
+ unsigned char s4_ctrl;
+ unsigned char s0_do;
+ unsigned char s1_do;
+ unsigned char i2c_delay_ctrl;
+ unsigned char raw_compass;
+ /* The I2C_MST_VDDIO bit is in this register. */
+ unsigned char yg_offs_tc;
+#endif
+};
+
+/* Information specific to a particular device. */
+struct hw_s
+{
+ unsigned char addr;
+ unsigned short max_fifo;
+ unsigned char num_reg;
+ unsigned short temp_sens;
+ short temp_offset;
+ unsigned short bank_size;
+#if defined AK89xx_SECONDARY
+ unsigned short compass_fsr;
+#endif
+};
+
+/* When entering motion interrupt mode, the driver keeps track of the
+ * previous state so that it can be restored at a later time.
+ * TODO: This is tacky. Fix it.
+ */
+struct motion_int_cache_s
+{
+ unsigned short gyro_fsr;
+ unsigned char accel_fsr;
+ unsigned short lpf;
+ unsigned short sample_rate;
+ unsigned char sensors_on;
+ unsigned char fifo_sensors;
+ unsigned char dmp_on;
+};
+
+/* Cached chip configuration data.
+ * TODO: A lot of these can be handled with a bitmask.
+ */
+struct chip_cfg_s
+{
+ /* Matches gyro_cfg >> 3 & 0x03 */
+ unsigned char gyro_fsr;
+ /* Matches accel_cfg >> 3 & 0x03 */
+ unsigned char accel_fsr;
+ /* Enabled sensors. Uses same masks as fifo_en, NOT pwr_mgmt_2. */
+ unsigned char sensors;
+ /* Matches config register. */
+ unsigned char lpf;
+ unsigned char clk_src;
+ /* Sample rate, NOT rate divider. */
+ unsigned short sample_rate;
+ /* Matches fifo_en register. */
+ unsigned char fifo_enable;
+ /* Matches int enable register. */
+ unsigned char int_enable;
+ /* 1 if devices on auxiliary I2C bus appear on the primary. */
+ unsigned char bypass_mode;
+ /* 1 if half-sensitivity.
+ * NOTE: This doesn't belong here, but everything else in hw_s is const,
+ * and this allows us to save some precious RAM.
+ */
+ unsigned char accel_half;
+ /* 1 if device in low-power accel-only mode. */
+ unsigned char lp_accel_mode;
+ /* 1 if interrupts are only triggered on motion events. */
+ unsigned char int_motion_only;
+ struct motion_int_cache_s cache;
+ /* 1 for active low interrupts. */
+ unsigned char active_low_int;
+ /* 1 for latched interrupts. */
+ unsigned char latched_int;
+ /* 1 if DMP is enabled. */
+ unsigned char dmp_on;
+ /* Ensures that DMP will only be loaded once. */
+ unsigned char dmp_loaded;
+ /* Sampling rate used when DMP is enabled. */
+ unsigned short dmp_sample_rate;
+#ifdef AK89xx_SECONDARY
+ /* Compass sample rate. */
+ unsigned short compass_sample_rate;
+ unsigned char compass_addr;
+ short mag_sens_adj[3];
+#endif
+};
+
+/* Information for self-test. */
+struct test_s
+{
+ unsigned long gyro_sens;
+ unsigned long accel_sens;
+ unsigned char reg_rate_div;
+ unsigned char reg_lpf;
+ unsigned char reg_gyro_fsr;
+ unsigned char reg_accel_fsr;
+ unsigned short wait_ms;
+ unsigned char packet_thresh;
+ float min_dps;
+ float max_dps;
+ float max_gyro_var;
+ float min_g;
+ float max_g;
+ float max_accel_var;
+};
+
+/* Gyro driver state variables. */
+struct gyro_state_s
+{
+ const struct gyro_reg_s *reg;
+ const struct hw_s *hw;
+ struct chip_cfg_s chip_cfg;
+ const struct test_s *test;
+};
+
+/* Filter configurations. */
+enum lpf_e
+{
+ INV_FILTER_256HZ_NOLPF2 = 0,
+ INV_FILTER_188HZ,
+ INV_FILTER_98HZ,
+ INV_FILTER_42HZ,
+ INV_FILTER_20HZ,
+ INV_FILTER_10HZ,
+ INV_FILTER_5HZ,
+ INV_FILTER_2100HZ_NOLPF,
+ NUM_FILTER
+};
+
+/* Full scale ranges. */
+enum gyro_fsr_e
+{
+ INV_FSR_250DPS = 0,
+ INV_FSR_500DPS,
+ INV_FSR_1000DPS,
+ INV_FSR_2000DPS,
+ NUM_GYRO_FSR
+};
+
+/* Full scale ranges. */
+enum accel_fsr_e
+{
+ INV_FSR_2G = 0,
+ INV_FSR_4G,
+ INV_FSR_8G,
+ INV_FSR_16G,
+ NUM_ACCEL_FSR
+};
+
+/* Clock sources. */
+enum clock_sel_e
+{
+ INV_CLK_INTERNAL = 0,
+ INV_CLK_PLL,
+ NUM_CLK
+};
+
+/* Low-power accel wakeup rates. */
+enum lp_accel_rate_e
+{
+#if defined MPU6050
+ INV_LPA_1_25HZ,
+ INV_LPA_5HZ,
+ INV_LPA_20HZ,
+ INV_LPA_40HZ
+#elif defined MPU6500
+ INV_LPA_0_3125HZ,
+ INV_LPA_0_625HZ,
+ INV_LPA_1_25HZ,
+ INV_LPA_2_5HZ,
+ INV_LPA_5HZ,
+ INV_LPA_10HZ,
+ INV_LPA_20HZ,
+ INV_LPA_40HZ,
+ INV_LPA_80HZ,
+ INV_LPA_160HZ,
+ INV_LPA_320HZ,
+ INV_LPA_640HZ
+#endif
+};
+
+#define BIT_I2C_MST_VDDIO (0x80)
+#define BIT_FIFO_EN (0x40)
+#define BIT_DMP_EN (0x80)
+#define BIT_FIFO_RST (0x04)
+#define BIT_DMP_RST (0x08)
+#define BIT_FIFO_OVERFLOW (0x10)
+#define BIT_DATA_RDY_EN (0x01)
+#define BIT_DMP_INT_EN (0x02)
+#define BIT_MOT_INT_EN (0x40)
+#define BITS_FSR (0x18)
+#define BITS_LPF (0x07)
+#define BITS_HPF (0x07)
+#define BITS_CLK (0x07)
+#define BIT_FIFO_SIZE_1024 (0x40)
+#define BIT_FIFO_SIZE_2048 (0x80)
+#define BIT_FIFO_SIZE_4096 (0xC0)
+#define BIT_RESET (0x80)
+#define BIT_SLEEP (0x40)
+#define BIT_S0_DELAY_EN (0x01)
+#define BIT_S2_DELAY_EN (0x04)
+#define BITS_SLAVE_LENGTH (0x0F)
+#define BIT_SLAVE_BYTE_SW (0x40)
+#define BIT_SLAVE_GROUP (0x10)
+#define BIT_SLAVE_EN (0x80)
+#define BIT_I2C_READ (0x80)
+#define BITS_I2C_MASTER_DLY (0x1F)
+#define BIT_AUX_IF_EN (0x20)
+#define BIT_ACTL (0x80)
+#define BIT_LATCH_EN (0x20)
+#define BIT_ANY_RD_CLR (0x10)
+#define BIT_BYPASS_EN (0x02)
+#define BITS_WOM_EN (0xC0)
+#define BIT_LPA_CYCLE (0x20)
+#define BIT_STBY_XA (0x20)
+#define BIT_STBY_YA (0x10)
+#define BIT_STBY_ZA (0x08)
+#define BIT_STBY_XG (0x04)
+#define BIT_STBY_YG (0x02)
+#define BIT_STBY_ZG (0x01)
+#define BIT_STBY_XYZA (BIT_STBY_XA | BIT_STBY_YA | BIT_STBY_ZA)
+#define BIT_STBY_XYZG (BIT_STBY_XG | BIT_STBY_YG | BIT_STBY_ZG)
+
+#if defined AK8975_SECONDARY
+#define SUPPORTS_AK89xx_HIGH_SENS (0x00)
+#define AK89xx_FSR (9830)
+#elif defined AK8963_SECONDARY
+#define SUPPORTS_AK89xx_HIGH_SENS (0x10)
+#define AK89xx_FSR (4915)
+#endif
+
+#ifdef AK89xx_SECONDARY
+#define AKM_REG_WHOAMI (0x00)
+
+#define AKM_REG_ST1 (0x02)
+#define AKM_REG_HXL (0x03)
+#define AKM_REG_ST2 (0x09)
+
+#define AKM_REG_CNTL (0x0A)
+#define AKM_REG_ASTC (0x0C)
+#define AKM_REG_ASAX (0x10)
+#define AKM_REG_ASAY (0x11)
+#define AKM_REG_ASAZ (0x12)
+
+#define AKM_DATA_READY (0x01)
+#define AKM_DATA_OVERRUN (0x02)
+#define AKM_OVERFLOW (0x80)
+#define AKM_DATA_ERROR (0x40)
+
+#define AKM_BIT_SELF_TEST (0x40)
+
+#define AKM_POWER_DOWN (0x00 | SUPPORTS_AK89xx_HIGH_SENS)
+#define AKM_SINGLE_MEASUREMENT (0x01 | SUPPORTS_AK89xx_HIGH_SENS)
+#define AKM_FUSE_ROM_ACCESS (0x0F | SUPPORTS_AK89xx_HIGH_SENS)
+#define AKM_MODE_SELF_TEST (0x08 | SUPPORTS_AK89xx_HIGH_SENS)
+
+#define AKM_WHOAMI (0x48)
+#endif
+
+#if defined MPU6050
+// const struct gyro_reg_s reg = {
+// .who_am_i = 0x75,
+// .rate_div = 0x19,
+// .lpf = 0x1A,
+// .prod_id = 0x0C,
+// .user_ctrl = 0x6A,
+// .fifo_en = 0x23,
+// .gyro_cfg = 0x1B,
+// .accel_cfg = 0x1C,
+// .motion_thr = 0x1F,
+// .motion_dur = 0x20,
+// .fifo_count_h = 0x72,
+// .fifo_r_w = 0x74,
+// .raw_gyro = 0x43,
+// .raw_accel = 0x3B,
+// .temp = 0x41,
+// .int_enable = 0x38,
+// .dmp_int_status = 0x39,
+// .int_status = 0x3A,
+// .pwr_mgmt_1 = 0x6B,
+// .pwr_mgmt_2 = 0x6C,
+// .int_pin_cfg = 0x37,
+// .mem_r_w = 0x6F,
+// .accel_offs = 0x06,
+// .i2c_mst = 0x24,
+// .bank_sel = 0x6D,
+// .mem_start_addr = 0x6E,
+// .prgm_start_h = 0x70
+// #ifdef AK89xx_SECONDARY
+// ,.raw_compass = 0x49,
+// .yg_offs_tc = 0x01,
+// .s0_addr = 0x25,
+// .s0_reg = 0x26,
+// .s0_ctrl = 0x27,
+// .s1_addr = 0x28,
+// .s1_reg = 0x29,
+// .s1_ctrl = 0x2A,
+// .s4_ctrl = 0x34,
+// .s0_do = 0x63,
+// .s1_do = 0x64,
+// .i2c_delay_ctrl = 0x67
+// #endif
+// };
+const struct gyro_reg_s reg = {
+ 0x75, // who_am_i
+ 0x19, // rate_div
+ 0x1A, // lpf
+ 0x0C, // prod_id
+ 0x6A, // user_ctrl
+ 0x23, // fifo_en
+ 0x1B, // gyro_cfg
+ 0x1C, // accel_cfg
+ 0x1F, // motion_thr
+ 0x20, // motion_dur
+ 0x72, // fifo_count_h
+ 0x74, // fifo_r_w
+ 0x43, // raw_gyro
+ 0x3B, // raw_accel
+ 0x41, // temp
+ 0x38, // int_enable
+ 0x39, // dmp_int_status
+ 0x3A, // int_status
+ 0x6B, // pwr_mgmt_1
+ 0x6C, // pwr_mgmt_2
+ 0x37, // int_pin_cfg
+ 0x6F, // mem_r_w
+ 0x06, // accel_offs
+ 0x24, // i2c_mst
+ 0x6D, // bank_sel
+ 0x6E, // mem_start_addr
+ 0x70 // prgm_start_h
+};
+
+// const struct hw_s hw = {
+// .addr = 0x68,
+// .max_fifo = 1024,
+// .num_reg = 118,
+// .temp_sens = 340,
+// .temp_offset = -521,
+// .bank_size = 256
+// #if defined AK89xx_SECONDARY
+// ,.compass_fsr = AK89xx_FSR
+// #endif
+// };
+const struct hw_s hw = {
+ 0x68, // addr
+ 1024, // max_fifo
+ 118, // num_reg
+ 340, // temp_sens
+ -521, // temp_offset
+ 256 // bank_size
+};
+
+// const struct test_s test = {
+// .gyro_sens = 32768/250,
+// .accel_sens = 32768/16,
+// .reg_rate_div = 0, /* 1kHz. */
+// .reg_lpf = 1, /* 188Hz. */
+// .reg_gyro_fsr = 0, /* 250dps. */
+// .reg_accel_fsr = 0x18, /* 16g. */
+// .wait_ms = 50,
+// .packet_thresh = 5, /* 5% */
+// .min_dps = 10.f,
+// .max_dps = 105.f,
+// .max_gyro_var = 0.14f,
+// .min_g = 0.3f,
+// .max_g = 0.95f,
+// .max_accel_var = 0.14f
+// };
+const struct test_s test = {
+ 32768 / 250, // gyro_sens
+ 32768 / 16, // accel_sens
+ 0, // reg_rate_div
+ 1, // reg_lpf
+ 0, // reg_gyro_fsr
+ 0x18, // reg_accel_fsr
+ 50, // wait_ms
+ 5, // packet_thresh
+ 10.0f, // min_dps
+ 105.0f, // max_dps
+ 0.14f, // max_gyro_var
+ 0.3f, // min_g
+ 0.95f, // max_g
+ 0.14f // max_accel_var
+};
+
+// static struct gyro_state_s st = {
+// .reg = ®,
+// .hw = &hw,
+// .test = &test
+// };
+static struct gyro_state_s st = {
+ ®,
+ &hw,
+ {0},
+ &test};
+
+#elif defined MPU6500
+const struct gyro_reg_s reg = {
+ .who_am_i = 0x75,
+ .rate_div = 0x19,
+ .lpf = 0x1A,
+ .prod_id = 0x0C,
+ .user_ctrl = 0x6A,
+ .fifo_en = 0x23,
+ .gyro_cfg = 0x1B,
+ .accel_cfg = 0x1C,
+ .accel_cfg2 = 0x1D,
+ .lp_accel_odr = 0x1E,
+ .motion_thr = 0x1F,
+ .motion_dur = 0x20,
+ .fifo_count_h = 0x72,
+ .fifo_r_w = 0x74,
+ .raw_gyro = 0x43,
+ .raw_accel = 0x3B,
+ .temp = 0x41,
+ .int_enable = 0x38,
+ .dmp_int_status = 0x39,
+ .int_status = 0x3A,
+ .accel_intel = 0x69,
+ .pwr_mgmt_1 = 0x6B,
+ .pwr_mgmt_2 = 0x6C,
+ .int_pin_cfg = 0x37,
+ .mem_r_w = 0x6F,
+ .accel_offs = 0x77,
+ .i2c_mst = 0x24,
+ .bank_sel = 0x6D,
+ .mem_start_addr = 0x6E,
+ .prgm_start_h = 0x70
+#ifdef AK89xx_SECONDARY
+ ,
+ .raw_compass = 0x49,
+ .s0_addr = 0x25,
+ .s0_reg = 0x26,
+ .s0_ctrl = 0x27,
+ .s1_addr = 0x28,
+ .s1_reg = 0x29,
+ .s1_ctrl = 0x2A,
+ .s4_ctrl = 0x34,
+ .s0_do = 0x63,
+ .s1_do = 0x64,
+ .i2c_delay_ctrl = 0x67
+#endif
+};
+const struct hw_s hw = {
+ .addr = 0x68,
+ .max_fifo = 1024,
+ .num_reg = 128,
+ .temp_sens = 321,
+ .temp_offset = 0,
+ .bank_size = 256
+#if defined AK89xx_SECONDARY
+ ,
+ .compass_fsr = AK89xx_FSR
+#endif
+};
+
+const struct test_s test = {
+ .gyro_sens = 32768 / 250,
+ .accel_sens = 32768 / 16,
+ .reg_rate_div = 0, /* 1kHz. */
+ .reg_lpf = 1, /* 188Hz. */
+ .reg_gyro_fsr = 0, /* 250dps. */
+ .reg_accel_fsr = 0x18, /* 16g. */
+ .wait_ms = 50,
+ .packet_thresh = 5, /* 5% */
+ .min_dps = 10.f,
+ .max_dps = 105.f,
+ .max_gyro_var = 0.14f,
+ .min_g = 0.3f,
+ .max_g = 0.95f,
+ .max_accel_var = 0.14f};
+
+static struct gyro_state_s st = {
+ .reg = ®,
+ .hw = &hw,
+ .test = &test};
+#endif
+
+#define MAX_PACKET_LENGTH (12)
+
+#ifdef AK89xx_SECONDARY
+static int setup_compass(void);
+#define MAX_COMPASS_SAMPLE_RATE (100)
+#endif
+
+/**
+ * @brief Enable/disable data ready interrupt.
+ * If the DMP is on, the DMP interrupt is enabled. Otherwise, the data ready
+ * interrupt is used.
+ * @param[in] enable 1 to enable interrupt.
+ * @return 0 if successful.
+ */
+static int set_int_enable(unsigned char enable)
+{
+ unsigned char tmp;
+
+ if (st.chip_cfg.dmp_on)
+ {
+ if (enable)
+ tmp = BIT_DMP_INT_EN;
+ else
+ tmp = 0x00;
+ if (i2c_write(st.hw->addr, st.reg->int_enable, 1, &tmp))
+ return -1;
+ st.chip_cfg.int_enable = tmp;
+ }
+ else
+ {
+ if (!st.chip_cfg.sensors)
+ return -1;
+ if (enable && st.chip_cfg.int_enable)
+ return 0;
+ if (enable)
+ tmp = BIT_DATA_RDY_EN;
+ else
+ tmp = 0x00;
+ if (i2c_write(st.hw->addr, st.reg->int_enable, 1, &tmp))
+ return -1;
+ st.chip_cfg.int_enable = tmp;
+ }
+ return 0;
+}
+
+/**
+ * @brief Register dump for testing.
+ * @return 0 if successful.
+ */
+int mpu_reg_dump(void)
+{
+ unsigned char ii;
+ unsigned char data;
+
+ for (ii = 0; ii < st.hw->num_reg; ii++)
+ {
+ if (ii == st.reg->fifo_r_w || ii == st.reg->mem_r_w)
+ continue;
+ if (i2c_read(st.hw->addr, ii, 1, &data))
+ return -1;
+ log_i("%#5x: %#5x\r\n", ii, data);
+ }
+ return 0;
+}
+
+/**
+ * @brief Read from a single register.
+ * NOTE: The memory and FIFO read/write registers cannot be accessed.
+ * @param[in] reg Register address.
+ * @param[out] data Register data.
+ * @return 0 if successful.
+ */
+int mpu_read_reg(unsigned char reg, unsigned char *data)
+{
+ if (reg == st.reg->fifo_r_w || reg == st.reg->mem_r_w)
+ return -1;
+ if (reg >= st.hw->num_reg)
+ return -1;
+ return i2c_read(st.hw->addr, reg, 1, data);
+}
+
+/**
+ * @brief Initialize hardware.
+ * Initial configuration:\n
+ * Gyro FSR: +/- 2000DPS\n
+ * Accel FSR +/- 2G\n
+ * DLPF: 42Hz\n
+ * FIFO rate: 50Hz\n
+ * Clock source: Gyro PLL\n
+ * FIFO: Disabled.\n
+ * Data ready interrupt: Disabled, active low, unlatched.
+ * @param[in] int_param Platform-specific parameters to interrupt API.
+ * @return 0 if successful.
+ */
+int mpu_init(void)
+{
+ unsigned char data[6], rev;
+
+ /* Reset device. */
+ data[0] = BIT_RESET;
+ if (i2c_write(st.hw->addr, st.reg->pwr_mgmt_1, 1, data))
+ return -1;
+ HAL_Delay(100);
+
+ /* Wake up chip. */
+ data[0] = 0x00;
+ if (i2c_write(st.hw->addr, st.reg->pwr_mgmt_1, 1, data))
+ return -1;
+
+#if defined MPU6050
+ /* Check product revision. */
+ if (i2c_read(st.hw->addr, st.reg->accel_offs, 6, data))
+ return -1;
+ rev = ((data[5] & 0x01) << 2) | ((data[3] & 0x01) << 1) |
+ (data[1] & 0x01);
+
+ if (rev)
+ {
+ /* Congrats, these parts are better. */
+ if (rev == 1)
+ st.chip_cfg.accel_half = 1;
+ else if (rev == 2)
+ st.chip_cfg.accel_half = 0;
+ else
+ {
+ log_e("Unsupported software product rev %d.\n", rev);
+ return -1;
+ }
+ }
+ else
+ {
+ if (i2c_read(st.hw->addr, st.reg->prod_id, 1, data))
+ return -1;
+ rev = data[0] & 0x0F;
+ if (!rev)
+ {
+ log_e("Product ID read as 0 indicates device is either "
+ "incompatible or an MPU3050.\n");
+ return -1;
+ }
+ else if (rev == 4)
+ {
+ log_i("Half sensitivity part found.\n");
+ st.chip_cfg.accel_half = 1;
+ }
+ else
+ st.chip_cfg.accel_half = 0;
+ }
+#elif defined MPU6500
+#define MPU6500_MEM_REV_ADDR (0x17)
+ if (mpu_read_mem(MPU6500_MEM_REV_ADDR, 1, &rev))
+ return -1;
+ if (rev == 0x1)
+ st.chip_cfg.accel_half = 0;
+ else
+ {
+ log_e("Unsupported software product rev %d.\n", rev);
+ return -1;
+ }
+
+ /* MPU6500 shares 4kB of memory between the DMP and the FIFO. Since the
+ * first 3kB are needed by the DMP, we'll use the last 1kB for the FIFO.
+ */
+ data[0] = BIT_FIFO_SIZE_1024 | 0x8;
+ if (i2c_write(st.hw->addr, st.reg->accel_cfg2, 1, data))
+ return -1;
+#endif
+
+ /* Set to invalid values to ensure no I2C writes are skipped. */
+ st.chip_cfg.sensors = 0xFF;
+ st.chip_cfg.gyro_fsr = 0xFF;
+ st.chip_cfg.accel_fsr = 0xFF;
+ st.chip_cfg.lpf = 0xFF;
+ st.chip_cfg.sample_rate = 0xFFFF;
+ st.chip_cfg.fifo_enable = 0xFF;
+ st.chip_cfg.bypass_mode = 0xFF;
+#ifdef AK89xx_SECONDARY
+ st.chip_cfg.compass_sample_rate = 0xFFFF;
+#endif
+ /* mpu_set_sensors always preserves this setting. */
+ st.chip_cfg.clk_src = INV_CLK_PLL;
+ /* Handled in next call to mpu_set_bypass. */
+ st.chip_cfg.active_low_int = 1;
+ st.chip_cfg.latched_int = 0;
+ st.chip_cfg.int_motion_only = 0;
+ st.chip_cfg.lp_accel_mode = 0;
+ memset(&st.chip_cfg.cache, 0, sizeof(st.chip_cfg.cache));
+ st.chip_cfg.dmp_on = 0;
+ st.chip_cfg.dmp_loaded = 0;
+ st.chip_cfg.dmp_sample_rate = 0;
+
+ if (mpu_set_gyro_fsr(2000))
+ return -1;
+ if (mpu_set_accel_fsr(2))
+ return -1;
+ if (mpu_set_lpf(42))
+ return -1;
+ if (mpu_set_sample_rate(50))
+ return -1;
+ if (mpu_configure_fifo(0))
+ return -1;
+
+ // if (int_param)
+ // reg_int_cb(int_param);
+
+#ifdef AK89xx_SECONDARY
+ setup_compass();
+ if (mpu_set_compass_sample_rate(10))
+ return -1;
+#else
+ /* Already disabled by setup_compass. */
+ if (mpu_set_bypass(0))
+ return -1;
+#endif
+
+ mpu_set_sensors(0);
+ return 0;
+}
+
+/**
+ * @brief Enter low-power accel-only mode.
+ * In low-power accel mode, the chip goes to sleep and only wakes up to sample
+ * the accelerometer at one of the following frequencies:
+ * \n MPU6050: 1.25Hz, 5Hz, 20Hz, 40Hz
+ * \n MPU6500: 1.25Hz, 2.5Hz, 5Hz, 10Hz, 20Hz, 40Hz, 80Hz, 160Hz, 320Hz, 640Hz
+ * \n If the requested rate is not one listed above, the device will be set to
+ * the next highest rate. Requesting a rate above the maximum supported
+ * frequency will result in an error.
+ * \n To select a fractional wake-up frequency, round down the value passed to
+ * @e rate.
+ * @param[in] rate Minimum sampling rate, or zero to disable LP
+ * accel mode.
+ * @return 0 if successful.
+ */
+int mpu_lp_accel_mode(unsigned char rate)
+{
+ unsigned char tmp[2];
+
+ if (rate > 40)
+ return -1;
+
+ if (!rate)
+ {
+ mpu_set_int_latched(0);
+ tmp[0] = 0;
+ tmp[1] = BIT_STBY_XYZG;
+ if (i2c_write(st.hw->addr, st.reg->pwr_mgmt_1, 2, tmp))
+ return -1;
+ st.chip_cfg.lp_accel_mode = 0;
+ return 0;
+ }
+ /* For LP accel, we automatically configure the hardware to produce latched
+ * interrupts. In LP accel mode, the hardware cycles into sleep mode before
+ * it gets a chance to deassert the interrupt pin; therefore, we shift this
+ * responsibility over to the MCU.
+ *
+ * Any register read will clear the interrupt.
+ */
+ mpu_set_int_latched(1);
+#if defined MPU6050
+ tmp[0] = BIT_LPA_CYCLE;
+ if (rate == 1)
+ {
+ tmp[1] = INV_LPA_1_25HZ;
+ mpu_set_lpf(5);
+ }
+ else if (rate <= 5)
+ {
+ tmp[1] = INV_LPA_5HZ;
+ mpu_set_lpf(5);
+ }
+ else if (rate <= 20)
+ {
+ tmp[1] = INV_LPA_20HZ;
+ mpu_set_lpf(10);
+ }
+ else
+ {
+ tmp[1] = INV_LPA_40HZ;
+ mpu_set_lpf(20);
+ }
+ tmp[1] = (tmp[1] << 6) | BIT_STBY_XYZG;
+ if (i2c_write(st.hw->addr, st.reg->pwr_mgmt_1, 2, tmp))
+ return -1;
+#elif defined MPU6500
+ /* Set wake frequency. */
+ if (rate == 1)
+ tmp[0] = INV_LPA_1_25HZ;
+ else if (rate == 2)
+ tmp[0] = INV_LPA_2_5HZ;
+ else if (rate <= 5)
+ tmp[0] = INV_LPA_5HZ;
+ else if (rate <= 10)
+ tmp[0] = INV_LPA_10HZ;
+ else if (rate <= 20)
+ tmp[0] = INV_LPA_20HZ;
+ else if (rate <= 40)
+ tmp[0] = INV_LPA_40HZ;
+ else if (rate <= 80)
+ tmp[0] = INV_LPA_80HZ;
+ else if (rate <= 160)
+ tmp[0] = INV_LPA_160HZ;
+ else if (rate <= 320)
+ tmp[0] = INV_LPA_320HZ;
+ else
+ tmp[0] = INV_LPA_640HZ;
+ if (i2c_write(st.hw->addr, st.reg->lp_accel_odr, 1, tmp))
+ return -1;
+ tmp[0] = BIT_LPA_CYCLE;
+ if (i2c_write(st.hw->addr, st.reg->pwr_mgmt_1, 1, tmp))
+ return -1;
+#endif
+ st.chip_cfg.sensors = INV_XYZ_ACCEL;
+ st.chip_cfg.clk_src = 0;
+ st.chip_cfg.lp_accel_mode = 1;
+ mpu_configure_fifo(0);
+
+ return 0;
+}
+
+/**
+ * @brief Read raw gyro data directly from the registers.
+ * @param[out] data Raw data in hardware units.
+ * @param[out] timestamp Timestamp in milliseconds. Null if not needed.
+ * @return 0 if successful.
+ */
+int mpu_get_gyro_reg(short *data, unsigned long *timestamp)
+{
+ unsigned char tmp[6];
+
+ if (!(st.chip_cfg.sensors & INV_XYZ_GYRO))
+ return -1;
+
+ if (i2c_read(st.hw->addr, st.reg->raw_gyro, 6, tmp))
+ return -1;
+ data[0] = (tmp[0] << 8) | tmp[1];
+ data[1] = (tmp[2] << 8) | tmp[3];
+ data[2] = (tmp[4] << 8) | tmp[5];
+ if (timestamp)
+ get_ms(timestamp);
+ return 0;
+}
+
+/**
+ * @brief Read raw accel data directly from the registers.
+ * @param[out] data Raw data in hardware units.
+ * @param[out] timestamp Timestamp in milliseconds. Null if not needed.
+ * @return 0 if successful.
+ */
+int mpu_get_accel_reg(short *data, unsigned long *timestamp)
+{
+ unsigned char tmp[6];
+
+ if (!(st.chip_cfg.sensors & INV_XYZ_ACCEL))
+ return -1;
+
+ if (i2c_read(st.hw->addr, st.reg->raw_accel, 6, tmp))
+ return -1;
+ data[0] = (tmp[0] << 8) | tmp[1];
+ data[1] = (tmp[2] << 8) | tmp[3];
+ data[2] = (tmp[4] << 8) | tmp[5];
+ if (timestamp)
+ get_ms(timestamp);
+ return 0;
+}
+
+/**
+ * @brief Read temperature data directly from the registers.
+ * @param[out] data Data in q16 format.
+ * @param[out] timestamp Timestamp in milliseconds. Null if not needed.
+ * @return 0 if successful.
+ */
+int mpu_get_temperature(long *data, unsigned long *timestamp)
+{
+ unsigned char tmp[2];
+ short raw;
+
+ if (!(st.chip_cfg.sensors))
+ return -1;
+
+ if (i2c_read(st.hw->addr, st.reg->temp, 2, tmp))
+ return -1;
+ raw = (tmp[0] << 8) | tmp[1];
+ if (timestamp)
+ get_ms(timestamp);
+
+ data[0] = (long)((35 + ((raw - (float)st.hw->temp_offset) / st.hw->temp_sens)) * 65536L);
+ return 0;
+}
+
+/**
+ * @brief Push biases to the accel bias registers.
+ * This function expects biases relative to the current sensor output, and
+ * these biases will be added to the factory-supplied values.
+ * @param[in] accel_bias New biases.
+ * @return 0 if successful.
+ */
+int mpu_set_accel_bias(const long *accel_bias)
+{
+ unsigned char data[6];
+ short accel_hw[3];
+ short got_accel[3];
+ short fg[3];
+
+ if (!accel_bias)
+ return -1;
+ if (!accel_bias[0] && !accel_bias[1] && !accel_bias[2])
+ return 0;
+
+ if (i2c_read(st.hw->addr, 3, 3, data))
+ return -1;
+ fg[0] = ((data[0] >> 4) + 8) & 0xf;
+ fg[1] = ((data[1] >> 4) + 8) & 0xf;
+ fg[2] = ((data[2] >> 4) + 8) & 0xf;
+
+ accel_hw[0] = (short)(accel_bias[0] * 2 / (64 + fg[0]));
+ accel_hw[1] = (short)(accel_bias[1] * 2 / (64 + fg[1]));
+ accel_hw[2] = (short)(accel_bias[2] * 2 / (64 + fg[2]));
+
+ if (i2c_read(st.hw->addr, 0x06, 6, data))
+ return -1;
+
+ got_accel[0] = ((short)data[0] << 8) | data[1];
+ got_accel[1] = ((short)data[2] << 8) | data[3];
+ got_accel[2] = ((short)data[4] << 8) | data[5];
+
+ accel_hw[0] += got_accel[0];
+ accel_hw[1] += got_accel[1];
+ accel_hw[2] += got_accel[2];
+
+ data[0] = (accel_hw[0] >> 8) & 0xff;
+ data[1] = (accel_hw[0]) & 0xff;
+ data[2] = (accel_hw[1] >> 8) & 0xff;
+ data[3] = (accel_hw[1]) & 0xff;
+ data[4] = (accel_hw[2] >> 8) & 0xff;
+ data[5] = (accel_hw[2]) & 0xff;
+
+ if (i2c_write(st.hw->addr, 0x06, 6, data))
+ return -1;
+ return 0;
+}
+
+/**
+ * @brief Reset FIFO read/write pointers.
+ * @return 0 if successful.
+ */
+int mpu_reset_fifo(void)
+{
+ unsigned char data;
+
+ if (!(st.chip_cfg.sensors))
+ return -1;
+
+ data = 0;
+ if (i2c_write(st.hw->addr, st.reg->int_enable, 1, &data))
+ return -1;
+ if (i2c_write(st.hw->addr, st.reg->fifo_en, 1, &data))
+ return -1;
+ if (i2c_write(st.hw->addr, st.reg->user_ctrl, 1, &data))
+ return -1;
+
+ if (st.chip_cfg.dmp_on)
+ {
+ data = BIT_FIFO_RST | BIT_DMP_RST;
+ if (i2c_write(st.hw->addr, st.reg->user_ctrl, 1, &data))
+ return -1;
+ HAL_Delay(50);
+ data = BIT_DMP_EN | BIT_FIFO_EN;
+ if (st.chip_cfg.sensors & INV_XYZ_COMPASS)
+ data |= BIT_AUX_IF_EN;
+ if (i2c_write(st.hw->addr, st.reg->user_ctrl, 1, &data))
+ return -1;
+ if (st.chip_cfg.int_enable)
+ data = BIT_DMP_INT_EN;
+ else
+ data = 0;
+ if (i2c_write(st.hw->addr, st.reg->int_enable, 1, &data))
+ return -1;
+ data = 0;
+ if (i2c_write(st.hw->addr, st.reg->fifo_en, 1, &data))
+ return -1;
+ }
+ else
+ {
+ data = BIT_FIFO_RST;
+ if (i2c_write(st.hw->addr, st.reg->user_ctrl, 1, &data))
+ return -1;
+ if (st.chip_cfg.bypass_mode || !(st.chip_cfg.sensors & INV_XYZ_COMPASS))
+ data = BIT_FIFO_EN;
+ else
+ data = BIT_FIFO_EN | BIT_AUX_IF_EN;
+ if (i2c_write(st.hw->addr, st.reg->user_ctrl, 1, &data))
+ return -1;
+ HAL_Delay(50);
+ if (st.chip_cfg.int_enable)
+ data = BIT_DATA_RDY_EN;
+ else
+ data = 0;
+ if (i2c_write(st.hw->addr, st.reg->int_enable, 1, &data))
+ return -1;
+ if (i2c_write(st.hw->addr, st.reg->fifo_en, 1, &st.chip_cfg.fifo_enable))
+ return -1;
+ }
+ return 0;
+}
+
+/**
+ * @brief Get the gyro full-scale range.
+ * @param[out] fsr Current full-scale range.
+ * @return 0 if successful.
+ */
+int mpu_get_gyro_fsr(unsigned short *fsr)
+{
+ switch (st.chip_cfg.gyro_fsr)
+ {
+ case INV_FSR_250DPS:
+ fsr[0] = 250;
+ break;
+ case INV_FSR_500DPS:
+ fsr[0] = 500;
+ break;
+ case INV_FSR_1000DPS:
+ fsr[0] = 1000;
+ break;
+ case INV_FSR_2000DPS:
+ fsr[0] = 2000;
+ break;
+ default:
+ fsr[0] = 0;
+ break;
+ }
+ return 0;
+}
+
+/**
+ * @brief Set the gyro full-scale range.
+ * @param[in] fsr Desired full-scale range.
+ * @return 0 if successful.
+ */
+int mpu_set_gyro_fsr(unsigned short fsr)
+{
+ unsigned char data;
+
+ if (!(st.chip_cfg.sensors))
+ return -1;
+
+ switch (fsr)
+ {
+ case 250:
+ data = INV_FSR_250DPS << 3;
+ break;
+ case 500:
+ data = INV_FSR_500DPS << 3;
+ break;
+ case 1000:
+ data = INV_FSR_1000DPS << 3;
+ break;
+ case 2000:
+ data = INV_FSR_2000DPS << 3;
+ break;
+ default:
+ return -1;
+ }
+
+ if (st.chip_cfg.gyro_fsr == (data >> 3))
+ return 0;
+ if (i2c_write(st.hw->addr, st.reg->gyro_cfg, 1, &data))
+ return -1;
+ st.chip_cfg.gyro_fsr = data >> 3;
+ return 0;
+}
+
+/**
+ * @brief Get the accel full-scale range.
+ * @param[out] fsr Current full-scale range.
+ * @return 0 if successful.
+ */
+int mpu_get_accel_fsr(unsigned char *fsr)
+{
+ switch (st.chip_cfg.accel_fsr)
+ {
+ case INV_FSR_2G:
+ fsr[0] = 2;
+ break;
+ case INV_FSR_4G:
+ fsr[0] = 4;
+ break;
+ case INV_FSR_8G:
+ fsr[0] = 8;
+ break;
+ case INV_FSR_16G:
+ fsr[0] = 16;
+ break;
+ default:
+ return -1;
+ }
+ if (st.chip_cfg.accel_half)
+ fsr[0] <<= 1;
+ return 0;
+}
+
+/**
+ * @brief Set the accel full-scale range.
+ * @param[in] fsr Desired full-scale range.
+ * @return 0 if successful.
+ */
+int mpu_set_accel_fsr(unsigned char fsr)
+{
+ unsigned char data;
+
+ if (!(st.chip_cfg.sensors))
+ return -1;
+
+ switch (fsr)
+ {
+ case 2:
+ data = INV_FSR_2G << 3;
+ break;
+ case 4:
+ data = INV_FSR_4G << 3;
+ break;
+ case 8:
+ data = INV_FSR_8G << 3;
+ break;
+ case 16:
+ data = INV_FSR_16G << 3;
+ break;
+ default:
+ return -1;
+ }
+
+ if (st.chip_cfg.accel_fsr == (data >> 3))
+ return 0;
+ if (i2c_write(st.hw->addr, st.reg->accel_cfg, 1, &data))
+ return -1;
+ st.chip_cfg.accel_fsr = data >> 3;
+ return 0;
+}
+
+/**
+ * @brief Get the current DLPF setting.
+ * @param[out] lpf Current LPF setting.
+ * 0 if successful.
+ */
+int mpu_get_lpf(unsigned short *lpf)
+{
+ switch (st.chip_cfg.lpf)
+ {
+ case INV_FILTER_188HZ:
+ lpf[0] = 188;
+ break;
+ case INV_FILTER_98HZ:
+ lpf[0] = 98;
+ break;
+ case INV_FILTER_42HZ:
+ lpf[0] = 42;
+ break;
+ case INV_FILTER_20HZ:
+ lpf[0] = 20;
+ break;
+ case INV_FILTER_10HZ:
+ lpf[0] = 10;
+ break;
+ case INV_FILTER_5HZ:
+ lpf[0] = 5;
+ break;
+ case INV_FILTER_256HZ_NOLPF2:
+ case INV_FILTER_2100HZ_NOLPF:
+ default:
+ lpf[0] = 0;
+ break;
+ }
+ return 0;
+}
+
+/**
+ * @brief Set digital low pass filter.
+ * The following LPF settings are supported: 188, 98, 42, 20, 10, 5.
+ * @param[in] lpf Desired LPF setting.
+ * @return 0 if successful.
+ */
+int mpu_set_lpf(unsigned short lpf)
+{
+ unsigned char data;
+
+ if (!(st.chip_cfg.sensors))
+ return -1;
+
+ if (lpf >= 188)
+ data = INV_FILTER_188HZ;
+ else if (lpf >= 98)
+ data = INV_FILTER_98HZ;
+ else if (lpf >= 42)
+ data = INV_FILTER_42HZ;
+ else if (lpf >= 20)
+ data = INV_FILTER_20HZ;
+ else if (lpf >= 10)
+ data = INV_FILTER_10HZ;
+ else
+ data = INV_FILTER_5HZ;
+
+ if (st.chip_cfg.lpf == data)
+ return 0;
+ if (i2c_write(st.hw->addr, st.reg->lpf, 1, &data))
+ return -1;
+ st.chip_cfg.lpf = data;
+ return 0;
+}
+
+/**
+ * @brief Get sampling rate.
+ * @param[out] rate Current sampling rate (Hz).
+ * @return 0 if successful.
+ */
+int mpu_get_sample_rate(unsigned short *rate)
+{
+ if (st.chip_cfg.dmp_on)
+ return -1;
+ else
+ rate[0] = st.chip_cfg.sample_rate;
+ return 0;
+}
+
+/**
+ * @brief Set sampling rate.
+ * Sampling rate must be between 4Hz and 1kHz.
+ * @param[in] rate Desired sampling rate (Hz).
+ * @return 0 if successful.
+ */
+int mpu_set_sample_rate(unsigned short rate)
+{
+ unsigned char data;
+
+ if (!(st.chip_cfg.sensors))
+ return -1;
+
+ if (st.chip_cfg.dmp_on)
+ return -1;
+ else
+ {
+ if (st.chip_cfg.lp_accel_mode)
+ {
+ if (rate && (rate <= 40))
+ {
+ /* Just stay in low-power accel mode. */
+ mpu_lp_accel_mode(rate);
+ return 0;
+ }
+ /* Requested rate exceeds the allowed frequencies in LP accel mode,
+ * switch back to full-power mode.
+ */
+ mpu_lp_accel_mode(0);
+ }
+ if (rate < 4)
+ rate = 4;
+ else if (rate > 1000)
+ rate = 1000;
+
+ data = 1000 / rate - 1;
+ if (i2c_write(st.hw->addr, st.reg->rate_div, 1, &data))
+ return -1;
+
+ st.chip_cfg.sample_rate = 1000 / (1 + data);
+
+#ifdef AK89xx_SECONDARY
+ mpu_set_compass_sample_rate(min(st.chip_cfg.compass_sample_rate, MAX_COMPASS_SAMPLE_RATE));
+#endif
+
+ /* Automatically set LPF to 1/2 sampling rate. */
+ mpu_set_lpf(st.chip_cfg.sample_rate >> 1);
+ return 0;
+ }
+}
+
+/**
+ * @brief Get compass sampling rate.
+ * @param[out] rate Current compass sampling rate (Hz).
+ * @return 0 if successful.
+ */
+int mpu_get_compass_sample_rate(unsigned short *rate)
+{
+#ifdef AK89xx_SECONDARY
+ rate[0] = st.chip_cfg.compass_sample_rate;
+ return 0;
+#else
+ rate[0] = 0;
+ return -1;
+#endif
+}
+
+/**
+ * @brief Set compass sampling rate.
+ * The compass on the auxiliary I2C bus is read by the MPU hardware at a
+ * maximum of 100Hz. The actual rate can be set to a fraction of the gyro
+ * sampling rate.
+ *
+ * \n WARNING: The new rate may be different than what was requested. Call
+ * mpu_get_compass_sample_rate to check the actual setting.
+ * @param[in] rate Desired compass sampling rate (Hz).
+ * @return 0 if successful.
+ */
+int mpu_set_compass_sample_rate(unsigned short rate)
+{
+#ifdef AK89xx_SECONDARY
+ unsigned char div;
+ if (!rate || rate > st.chip_cfg.sample_rate || rate > MAX_COMPASS_SAMPLE_RATE)
+ return -1;
+
+ div = st.chip_cfg.sample_rate / rate - 1;
+ if (i2c_write(st.hw->addr, st.reg->s4_ctrl, 1, &div))
+ return -1;
+ st.chip_cfg.compass_sample_rate = st.chip_cfg.sample_rate / (div + 1);
+ return 0;
+#else
+ return -1;
+#endif
+}
+
+/**
+ * @brief Get gyro sensitivity scale factor.
+ * @param[out] sens Conversion from hardware units to dps.
+ * @return 0 if successful.
+ */
+int mpu_get_gyro_sens(float *sens)
+{
+ switch (st.chip_cfg.gyro_fsr)
+ {
+ case INV_FSR_250DPS:
+ sens[0] = 131.f;
+ break;
+ case INV_FSR_500DPS:
+ sens[0] = 65.5f;
+ break;
+ case INV_FSR_1000DPS:
+ sens[0] = 32.8f;
+ break;
+ case INV_FSR_2000DPS:
+ sens[0] = 16.4f;
+ break;
+ default:
+ return -1;
+ }
+ return 0;
+}
+
+/**
+ * @brief Get accel sensitivity scale factor.
+ * @param[out] sens Conversion from hardware units to g's.
+ * @return 0 if successful.
+ */
+int mpu_get_accel_sens(unsigned short *sens)
+{
+ switch (st.chip_cfg.accel_fsr)
+ {
+ case INV_FSR_2G:
+ sens[0] = 16384;
+ break;
+ case INV_FSR_4G:
+ sens[0] = 8092;
+ break;
+ case INV_FSR_8G:
+ sens[0] = 4096;
+ break;
+ case INV_FSR_16G:
+ sens[0] = 2048;
+ break;
+ default:
+ return -1;
+ }
+ if (st.chip_cfg.accel_half)
+ sens[0] >>= 1;
+ return 0;
+}
+
+/**
+ * @brief Get current FIFO configuration.
+ * @e sensors can contain a combination of the following flags:
+ * \n INV_X_GYRO, INV_Y_GYRO, INV_Z_GYRO
+ * \n INV_XYZ_GYRO
+ * \n INV_XYZ_ACCEL
+ * @param[out] sensors Mask of sensors in FIFO.
+ * @return 0 if successful.
+ */
+int mpu_get_fifo_config(unsigned char *sensors)
+{
+ sensors[0] = st.chip_cfg.fifo_enable;
+ return 0;
+}
+
+/**
+ * @brief Select which sensors are pushed to FIFO.
+ * @e sensors can contain a combination of the following flags:
+ * \n INV_X_GYRO, INV_Y_GYRO, INV_Z_GYRO
+ * \n INV_XYZ_GYRO
+ * \n INV_XYZ_ACCEL
+ * @param[in] sensors Mask of sensors to push to FIFO.
+ * @return 0 if successful.
+ */
+int mpu_configure_fifo(unsigned char sensors)
+{
+ unsigned char prev;
+ int result = 0;
+
+ /* Compass data isn't going into the FIFO. Stop trying. */
+ sensors &= ~INV_XYZ_COMPASS;
+
+ if (st.chip_cfg.dmp_on)
+ return 0;
+ else
+ {
+ if (!(st.chip_cfg.sensors))
+ return -1;
+ prev = st.chip_cfg.fifo_enable;
+ st.chip_cfg.fifo_enable = sensors & st.chip_cfg.sensors;
+ if (st.chip_cfg.fifo_enable != sensors)
+ /* You're not getting what you asked for. Some sensors are
+ * asleep.
+ */
+ result = -1;
+ else
+ result = 0;
+ if (sensors || st.chip_cfg.lp_accel_mode)
+ set_int_enable(1);
+ else
+ set_int_enable(0);
+ if (sensors)
+ {
+ if (mpu_reset_fifo())
+ {
+ st.chip_cfg.fifo_enable = prev;
+ return -1;
+ }
+ }
+ }
+
+ return result;
+}
+
+/**
+ * @brief Get current power state.
+ * @param[in] power_on 1 if turned on, 0 if suspended.
+ * @return 0 if successful.
+ */
+int mpu_get_power_state(unsigned char *power_on)
+{
+ if (st.chip_cfg.sensors)
+ power_on[0] = 1;
+ else
+ power_on[0] = 0;
+ return 0;
+}
+
+/**
+ * @brief Turn specific sensors on/off.
+ * @e sensors can contain a combination of the following flags:
+ * \n INV_X_GYRO, INV_Y_GYRO, INV_Z_GYRO
+ * \n INV_XYZ_GYRO
+ * \n INV_XYZ_ACCEL
+ * \n INV_XYZ_COMPASS
+ * @param[in] sensors Mask of sensors to wake.
+ * @return 0 if successful.
+ */
+int mpu_set_sensors(unsigned char sensors)
+{
+ unsigned char data;
+#ifdef AK89xx_SECONDARY
+ unsigned char user_ctrl;
+#endif
+
+ if (sensors & INV_XYZ_GYRO)
+ data = INV_CLK_PLL;
+ else if (sensors)
+ data = 0;
+ else
+ data = BIT_SLEEP;
+ if (i2c_write(st.hw->addr, st.reg->pwr_mgmt_1, 1, &data))
+ {
+ st.chip_cfg.sensors = 0;
+ return -1;
+ }
+ st.chip_cfg.clk_src = data & ~BIT_SLEEP;
+
+ data = 0;
+ if (!(sensors & INV_X_GYRO))
+ data |= BIT_STBY_XG;
+ if (!(sensors & INV_Y_GYRO))
+ data |= BIT_STBY_YG;
+ if (!(sensors & INV_Z_GYRO))
+ data |= BIT_STBY_ZG;
+ if (!(sensors & INV_XYZ_ACCEL))
+ data |= BIT_STBY_XYZA;
+ if (i2c_write(st.hw->addr, st.reg->pwr_mgmt_2, 1, &data))
+ {
+ st.chip_cfg.sensors = 0;
+ return -1;
+ }
+
+ if (sensors && (sensors != INV_XYZ_ACCEL))
+ /* Latched interrupts only used in LP accel mode. */
+ mpu_set_int_latched(0);
+
+#ifdef AK89xx_SECONDARY
+#ifdef AK89xx_BYPASS
+ if (sensors & INV_XYZ_COMPASS)
+ mpu_set_bypass(1);
+ else
+ mpu_set_bypass(0);
+#else
+ if (i2c_read(st.hw->addr, st.reg->user_ctrl, 1, &user_ctrl))
+ return -1;
+ /* Handle AKM power management. */
+ if (sensors & INV_XYZ_COMPASS)
+ {
+ data = AKM_SINGLE_MEASUREMENT;
+ user_ctrl |= BIT_AUX_IF_EN;
+ }
+ else
+ {
+ data = AKM_POWER_DOWN;
+ user_ctrl &= ~BIT_AUX_IF_EN;
+ }
+ if (st.chip_cfg.dmp_on)
+ user_ctrl |= BIT_DMP_EN;
+ else
+ user_ctrl &= ~BIT_DMP_EN;
+ if (i2c_write(st.hw->addr, st.reg->s1_do, 1, &data))
+ return -1;
+ /* Enable/disable I2C master mode. */
+ if (i2c_write(st.hw->addr, st.reg->user_ctrl, 1, &user_ctrl))
+ return -1;
+#endif
+#endif
+
+ st.chip_cfg.sensors = sensors;
+ st.chip_cfg.lp_accel_mode = 0;
+ HAL_Delay(50);
+ return 0;
+}
+
+/**
+ * @brief Read the MPU interrupt status registers.
+ * @param[out] status Mask of interrupt bits.
+ * @return 0 if successful.
+ */
+int mpu_get_int_status(short *status)
+{
+ unsigned char tmp[2];
+ if (!st.chip_cfg.sensors)
+ return -1;
+ if (i2c_read(st.hw->addr, st.reg->dmp_int_status, 2, tmp))
+ return -1;
+ status[0] = (tmp[0] << 8) | tmp[1];
+ return 0;
+}
+
+/**
+ * @brief Get one packet from the FIFO.
+ * If @e sensors does not contain a particular sensor, disregard the data
+ * returned to that pointer.
+ * \n @e sensors can contain a combination of the following flags:
+ * \n INV_X_GYRO, INV_Y_GYRO, INV_Z_GYRO
+ * \n INV_XYZ_GYRO
+ * \n INV_XYZ_ACCEL
+ * \n If the FIFO has no new data, @e sensors will be zero.
+ * \n If the FIFO is disabled, @e sensors will be zero and this function will
+ * return a non-zero error code.
+ * @param[out] gyro Gyro data in hardware units.
+ * @param[out] accel Accel data in hardware units.
+ * @param[out] timestamp Timestamp in milliseconds.
+ * @param[out] sensors Mask of sensors read from FIFO.
+ * @param[out] more Number of remaining packets.
+ * @return 0 if successful.
+ */
+int mpu_read_fifo(short *gyro, short *accel, unsigned long *timestamp,
+ unsigned char *sensors, unsigned char *more)
+{
+ /* Assumes maximum packet size is gyro (6) + accel (6). */
+ unsigned char data[MAX_PACKET_LENGTH];
+ unsigned char packet_size = 0;
+ unsigned short fifo_count, index = 0;
+
+ if (st.chip_cfg.dmp_on)
+ return -1;
+
+ sensors[0] = 0;
+ if (!st.chip_cfg.sensors)
+ return -1;
+ if (!st.chip_cfg.fifo_enable)
+ return -1;
+
+ if (st.chip_cfg.fifo_enable & INV_X_GYRO)
+ packet_size += 2;
+ if (st.chip_cfg.fifo_enable & INV_Y_GYRO)
+ packet_size += 2;
+ if (st.chip_cfg.fifo_enable & INV_Z_GYRO)
+ packet_size += 2;
+ if (st.chip_cfg.fifo_enable & INV_XYZ_ACCEL)
+ packet_size += 6;
+
+ if (i2c_read(st.hw->addr, st.reg->fifo_count_h, 2, data))
+ return -1;
+ fifo_count = (data[0] << 8) | data[1];
+ if (fifo_count < packet_size)
+ return 0;
+ // log_i("FIFO count: %hd\n", fifo_count);
+ if (fifo_count > (st.hw->max_fifo >> 1))
+ {
+ /* FIFO is 50% full, better check overflow bit. */
+ if (i2c_read(st.hw->addr, st.reg->int_status, 1, data))
+ return -1;
+ if (data[0] & BIT_FIFO_OVERFLOW)
+ {
+ mpu_reset_fifo();
+ return -2;
+ }
+ }
+ get_ms((unsigned long *)timestamp);
+
+ if (i2c_read(st.hw->addr, st.reg->fifo_r_w, packet_size, data))
+ return -1;
+ more[0] = fifo_count / packet_size - 1;
+ sensors[0] = 0;
+
+ if ((index != packet_size) && st.chip_cfg.fifo_enable & INV_XYZ_ACCEL)
+ {
+ accel[0] = (data[index + 0] << 8) | data[index + 1];
+ accel[1] = (data[index + 2] << 8) | data[index + 3];
+ accel[2] = (data[index + 4] << 8) | data[index + 5];
+ sensors[0] |= INV_XYZ_ACCEL;
+ index += 6;
+ }
+ if ((index != packet_size) && st.chip_cfg.fifo_enable & INV_X_GYRO)
+ {
+ gyro[0] = (data[index + 0] << 8) | data[index + 1];
+ sensors[0] |= INV_X_GYRO;
+ index += 2;
+ }
+ if ((index != packet_size) && st.chip_cfg.fifo_enable & INV_Y_GYRO)
+ {
+ gyro[1] = (data[index + 0] << 8) | data[index + 1];
+ sensors[0] |= INV_Y_GYRO;
+ index += 2;
+ }
+ if ((index != packet_size) && st.chip_cfg.fifo_enable & INV_Z_GYRO)
+ {
+ gyro[2] = (data[index + 0] << 8) | data[index + 1];
+ sensors[0] |= INV_Z_GYRO;
+ index += 2;
+ }
+
+ return 0;
+}
+
+/**
+ * @brief Get one unparsed packet from the FIFO.
+ * This function should be used if the packet is to be parsed elsewhere.
+ * @param[in] length Length of one FIFO packet.
+ * @param[in] data FIFO packet.
+ * @param[in] more Number of remaining packets.
+ */
+int mpu_read_fifo_stream(unsigned short length, unsigned char *data,
+ unsigned char *more)
+{
+ unsigned char tmp[2];
+ unsigned short fifo_count;
+ if (!st.chip_cfg.dmp_on)
+ return -1;
+ if (!st.chip_cfg.sensors)
+ return -1;
+
+ if (i2c_read(st.hw->addr, st.reg->fifo_count_h, 2, tmp))
+ return -1;
+ fifo_count = (tmp[0] << 8) | tmp[1];
+ if (fifo_count < length)
+ {
+ more[0] = 0;
+ return -1;
+ }
+ if (fifo_count > (st.hw->max_fifo >> 1))
+ {
+ /* FIFO is 50% full, better check overflow bit. */
+ if (i2c_read(st.hw->addr, st.reg->int_status, 1, tmp))
+ return -1;
+ if (tmp[0] & BIT_FIFO_OVERFLOW)
+ {
+ mpu_reset_fifo();
+ return -2;
+ }
+ }
+
+ if (i2c_read(st.hw->addr, st.reg->fifo_r_w, length, data))
+ return -1;
+ more[0] = fifo_count / length - 1;
+ return 0;
+}
+
+/**
+ * @brief Set device to bypass mode.
+ * @param[in] bypass_on 1 to enable bypass mode.
+ * @return 0 if successful.
+ */
+int mpu_set_bypass(unsigned char bypass_on)
+{
+ unsigned char tmp;
+
+ if (st.chip_cfg.bypass_mode == bypass_on)
+ return 0;
+
+ if (bypass_on)
+ {
+ if (i2c_read(st.hw->addr, st.reg->user_ctrl, 1, &tmp))
+ return -1;
+ tmp &= ~BIT_AUX_IF_EN;
+ if (i2c_write(st.hw->addr, st.reg->user_ctrl, 1, &tmp))
+ return -1;
+ HAL_Delay(3);
+ tmp = BIT_BYPASS_EN;
+ if (st.chip_cfg.active_low_int)
+ tmp |= BIT_ACTL;
+ if (st.chip_cfg.latched_int)
+ tmp |= BIT_LATCH_EN | BIT_ANY_RD_CLR;
+ if (i2c_write(st.hw->addr, st.reg->int_pin_cfg, 1, &tmp))
+ return -1;
+ }
+ else
+ {
+ /* Enable I2C master mode if compass is being used. */
+ if (i2c_read(st.hw->addr, st.reg->user_ctrl, 1, &tmp))
+ return -1;
+ if (st.chip_cfg.sensors & INV_XYZ_COMPASS)
+ tmp |= BIT_AUX_IF_EN;
+ else
+ tmp &= ~BIT_AUX_IF_EN;
+ if (i2c_write(st.hw->addr, st.reg->user_ctrl, 1, &tmp))
+ return -1;
+ HAL_Delay(3);
+ if (st.chip_cfg.active_low_int)
+ tmp = BIT_ACTL;
+ else
+ tmp = 0;
+ if (st.chip_cfg.latched_int)
+ tmp |= BIT_LATCH_EN | BIT_ANY_RD_CLR;
+ if (i2c_write(st.hw->addr, st.reg->int_pin_cfg, 1, &tmp))
+ return -1;
+ }
+ st.chip_cfg.bypass_mode = bypass_on;
+ return 0;
+}
+
+/**
+ * @brief Set interrupt level.
+ * @param[in] active_low 1 for active low, 0 for active high.
+ * @return 0 if successful.
+ */
+int mpu_set_int_level(unsigned char active_low)
+{
+ st.chip_cfg.active_low_int = active_low;
+ return 0;
+}
+
+/**
+ * @brief Enable latched interrupts.
+ * Any MPU register will clear the interrupt.
+ * @param[in] enable 1 to enable, 0 to disable.
+ * @return 0 if successful.
+ */
+int mpu_set_int_latched(unsigned char enable)
+{
+ unsigned char tmp;
+ if (st.chip_cfg.latched_int == enable)
+ return 0;
+
+ if (enable)
+ tmp = BIT_LATCH_EN | BIT_ANY_RD_CLR;
+ else
+ tmp = 0;
+ if (st.chip_cfg.bypass_mode)
+ tmp |= BIT_BYPASS_EN;
+ if (st.chip_cfg.active_low_int)
+ tmp |= BIT_ACTL;
+ if (i2c_write(st.hw->addr, st.reg->int_pin_cfg, 1, &tmp))
+ return -1;
+ st.chip_cfg.latched_int = enable;
+ return 0;
+}
+
+#ifdef MPU6050
+static int get_accel_prod_shift(float *st_shift)
+{
+ unsigned char tmp[4], shift_code[3], ii;
+
+ if (i2c_read(st.hw->addr, 0x0D, 4, tmp))
+ return 0x07;
+
+ shift_code[0] = ((tmp[0] & 0xE0) >> 3) | ((tmp[3] & 0x30) >> 4);
+ shift_code[1] = ((tmp[1] & 0xE0) >> 3) | ((tmp[3] & 0x0C) >> 2);
+ shift_code[2] = ((tmp[2] & 0xE0) >> 3) | (tmp[3] & 0x03);
+ for (ii = 0; ii < 3; ii++)
+ {
+ if (!shift_code[ii])
+ {
+ st_shift[ii] = 0.f;
+ continue;
+ }
+ /* Equivalent to..
+ * st_shift[ii] = 0.34f * powf(0.92f/0.34f, (shift_code[ii]-1) / 30.f)
+ */
+ st_shift[ii] = 0.34f;
+ while (--shift_code[ii])
+ st_shift[ii] *= 1.034f;
+ }
+ return 0;
+}
+
+static int accel_self_test(long *bias_regular, long *bias_st)
+{
+ int jj, result = 0;
+ float st_shift[3], st_shift_cust, st_shift_var;
+
+ get_accel_prod_shift(st_shift);
+ for (jj = 0; jj < 3; jj++)
+ {
+ st_shift_cust = labs(bias_regular[jj] - bias_st[jj]) / 65536.f;
+ if (st_shift[jj])
+ {
+ st_shift_var = st_shift_cust / st_shift[jj] - 1.f;
+ if (fabs(st_shift_var) > test.max_accel_var)
+ result |= 1 << jj;
+ }
+ else if ((st_shift_cust < test.min_g) ||
+ (st_shift_cust > test.max_g))
+ result |= 1 << jj;
+ }
+
+ return result;
+}
+
+static int gyro_self_test(long *bias_regular, long *bias_st)
+{
+ int jj, result = 0;
+ unsigned char tmp[3];
+ float st_shift, st_shift_cust, st_shift_var;
+
+ if (i2c_read(st.hw->addr, 0x0D, 3, tmp))
+ return 0x07;
+
+ tmp[0] &= 0x1F;
+ tmp[1] &= 0x1F;
+ tmp[2] &= 0x1F;
+
+ for (jj = 0; jj < 3; jj++)
+ {
+ st_shift_cust = labs(bias_regular[jj] - bias_st[jj]) / 65536.f;
+ if (tmp[jj])
+ {
+ st_shift = 3275.f / test.gyro_sens;
+ while (--tmp[jj])
+ st_shift *= 1.046f;
+ st_shift_var = st_shift_cust / st_shift - 1.f;
+ if (fabs(st_shift_var) > test.max_gyro_var)
+ result |= 1 << jj;
+ }
+ else if ((st_shift_cust < test.min_dps) ||
+ (st_shift_cust > test.max_dps))
+ result |= 1 << jj;
+ }
+ return result;
+}
+
+#ifdef AK89xx_SECONDARY
+static int compass_self_test(void)
+{
+ unsigned char tmp[6];
+ unsigned char tries = 10;
+ int result = 0x07;
+ short data;
+
+ mpu_set_bypass(1);
+
+ tmp[0] = AKM_POWER_DOWN;
+ if (i2c_write(st.chip_cfg.compass_addr, AKM_REG_CNTL, 1, tmp))
+ return 0x07;
+ tmp[0] = AKM_BIT_SELF_TEST;
+ if (i2c_write(st.chip_cfg.compass_addr, AKM_REG_ASTC, 1, tmp))
+ goto AKM_restore;
+ tmp[0] = AKM_MODE_SELF_TEST;
+ if (i2c_write(st.chip_cfg.compass_addr, AKM_REG_CNTL, 1, tmp))
+ goto AKM_restore;
+
+ do
+ {
+ delay_ms(10);
+ if (i2c_read(st.chip_cfg.compass_addr, AKM_REG_ST1, 1, tmp))
+ goto AKM_restore;
+ if (tmp[0] & AKM_DATA_READY)
+ break;
+ } while (tries--);
+ if (!(tmp[0] & AKM_DATA_READY))
+ goto AKM_restore;
+
+ if (i2c_read(st.chip_cfg.compass_addr, AKM_REG_HXL, 6, tmp))
+ goto AKM_restore;
+
+ result = 0;
+ data = (short)(tmp[1] << 8) | tmp[0];
+ if ((data > 100) || (data < -100))
+ result |= 0x01;
+ data = (short)(tmp[3] << 8) | tmp[2];
+ if ((data > 100) || (data < -100))
+ result |= 0x02;
+ data = (short)(tmp[5] << 8) | tmp[4];
+ if ((data > -300) || (data < -1000))
+ result |= 0x04;
+
+AKM_restore:
+ tmp[0] = 0 | SUPPORTS_AK89xx_HIGH_SENS;
+ i2c_write(st.chip_cfg.compass_addr, AKM_REG_ASTC, 1, tmp);
+ tmp[0] = SUPPORTS_AK89xx_HIGH_SENS;
+ i2c_write(st.chip_cfg.compass_addr, AKM_REG_CNTL, 1, tmp);
+ mpu_set_bypass(0);
+ return result;
+}
+#endif
+#endif
+
+static int get_st_biases(long *gyro, long *accel, unsigned char hw_test)
+{
+ unsigned char data[MAX_PACKET_LENGTH];
+ unsigned char packet_count, ii;
+ unsigned short fifo_count;
+
+ data[0] = 0x01;
+ data[1] = 0;
+ if (i2c_write(st.hw->addr, st.reg->pwr_mgmt_1, 2, data))
+ return -1;
+ HAL_Delay(200);
+ data[0] = 0;
+ if (i2c_write(st.hw->addr, st.reg->int_enable, 1, data))
+ return -1;
+ if (i2c_write(st.hw->addr, st.reg->fifo_en, 1, data))
+ return -1;
+ if (i2c_write(st.hw->addr, st.reg->pwr_mgmt_1, 1, data))
+ return -1;
+ if (i2c_write(st.hw->addr, st.reg->i2c_mst, 1, data))
+ return -1;
+ if (i2c_write(st.hw->addr, st.reg->user_ctrl, 1, data))
+ return -1;
+ data[0] = BIT_FIFO_RST | BIT_DMP_RST;
+ if (i2c_write(st.hw->addr, st.reg->user_ctrl, 1, data))
+ return -1;
+ HAL_Delay(15);
+ data[0] = st.test->reg_lpf;
+ if (i2c_write(st.hw->addr, st.reg->lpf, 1, data))
+ return -1;
+ data[0] = st.test->reg_rate_div;
+ if (i2c_write(st.hw->addr, st.reg->rate_div, 1, data))
+ return -1;
+ if (hw_test)
+ data[0] = st.test->reg_gyro_fsr | 0xE0;
+ else
+ data[0] = st.test->reg_gyro_fsr;
+ if (i2c_write(st.hw->addr, st.reg->gyro_cfg, 1, data))
+ return -1;
+
+ if (hw_test)
+ data[0] = st.test->reg_accel_fsr | 0xE0;
+ else
+ data[0] = test.reg_accel_fsr;
+ if (i2c_write(st.hw->addr, st.reg->accel_cfg, 1, data))
+ return -1;
+ if (hw_test)
+ HAL_Delay(200);
+
+ /* Fill FIFO for test.wait_ms milliseconds. */
+ data[0] = BIT_FIFO_EN;
+ if (i2c_write(st.hw->addr, st.reg->user_ctrl, 1, data))
+ return -1;
+
+ data[0] = INV_XYZ_GYRO | INV_XYZ_ACCEL;
+ if (i2c_write(st.hw->addr, st.reg->fifo_en, 1, data))
+ return -1;
+ HAL_Delay(test.wait_ms);
+ data[0] = 0;
+ if (i2c_write(st.hw->addr, st.reg->fifo_en, 1, data))
+ return -1;
+
+ if (i2c_read(st.hw->addr, st.reg->fifo_count_h, 2, data))
+ return -1;
+
+ fifo_count = (data[0] << 8) | data[1];
+ packet_count = fifo_count / MAX_PACKET_LENGTH;
+ gyro[0] = gyro[1] = gyro[2] = 0;
+ accel[0] = accel[1] = accel[2] = 0;
+
+ for (ii = 0; ii < packet_count; ii++)
+ {
+ short accel_cur[3], gyro_cur[3];
+ if (i2c_read(st.hw->addr, st.reg->fifo_r_w, MAX_PACKET_LENGTH, data))
+ return -1;
+ accel_cur[0] = ((short)data[0] << 8) | data[1];
+ accel_cur[1] = ((short)data[2] << 8) | data[3];
+ accel_cur[2] = ((short)data[4] << 8) | data[5];
+ accel[0] += (long)accel_cur[0];
+ accel[1] += (long)accel_cur[1];
+ accel[2] += (long)accel_cur[2];
+ gyro_cur[0] = (((short)data[6] << 8) | data[7]);
+ gyro_cur[1] = (((short)data[8] << 8) | data[9]);
+ gyro_cur[2] = (((short)data[10] << 8) | data[11]);
+ gyro[0] += (long)gyro_cur[0];
+ gyro[1] += (long)gyro_cur[1];
+ gyro[2] += (long)gyro_cur[2];
+ }
+#ifdef EMPL_NO_64BIT
+ gyro[0] = (long)(((float)gyro[0] * 65536.f) / test.gyro_sens / packet_count);
+ gyro[1] = (long)(((float)gyro[1] * 65536.f) / test.gyro_sens / packet_count);
+ gyro[2] = (long)(((float)gyro[2] * 65536.f) / test.gyro_sens / packet_count);
+ if (has_accel)
+ {
+ accel[0] = (long)(((float)accel[0] * 65536.f) / test.accel_sens /
+ packet_count);
+ accel[1] = (long)(((float)accel[1] * 65536.f) / test.accel_sens /
+ packet_count);
+ accel[2] = (long)(((float)accel[2] * 65536.f) / test.accel_sens /
+ packet_count);
+ /* Don't remove gravity! */
+ accel[2] -= 65536L;
+ }
+#else
+ gyro[0] = (long)(((long long)gyro[0] << 16) / test.gyro_sens / packet_count);
+ gyro[1] = (long)(((long long)gyro[1] << 16) / test.gyro_sens / packet_count);
+ gyro[2] = (long)(((long long)gyro[2] << 16) / test.gyro_sens / packet_count);
+ accel[0] = (long)(((long long)accel[0] << 16) / test.accel_sens /
+ packet_count);
+ accel[1] = (long)(((long long)accel[1] << 16) / test.accel_sens /
+ packet_count);
+ accel[2] = (long)(((long long)accel[2] << 16) / test.accel_sens /
+ packet_count);
+ /* Don't remove gravity! */
+ if (accel[2] > 0L)
+ accel[2] -= 65536L;
+ else
+ accel[2] += 65536L;
+#endif
+
+ return 0;
+}
+
+/**
+ * @brief Trigger gyro/accel/compass self-test.
+ * On success/error, the self-test returns a mask representing the sensor(s)
+ * that failed. For each bit, a one (1) represents a "pass" case; conversely,
+ * a zero (0) indicates a failure.
+ *
+ * \n The mask is defined as follows:
+ * \n Bit 0: Gyro.
+ * \n Bit 1: Accel.
+ * \n Bit 2: Compass.
+ *
+ * \n Currently, the hardware self-test is unsupported for MPU6500. However,
+ * this function can still be used to obtain the accel and gyro biases.
+ *
+ * \n This function must be called with the device either face-up or face-down
+ * (z-axis is parallel to gravity).
+ * @param[out] gyro Gyro biases in q16 format.
+ * @param[out] accel Accel biases (if applicable) in q16 format.
+ * @return Result mask (see above).
+ */
+int mpu_run_self_test(long *gyro, long *accel)
+{
+#ifdef MPU6050
+ const unsigned char tries = 2;
+ long gyro_st[3], accel_st[3];
+ unsigned char accel_result, gyro_result;
+#ifdef AK89xx_SECONDARY
+ unsigned char compass_result;
+#endif
+ int ii;
+#endif
+ int result;
+ unsigned char accel_fsr, fifo_sensors, sensors_on;
+ unsigned short gyro_fsr, sample_rate, lpf;
+ unsigned char dmp_was_on;
+
+ if (st.chip_cfg.dmp_on)
+ {
+ mpu_set_dmp_state(0);
+ dmp_was_on = 1;
+ }
+ else
+ dmp_was_on = 0;
+
+ /* Get initial settings. */
+ mpu_get_gyro_fsr(&gyro_fsr);
+ mpu_get_accel_fsr(&accel_fsr);
+ mpu_get_lpf(&lpf);
+ mpu_get_sample_rate(&sample_rate);
+ sensors_on = st.chip_cfg.sensors;
+ mpu_get_fifo_config(&fifo_sensors);
+
+ /* For older chips, the self-test will be different. */
+#if defined MPU6050
+ for (ii = 0; ii < tries; ii++)
+ if (!get_st_biases(gyro, accel, 0))
+ break;
+ if (ii == tries)
+ {
+ /* If we reach this point, we most likely encountered an I2C error.
+ * We'll just report an error for all three sensors.
+ */
+ result = 0;
+ goto restore;
+ }
+ for (ii = 0; ii < tries; ii++)
+ if (!get_st_biases(gyro_st, accel_st, 1))
+ break;
+ if (ii == tries)
+ {
+ /* Again, probably an I2C error. */
+ result = 0;
+ goto restore;
+ }
+ accel_result = accel_self_test(accel, accel_st);
+ gyro_result = gyro_self_test(gyro, gyro_st);
+
+ result = 0;
+ if (!gyro_result)
+ result |= 0x01;
+ if (!accel_result)
+ result |= 0x02;
+
+#ifdef AK89xx_SECONDARY
+ compass_result = compass_self_test();
+ if (!compass_result)
+ result |= 0x04;
+#endif
+restore:
+#elif defined MPU6500
+ /* For now, this function will return a "pass" result for all three sensors
+ * for compatibility with current test applications.
+ */
+ get_st_biases(gyro, accel, 0);
+ result = 0x7;
+#endif
+ /* Set to invalid values to ensure no I2C writes are skipped. */
+ st.chip_cfg.gyro_fsr = 0xFF;
+ st.chip_cfg.accel_fsr = 0xFF;
+ st.chip_cfg.lpf = 0xFF;
+ st.chip_cfg.sample_rate = 0xFFFF;
+ st.chip_cfg.sensors = 0xFF;
+ st.chip_cfg.fifo_enable = 0xFF;
+ st.chip_cfg.clk_src = INV_CLK_PLL;
+ mpu_set_gyro_fsr(gyro_fsr);
+ mpu_set_accel_fsr(accel_fsr);
+ mpu_set_lpf(lpf);
+ mpu_set_sample_rate(sample_rate);
+ mpu_set_sensors(sensors_on);
+ mpu_configure_fifo(fifo_sensors);
+
+ if (dmp_was_on)
+ mpu_set_dmp_state(1);
+
+ return result;
+}
+
+/**
+ * @brief Write to the DMP memory.
+ * This function prevents I2C writes past the bank boundaries. The DMP memory
+ * is only accessible when the chip is awake.
+ * @param[in] mem_addr Memory location (bank << 8 | start address)
+ * @param[in] length Number of bytes to write.
+ * @param[in] data Bytes to write to memory.
+ * @return 0 if successful.
+ */
+int mpu_write_mem(unsigned short mem_addr, unsigned short length,
+ unsigned char *data)
+{
+ unsigned char tmp[2];
+
+ if (!data)
+ return -1;
+ if (!st.chip_cfg.sensors)
+ return -1;
+
+ tmp[0] = (unsigned char)(mem_addr >> 8);
+ tmp[1] = (unsigned char)(mem_addr & 0xFF);
+
+ /* Check bank boundaries. */
+ if (tmp[1] + length > st.hw->bank_size)
+ return -1;
+
+ if (i2c_write(st.hw->addr, st.reg->bank_sel, 2, tmp))
+ return -1;
+ if (i2c_write(st.hw->addr, st.reg->mem_r_w, length, data))
+ return -1;
+ return 0;
+}
+
+/**
+ * @brief Read from the DMP memory.
+ * This function prevents I2C reads past the bank boundaries. The DMP memory
+ * is only accessible when the chip is awake.
+ * @param[in] mem_addr Memory location (bank << 8 | start address)
+ * @param[in] length Number of bytes to read.
+ * @param[out] data Bytes read from memory.
+ * @return 0 if successful.
+ */
+int mpu_read_mem(unsigned short mem_addr, unsigned short length,
+ unsigned char *data)
+{
+ unsigned char tmp[2];
+
+ if (!data)
+ return -1;
+ if (!st.chip_cfg.sensors)
+ return -1;
+
+ tmp[0] = (unsigned char)(mem_addr >> 8);
+ tmp[1] = (unsigned char)(mem_addr & 0xFF);
+
+ /* Check bank boundaries. */
+ if (tmp[1] + length > st.hw->bank_size)
+ return -1;
+
+ if (i2c_write(st.hw->addr, st.reg->bank_sel, 2, tmp))
+ return -1;
+ if (i2c_read(st.hw->addr, st.reg->mem_r_w, length, data))
+ return -1;
+ return 0;
+}
+
+/**
+ * @brief Load and verify DMP image.
+ * @param[in] length Length of DMP image.
+ * @param[in] firmware DMP code.
+ * @param[in] start_addr Starting address of DMP code memory.
+ * @param[in] sample_rate Fixed sampling rate used when DMP is enabled.
+ * @return 0 if successful.
+ */
+int mpu_load_firmware(unsigned short length, const unsigned char *firmware,
+ unsigned short start_addr, unsigned short sample_rate)
+{
+ unsigned short ii;
+ unsigned short this_write;
+ /* Must divide evenly into st.hw->bank_size to avoid bank crossings. */
+#define LOAD_CHUNK (16)
+ unsigned char cur[LOAD_CHUNK], tmp[2];
+
+ if (st.chip_cfg.dmp_loaded)
+ /* DMP should only be loaded once. */
+ return -1;
+
+ if (!firmware)
+ return -1;
+ for (ii = 0; ii < length; ii += this_write)
+ {
+ this_write = min(LOAD_CHUNK, length - ii);
+ if (mpu_write_mem(ii, this_write, (unsigned char *)&firmware[ii]))
+ return -1;
+ if (mpu_read_mem(ii, this_write, cur))
+ return -1;
+ if (memcmp(firmware + ii, cur, this_write))
+ return -2;
+ }
+
+ /* Set program start address. */
+ tmp[0] = start_addr >> 8;
+ tmp[1] = start_addr & 0xFF;
+ if (i2c_write(st.hw->addr, st.reg->prgm_start_h, 2, tmp))
+ return -1;
+
+ st.chip_cfg.dmp_loaded = 1;
+ st.chip_cfg.dmp_sample_rate = sample_rate;
+ return 0;
+}
+
+/**
+ * @brief Enable/disable DMP support.
+ * @param[in] enable 1 to turn on the DMP.
+ * @return 0 if successful.
+ */
+int mpu_set_dmp_state(unsigned char enable)
+{
+ unsigned char tmp;
+ if (st.chip_cfg.dmp_on == enable)
+ return 0;
+
+ if (enable)
+ {
+ if (!st.chip_cfg.dmp_loaded)
+ return -1;
+ /* Disable data ready interrupt. */
+ set_int_enable(0);
+ /* Disable bypass mode. */
+ mpu_set_bypass(0);
+ /* Keep constant sample rate, FIFO rate controlled by DMP. */
+ mpu_set_sample_rate(st.chip_cfg.dmp_sample_rate);
+ /* Remove FIFO elements. */
+ tmp = 0;
+ i2c_write(st.hw->addr, 0x23, 1, &tmp);
+ st.chip_cfg.dmp_on = 1;
+ /* Enable DMP interrupt. */
+ set_int_enable(1);
+ mpu_reset_fifo();
+ }
+ else
+ {
+ /* Disable DMP interrupt. */
+ set_int_enable(0);
+ /* Restore FIFO settings. */
+ tmp = st.chip_cfg.fifo_enable;
+ i2c_write(st.hw->addr, 0x23, 1, &tmp);
+ st.chip_cfg.dmp_on = 0;
+ mpu_reset_fifo();
+ }
+ return 0;
+}
+
+/**
+ * @brief Get DMP state.
+ * @param[out] enabled 1 if enabled.
+ * @return 0 if successful.
+ */
+int mpu_get_dmp_state(unsigned char *enabled)
+{
+ enabled[0] = st.chip_cfg.dmp_on;
+ return 0;
+}
+
+/* This initialization is similar to the one in ak8975.c. */
+int setup_compass(void)
+{
+#ifdef AK89xx_SECONDARY
+ unsigned char data[4], akm_addr;
+
+ mpu_set_bypass(1);
+
+ /* Find compass. Possible addresses range from 0x0C to 0x0F. */
+ for (akm_addr = 0x0C; akm_addr <= 0x0F; akm_addr++)
+ {
+ int result;
+ result = i2c_read(akm_addr, AKM_REG_WHOAMI, 1, data);
+ if (!result && (data[0] == AKM_WHOAMI))
+ break;
+ }
+
+ if (akm_addr > 0x0F)
+ {
+ /* TODO: Handle this case in all compass-related functions. */
+ log_e("Compass not found.\n");
+ return -1;
+ }
+
+ st.chip_cfg.compass_addr = akm_addr;
+
+ data[0] = AKM_POWER_DOWN;
+ if (i2c_write(st.chip_cfg.compass_addr, AKM_REG_CNTL, 1, data))
+ return -1;
+ delay_ms(1);
+
+ data[0] = AKM_FUSE_ROM_ACCESS;
+ if (i2c_write(st.chip_cfg.compass_addr, AKM_REG_CNTL, 1, data))
+ return -1;
+ delay_ms(1);
+
+ /* Get sensitivity adjustment data from fuse ROM. */
+ if (i2c_read(st.chip_cfg.compass_addr, AKM_REG_ASAX, 3, data))
+ return -1;
+ st.chip_cfg.mag_sens_adj[0] = (long)data[0] + 128;
+ st.chip_cfg.mag_sens_adj[1] = (long)data[1] + 128;
+ st.chip_cfg.mag_sens_adj[2] = (long)data[2] + 128;
+
+ data[0] = AKM_POWER_DOWN;
+ if (i2c_write(st.chip_cfg.compass_addr, AKM_REG_CNTL, 1, data))
+ return -1;
+ delay_ms(1);
+
+ mpu_set_bypass(0);
+
+ /* Set up master mode, master clock, and ES bit. */
+ data[0] = 0x40;
+ if (i2c_write(st.hw->addr, st.reg->i2c_mst, 1, data))
+ return -1;
+
+ /* Slave 0 reads from AKM data registers. */
+ data[0] = BIT_I2C_READ | st.chip_cfg.compass_addr;
+ if (i2c_write(st.hw->addr, st.reg->s0_addr, 1, data))
+ return -1;
+
+ /* Compass reads start at this register. */
+ data[0] = AKM_REG_ST1;
+ if (i2c_write(st.hw->addr, st.reg->s0_reg, 1, data))
+ return -1;
+
+ /* Enable slave 0, 8-byte reads. */
+ data[0] = BIT_SLAVE_EN | 8;
+ if (i2c_write(st.hw->addr, st.reg->s0_ctrl, 1, data))
+ return -1;
+
+ /* Slave 1 changes AKM measurement mode. */
+ data[0] = st.chip_cfg.compass_addr;
+ if (i2c_write(st.hw->addr, st.reg->s1_addr, 1, data))
+ return -1;
+
+ /* AKM measurement mode register. */
+ data[0] = AKM_REG_CNTL;
+ if (i2c_write(st.hw->addr, st.reg->s1_reg, 1, data))
+ return -1;
+
+ /* Enable slave 1, 1-byte writes. */
+ data[0] = BIT_SLAVE_EN | 1;
+ if (i2c_write(st.hw->addr, st.reg->s1_ctrl, 1, data))
+ return -1;
+
+ /* Set slave 1 data. */
+ data[0] = AKM_SINGLE_MEASUREMENT;
+ if (i2c_write(st.hw->addr, st.reg->s1_do, 1, data))
+ return -1;
+
+ /* Trigger slave 0 and slave 1 actions at each sample. */
+ data[0] = 0x03;
+ if (i2c_write(st.hw->addr, st.reg->i2c_delay_ctrl, 1, data))
+ return -1;
+
+#ifdef MPU9150
+ /* For the MPU9150, the auxiliary I2C bus needs to be set to VDD. */
+ data[0] = BIT_I2C_MST_VDDIO;
+ if (i2c_write(st.hw->addr, st.reg->yg_offs_tc, 1, data))
+ return -1;
+#endif
+
+ return 0;
+#else
+ return -1;
+#endif
+}
+
+/**
+ * @brief Read raw compass data.
+ * @param[out] data Raw data in hardware units.
+ * @param[out] timestamp Timestamp in milliseconds. Null if not needed.
+ * @return 0 if successful.
+ */
+int mpu_get_compass_reg(short *data, unsigned long *timestamp)
+{
+#ifdef AK89xx_SECONDARY
+ unsigned char tmp[9];
+
+ if (!(st.chip_cfg.sensors & INV_XYZ_COMPASS))
+ return -1;
+
+#ifdef AK89xx_BYPASS
+ if (i2c_read(st.chip_cfg.compass_addr, AKM_REG_ST1, 8, tmp))
+ return -1;
+ tmp[8] = AKM_SINGLE_MEASUREMENT;
+ if (i2c_write(st.chip_cfg.compass_addr, AKM_REG_CNTL, 1, tmp + 8))
+ return -1;
+#else
+ if (i2c_read(st.hw->addr, st.reg->raw_compass, 8, tmp))
+ return -1;
+#endif
+
+#if defined AK8975_SECONDARY
+ /* AK8975 doesn't have the overrun error bit. */
+ if (!(tmp[0] & AKM_DATA_READY))
+ return -2;
+ if ((tmp[7] & AKM_OVERFLOW) || (tmp[7] & AKM_DATA_ERROR))
+ return -3;
+#elif defined AK8963_SECONDARY
+ /* AK8963 doesn't have the data read error bit. */
+ if (!(tmp[0] & AKM_DATA_READY) || (tmp[0] & AKM_DATA_OVERRUN))
+ return -2;
+ if (tmp[7] & AKM_OVERFLOW)
+ return -3;
+#endif
+ data[0] = (tmp[2] << 8) | tmp[1];
+ data[1] = (tmp[4] << 8) | tmp[3];
+ data[2] = (tmp[6] << 8) | tmp[5];
+
+ data[0] = ((long)data[0] * st.chip_cfg.mag_sens_adj[0]) >> 8;
+ data[1] = ((long)data[1] * st.chip_cfg.mag_sens_adj[1]) >> 8;
+ data[2] = ((long)data[2] * st.chip_cfg.mag_sens_adj[2]) >> 8;
+
+ if (timestamp)
+ get_ms(timestamp);
+ return 0;
+#else
+ return -1;
+#endif
+}
+
+/**
+ * @brief Get the compass full-scale range.
+ * @param[out] fsr Current full-scale range.
+ * @return 0 if successful.
+ */
+int mpu_get_compass_fsr(unsigned short *fsr)
+{
+#ifdef AK89xx_SECONDARY
+ fsr[0] = st.hw->compass_fsr;
+ return 0;
+#else
+ return -1;
+#endif
+}
+
+/**
+ * @brief Enters LP accel motion interrupt mode.
+ * The behavior of this feature is very different between the MPU6050 and the
+ * MPU6500. Each chip's version of this feature is explained below.
+ *
+ * \n MPU6050:
+ * \n When this mode is first enabled, the hardware captures a single accel
+ * sample, and subsequent samples are compared with this one to determine if
+ * the device is in motion. Therefore, whenever this "locked" sample needs to
+ * be changed, this function must be called again.
+ *
+ * \n The hardware motion threshold can be between 32mg and 8160mg in 32mg
+ * increments.
+ *
+ * \n Low-power accel mode supports the following frequencies:
+ * \n 1.25Hz, 5Hz, 20Hz, 40Hz
+ *
+ * \n MPU6500:
+ * \n Unlike the MPU6050 version, the hardware does not "lock in" a reference
+ * sample. The hardware monitors the accel data and detects any large change
+ * over a short period of time.
+ *
+ * \n The hardware motion threshold can be between 4mg and 1020mg in 4mg
+ * increments.
+ *
+ * \n MPU6500 Low-power accel mode supports the following frequencies:
+ * \n 1.25Hz, 2.5Hz, 5Hz, 10Hz, 20Hz, 40Hz, 80Hz, 160Hz, 320Hz, 640Hz
+ *
+ * \n\n NOTES:
+ * \n The driver will round down @e thresh to the nearest supported value if
+ * an unsupported threshold is selected.
+ * \n To select a fractional wake-up frequency, round down the value passed to
+ * @e lpa_freq.
+ * \n The MPU6500 does not support a delay parameter. If this function is used
+ * for the MPU6500, the value passed to @e time will be ignored.
+ * \n To disable this mode, set @e lpa_freq to zero. The driver will restore
+ * the previous configuration.
+ *
+ * @param[in] thresh Motion threshold in mg.
+ * @param[in] time Duration in milliseconds that the accel data must
+ * exceed @e thresh before motion is reported.
+ * @param[in] lpa_freq Minimum sampling rate, or zero to disable.
+ * @return 0 if successful.
+ */
+int mpu_lp_motion_interrupt(unsigned short thresh, unsigned char time,
+ unsigned char lpa_freq)
+{
+ unsigned char data[3];
+
+ if (lpa_freq)
+ {
+ unsigned char thresh_hw;
+
+#if defined MPU6050
+ /* TODO: Make these const/#defines. */
+ /* 1LSb = 32mg. */
+ if (thresh > 8160)
+ thresh_hw = 255;
+ else if (thresh < 32)
+ thresh_hw = 1;
+ else
+ thresh_hw = thresh >> 5;
+#elif defined MPU6500
+ /* 1LSb = 4mg. */
+ if (thresh > 1020)
+ thresh_hw = 255;
+ else if (thresh < 4)
+ thresh_hw = 1;
+ else
+ thresh_hw = thresh >> 2;
+#endif
+
+ if (!time)
+ /* Minimum duration must be 1ms. */
+ time = 1;
+
+#if defined MPU6050
+ if (lpa_freq > 40)
+#elif defined MPU6500
+ if (lpa_freq > 640)
+#endif
+ /* At this point, the chip has not been re-configured, so the
+ * function can safely exit.
+ */
+ return -1;
+
+ if (!st.chip_cfg.int_motion_only)
+ {
+ /* Store current settings for later. */
+ if (st.chip_cfg.dmp_on)
+ {
+ mpu_set_dmp_state(0);
+ st.chip_cfg.cache.dmp_on = 1;
+ }
+ else
+ st.chip_cfg.cache.dmp_on = 0;
+ mpu_get_gyro_fsr(&st.chip_cfg.cache.gyro_fsr);
+ mpu_get_accel_fsr(&st.chip_cfg.cache.accel_fsr);
+ mpu_get_lpf(&st.chip_cfg.cache.lpf);
+ mpu_get_sample_rate(&st.chip_cfg.cache.sample_rate);
+ st.chip_cfg.cache.sensors_on = st.chip_cfg.sensors;
+ mpu_get_fifo_config(&st.chip_cfg.cache.fifo_sensors);
+ }
+
+#ifdef MPU6050
+ /* Disable hardware interrupts for now. */
+ set_int_enable(0);
+
+ /* Enter full-power accel-only mode. */
+ mpu_lp_accel_mode(0);
+
+ /* Override current LPF (and HPF) settings to obtain a valid accel
+ * reading.
+ */
+ data[0] = INV_FILTER_256HZ_NOLPF2;
+ if (i2c_write(st.hw->addr, st.reg->lpf, 1, data))
+ return -1;
+
+ /* NOTE: Digital high pass filter should be configured here. Since this
+ * driver doesn't modify those bits anywhere, they should already be
+ * cleared by default.
+ */
+
+ /* Configure the device to send motion interrupts. */
+ /* Enable motion interrupt. */
+ data[0] = BIT_MOT_INT_EN;
+ if (i2c_write(st.hw->addr, st.reg->int_enable, 1, data))
+ goto lp_int_restore;
+
+ /* Set motion interrupt parameters. */
+ data[0] = thresh_hw;
+ data[1] = time;
+ if (i2c_write(st.hw->addr, st.reg->motion_thr, 2, data))
+ goto lp_int_restore;
+
+ /* Force hardware to "lock" current accel sample. */
+ delay_ms(5);
+ data[0] = (st.chip_cfg.accel_fsr << 3) | BITS_HPF;
+ if (i2c_write(st.hw->addr, st.reg->accel_cfg, 1, data))
+ goto lp_int_restore;
+
+ /* Set up LP accel mode. */
+ data[0] = BIT_LPA_CYCLE;
+ if (lpa_freq == 1)
+ data[1] = INV_LPA_1_25HZ;
+ else if (lpa_freq <= 5)
+ data[1] = INV_LPA_5HZ;
+ else if (lpa_freq <= 20)
+ data[1] = INV_LPA_20HZ;
+ else
+ data[1] = INV_LPA_40HZ;
+ data[1] = (data[1] << 6) | BIT_STBY_XYZG;
+ if (i2c_write(st.hw->addr, st.reg->pwr_mgmt_1, 2, data))
+ goto lp_int_restore;
+
+ st.chip_cfg.int_motion_only = 1;
+ return 0;
+#elif defined MPU6500
+ /* Disable hardware interrupts. */
+ set_int_enable(0);
+
+ /* Enter full-power accel-only mode, no FIFO/DMP. */
+ data[0] = 0;
+ data[1] = 0;
+ data[2] = BIT_STBY_XYZG;
+ if (i2c_write(st.hw->addr, st.reg->user_ctrl, 3, data))
+ goto lp_int_restore;
+
+ /* Set motion threshold. */
+ data[0] = thresh_hw;
+ if (i2c_write(st.hw->addr, st.reg->motion_thr, 1, data))
+ goto lp_int_restore;
+
+ /* Set wake frequency. */
+ if (lpa_freq == 1)
+ data[0] = INV_LPA_1_25HZ;
+ else if (lpa_freq == 2)
+ data[0] = INV_LPA_2_5HZ;
+ else if (lpa_freq <= 5)
+ data[0] = INV_LPA_5HZ;
+ else if (lpa_freq <= 10)
+ data[0] = INV_LPA_10HZ;
+ else if (lpa_freq <= 20)
+ data[0] = INV_LPA_20HZ;
+ else if (lpa_freq <= 40)
+ data[0] = INV_LPA_40HZ;
+ else if (lpa_freq <= 80)
+ data[0] = INV_LPA_80HZ;
+ else if (lpa_freq <= 160)
+ data[0] = INV_LPA_160HZ;
+ else if (lpa_freq <= 320)
+ data[0] = INV_LPA_320HZ;
+ else
+ data[0] = INV_LPA_640HZ;
+ if (i2c_write(st.hw->addr, st.reg->lp_accel_odr, 1, data))
+ goto lp_int_restore;
+
+ /* Enable motion interrupt (MPU6500 version). */
+ data[0] = BITS_WOM_EN;
+ if (i2c_write(st.hw->addr, st.reg->accel_intel, 1, data))
+ goto lp_int_restore;
+
+ /* Enable cycle mode. */
+ data[0] = BIT_LPA_CYCLE;
+ if (i2c_write(st.hw->addr, st.reg->pwr_mgmt_1, 1, data))
+ goto lp_int_restore;
+
+ /* Enable interrupt. */
+ data[0] = BIT_MOT_INT_EN;
+ if (i2c_write(st.hw->addr, st.reg->int_enable, 1, data))
+ goto lp_int_restore;
+
+ st.chip_cfg.int_motion_only = 1;
+ return 0;
+#endif
+ }
+ else
+ {
+ /* Don't "restore" the previous state if no state has been saved. */
+ int ii;
+ char *cache_ptr = (char *)&st.chip_cfg.cache;
+ for (ii = 0; ii < sizeof(st.chip_cfg.cache); ii++)
+ {
+ if (cache_ptr[ii] != 0)
+ goto lp_int_restore;
+ }
+ /* If we reach this point, motion interrupt mode hasn't been used yet. */
+ return -1;
+ }
+lp_int_restore:
+ /* Set to invalid values to ensure no I2C writes are skipped. */
+ st.chip_cfg.gyro_fsr = 0xFF;
+ st.chip_cfg.accel_fsr = 0xFF;
+ st.chip_cfg.lpf = 0xFF;
+ st.chip_cfg.sample_rate = 0xFFFF;
+ st.chip_cfg.sensors = 0xFF;
+ st.chip_cfg.fifo_enable = 0xFF;
+ st.chip_cfg.clk_src = INV_CLK_PLL;
+ mpu_set_sensors(st.chip_cfg.cache.sensors_on);
+ mpu_set_gyro_fsr(st.chip_cfg.cache.gyro_fsr);
+ mpu_set_accel_fsr(st.chip_cfg.cache.accel_fsr);
+ mpu_set_lpf(st.chip_cfg.cache.lpf);
+ mpu_set_sample_rate(st.chip_cfg.cache.sample_rate);
+ mpu_configure_fifo(st.chip_cfg.cache.fifo_sensors);
+
+ if (st.chip_cfg.cache.dmp_on)
+ mpu_set_dmp_state(1);
+
+#ifdef MPU6500
+ /* Disable motion interrupt (MPU6500 version). */
+ data[0] = 0;
+ if (i2c_write(st.hw->addr, st.reg->accel_intel, 1, data))
+ goto lp_int_restore;
+#endif
+
+ st.chip_cfg.int_motion_only = 0;
+ return 0;
+}
+//////////////////////////////////////////////////////////////////////////////////
+// 添加的代码部分
+//////////////////////////////////////////////////////////////////////////////////
+// 本程序只供学习使用,未经作者许可,不得用于其它任何用途
+// ALIENTEK精英STM32开发板V3
+// MPU6050 DMP 驱动代码
+// 正点原子@ALIENTEK
+// 技术论坛:www.openedv.com
+// 创建日期:2015/1/17
+// 版本:V1.0
+// 版权所有,盗版必究。
+// Copyright(C) 广州市星翼电子科技有限公司 2009-2019
+// All rights reserved
+//////////////////////////////////////////////////////////////////////////////////
+
+// q30格式,long转float时的除数.
+#define q30 1073741824.0f
+
+// 陀螺仪方向设置
+static signed char gyro_orientation[9] = {1, 0, 0,
+ 0, 1, 0,
+ 0, 0, 1};
+// MPU6050自测试
+// 返回值:0,正常
+// 其他,失败
+uint8_t run_self_test(void)
+{
+ int result;
+ // char test_packet[4] = {0};
+ long gyro[3], accel[3];
+ result = mpu_run_self_test(gyro, accel);
+ if (result == 0x3)
+ {
+ /* Test passed. We can trust the gyro data here, so let's push it down
+ * to the DMP.
+ */
+ float sens;
+ unsigned short accel_sens;
+ mpu_get_gyro_sens(&sens);
+ gyro[0] = (long)(gyro[0] * sens);
+ gyro[1] = (long)(gyro[1] * sens);
+ gyro[2] = (long)(gyro[2] * sens);
+ dmp_set_gyro_bias(gyro);
+ mpu_get_accel_sens(&accel_sens);
+ accel[0] *= accel_sens;
+ accel[1] *= accel_sens;
+ accel[2] *= accel_sens;
+ dmp_set_accel_bias(accel);
+ return 0;
+ }
+ else
+ return 1;
+}
+// 陀螺仪方向控制
+unsigned short inv_orientation_matrix_to_scalar(
+ const signed char *mtx)
+{
+ unsigned short scalar;
+ /*
+ XYZ 010_001_000 Identity Matrix
+ XZY 001_010_000
+ YXZ 010_000_001
+ YZX 000_010_001
+ ZXY 001_000_010
+ ZYX 000_001_010
+ */
+
+ scalar = inv_row_2_scale(mtx);
+ scalar |= inv_row_2_scale(mtx + 3) << 3;
+ scalar |= inv_row_2_scale(mtx + 6) << 6;
+
+ return scalar;
+}
+// 方向转换
+unsigned short inv_row_2_scale(const signed char *row)
+{
+ unsigned short b;
+
+ if (row[0] > 0)
+ b = 0;
+ else if (row[0] < 0)
+ b = 4;
+ else if (row[1] > 0)
+ b = 1;
+ else if (row[1] < 0)
+ b = 5;
+ else if (row[2] > 0)
+ b = 2;
+ else if (row[2] < 0)
+ b = 6;
+ else
+ b = 7; // error
+ return b;
+}
+// 空函数,未用到.
+void mget_ms(unsigned long *time)
+{
+}
+// mpu6050,dmp初始化
+// 返回值:0,正常
+// 其他,失败
+uint8_t mpu_dmp_init(void)
+{
+ uint8_t res = 0;
+ MPU_IIC_Init(); // 初始化IIC总线
+ if (mpu_init() == 0) // 初始化MPU6050
+ {
+ res = mpu_set_sensors(INV_XYZ_GYRO | INV_XYZ_ACCEL); // 设置所需要的传感器
+ if (res)
+ return 1;
+ res = mpu_configure_fifo(INV_XYZ_GYRO | INV_XYZ_ACCEL); // 设置FIFO
+ if (res)
+ return 2;
+ res = mpu_set_sample_rate(DEFAULT_MPU_HZ); // 设置采样率
+ if (res)
+ return 3;
+ res = dmp_load_motion_driver_firmware(); // 加载dmp固件
+ if (res)
+ return 4;
+ res = dmp_set_orientation(inv_orientation_matrix_to_scalar(gyro_orientation)); // 设置陀螺仪方向
+ if (res)
+ return 5;
+ res = dmp_enable_feature(DMP_FEATURE_6X_LP_QUAT | DMP_FEATURE_TAP | // 设置dmp功能
+ DMP_FEATURE_ANDROID_ORIENT | DMP_FEATURE_SEND_RAW_ACCEL | DMP_FEATURE_SEND_CAL_GYRO |
+ DMP_FEATURE_GYRO_CAL);
+ if (res)
+ return 6;
+ res = dmp_set_fifo_rate(DEFAULT_MPU_HZ); // 设置DMP输出速率(最大不超过200Hz)
+ if (res)
+ return 7;
+ res = run_self_test(); // 自检
+ if (res)
+ return 8;
+ res = mpu_set_dmp_state(1); // 使能DMP
+ if (res)
+ return 9;
+ }
+ else
+ return 10;
+ return 0;
+}
+// 得到dmp处理后的数据(注意,本函数需要比较多堆栈,局部变量有点多)
+// pitch:俯仰角 精度:0.1° 范围:-90.0° <---> +90.0°
+// roll:横滚角 精度:0.1° 范围:-180.0°<---> +180.0°
+// yaw:航向角 精度:0.1° 范围:-180.0°<---> +180.0°
+// 返回值:0,正常
+// 其他,失败
+uint8_t mpu_dmp_get_data(float *pitch, float *roll, float *yaw)
+{
+ float q0 = 1.0f, q1 = 0.0f, q2 = 0.0f, q3 = 0.0f;
+ unsigned long sensor_timestamp;
+ short gyro[3], accel[3], sensors;
+ unsigned char more;
+ long quat[4];
+ if (dmp_read_fifo(gyro, accel, quat, &sensor_timestamp, &sensors, &more))
+ return 1;
+ /* Gyro and accel data are written to the FIFO by the DMP in chip frame and hardware units.
+ * This behavior is convenient because it keeps the gyro and accel outputs of dmp_read_fifo and mpu_read_fifo consistent.
+ **/
+ /*if (sensors & INV_XYZ_GYRO )
+ send_packet(PACKET_TYPE_GYRO, gyro);
+ if (sensors & INV_XYZ_ACCEL)
+ send_packet(PACKET_TYPE_ACCEL, accel); */
+ /* Unlike gyro and accel, quaternions are written to the FIFO in the body frame, q30.
+ * The orientation is set by the scalar passed to dmp_set_orientation during initialization.
+ **/
+ if (sensors & INV_WXYZ_QUAT)
+ {
+ q0 = quat[0] / q30; // q30格式转换为浮点数
+ q1 = quat[1] / q30;
+ q2 = quat[2] / q30;
+ q3 = quat[3] / q30;
+ // 计算得到俯仰角/横滚角/航向角
+ *pitch = asin(-2 * q1 * q3 + 2 * q0 * q2) * 57.3; // pitch
+ *roll = atan2(2 * q2 * q3 + 2 * q0 * q1, -2 * q1 * q1 - 2 * q2 * q2 + 1) * 57.3; // roll
+ *yaw = atan2(2 * (q1 * q2 + q0 * q3), q0 * q0 + q1 * q1 - q2 * q2 - q3 * q3) * 57.3; // yaw
+ }
+ else
+ return 2;
+ return 0;
+}
+
diff --git a/Core/Src/inv_mpu_dmp_motion_driver.c b/Core/Src/inv_mpu_dmp_motion_driver.c
new file mode 100644
index 0000000000000000000000000000000000000000..85ca5cfad0d86f06a75b93fda5cc56f254fcd453
--- /dev/null
+++ b/Core/Src/inv_mpu_dmp_motion_driver.c
@@ -0,0 +1,1424 @@
+/*
+ * inv_mpu_dmp_motion_driver.c
+ *
+ * Created on: Jul 11, 2023
+ * Author: zzy
+ */
+
+/*
+ $License:
+ Copyright (C) 2011-2012 InvenSense Corporation, All Rights Reserved.
+ See included License.txt for License information.
+ $
+ */
+/**
+ * @addtogroup DRIVERS Sensor Driver Layer
+ * @brief Hardware drivers to communicate with sensors via I2C.
+ *
+ * @{
+ * @file inv_mpu_dmp_motion_driver.c
+ * @brief DMP image and interface functions.
+ * @details All functions are preceded by the dmp_ prefix to
+ * differentiate among MPL and general driver function calls.
+ */
+#include
+#include
+#include
+#include
+#include
+#include "inv_mpu.h"
+#include "inv_mpu_dmp_motion_driver.h"
+#include "dmpKey.h"
+#include "dmpmap.h"
+#include "usart.h"
+
+// 定义目标板采用MSP430
+#define MOTION_DRIVER_TARGET_MSP430
+
+/* The following functions must be defined for this platform:
+ * i2c_write(unsigned char slave_addr, unsigned char reg_addr,
+ * unsigned char length, unsigned char const *data)
+ * i2c_read(unsigned char slave_addr, unsigned char reg_addr,
+ * unsigned char length, unsigned char *data)
+ * delay_ms(unsigned long num_ms)
+ * get_ms(unsigned long *count)
+ */
+#if defined MOTION_DRIVER_TARGET_MSP430
+// #include "msp430.h"
+// #include "msp430_clock.h"
+#define delay_ms delay_ms
+#define get_ms mget_ms
+#define log_i printf
+#define log_e printf
+
+#elif defined EMPL_TARGET_MSP430
+#include "msp430.h"
+#include "msp430_clock.h"
+#include "log.h"
+#define delay_ms msp430_delay_ms
+#define get_ms msp430_get_clock_ms
+#define log_i MPL_LOGI
+#define log_e MPL_LOGE
+
+#elif defined EMPL_TARGET_UC3L0
+/* Instead of using the standard TWI driver from the ASF library, we're using
+ * a TWI driver that follows the slave address + register address convention.
+ */
+#include "delay.h"
+#include "sysclk.h"
+#include "log.h"
+#include "uc3l0_clock.h"
+/* delay_ms is a function already defined in ASF. */
+#define get_ms uc3l0_get_clock_ms
+#define log_i MPL_LOGI
+#define log_e MPL_LOGE
+
+#else
+#error Gyro driver is missing the system layer implementations.
+#endif
+
+/* These defines are copied from dmpDefaultMPU6050.c in the general MPL
+ * releases. These defines may change for each DMP image, so be sure to modify
+ * these values when switching to a new image.
+ */
+#define CFG_LP_QUAT (2712)
+#define END_ORIENT_TEMP (1866)
+#define CFG_27 (2742)
+#define CFG_20 (2224)
+#define CFG_23 (2745)
+#define CFG_FIFO_ON_EVENT (2690)
+#define END_PREDICTION_UPDATE (1761)
+#define CGNOTICE_INTR (2620)
+#define X_GRT_Y_TMP (1358)
+#define CFG_DR_INT (1029)
+#define CFG_AUTH (1035)
+#define UPDATE_PROP_ROT (1835)
+#define END_COMPARE_Y_X_TMP2 (1455)
+#define SKIP_X_GRT_Y_TMP (1359)
+#define SKIP_END_COMPARE (1435)
+#define FCFG_3 (1088)
+#define FCFG_2 (1066)
+#define FCFG_1 (1062)
+#define END_COMPARE_Y_X_TMP3 (1434)
+#define FCFG_7 (1073)
+#define FCFG_6 (1106)
+#define FLAT_STATE_END (1713)
+#define SWING_END_4 (1616)
+#define SWING_END_2 (1565)
+#define SWING_END_3 (1587)
+#define SWING_END_1 (1550)
+#define CFG_8 (2718)
+#define CFG_15 (2727)
+#define CFG_16 (2746)
+#define CFG_EXT_GYRO_BIAS (1189)
+#define END_COMPARE_Y_X_TMP (1407)
+#define DO_NOT_UPDATE_PROP_ROT (1839)
+#define CFG_7 (1205)
+#define FLAT_STATE_END_TEMP (1683)
+#define END_COMPARE_Y_X (1484)
+#define SKIP_SWING_END_1 (1551)
+#define SKIP_SWING_END_3 (1588)
+#define SKIP_SWING_END_2 (1566)
+#define TILTG75_START (1672)
+#define CFG_6 (2753)
+#define TILTL75_END (1669)
+#define END_ORIENT (1884)
+#define CFG_FLICK_IN (2573)
+#define TILTL75_START (1643)
+#define CFG_MOTION_BIAS (1208)
+#define X_GRT_Y (1408)
+#define TEMPLABEL (2324)
+#define CFG_ANDROID_ORIENT_INT (1853)
+#define CFG_GYRO_RAW_DATA (2722)
+#define X_GRT_Y_TMP2 (1379)
+
+#define D_0_22 (22 + 512)
+#define D_0_24 (24 + 512)
+
+#define D_0_36 (36)
+#define D_0_52 (52)
+#define D_0_96 (96)
+#define D_0_104 (104)
+#define D_0_108 (108)
+#define D_0_163 (163)
+#define D_0_188 (188)
+#define D_0_192 (192)
+#define D_0_224 (224)
+#define D_0_228 (228)
+#define D_0_232 (232)
+#define D_0_236 (236)
+
+#define D_1_2 (256 + 2)
+#define D_1_4 (256 + 4)
+#define D_1_8 (256 + 8)
+#define D_1_10 (256 + 10)
+#define D_1_24 (256 + 24)
+#define D_1_28 (256 + 28)
+#define D_1_36 (256 + 36)
+#define D_1_40 (256 + 40)
+#define D_1_44 (256 + 44)
+#define D_1_72 (256 + 72)
+#define D_1_74 (256 + 74)
+#define D_1_79 (256 + 79)
+#define D_1_88 (256 + 88)
+#define D_1_90 (256 + 90)
+#define D_1_92 (256 + 92)
+#define D_1_96 (256 + 96)
+#define D_1_98 (256 + 98)
+#define D_1_106 (256 + 106)
+#define D_1_108 (256 + 108)
+#define D_1_112 (256 + 112)
+#define D_1_128 (256 + 144)
+#define D_1_152 (256 + 12)
+#define D_1_160 (256 + 160)
+#define D_1_176 (256 + 176)
+#define D_1_178 (256 + 178)
+#define D_1_218 (256 + 218)
+#define D_1_232 (256 + 232)
+#define D_1_236 (256 + 236)
+#define D_1_240 (256 + 240)
+#define D_1_244 (256 + 244)
+#define D_1_250 (256 + 250)
+#define D_1_252 (256 + 252)
+#define D_2_12 (512 + 12)
+#define D_2_96 (512 + 96)
+#define D_2_108 (512 + 108)
+#define D_2_208 (512 + 208)
+#define D_2_224 (512 + 224)
+#define D_2_236 (512 + 236)
+#define D_2_244 (512 + 244)
+#define D_2_248 (512 + 248)
+#define D_2_252 (512 + 252)
+
+#define CPASS_BIAS_X (35 * 16 + 4)
+#define CPASS_BIAS_Y (35 * 16 + 8)
+#define CPASS_BIAS_Z (35 * 16 + 12)
+#define CPASS_MTX_00 (36 * 16)
+#define CPASS_MTX_01 (36 * 16 + 4)
+#define CPASS_MTX_02 (36 * 16 + 8)
+#define CPASS_MTX_10 (36 * 16 + 12)
+#define CPASS_MTX_11 (37 * 16)
+#define CPASS_MTX_12 (37 * 16 + 4)
+#define CPASS_MTX_20 (37 * 16 + 8)
+#define CPASS_MTX_21 (37 * 16 + 12)
+#define CPASS_MTX_22 (43 * 16 + 12)
+#define D_EXT_GYRO_BIAS_X (61 * 16)
+#define D_EXT_GYRO_BIAS_Y (61 * 16) + 4
+#define D_EXT_GYRO_BIAS_Z (61 * 16) + 8
+#define D_ACT0 (40 * 16)
+#define D_ACSX (40 * 16 + 4)
+#define D_ACSY (40 * 16 + 8)
+#define D_ACSZ (40 * 16 + 12)
+
+#define FLICK_MSG (45 * 16 + 4)
+#define FLICK_COUNTER (45 * 16 + 8)
+#define FLICK_LOWER (45 * 16 + 12)
+#define FLICK_UPPER (46 * 16 + 12)
+
+#define D_AUTH_OUT (992)
+#define D_AUTH_IN (996)
+#define D_AUTH_A (1000)
+#define D_AUTH_B (1004)
+
+#define D_PEDSTD_BP_B (768 + 0x1C)
+#define D_PEDSTD_HP_A (768 + 0x78)
+#define D_PEDSTD_HP_B (768 + 0x7C)
+#define D_PEDSTD_BP_A4 (768 + 0x40)
+#define D_PEDSTD_BP_A3 (768 + 0x44)
+#define D_PEDSTD_BP_A2 (768 + 0x48)
+#define D_PEDSTD_BP_A1 (768 + 0x4C)
+#define D_PEDSTD_INT_THRSH (768 + 0x68)
+#define D_PEDSTD_CLIP (768 + 0x6C)
+#define D_PEDSTD_SB (768 + 0x28)
+#define D_PEDSTD_SB_TIME (768 + 0x2C)
+#define D_PEDSTD_PEAKTHRSH (768 + 0x98)
+#define D_PEDSTD_TIML (768 + 0x2A)
+#define D_PEDSTD_TIMH (768 + 0x2E)
+#define D_PEDSTD_PEAK (768 + 0X94)
+#define D_PEDSTD_STEPCTR (768 + 0x60)
+#define D_PEDSTD_TIMECTR (964)
+#define D_PEDSTD_DECI (768 + 0xA0)
+
+#define D_HOST_NO_MOT (976)
+#define D_ACCEL_BIAS (660)
+
+#define D_ORIENT_GAP (76)
+
+#define D_TILT0_H (48)
+#define D_TILT0_L (50)
+#define D_TILT1_H (52)
+#define D_TILT1_L (54)
+#define D_TILT2_H (56)
+#define D_TILT2_L (58)
+#define D_TILT3_H (60)
+#define D_TILT3_L (62)
+
+#define DMP_CODE_SIZE (3062)
+
+static const unsigned char dmp_memory[DMP_CODE_SIZE] = {
+ /* bank # 0 */
+ 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x02, 0x00, 0x03, 0x00, 0x00,
+ 0x00, 0x65, 0x00, 0x54, 0xff, 0xef, 0x00, 0x00, 0xfa, 0x80, 0x00, 0x0b, 0x12, 0x82, 0x00, 0x01,
+ 0x03, 0x0c, 0x30, 0xc3, 0x0e, 0x8c, 0x8c, 0xe9, 0x14, 0xd5, 0x40, 0x02, 0x13, 0x71, 0x0f, 0x8e,
+ 0x38, 0x83, 0xf8, 0x83, 0x30, 0x00, 0xf8, 0x83, 0x25, 0x8e, 0xf8, 0x83, 0x30, 0x00, 0xf8, 0x83,
+ 0xff, 0xff, 0xff, 0xff, 0x0f, 0xfe, 0xa9, 0xd6, 0x24, 0x00, 0x04, 0x00, 0x1a, 0x82, 0x79, 0xa1,
+ 0x00, 0x00, 0x00, 0x3c, 0xff, 0xff, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x38, 0x83, 0x6f, 0xa2,
+ 0x00, 0x3e, 0x03, 0x30, 0x40, 0x00, 0x00, 0x00, 0x02, 0xca, 0xe3, 0x09, 0x3e, 0x80, 0x00, 0x00,
+ 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,
+ 0x00, 0x0c, 0x00, 0x00, 0x00, 0x0c, 0x18, 0x6e, 0x00, 0x00, 0x06, 0x92, 0x0a, 0x16, 0xc0, 0xdf,
+ 0xff, 0xff, 0x02, 0x56, 0xfd, 0x8c, 0xd3, 0x77, 0xff, 0xe1, 0xc4, 0x96, 0xe0, 0xc5, 0xbe, 0xaa,
+ 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x0b, 0x2b, 0x00, 0x00, 0x16, 0x57, 0x00, 0x00, 0x03, 0x59,
+ 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1d, 0xfa, 0x00, 0x02, 0x6c, 0x1d, 0x00, 0x00, 0x00, 0x00,
+ 0x3f, 0xff, 0xdf, 0xeb, 0x00, 0x3e, 0xb3, 0xb6, 0x00, 0x0d, 0x22, 0x78, 0x00, 0x00, 0x2f, 0x3c,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x19, 0x42, 0xb5, 0x00, 0x00, 0x39, 0xa2, 0x00, 0x00, 0xb3, 0x65,
+ 0xd9, 0x0e, 0x9f, 0xc9, 0x1d, 0xcf, 0x4c, 0x34, 0x30, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00,
+ 0x3b, 0xb6, 0x7a, 0xe8, 0x00, 0x64, 0x00, 0x00, 0x00, 0xc8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ /* bank # 1 */
+ 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0xfa, 0x92, 0x10, 0x00, 0x22, 0x5e, 0x00, 0x0d, 0x22, 0x9f,
+ 0x00, 0x01, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0xff, 0x46, 0x00, 0x00, 0x63, 0xd4, 0x00, 0x00,
+ 0x10, 0x00, 0x00, 0x00, 0x04, 0xd6, 0x00, 0x00, 0x04, 0xcc, 0x00, 0x00, 0x04, 0xcc, 0x00, 0x00,
+ 0x00, 0x00, 0x10, 0x72, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x06, 0x00, 0x02, 0x00, 0x05, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x64, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x64, 0x00, 0x20, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x03, 0x00,
+ 0x00, 0x00, 0x00, 0x32, 0xf8, 0x98, 0x00, 0x00, 0xff, 0x65, 0x00, 0x00, 0x83, 0x0f, 0x00, 0x00,
+ 0xff, 0x9b, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00,
+ 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0xb2, 0x6a, 0x00, 0x02, 0x00, 0x00,
+ 0x00, 0x01, 0xfb, 0x83, 0x00, 0x68, 0x00, 0x00, 0x00, 0xd9, 0xfc, 0x00, 0x7c, 0xf1, 0xff, 0x83,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x64, 0x03, 0xe8, 0x00, 0x64, 0x00, 0x28,
+ 0x00, 0x00, 0x00, 0x25, 0x00, 0x00, 0x00, 0x00, 0x16, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00,
+ 0x00, 0x00, 0x10, 0x00, 0x00, 0x2f, 0x00, 0x00, 0x00, 0x00, 0x01, 0xf4, 0x00, 0x00, 0x10, 0x00,
+ /* bank # 2 */
+ 0x00, 0x28, 0x00, 0x00, 0xff, 0xff, 0x45, 0x81, 0xff, 0xff, 0xfa, 0x72, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0x00, 0x05, 0x00, 0x05, 0xba, 0xc6, 0x00, 0x47, 0x78, 0xa2,
+ 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x14,
+ 0x00, 0x00, 0x25, 0x4d, 0x00, 0x2f, 0x70, 0x6d, 0x00, 0x00, 0x05, 0xae, 0x00, 0x0c, 0x02, 0xd0,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x1b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x64, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x1b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x0e,
+ 0x00, 0x00, 0x0a, 0xc7, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x32, 0xff, 0xff, 0xff, 0x9c,
+ 0x00, 0x00, 0x0b, 0x2b, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x64,
+ 0xff, 0xe5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ /* bank # 3 */
+ 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x01, 0x80, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x24, 0x26, 0xd3,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x10, 0x00, 0x96, 0x00, 0x3c,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x0c, 0x0a, 0x4e, 0x68, 0xcd, 0xcf, 0x77, 0x09, 0x50, 0x16, 0x67, 0x59, 0xc6, 0x19, 0xce, 0x82,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x17, 0xd7, 0x84, 0x00, 0x03, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc7, 0x93, 0x8f, 0x9d, 0x1e, 0x1b, 0x1c, 0x19,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x03, 0x18, 0x85, 0x00, 0x00, 0x40, 0x00,
+ 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x67, 0x7d, 0xdf, 0x7e, 0x72, 0x90, 0x2e, 0x55, 0x4c, 0xf6, 0xe6, 0x88,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+
+ /* bank # 4 */
+ 0xd8, 0xdc, 0xb4, 0xb8, 0xb0, 0xd8, 0xb9, 0xab, 0xf3, 0xf8, 0xfa, 0xb3, 0xb7, 0xbb, 0x8e, 0x9e,
+ 0xae, 0xf1, 0x32, 0xf5, 0x1b, 0xf1, 0xb4, 0xb8, 0xb0, 0x80, 0x97, 0xf1, 0xa9, 0xdf, 0xdf, 0xdf,
+ 0xaa, 0xdf, 0xdf, 0xdf, 0xf2, 0xaa, 0xc5, 0xcd, 0xc7, 0xa9, 0x0c, 0xc9, 0x2c, 0x97, 0xf1, 0xa9,
+ 0x89, 0x26, 0x46, 0x66, 0xb2, 0x89, 0x99, 0xa9, 0x2d, 0x55, 0x7d, 0xb0, 0xb0, 0x8a, 0xa8, 0x96,
+ 0x36, 0x56, 0x76, 0xf1, 0xba, 0xa3, 0xb4, 0xb2, 0x80, 0xc0, 0xb8, 0xa8, 0x97, 0x11, 0xb2, 0x83,
+ 0x98, 0xba, 0xa3, 0xf0, 0x24, 0x08, 0x44, 0x10, 0x64, 0x18, 0xb2, 0xb9, 0xb4, 0x98, 0x83, 0xf1,
+ 0xa3, 0x29, 0x55, 0x7d, 0xba, 0xb5, 0xb1, 0xa3, 0x83, 0x93, 0xf0, 0x00, 0x28, 0x50, 0xf5, 0xb2,
+ 0xb6, 0xaa, 0x83, 0x93, 0x28, 0x54, 0x7c, 0xf1, 0xb9, 0xa3, 0x82, 0x93, 0x61, 0xba, 0xa2, 0xda,
+ 0xde, 0xdf, 0xdb, 0x81, 0x9a, 0xb9, 0xae, 0xf5, 0x60, 0x68, 0x70, 0xf1, 0xda, 0xba, 0xa2, 0xdf,
+ 0xd9, 0xba, 0xa2, 0xfa, 0xb9, 0xa3, 0x82, 0x92, 0xdb, 0x31, 0xba, 0xa2, 0xd9, 0xba, 0xa2, 0xf8,
+ 0xdf, 0x85, 0xa4, 0xd0, 0xc1, 0xbb, 0xad, 0x83, 0xc2, 0xc5, 0xc7, 0xb8, 0xa2, 0xdf, 0xdf, 0xdf,
+ 0xba, 0xa0, 0xdf, 0xdf, 0xdf, 0xd8, 0xd8, 0xf1, 0xb8, 0xaa, 0xb3, 0x8d, 0xb4, 0x98, 0x0d, 0x35,
+ 0x5d, 0xb2, 0xb6, 0xba, 0xaf, 0x8c, 0x96, 0x19, 0x8f, 0x9f, 0xa7, 0x0e, 0x16, 0x1e, 0xb4, 0x9a,
+ 0xb8, 0xaa, 0x87, 0x2c, 0x54, 0x7c, 0xba, 0xa4, 0xb0, 0x8a, 0xb6, 0x91, 0x32, 0x56, 0x76, 0xb2,
+ 0x84, 0x94, 0xa4, 0xc8, 0x08, 0xcd, 0xd8, 0xb8, 0xb4, 0xb0, 0xf1, 0x99, 0x82, 0xa8, 0x2d, 0x55,
+ 0x7d, 0x98, 0xa8, 0x0e, 0x16, 0x1e, 0xa2, 0x2c, 0x54, 0x7c, 0x92, 0xa4, 0xf0, 0x2c, 0x50, 0x78,
+ /* bank # 5 */
+ 0xf1, 0x84, 0xa8, 0x98, 0xc4, 0xcd, 0xfc, 0xd8, 0x0d, 0xdb, 0xa8, 0xfc, 0x2d, 0xf3, 0xd9, 0xba,
+ 0xa6, 0xf8, 0xda, 0xba, 0xa6, 0xde, 0xd8, 0xba, 0xb2, 0xb6, 0x86, 0x96, 0xa6, 0xd0, 0xf3, 0xc8,
+ 0x41, 0xda, 0xa6, 0xc8, 0xf8, 0xd8, 0xb0, 0xb4, 0xb8, 0x82, 0xa8, 0x92, 0xf5, 0x2c, 0x54, 0x88,
+ 0x98, 0xf1, 0x35, 0xd9, 0xf4, 0x18, 0xd8, 0xf1, 0xa2, 0xd0, 0xf8, 0xf9, 0xa8, 0x84, 0xd9, 0xc7,
+ 0xdf, 0xf8, 0xf8, 0x83, 0xc5, 0xda, 0xdf, 0x69, 0xdf, 0x83, 0xc1, 0xd8, 0xf4, 0x01, 0x14, 0xf1,
+ 0xa8, 0x82, 0x4e, 0xa8, 0x84, 0xf3, 0x11, 0xd1, 0x82, 0xf5, 0xd9, 0x92, 0x28, 0x97, 0x88, 0xf1,
+ 0x09, 0xf4, 0x1c, 0x1c, 0xd8, 0x84, 0xa8, 0xf3, 0xc0, 0xf9, 0xd1, 0xd9, 0x97, 0x82, 0xf1, 0x29,
+ 0xf4, 0x0d, 0xd8, 0xf3, 0xf9, 0xf9, 0xd1, 0xd9, 0x82, 0xf4, 0xc2, 0x03, 0xd8, 0xde, 0xdf, 0x1a,
+ 0xd8, 0xf1, 0xa2, 0xfa, 0xf9, 0xa8, 0x84, 0x98, 0xd9, 0xc7, 0xdf, 0xf8, 0xf8, 0xf8, 0x83, 0xc7,
+ 0xda, 0xdf, 0x69, 0xdf, 0xf8, 0x83, 0xc3, 0xd8, 0xf4, 0x01, 0x14, 0xf1, 0x98, 0xa8, 0x82, 0x2e,
+ 0xa8, 0x84, 0xf3, 0x11, 0xd1, 0x82, 0xf5, 0xd9, 0x92, 0x50, 0x97, 0x88, 0xf1, 0x09, 0xf4, 0x1c,
+ 0xd8, 0x84, 0xa8, 0xf3, 0xc0, 0xf8, 0xf9, 0xd1, 0xd9, 0x97, 0x82, 0xf1, 0x49, 0xf4, 0x0d, 0xd8,
+ 0xf3, 0xf9, 0xf9, 0xd1, 0xd9, 0x82, 0xf4, 0xc4, 0x03, 0xd8, 0xde, 0xdf, 0xd8, 0xf1, 0xad, 0x88,
+ 0x98, 0xcc, 0xa8, 0x09, 0xf9, 0xd9, 0x82, 0x92, 0xa8, 0xf5, 0x7c, 0xf1, 0x88, 0x3a, 0xcf, 0x94,
+ 0x4a, 0x6e, 0x98, 0xdb, 0x69, 0x31, 0xda, 0xad, 0xf2, 0xde, 0xf9, 0xd8, 0x87, 0x95, 0xa8, 0xf2,
+ 0x21, 0xd1, 0xda, 0xa5, 0xf9, 0xf4, 0x17, 0xd9, 0xf1, 0xae, 0x8e, 0xd0, 0xc0, 0xc3, 0xae, 0x82,
+ /* bank # 6 */
+ 0xc6, 0x84, 0xc3, 0xa8, 0x85, 0x95, 0xc8, 0xa5, 0x88, 0xf2, 0xc0, 0xf1, 0xf4, 0x01, 0x0e, 0xf1,
+ 0x8e, 0x9e, 0xa8, 0xc6, 0x3e, 0x56, 0xf5, 0x54, 0xf1, 0x88, 0x72, 0xf4, 0x01, 0x15, 0xf1, 0x98,
+ 0x45, 0x85, 0x6e, 0xf5, 0x8e, 0x9e, 0x04, 0x88, 0xf1, 0x42, 0x98, 0x5a, 0x8e, 0x9e, 0x06, 0x88,
+ 0x69, 0xf4, 0x01, 0x1c, 0xf1, 0x98, 0x1e, 0x11, 0x08, 0xd0, 0xf5, 0x04, 0xf1, 0x1e, 0x97, 0x02,
+ 0x02, 0x98, 0x36, 0x25, 0xdb, 0xf9, 0xd9, 0x85, 0xa5, 0xf3, 0xc1, 0xda, 0x85, 0xa5, 0xf3, 0xdf,
+ 0xd8, 0x85, 0x95, 0xa8, 0xf3, 0x09, 0xda, 0xa5, 0xfa, 0xd8, 0x82, 0x92, 0xa8, 0xf5, 0x78, 0xf1,
+ 0x88, 0x1a, 0x84, 0x9f, 0x26, 0x88, 0x98, 0x21, 0xda, 0xf4, 0x1d, 0xf3, 0xd8, 0x87, 0x9f, 0x39,
+ 0xd1, 0xaf, 0xd9, 0xdf, 0xdf, 0xfb, 0xf9, 0xf4, 0x0c, 0xf3, 0xd8, 0xfa, 0xd0, 0xf8, 0xda, 0xf9,
+ 0xf9, 0xd0, 0xdf, 0xd9, 0xf9, 0xd8, 0xf4, 0x0b, 0xd8, 0xf3, 0x87, 0x9f, 0x39, 0xd1, 0xaf, 0xd9,
+ 0xdf, 0xdf, 0xf4, 0x1d, 0xf3, 0xd8, 0xfa, 0xfc, 0xa8, 0x69, 0xf9, 0xf9, 0xaf, 0xd0, 0xda, 0xde,
+ 0xfa, 0xd9, 0xf8, 0x8f, 0x9f, 0xa8, 0xf1, 0xcc, 0xf3, 0x98, 0xdb, 0x45, 0xd9, 0xaf, 0xdf, 0xd0,
+ 0xf8, 0xd8, 0xf1, 0x8f, 0x9f, 0xa8, 0xca, 0xf3, 0x88, 0x09, 0xda, 0xaf, 0x8f, 0xcb, 0xf8, 0xd8,
+ 0xf2, 0xad, 0x97, 0x8d, 0x0c, 0xd9, 0xa5, 0xdf, 0xf9, 0xba, 0xa6, 0xf3, 0xfa, 0xf4, 0x12, 0xf2,
+ 0xd8, 0x95, 0x0d, 0xd1, 0xd9, 0xba, 0xa6, 0xf3, 0xfa, 0xda, 0xa5, 0xf2, 0xc1, 0xba, 0xa6, 0xf3,
+ 0xdf, 0xd8, 0xf1, 0xba, 0xb2, 0xb6, 0x86, 0x96, 0xa6, 0xd0, 0xca, 0xf3, 0x49, 0xda, 0xa6, 0xcb,
+ 0xf8, 0xd8, 0xb0, 0xb4, 0xb8, 0xd8, 0xad, 0x84, 0xf2, 0xc0, 0xdf, 0xf1, 0x8f, 0xcb, 0xc3, 0xa8,
+ /* bank # 7 */
+ 0xb2, 0xb6, 0x86, 0x96, 0xc8, 0xc1, 0xcb, 0xc3, 0xf3, 0xb0, 0xb4, 0x88, 0x98, 0xa8, 0x21, 0xdb,
+ 0x71, 0x8d, 0x9d, 0x71, 0x85, 0x95, 0x21, 0xd9, 0xad, 0xf2, 0xfa, 0xd8, 0x85, 0x97, 0xa8, 0x28,
+ 0xd9, 0xf4, 0x08, 0xd8, 0xf2, 0x8d, 0x29, 0xda, 0xf4, 0x05, 0xd9, 0xf2, 0x85, 0xa4, 0xc2, 0xf2,
+ 0xd8, 0xa8, 0x8d, 0x94, 0x01, 0xd1, 0xd9, 0xf4, 0x11, 0xf2, 0xd8, 0x87, 0x21, 0xd8, 0xf4, 0x0a,
+ 0xd8, 0xf2, 0x84, 0x98, 0xa8, 0xc8, 0x01, 0xd1, 0xd9, 0xf4, 0x11, 0xd8, 0xf3, 0xa4, 0xc8, 0xbb,
+ 0xaf, 0xd0, 0xf2, 0xde, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xd8, 0xf1, 0xb8, 0xf6,
+ 0xb5, 0xb9, 0xb0, 0x8a, 0x95, 0xa3, 0xde, 0x3c, 0xa3, 0xd9, 0xf8, 0xd8, 0x5c, 0xa3, 0xd9, 0xf8,
+ 0xd8, 0x7c, 0xa3, 0xd9, 0xf8, 0xd8, 0xf8, 0xf9, 0xd1, 0xa5, 0xd9, 0xdf, 0xda, 0xfa, 0xd8, 0xb1,
+ 0x85, 0x30, 0xf7, 0xd9, 0xde, 0xd8, 0xf8, 0x30, 0xad, 0xda, 0xde, 0xd8, 0xf2, 0xb4, 0x8c, 0x99,
+ 0xa3, 0x2d, 0x55, 0x7d, 0xa0, 0x83, 0xdf, 0xdf, 0xdf, 0xb5, 0x91, 0xa0, 0xf6, 0x29, 0xd9, 0xfb,
+ 0xd8, 0xa0, 0xfc, 0x29, 0xd9, 0xfa, 0xd8, 0xa0, 0xd0, 0x51, 0xd9, 0xf8, 0xd8, 0xfc, 0x51, 0xd9,
+ 0xf9, 0xd8, 0x79, 0xd9, 0xfb, 0xd8, 0xa0, 0xd0, 0xfc, 0x79, 0xd9, 0xfa, 0xd8, 0xa1, 0xf9, 0xf9,
+ 0xf9, 0xf9, 0xf9, 0xa0, 0xda, 0xdf, 0xdf, 0xdf, 0xd8, 0xa1, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xac,
+ 0xde, 0xf8, 0xad, 0xde, 0x83, 0x93, 0xac, 0x2c, 0x54, 0x7c, 0xf1, 0xa8, 0xdf, 0xdf, 0xdf, 0xf6,
+ 0x9d, 0x2c, 0xda, 0xa0, 0xdf, 0xd9, 0xfa, 0xdb, 0x2d, 0xf8, 0xd8, 0xa8, 0x50, 0xda, 0xa0, 0xd0,
+ 0xde, 0xd9, 0xd0, 0xf8, 0xf8, 0xf8, 0xdb, 0x55, 0xf8, 0xd8, 0xa8, 0x78, 0xda, 0xa0, 0xd0, 0xdf,
+ /* bank # 8 */
+ 0xd9, 0xd0, 0xfa, 0xf8, 0xf8, 0xf8, 0xf8, 0xdb, 0x7d, 0xf8, 0xd8, 0x9c, 0xa8, 0x8c, 0xf5, 0x30,
+ 0xdb, 0x38, 0xd9, 0xd0, 0xde, 0xdf, 0xa0, 0xd0, 0xde, 0xdf, 0xd8, 0xa8, 0x48, 0xdb, 0x58, 0xd9,
+ 0xdf, 0xd0, 0xde, 0xa0, 0xdf, 0xd0, 0xde, 0xd8, 0xa8, 0x68, 0xdb, 0x70, 0xd9, 0xdf, 0xdf, 0xa0,
+ 0xdf, 0xdf, 0xd8, 0xf1, 0xa8, 0x88, 0x90, 0x2c, 0x54, 0x7c, 0x98, 0xa8, 0xd0, 0x5c, 0x38, 0xd1,
+ 0xda, 0xf2, 0xae, 0x8c, 0xdf, 0xf9, 0xd8, 0xb0, 0x87, 0xa8, 0xc1, 0xc1, 0xb1, 0x88, 0xa8, 0xc6,
+ 0xf9, 0xf9, 0xda, 0x36, 0xd8, 0xa8, 0xf9, 0xda, 0x36, 0xd8, 0xa8, 0xf9, 0xda, 0x36, 0xd8, 0xa8,
+ 0xf9, 0xda, 0x36, 0xd8, 0xa8, 0xf9, 0xda, 0x36, 0xd8, 0xf7, 0x8d, 0x9d, 0xad, 0xf8, 0x18, 0xda,
+ 0xf2, 0xae, 0xdf, 0xd8, 0xf7, 0xad, 0xfa, 0x30, 0xd9, 0xa4, 0xde, 0xf9, 0xd8, 0xf2, 0xae, 0xde,
+ 0xfa, 0xf9, 0x83, 0xa7, 0xd9, 0xc3, 0xc5, 0xc7, 0xf1, 0x88, 0x9b, 0xa7, 0x7a, 0xad, 0xf7, 0xde,
+ 0xdf, 0xa4, 0xf8, 0x84, 0x94, 0x08, 0xa7, 0x97, 0xf3, 0x00, 0xae, 0xf2, 0x98, 0x19, 0xa4, 0x88,
+ 0xc6, 0xa3, 0x94, 0x88, 0xf6, 0x32, 0xdf, 0xf2, 0x83, 0x93, 0xdb, 0x09, 0xd9, 0xf2, 0xaa, 0xdf,
+ 0xd8, 0xd8, 0xae, 0xf8, 0xf9, 0xd1, 0xda, 0xf3, 0xa4, 0xde, 0xa7, 0xf1, 0x88, 0x9b, 0x7a, 0xd8,
+ 0xf3, 0x84, 0x94, 0xae, 0x19, 0xf9, 0xda, 0xaa, 0xf1, 0xdf, 0xd8, 0xa8, 0x81, 0xc0, 0xc3, 0xc5,
+ 0xc7, 0xa3, 0x92, 0x83, 0xf6, 0x28, 0xad, 0xde, 0xd9, 0xf8, 0xd8, 0xa3, 0x50, 0xad, 0xd9, 0xf8,
+ 0xd8, 0xa3, 0x78, 0xad, 0xd9, 0xf8, 0xd8, 0xf8, 0xf9, 0xd1, 0xa1, 0xda, 0xde, 0xc3, 0xc5, 0xc7,
+ 0xd8, 0xa1, 0x81, 0x94, 0xf8, 0x18, 0xf2, 0xb0, 0x89, 0xac, 0xc3, 0xc5, 0xc7, 0xf1, 0xd8, 0xb8,
+ /* bank # 9 */
+ 0xb4, 0xb0, 0x97, 0x86, 0xa8, 0x31, 0x9b, 0x06, 0x99, 0x07, 0xab, 0x97, 0x28, 0x88, 0x9b, 0xf0,
+ 0x0c, 0x20, 0x14, 0x40, 0xb0, 0xb4, 0xb8, 0xf0, 0xa8, 0x8a, 0x9a, 0x28, 0x50, 0x78, 0xb7, 0x9b,
+ 0xa8, 0x29, 0x51, 0x79, 0x24, 0x70, 0x59, 0x44, 0x69, 0x38, 0x64, 0x48, 0x31, 0xf1, 0xbb, 0xab,
+ 0x88, 0x00, 0x2c, 0x54, 0x7c, 0xf0, 0xb3, 0x8b, 0xb8, 0xa8, 0x04, 0x28, 0x50, 0x78, 0xf1, 0xb0,
+ 0x88, 0xb4, 0x97, 0x26, 0xa8, 0x59, 0x98, 0xbb, 0xab, 0xb3, 0x8b, 0x02, 0x26, 0x46, 0x66, 0xb0,
+ 0xb8, 0xf0, 0x8a, 0x9c, 0xa8, 0x29, 0x51, 0x79, 0x8b, 0x29, 0x51, 0x79, 0x8a, 0x24, 0x70, 0x59,
+ 0x8b, 0x20, 0x58, 0x71, 0x8a, 0x44, 0x69, 0x38, 0x8b, 0x39, 0x40, 0x68, 0x8a, 0x64, 0x48, 0x31,
+ 0x8b, 0x30, 0x49, 0x60, 0x88, 0xf1, 0xac, 0x00, 0x2c, 0x54, 0x7c, 0xf0, 0x8c, 0xa8, 0x04, 0x28,
+ 0x50, 0x78, 0xf1, 0x88, 0x97, 0x26, 0xa8, 0x59, 0x98, 0xac, 0x8c, 0x02, 0x26, 0x46, 0x66, 0xf0,
+ 0x89, 0x9c, 0xa8, 0x29, 0x51, 0x79, 0x24, 0x70, 0x59, 0x44, 0x69, 0x38, 0x64, 0x48, 0x31, 0xa9,
+ 0x88, 0x09, 0x20, 0x59, 0x70, 0xab, 0x11, 0x38, 0x40, 0x69, 0xa8, 0x19, 0x31, 0x48, 0x60, 0x8c,
+ 0xa8, 0x3c, 0x41, 0x5c, 0x20, 0x7c, 0x00, 0xf1, 0x87, 0x98, 0x19, 0x86, 0xa8, 0x6e, 0x76, 0x7e,
+ 0xa9, 0x99, 0x88, 0x2d, 0x55, 0x7d, 0xd8, 0xb1, 0xb5, 0xb9, 0xa3, 0xdf, 0xdf, 0xdf, 0xae, 0xd0,
+ 0xdf, 0xaa, 0xd0, 0xde, 0xf2, 0xab, 0xf8, 0xf9, 0xd9, 0xb0, 0x87, 0xc4, 0xaa, 0xf1, 0xdf, 0xdf,
+ 0xbb, 0xaf, 0xdf, 0xdf, 0xb9, 0xd8, 0xb1, 0xf1, 0xa3, 0x97, 0x8e, 0x60, 0xdf, 0xb0, 0x84, 0xf2,
+ 0xc8, 0xf8, 0xf9, 0xd9, 0xde, 0xd8, 0x93, 0x85, 0xf1, 0x4a, 0xb1, 0x83, 0xa3, 0x08, 0xb5, 0x83,
+ /* bank # 10 */
+ 0x9a, 0x08, 0x10, 0xb7, 0x9f, 0x10, 0xd8, 0xf1, 0xb0, 0xba, 0xae, 0xb0, 0x8a, 0xc2, 0xb2, 0xb6,
+ 0x8e, 0x9e, 0xf1, 0xfb, 0xd9, 0xf4, 0x1d, 0xd8, 0xf9, 0xd9, 0x0c, 0xf1, 0xd8, 0xf8, 0xf8, 0xad,
+ 0x61, 0xd9, 0xae, 0xfb, 0xd8, 0xf4, 0x0c, 0xf1, 0xd8, 0xf8, 0xf8, 0xad, 0x19, 0xd9, 0xae, 0xfb,
+ 0xdf, 0xd8, 0xf4, 0x16, 0xf1, 0xd8, 0xf8, 0xad, 0x8d, 0x61, 0xd9, 0xf4, 0xf4, 0xac, 0xf5, 0x9c,
+ 0x9c, 0x8d, 0xdf, 0x2b, 0xba, 0xb6, 0xae, 0xfa, 0xf8, 0xf4, 0x0b, 0xd8, 0xf1, 0xae, 0xd0, 0xf8,
+ 0xad, 0x51, 0xda, 0xae, 0xfa, 0xf8, 0xf1, 0xd8, 0xb9, 0xb1, 0xb6, 0xa3, 0x83, 0x9c, 0x08, 0xb9,
+ 0xb1, 0x83, 0x9a, 0xb5, 0xaa, 0xc0, 0xfd, 0x30, 0x83, 0xb7, 0x9f, 0x10, 0xb5, 0x8b, 0x93, 0xf2,
+ 0x02, 0x02, 0xd1, 0xab, 0xda, 0xde, 0xd8, 0xf1, 0xb0, 0x80, 0xba, 0xab, 0xc0, 0xc3, 0xb2, 0x84,
+ 0xc1, 0xc3, 0xd8, 0xb1, 0xb9, 0xf3, 0x8b, 0xa3, 0x91, 0xb6, 0x09, 0xb4, 0xd9, 0xab, 0xde, 0xb0,
+ 0x87, 0x9c, 0xb9, 0xa3, 0xdd, 0xf1, 0xb3, 0x8b, 0x8b, 0x8b, 0x8b, 0x8b, 0xb0, 0x87, 0xa3, 0xa3,
+ 0xa3, 0xa3, 0xb2, 0x8b, 0xb6, 0x9b, 0xf2, 0xa3, 0xa3, 0xa3, 0xa3, 0xa3, 0xa3, 0xa3, 0xa3, 0xa3,
+ 0xa3, 0xf1, 0xb0, 0x87, 0xb5, 0x9a, 0xa3, 0xf3, 0x9b, 0xa3, 0xa3, 0xdc, 0xba, 0xac, 0xdf, 0xb9,
+ 0xa3, 0xa3, 0xa3, 0xa3, 0xa3, 0xa3, 0xa3, 0xa3, 0xa3, 0xa3, 0xa3, 0xa3, 0xa3, 0xa3, 0xa3, 0xa3,
+ 0xd8, 0xd8, 0xd8, 0xbb, 0xb3, 0xb7, 0xf1, 0xaa, 0xf9, 0xda, 0xff, 0xd9, 0x80, 0x9a, 0xaa, 0x28,
+ 0xb4, 0x80, 0x98, 0xa7, 0x20, 0xb7, 0x97, 0x87, 0xa8, 0x66, 0x88, 0xf0, 0x79, 0x51, 0xf1, 0x90,
+ 0x2c, 0x87, 0x0c, 0xa7, 0x81, 0x97, 0x62, 0x93, 0xf0, 0x71, 0x71, 0x60, 0x85, 0x94, 0x01, 0x29,
+ /* bank # 11 */
+ 0x51, 0x79, 0x90, 0xa5, 0xf1, 0x28, 0x4c, 0x6c, 0x87, 0x0c, 0x95, 0x18, 0x85, 0x78, 0xa3, 0x83,
+ 0x90, 0x28, 0x4c, 0x6c, 0x88, 0x6c, 0xd8, 0xf3, 0xa2, 0x82, 0x00, 0xf2, 0x10, 0xa8, 0x92, 0x19,
+ 0x80, 0xa2, 0xf2, 0xd9, 0x26, 0xd8, 0xf1, 0x88, 0xa8, 0x4d, 0xd9, 0x48, 0xd8, 0x96, 0xa8, 0x39,
+ 0x80, 0xd9, 0x3c, 0xd8, 0x95, 0x80, 0xa8, 0x39, 0xa6, 0x86, 0x98, 0xd9, 0x2c, 0xda, 0x87, 0xa7,
+ 0x2c, 0xd8, 0xa8, 0x89, 0x95, 0x19, 0xa9, 0x80, 0xd9, 0x38, 0xd8, 0xa8, 0x89, 0x39, 0xa9, 0x80,
+ 0xda, 0x3c, 0xd8, 0xa8, 0x2e, 0xa8, 0x39, 0x90, 0xd9, 0x0c, 0xd8, 0xa8, 0x95, 0x31, 0x98, 0xd9,
+ 0x0c, 0xd8, 0xa8, 0x09, 0xd9, 0xff, 0xd8, 0x01, 0xda, 0xff, 0xd8, 0x95, 0x39, 0xa9, 0xda, 0x26,
+ 0xff, 0xd8, 0x90, 0xa8, 0x0d, 0x89, 0x99, 0xa8, 0x10, 0x80, 0x98, 0x21, 0xda, 0x2e, 0xd8, 0x89,
+ 0x99, 0xa8, 0x31, 0x80, 0xda, 0x2e, 0xd8, 0xa8, 0x86, 0x96, 0x31, 0x80, 0xda, 0x2e, 0xd8, 0xa8,
+ 0x87, 0x31, 0x80, 0xda, 0x2e, 0xd8, 0xa8, 0x82, 0x92, 0xf3, 0x41, 0x80, 0xf1, 0xd9, 0x2e, 0xd8,
+ 0xa8, 0x82, 0xf3, 0x19, 0x80, 0xf1, 0xd9, 0x2e, 0xd8, 0x82, 0xac, 0xf3, 0xc0, 0xa2, 0x80, 0x22,
+ 0xf1, 0xa6, 0x2e, 0xa7, 0x2e, 0xa9, 0x22, 0x98, 0xa8, 0x29, 0xda, 0xac, 0xde, 0xff, 0xd8, 0xa2,
+ 0xf2, 0x2a, 0xf1, 0xa9, 0x2e, 0x82, 0x92, 0xa8, 0xf2, 0x31, 0x80, 0xa6, 0x96, 0xf1, 0xd9, 0x00,
+ 0xac, 0x8c, 0x9c, 0x0c, 0x30, 0xac, 0xde, 0xd0, 0xde, 0xff, 0xd8, 0x8c, 0x9c, 0xac, 0xd0, 0x10,
+ 0xac, 0xde, 0x80, 0x92, 0xa2, 0xf2, 0x4c, 0x82, 0xa8, 0xf1, 0xca, 0xf2, 0x35, 0xf1, 0x96, 0x88,
+ 0xa6, 0xd9, 0x00, 0xd8, 0xf1, 0xff};
+
+static const unsigned short sStartAddress = 0x0400;
+
+/* END OF SECTION COPIED FROM dmpDefaultMPU6050.c */
+
+#define INT_SRC_TAP (0x01)
+#define INT_SRC_ANDROID_ORIENT (0x08)
+
+#define DMP_FEATURE_SEND_ANY_GYRO (DMP_FEATURE_SEND_RAW_GYRO | \
+ DMP_FEATURE_SEND_CAL_GYRO)
+
+#define MAX_PACKET_LENGTH (32)
+
+#define DMP_SAMPLE_RATE (200)
+#define GYRO_SF (46850825LL * 200 / DMP_SAMPLE_RATE)
+
+#define FIFO_CORRUPTION_CHECK
+#ifdef FIFO_CORRUPTION_CHECK
+#define QUAT_ERROR_THRESH (1L << 24)
+#define QUAT_MAG_SQ_NORMALIZED (1L << 28)
+#define QUAT_MAG_SQ_MIN (QUAT_MAG_SQ_NORMALIZED - QUAT_ERROR_THRESH)
+#define QUAT_MAG_SQ_MAX (QUAT_MAG_SQ_NORMALIZED + QUAT_ERROR_THRESH)
+#endif
+
+struct dmp_s
+{
+ void (*tap_cb)(unsigned char count, unsigned char direction);
+ void (*android_orient_cb)(unsigned char orientation);
+ unsigned short orient;
+ unsigned short feature_mask;
+ unsigned short fifo_rate;
+ unsigned char packet_length;
+};
+
+// static struct dmp_s dmp = {
+// .tap_cb = NULL,
+// .android_orient_cb = NULL,
+// .orient = 0,
+// .feature_mask = 0,
+// .fifo_rate = 0,
+// .packet_length = 0
+// };
+
+static struct dmp_s dmp = {
+ NULL,
+ NULL,
+ 0,
+ 0,
+ 0,
+ 0};
+
+/**
+ * @brief Load the DMP with this image.
+ * @return 0 if successful.
+ */
+int dmp_load_motion_driver_firmware(void)
+{
+ return mpu_load_firmware(DMP_CODE_SIZE, dmp_memory, sStartAddress,
+ DMP_SAMPLE_RATE);
+}
+
+/**
+ * @brief Push gyro and accel orientation to the DMP.
+ * The orientation is represented here as the output of
+ * @e inv_orientation_matrix_to_scalar.
+ * @param[in] orient Gyro and accel orientation in body frame.
+ * @return 0 if successful.
+ */
+int dmp_set_orientation(unsigned short orient)
+{
+ unsigned char gyro_regs[3], accel_regs[3];
+ const unsigned char gyro_axes[3] = {DINA4C, DINACD, DINA6C};
+ const unsigned char accel_axes[3] = {DINA0C, DINAC9, DINA2C};
+ const unsigned char gyro_sign[3] = {DINA36, DINA56, DINA76};
+ const unsigned char accel_sign[3] = {DINA26, DINA46, DINA66};
+
+ gyro_regs[0] = gyro_axes[orient & 3];
+ gyro_regs[1] = gyro_axes[(orient >> 3) & 3];
+ gyro_regs[2] = gyro_axes[(orient >> 6) & 3];
+ accel_regs[0] = accel_axes[orient & 3];
+ accel_regs[1] = accel_axes[(orient >> 3) & 3];
+ accel_regs[2] = accel_axes[(orient >> 6) & 3];
+
+ /* Chip-to-body, axes only. */
+ if (mpu_write_mem(FCFG_1, 3, gyro_regs))
+ return -1;
+ if (mpu_write_mem(FCFG_2, 3, accel_regs))
+ return -1;
+
+ memcpy(gyro_regs, gyro_sign, 3);
+ memcpy(accel_regs, accel_sign, 3);
+ if (orient & 4)
+ {
+ gyro_regs[0] |= 1;
+ accel_regs[0] |= 1;
+ }
+ if (orient & 0x20)
+ {
+ gyro_regs[1] |= 1;
+ accel_regs[1] |= 1;
+ }
+ if (orient & 0x100)
+ {
+ gyro_regs[2] |= 1;
+ accel_regs[2] |= 1;
+ }
+
+ /* Chip-to-body, sign only. */
+ if (mpu_write_mem(FCFG_3, 3, gyro_regs))
+ return -1;
+ if (mpu_write_mem(FCFG_7, 3, accel_regs))
+ return -1;
+ dmp.orient = orient;
+ return 0;
+}
+
+/**
+ * @brief Push gyro biases to the DMP.
+ * Because the gyro integration is handled in the DMP, any gyro biases
+ * calculated by the MPL should be pushed down to DMP memory to remove
+ * 3-axis quaternion drift.
+ * \n NOTE: If the DMP-based gyro calibration is enabled, the DMP will
+ * overwrite the biases written to this location once a new one is computed.
+ * @param[in] bias Gyro biases in q16.
+ * @return 0 if successful.
+ */
+int dmp_set_gyro_bias(long *bias)
+{
+ long gyro_bias_body[3];
+ unsigned char regs[4];
+
+ gyro_bias_body[0] = bias[dmp.orient & 3];
+ if (dmp.orient & 4)
+ gyro_bias_body[0] *= -1;
+ gyro_bias_body[1] = bias[(dmp.orient >> 3) & 3];
+ if (dmp.orient & 0x20)
+ gyro_bias_body[1] *= -1;
+ gyro_bias_body[2] = bias[(dmp.orient >> 6) & 3];
+ if (dmp.orient & 0x100)
+ gyro_bias_body[2] *= -1;
+
+#ifdef EMPL_NO_64BIT
+ gyro_bias_body[0] = (long)(((float)gyro_bias_body[0] * GYRO_SF) / 1073741824.f);
+ gyro_bias_body[1] = (long)(((float)gyro_bias_body[1] * GYRO_SF) / 1073741824.f);
+ gyro_bias_body[2] = (long)(((float)gyro_bias_body[2] * GYRO_SF) / 1073741824.f);
+#else
+ gyro_bias_body[0] = (long)(((long long)gyro_bias_body[0] * GYRO_SF) >> 30);
+ gyro_bias_body[1] = (long)(((long long)gyro_bias_body[1] * GYRO_SF) >> 30);
+ gyro_bias_body[2] = (long)(((long long)gyro_bias_body[2] * GYRO_SF) >> 30);
+#endif
+
+ regs[0] = (unsigned char)((gyro_bias_body[0] >> 24) & 0xFF);
+ regs[1] = (unsigned char)((gyro_bias_body[0] >> 16) & 0xFF);
+ regs[2] = (unsigned char)((gyro_bias_body[0] >> 8) & 0xFF);
+ regs[3] = (unsigned char)(gyro_bias_body[0] & 0xFF);
+ if (mpu_write_mem(D_EXT_GYRO_BIAS_X, 4, regs))
+ return -1;
+
+ regs[0] = (unsigned char)((gyro_bias_body[1] >> 24) & 0xFF);
+ regs[1] = (unsigned char)((gyro_bias_body[1] >> 16) & 0xFF);
+ regs[2] = (unsigned char)((gyro_bias_body[1] >> 8) & 0xFF);
+ regs[3] = (unsigned char)(gyro_bias_body[1] & 0xFF);
+ if (mpu_write_mem(D_EXT_GYRO_BIAS_Y, 4, regs))
+ return -1;
+
+ regs[0] = (unsigned char)((gyro_bias_body[2] >> 24) & 0xFF);
+ regs[1] = (unsigned char)((gyro_bias_body[2] >> 16) & 0xFF);
+ regs[2] = (unsigned char)((gyro_bias_body[2] >> 8) & 0xFF);
+ regs[3] = (unsigned char)(gyro_bias_body[2] & 0xFF);
+ return mpu_write_mem(D_EXT_GYRO_BIAS_Z, 4, regs);
+}
+
+/**
+ * @brief Push accel biases to the DMP.
+ * These biases will be removed from the DMP 6-axis quaternion.
+ * @param[in] bias Accel biases in q16.
+ * @return 0 if successful.
+ */
+int dmp_set_accel_bias(long *bias)
+{
+ long accel_bias_body[3];
+ unsigned char regs[12];
+ long long accel_sf;
+ unsigned short accel_sens;
+
+ mpu_get_accel_sens(&accel_sens);
+ accel_sf = (long long)accel_sens << 15;
+ //__no_operation();
+
+ accel_bias_body[0] = bias[dmp.orient & 3];
+ if (dmp.orient & 4)
+ accel_bias_body[0] *= -1;
+ accel_bias_body[1] = bias[(dmp.orient >> 3) & 3];
+ if (dmp.orient & 0x20)
+ accel_bias_body[1] *= -1;
+ accel_bias_body[2] = bias[(dmp.orient >> 6) & 3];
+ if (dmp.orient & 0x100)
+ accel_bias_body[2] *= -1;
+
+#ifdef EMPL_NO_64BIT
+ accel_bias_body[0] = (long)(((float)accel_bias_body[0] * accel_sf) / 1073741824.f);
+ accel_bias_body[1] = (long)(((float)accel_bias_body[1] * accel_sf) / 1073741824.f);
+ accel_bias_body[2] = (long)(((float)accel_bias_body[2] * accel_sf) / 1073741824.f);
+#else
+ accel_bias_body[0] = (long)(((long long)accel_bias_body[0] * accel_sf) >> 30);
+ accel_bias_body[1] = (long)(((long long)accel_bias_body[1] * accel_sf) >> 30);
+ accel_bias_body[2] = (long)(((long long)accel_bias_body[2] * accel_sf) >> 30);
+#endif
+
+ regs[0] = (unsigned char)((accel_bias_body[0] >> 24) & 0xFF);
+ regs[1] = (unsigned char)((accel_bias_body[0] >> 16) & 0xFF);
+ regs[2] = (unsigned char)((accel_bias_body[0] >> 8) & 0xFF);
+ regs[3] = (unsigned char)(accel_bias_body[0] & 0xFF);
+ regs[4] = (unsigned char)((accel_bias_body[1] >> 24) & 0xFF);
+ regs[5] = (unsigned char)((accel_bias_body[1] >> 16) & 0xFF);
+ regs[6] = (unsigned char)((accel_bias_body[1] >> 8) & 0xFF);
+ regs[7] = (unsigned char)(accel_bias_body[1] & 0xFF);
+ regs[8] = (unsigned char)((accel_bias_body[2] >> 24) & 0xFF);
+ regs[9] = (unsigned char)((accel_bias_body[2] >> 16) & 0xFF);
+ regs[10] = (unsigned char)((accel_bias_body[2] >> 8) & 0xFF);
+ regs[11] = (unsigned char)(accel_bias_body[2] & 0xFF);
+ return mpu_write_mem(D_ACCEL_BIAS, 12, regs);
+}
+
+/**
+ * @brief Set DMP output rate.
+ * Only used when DMP is on.
+ * @param[in] rate Desired fifo rate (Hz).
+ * @return 0 if successful.
+ */
+int dmp_set_fifo_rate(unsigned short rate)
+{
+ const unsigned char regs_end[12] = {DINAFE, DINAF2, DINAAB,
+ 0xc4, DINAAA, DINAF1, DINADF, DINADF, 0xBB, 0xAF, DINADF, DINADF};
+ unsigned short div;
+ unsigned char tmp[8];
+
+ if (rate > DMP_SAMPLE_RATE)
+ return -1;
+ div = DMP_SAMPLE_RATE / rate - 1;
+ tmp[0] = (unsigned char)((div >> 8) & 0xFF);
+ tmp[1] = (unsigned char)(div & 0xFF);
+ if (mpu_write_mem(D_0_22, 2, tmp))
+ return -1;
+ if (mpu_write_mem(CFG_6, 12, (unsigned char *)regs_end))
+ return -1;
+
+ dmp.fifo_rate = rate;
+ return 0;
+}
+
+/**
+ * @brief Get DMP output rate.
+ * @param[out] rate Current fifo rate (Hz).
+ * @return 0 if successful.
+ */
+int dmp_get_fifo_rate(unsigned short *rate)
+{
+ rate[0] = dmp.fifo_rate;
+ return 0;
+}
+
+/**
+ * @brief Set tap threshold for a specific axis.
+ * @param[in] axis 1, 2, and 4 for XYZ accel, respectively.
+ * @param[in] thresh Tap threshold, in mg/ms.
+ * @return 0 if successful.
+ */
+int dmp_set_tap_thresh(unsigned char axis, unsigned short thresh)
+{
+ unsigned char tmp[4], accel_fsr;
+ float scaled_thresh;
+ unsigned short dmp_thresh, dmp_thresh_2;
+ if (!(axis & TAP_XYZ) || thresh > 1600)
+ return -1;
+
+ scaled_thresh = (float)thresh / DMP_SAMPLE_RATE;
+
+ mpu_get_accel_fsr(&accel_fsr);
+ switch (accel_fsr)
+ {
+ case 2:
+ dmp_thresh = (unsigned short)(scaled_thresh * 16384);
+ /* dmp_thresh * 0.75 */
+ dmp_thresh_2 = (unsigned short)(scaled_thresh * 12288);
+ break;
+ case 4:
+ dmp_thresh = (unsigned short)(scaled_thresh * 8192);
+ /* dmp_thresh * 0.75 */
+ dmp_thresh_2 = (unsigned short)(scaled_thresh * 6144);
+ break;
+ case 8:
+ dmp_thresh = (unsigned short)(scaled_thresh * 4096);
+ /* dmp_thresh * 0.75 */
+ dmp_thresh_2 = (unsigned short)(scaled_thresh * 3072);
+ break;
+ case 16:
+ dmp_thresh = (unsigned short)(scaled_thresh * 2048);
+ /* dmp_thresh * 0.75 */
+ dmp_thresh_2 = (unsigned short)(scaled_thresh * 1536);
+ break;
+ default:
+ return -1;
+ }
+ tmp[0] = (unsigned char)(dmp_thresh >> 8);
+ tmp[1] = (unsigned char)(dmp_thresh & 0xFF);
+ tmp[2] = (unsigned char)(dmp_thresh_2 >> 8);
+ tmp[3] = (unsigned char)(dmp_thresh_2 & 0xFF);
+
+ if (axis & TAP_X)
+ {
+ if (mpu_write_mem(DMP_TAP_THX, 2, tmp))
+ return -1;
+ if (mpu_write_mem(D_1_36, 2, tmp + 2))
+ return -1;
+ }
+ if (axis & TAP_Y)
+ {
+ if (mpu_write_mem(DMP_TAP_THY, 2, tmp))
+ return -1;
+ if (mpu_write_mem(D_1_40, 2, tmp + 2))
+ return -1;
+ }
+ if (axis & TAP_Z)
+ {
+ if (mpu_write_mem(DMP_TAP_THZ, 2, tmp))
+ return -1;
+ if (mpu_write_mem(D_1_44, 2, tmp + 2))
+ return -1;
+ }
+ return 0;
+}
+
+/**
+ * @brief Set which axes will register a tap.
+ * @param[in] axis 1, 2, and 4 for XYZ, respectively.
+ * @return 0 if successful.
+ */
+int dmp_set_tap_axes(unsigned char axis)
+{
+ unsigned char tmp = 0;
+
+ if (axis & TAP_X)
+ tmp |= 0x30;
+ if (axis & TAP_Y)
+ tmp |= 0x0C;
+ if (axis & TAP_Z)
+ tmp |= 0x03;
+ return mpu_write_mem(D_1_72, 1, &tmp);
+}
+
+/**
+ * @brief Set minimum number of taps needed for an interrupt.
+ * @param[in] min_taps Minimum consecutive taps (1-4).
+ * @return 0 if successful.
+ */
+int dmp_set_tap_count(unsigned char min_taps)
+{
+ unsigned char tmp;
+
+ if (min_taps < 1)
+ min_taps = 1;
+ else if (min_taps > 4)
+ min_taps = 4;
+
+ tmp = min_taps - 1;
+ return mpu_write_mem(D_1_79, 1, &tmp);
+}
+
+/**
+ * @brief Set length between valid taps.
+ * @param[in] time Milliseconds between taps.
+ * @return 0 if successful.
+ */
+int dmp_set_tap_time(unsigned short time)
+{
+ unsigned short dmp_time;
+ unsigned char tmp[2];
+
+ dmp_time = time / (1000 / DMP_SAMPLE_RATE);
+ tmp[0] = (unsigned char)(dmp_time >> 8);
+ tmp[1] = (unsigned char)(dmp_time & 0xFF);
+ return mpu_write_mem(DMP_TAPW_MIN, 2, tmp);
+}
+
+/**
+ * @brief Set max time between taps to register as a multi-tap.
+ * @param[in] time Max milliseconds between taps.
+ * @return 0 if successful.
+ */
+int dmp_set_tap_time_multi(unsigned short time)
+{
+ unsigned short dmp_time;
+ unsigned char tmp[2];
+
+ dmp_time = time / (1000 / DMP_SAMPLE_RATE);
+ tmp[0] = (unsigned char)(dmp_time >> 8);
+ tmp[1] = (unsigned char)(dmp_time & 0xFF);
+ return mpu_write_mem(D_1_218, 2, tmp);
+}
+
+/**
+ * @brief Set shake rejection threshold.
+ * If the DMP detects a gyro sample larger than @e thresh, taps are rejected.
+ * @param[in] sf Gyro scale factor.
+ * @param[in] thresh Gyro threshold in dps.
+ * @return 0 if successful.
+ */
+int dmp_set_shake_reject_thresh(long sf, unsigned short thresh)
+{
+ unsigned char tmp[4];
+ long thresh_scaled = sf / 1000 * thresh;
+ tmp[0] = (unsigned char)(((long)thresh_scaled >> 24) & 0xFF);
+ tmp[1] = (unsigned char)(((long)thresh_scaled >> 16) & 0xFF);
+ tmp[2] = (unsigned char)(((long)thresh_scaled >> 8) & 0xFF);
+ tmp[3] = (unsigned char)((long)thresh_scaled & 0xFF);
+ return mpu_write_mem(D_1_92, 4, tmp);
+}
+
+/**
+ * @brief Set shake rejection time.
+ * Sets the length of time that the gyro must be outside of the threshold set
+ * by @e gyro_set_shake_reject_thresh before taps are rejected. A mandatory
+ * 60 ms is added to this parameter.
+ * @param[in] time Time in milliseconds.
+ * @return 0 if successful.
+ */
+int dmp_set_shake_reject_time(unsigned short time)
+{
+ unsigned char tmp[2];
+
+ time /= (1000 / DMP_SAMPLE_RATE);
+ tmp[0] = time >> 8;
+ tmp[1] = time & 0xFF;
+ return mpu_write_mem(D_1_90, 2, tmp);
+}
+
+/**
+ * @brief Set shake rejection timeout.
+ * Sets the length of time after a shake rejection that the gyro must stay
+ * inside of the threshold before taps can be detected again. A mandatory
+ * 60 ms is added to this parameter.
+ * @param[in] time Time in milliseconds.
+ * @return 0 if successful.
+ */
+int dmp_set_shake_reject_timeout(unsigned short time)
+{
+ unsigned char tmp[2];
+
+ time /= (1000 / DMP_SAMPLE_RATE);
+ tmp[0] = time >> 8;
+ tmp[1] = time & 0xFF;
+ return mpu_write_mem(D_1_88, 2, tmp);
+}
+
+/**
+ * @brief Get current step count.
+ * @param[out] count Number of steps detected.
+ * @return 0 if successful.
+ */
+int dmp_get_pedometer_step_count(unsigned long *count)
+{
+ unsigned char tmp[4];
+ if (!count)
+ return -1;
+
+ if (mpu_read_mem(D_PEDSTD_STEPCTR, 4, tmp))
+ return -1;
+
+ count[0] = ((unsigned long)tmp[0] << 24) | ((unsigned long)tmp[1] << 16) |
+ ((unsigned long)tmp[2] << 8) | tmp[3];
+ return 0;
+}
+
+/**
+ * @brief Overwrite current step count.
+ * WARNING: This function writes to DMP memory and could potentially encounter
+ * a race condition if called while the pedometer is enabled.
+ * @param[in] count New step count.
+ * @return 0 if successful.
+ */
+int dmp_set_pedometer_step_count(unsigned long count)
+{
+ unsigned char tmp[4];
+
+ tmp[0] = (unsigned char)((count >> 24) & 0xFF);
+ tmp[1] = (unsigned char)((count >> 16) & 0xFF);
+ tmp[2] = (unsigned char)((count >> 8) & 0xFF);
+ tmp[3] = (unsigned char)(count & 0xFF);
+ return mpu_write_mem(D_PEDSTD_STEPCTR, 4, tmp);
+}
+
+/**
+ * @brief Get duration of walking time.
+ * @param[in] time Walk time in milliseconds.
+ * @return 0 if successful.
+ */
+int dmp_get_pedometer_walk_time(unsigned long *time)
+{
+ unsigned char tmp[4];
+ if (!time)
+ return -1;
+
+ if (mpu_read_mem(D_PEDSTD_TIMECTR, 4, tmp))
+ return -1;
+
+ time[0] = (((unsigned long)tmp[0] << 24) | ((unsigned long)tmp[1] << 16) |
+ ((unsigned long)tmp[2] << 8) | tmp[3]) *
+ 20;
+ return 0;
+}
+
+/**
+ * @brief Overwrite current walk time.
+ * WARNING: This function writes to DMP memory and could potentially encounter
+ * a race condition if called while the pedometer is enabled.
+ * @param[in] time New walk time in milliseconds.
+ */
+int dmp_set_pedometer_walk_time(unsigned long time)
+{
+ unsigned char tmp[4];
+
+ time /= 20;
+
+ tmp[0] = (unsigned char)((time >> 24) & 0xFF);
+ tmp[1] = (unsigned char)((time >> 16) & 0xFF);
+ tmp[2] = (unsigned char)((time >> 8) & 0xFF);
+ tmp[3] = (unsigned char)(time & 0xFF);
+ return mpu_write_mem(D_PEDSTD_TIMECTR, 4, tmp);
+}
+
+/**
+ * @brief Enable DMP features.
+ * The following \#define's are used in the input mask:
+ * \n DMP_FEATURE_TAP
+ * \n DMP_FEATURE_ANDROID_ORIENT
+ * \n DMP_FEATURE_LP_QUAT
+ * \n DMP_FEATURE_6X_LP_QUAT
+ * \n DMP_FEATURE_GYRO_CAL
+ * \n DMP_FEATURE_SEND_RAW_ACCEL
+ * \n DMP_FEATURE_SEND_RAW_GYRO
+ * \n NOTE: DMP_FEATURE_LP_QUAT and DMP_FEATURE_6X_LP_QUAT are mutually
+ * exclusive.
+ * \n NOTE: DMP_FEATURE_SEND_RAW_GYRO and DMP_FEATURE_SEND_CAL_GYRO are also
+ * mutually exclusive.
+ * @param[in] mask Mask of features to enable.
+ * @return 0 if successful.
+ */
+int dmp_enable_feature(unsigned short mask)
+{
+ unsigned char tmp[10];
+
+ /* TODO: All of these settings can probably be integrated into the default
+ * DMP image.
+ */
+ /* Set integration scale factor. */
+ tmp[0] = (unsigned char)((GYRO_SF >> 24) & 0xFF);
+ tmp[1] = (unsigned char)((GYRO_SF >> 16) & 0xFF);
+ tmp[2] = (unsigned char)((GYRO_SF >> 8) & 0xFF);
+ tmp[3] = (unsigned char)(GYRO_SF & 0xFF);
+ mpu_write_mem(D_0_104, 4, tmp);
+
+ /* Send sensor data to the FIFO. */
+ tmp[0] = 0xA3;
+ if (mask & DMP_FEATURE_SEND_RAW_ACCEL)
+ {
+ tmp[1] = 0xC0;
+ tmp[2] = 0xC8;
+ tmp[3] = 0xC2;
+ }
+ else
+ {
+ tmp[1] = 0xA3;
+ tmp[2] = 0xA3;
+ tmp[3] = 0xA3;
+ }
+ if (mask & DMP_FEATURE_SEND_ANY_GYRO)
+ {
+ tmp[4] = 0xC4;
+ tmp[5] = 0xCC;
+ tmp[6] = 0xC6;
+ }
+ else
+ {
+ tmp[4] = 0xA3;
+ tmp[5] = 0xA3;
+ tmp[6] = 0xA3;
+ }
+ tmp[7] = 0xA3;
+ tmp[8] = 0xA3;
+ tmp[9] = 0xA3;
+ mpu_write_mem(CFG_15, 10, tmp);
+
+ /* Send gesture data to the FIFO. */
+ if (mask & (DMP_FEATURE_TAP | DMP_FEATURE_ANDROID_ORIENT))
+ tmp[0] = DINA20;
+ else
+ tmp[0] = 0xD8;
+ mpu_write_mem(CFG_27, 1, tmp);
+
+ if (mask & DMP_FEATURE_GYRO_CAL)
+ dmp_enable_gyro_cal(1);
+ else
+ dmp_enable_gyro_cal(0);
+
+ if (mask & DMP_FEATURE_SEND_ANY_GYRO)
+ {
+ if (mask & DMP_FEATURE_SEND_CAL_GYRO)
+ {
+ tmp[0] = 0xB2;
+ tmp[1] = 0x8B;
+ tmp[2] = 0xB6;
+ tmp[3] = 0x9B;
+ }
+ else
+ {
+ tmp[0] = DINAC0;
+ tmp[1] = DINA80;
+ tmp[2] = DINAC2;
+ tmp[3] = DINA90;
+ }
+ mpu_write_mem(CFG_GYRO_RAW_DATA, 4, tmp);
+ }
+
+ if (mask & DMP_FEATURE_TAP)
+ {
+ /* Enable tap. */
+ tmp[0] = 0xF8;
+ mpu_write_mem(CFG_20, 1, tmp);
+ dmp_set_tap_thresh(TAP_XYZ, 250);
+ dmp_set_tap_axes(TAP_XYZ);
+ dmp_set_tap_count(1);
+ dmp_set_tap_time(100);
+ dmp_set_tap_time_multi(500);
+
+ dmp_set_shake_reject_thresh(GYRO_SF, 200);
+ dmp_set_shake_reject_time(40);
+ dmp_set_shake_reject_timeout(10);
+ }
+ else
+ {
+ tmp[0] = 0xD8;
+ mpu_write_mem(CFG_20, 1, tmp);
+ }
+
+ if (mask & DMP_FEATURE_ANDROID_ORIENT)
+ {
+ tmp[0] = 0xD9;
+ }
+ else
+ tmp[0] = 0xD8;
+ mpu_write_mem(CFG_ANDROID_ORIENT_INT, 1, tmp);
+
+ if (mask & DMP_FEATURE_LP_QUAT)
+ dmp_enable_lp_quat(1);
+ else
+ dmp_enable_lp_quat(0);
+
+ if (mask & DMP_FEATURE_6X_LP_QUAT)
+ dmp_enable_6x_lp_quat(1);
+ else
+ dmp_enable_6x_lp_quat(0);
+
+ /* Pedometer is always enabled. */
+ dmp.feature_mask = mask | DMP_FEATURE_PEDOMETER;
+ mpu_reset_fifo();
+
+ dmp.packet_length = 0;
+ if (mask & DMP_FEATURE_SEND_RAW_ACCEL)
+ dmp.packet_length += 6;
+ if (mask & DMP_FEATURE_SEND_ANY_GYRO)
+ dmp.packet_length += 6;
+ if (mask & (DMP_FEATURE_LP_QUAT | DMP_FEATURE_6X_LP_QUAT))
+ dmp.packet_length += 16;
+ if (mask & (DMP_FEATURE_TAP | DMP_FEATURE_ANDROID_ORIENT))
+ dmp.packet_length += 4;
+
+ return 0;
+}
+
+/**
+ * @brief Get list of currently enabled DMP features.
+ * @param[out] Mask of enabled features.
+ * @return 0 if successful.
+ */
+int dmp_get_enabled_features(unsigned short *mask)
+{
+ mask[0] = dmp.feature_mask;
+ return 0;
+}
+
+/**
+ * @brief Calibrate the gyro data in the DMP.
+ * After eight seconds of no motion, the DMP will compute gyro biases and
+ * subtract them from the quaternion output. If @e dmp_enable_feature is
+ * called with @e DMP_FEATURE_SEND_CAL_GYRO, the biases will also be
+ * subtracted from the gyro output.
+ * @param[in] enable 1 to enable gyro calibration.
+ * @return 0 if successful.
+ */
+int dmp_enable_gyro_cal(unsigned char enable)
+{
+ if (enable)
+ {
+ unsigned char regs[9] = {0xb8, 0xaa, 0xb3, 0x8d, 0xb4, 0x98, 0x0d, 0x35, 0x5d};
+ return mpu_write_mem(CFG_MOTION_BIAS, 9, regs);
+ }
+ else
+ {
+ unsigned char regs[9] = {0xb8, 0xaa, 0xaa, 0xaa, 0xb0, 0x88, 0xc3, 0xc5, 0xc7};
+ return mpu_write_mem(CFG_MOTION_BIAS, 9, regs);
+ }
+}
+
+/**
+ * @brief Generate 3-axis quaternions from the DMP.
+ * In this driver, the 3-axis and 6-axis DMP quaternion features are mutually
+ * exclusive.
+ * @param[in] enable 1 to enable 3-axis quaternion.
+ * @return 0 if successful.
+ */
+int dmp_enable_lp_quat(unsigned char enable)
+{
+ unsigned char regs[4];
+ if (enable)
+ {
+ regs[0] = DINBC0;
+ regs[1] = DINBC2;
+ regs[2] = DINBC4;
+ regs[3] = DINBC6;
+ }
+ else
+ memset(regs, 0x8B, 4);
+
+ mpu_write_mem(CFG_LP_QUAT, 4, regs);
+
+ return mpu_reset_fifo();
+}
+
+/**
+ * @brief Generate 6-axis quaternions from the DMP.
+ * In this driver, the 3-axis and 6-axis DMP quaternion features are mutually
+ * exclusive.
+ * @param[in] enable 1 to enable 6-axis quaternion.
+ * @return 0 if successful.
+ */
+int dmp_enable_6x_lp_quat(unsigned char enable)
+{
+ unsigned char regs[4];
+ if (enable)
+ {
+ regs[0] = DINA20;
+ regs[1] = DINA28;
+ regs[2] = DINA30;
+ regs[3] = DINA38;
+ }
+ else
+ memset(regs, 0xA3, 4);
+
+ mpu_write_mem(CFG_8, 4, regs);
+
+ return mpu_reset_fifo();
+}
+
+/**
+ * @brief Decode the four-byte gesture data and execute any callbacks.
+ * @param[in] gesture Gesture data from DMP packet.
+ * @return 0 if successful.
+ */
+static int decode_gesture(unsigned char *gesture)
+{
+ unsigned char tap, android_orient;
+
+ android_orient = gesture[3] & 0xC0;
+ tap = 0x3F & gesture[3];
+
+ if (gesture[1] & INT_SRC_TAP)
+ {
+ unsigned char direction, count;
+ direction = tap >> 3;
+ count = (tap % 8) + 1;
+ if (dmp.tap_cb)
+ dmp.tap_cb(direction, count);
+ }
+
+ if (gesture[1] & INT_SRC_ANDROID_ORIENT)
+ {
+ if (dmp.android_orient_cb)
+ dmp.android_orient_cb(android_orient >> 6);
+ }
+
+ return 0;
+}
+
+/**
+ * @brief Specify when a DMP interrupt should occur.
+ * A DMP interrupt can be configured to trigger on either of the two
+ * conditions below:
+ * \n a. One FIFO period has elapsed (set by @e mpu_set_sample_rate).
+ * \n b. A tap event has been detected.
+ * @param[in] mode DMP_INT_GESTURE or DMP_INT_CONTINUOUS.
+ * @return 0 if successful.
+ */
+int dmp_set_interrupt_mode(unsigned char mode)
+{
+ const unsigned char regs_continuous[11] =
+ {0xd8, 0xb1, 0xb9, 0xf3, 0x8b, 0xa3, 0x91, 0xb6, 0x09, 0xb4, 0xd9};
+ const unsigned char regs_gesture[11] =
+ {0xda, 0xb1, 0xb9, 0xf3, 0x8b, 0xa3, 0x91, 0xb6, 0xda, 0xb4, 0xda};
+
+ switch (mode)
+ {
+ case DMP_INT_CONTINUOUS:
+ return mpu_write_mem(CFG_FIFO_ON_EVENT, 11,
+ (unsigned char *)regs_continuous);
+ case DMP_INT_GESTURE:
+ return mpu_write_mem(CFG_FIFO_ON_EVENT, 11,
+ (unsigned char *)regs_gesture);
+ default:
+ return -1;
+ }
+}
+
+/**
+ * @brief Get one packet from the FIFO.
+ * If @e sensors does not contain a particular sensor, disregard the data
+ * returned to that pointer.
+ * \n @e sensors can contain a combination of the following flags:
+ * \n INV_X_GYRO, INV_Y_GYRO, INV_Z_GYRO
+ * \n INV_XYZ_GYRO
+ * \n INV_XYZ_ACCEL
+ * \n INV_WXYZ_QUAT
+ * \n If the FIFO has no new data, @e sensors will be zero.
+ * \n If the FIFO is disabled, @e sensors will be zero and this function will
+ * return a non-zero error code.
+ * @param[out] gyro Gyro data in hardware units.
+ * @param[out] accel Accel data in hardware units.
+ * @param[out] quat 3-axis quaternion data in hardware units.
+ * @param[out] timestamp Timestamp in milliseconds.
+ * @param[out] sensors Mask of sensors read from FIFO.
+ * @param[out] more Number of remaining packets.
+ * @return 0 if successful.
+ */
+int dmp_read_fifo(short *gyro, short *accel, long *quat,
+ unsigned long *timestamp, short *sensors, unsigned char *more)
+{
+ unsigned char fifo_data[MAX_PACKET_LENGTH];
+ unsigned char ii = 0;
+
+ /* TODO: sensors[0] only changes when dmp_enable_feature is called. We can
+ * cache this value and save some cycles.
+ */
+ sensors[0] = 0;
+
+ /* Get a packet. */
+ if (mpu_read_fifo_stream(dmp.packet_length, fifo_data, more))
+ return -1;
+
+ /* Parse DMP packet. */
+ if (dmp.feature_mask & (DMP_FEATURE_LP_QUAT | DMP_FEATURE_6X_LP_QUAT))
+ {
+#ifdef FIFO_CORRUPTION_CHECK
+ long quat_q14[4], quat_mag_sq;
+#endif
+ quat[0] = ((long)fifo_data[0] << 24) | ((long)fifo_data[1] << 16) |
+ ((long)fifo_data[2] << 8) | fifo_data[3];
+ quat[1] = ((long)fifo_data[4] << 24) | ((long)fifo_data[5] << 16) |
+ ((long)fifo_data[6] << 8) | fifo_data[7];
+ quat[2] = ((long)fifo_data[8] << 24) | ((long)fifo_data[9] << 16) |
+ ((long)fifo_data[10] << 8) | fifo_data[11];
+ quat[3] = ((long)fifo_data[12] << 24) | ((long)fifo_data[13] << 16) |
+ ((long)fifo_data[14] << 8) | fifo_data[15];
+ ii += 16;
+#ifdef FIFO_CORRUPTION_CHECK
+ /* We can detect a corrupted FIFO by monitoring the quaternion data and
+ * ensuring that the magnitude is always normalized to one. This
+ * shouldn't happen in normal operation, but if an I2C error occurs,
+ * the FIFO reads might become misaligned.
+ *
+ * Let's start by scaling down the quaternion data to avoid long long
+ * math.
+ */
+ quat_q14[0] = quat[0] >> 16;
+ quat_q14[1] = quat[1] >> 16;
+ quat_q14[2] = quat[2] >> 16;
+ quat_q14[3] = quat[3] >> 16;
+ quat_mag_sq = quat_q14[0] * quat_q14[0] + quat_q14[1] * quat_q14[1] +
+ quat_q14[2] * quat_q14[2] + quat_q14[3] * quat_q14[3];
+ if ((quat_mag_sq < QUAT_MAG_SQ_MIN) ||
+ (quat_mag_sq > QUAT_MAG_SQ_MAX))
+ {
+ /* Quaternion is outside of the acceptable threshold. */
+ mpu_reset_fifo();
+ sensors[0] = 0;
+ return -1;
+ }
+ sensors[0] |= INV_WXYZ_QUAT;
+#endif
+ }
+
+ if (dmp.feature_mask & DMP_FEATURE_SEND_RAW_ACCEL)
+ {
+ accel[0] = ((short)fifo_data[ii + 0] << 8) | fifo_data[ii + 1];
+ accel[1] = ((short)fifo_data[ii + 2] << 8) | fifo_data[ii + 3];
+ accel[2] = ((short)fifo_data[ii + 4] << 8) | fifo_data[ii + 5];
+ ii += 6;
+ sensors[0] |= INV_XYZ_ACCEL;
+ }
+
+ if (dmp.feature_mask & DMP_FEATURE_SEND_ANY_GYRO)
+ {
+ gyro[0] = ((short)fifo_data[ii + 0] << 8) | fifo_data[ii + 1];
+ gyro[1] = ((short)fifo_data[ii + 2] << 8) | fifo_data[ii + 3];
+ gyro[2] = ((short)fifo_data[ii + 4] << 8) | fifo_data[ii + 5];
+ ii += 6;
+ sensors[0] |= INV_XYZ_GYRO;
+ }
+
+ /* Gesture data is at the end of the DMP packet. Parse it and call
+ * the gesture callbacks (if registered).
+ */
+ if (dmp.feature_mask & (DMP_FEATURE_TAP | DMP_FEATURE_ANDROID_ORIENT))
+ decode_gesture(fifo_data + ii);
+
+ get_ms(timestamp);
+ return 0;
+}
+
+/**
+ * @brief Register a function to be executed on a tap event.
+ * The tap direction is represented by one of the following:
+ * \n TAP_X_UP
+ * \n TAP_X_DOWN
+ * \n TAP_Y_UP
+ * \n TAP_Y_DOWN
+ * \n TAP_Z_UP
+ * \n TAP_Z_DOWN
+ * @param[in] func Callback function.
+ * @return 0 if successful.
+ */
+int dmp_register_tap_cb(void (*func)(unsigned char, unsigned char))
+{
+ dmp.tap_cb = func;
+ return 0;
+}
+
+/**
+ * @brief Register a function to be executed on a android orientation event.
+ * @param[in] func Callback function.
+ * @return 0 if successful.
+ */
+int dmp_register_android_orient_cb(void (*func)(unsigned char))
+{
+ dmp.android_orient_cb = func;
+ return 0;
+}
+
+/**
+ * @}
+ */
+
diff --git a/Core/Src/main.c b/Core/Src/main.c
new file mode 100644
index 0000000000000000000000000000000000000000..a40f8f74917f5267b1417794f1966718d985246c
--- /dev/null
+++ b/Core/Src/main.c
@@ -0,0 +1,252 @@
+/* USER CODE BEGIN Header */
+/**
+ ******************************************************************************
+ * @file : main.c
+ * @brief : Main program body
+ ******************************************************************************
+ * @attention
+ *
+ * Copyright (c) 2023 STMicroelectronics.
+ * All rights reserved.
+ *
+ * This software is licensed under terms that can be found in the LICENSE file
+ * in the root directory of this software component.
+ * If no LICENSE file comes with this software, it is provided AS-IS.
+ *
+ ******************************************************************************
+ */
+/* USER CODE END Header */
+/* Includes ------------------------------------------------------------------*/
+#include "main.h"
+#include "tim.h"
+#include "usart.h"
+#include "gpio.h"
+
+/* Private includes ----------------------------------------------------------*/
+/* USER CODE BEGIN Includes */
+#include "stdio.h"
+#include "IIC.h"
+#include "mpu6050.h"
+/* USER CODE END Includes */
+
+/* Private typedef -----------------------------------------------------------*/
+/* USER CODE BEGIN PTD */
+
+/* USER CODE END PTD */
+
+/* Private define ------------------------------------------------------------*/
+/* USER CODE BEGIN PD */
+/* USER CODE END PD */
+
+/* Private macro -------------------------------------------------------------*/
+/* USER CODE BEGIN PM */
+
+/* USER CODE END PM */
+
+/* Private variables ---------------------------------------------------------*/
+
+/* USER CODE BEGIN PV */
+
+/* USER CODE END PV */
+
+/* Private function prototypes -----------------------------------------------*/
+void SystemClock_Config(void);
+/* USER CODE BEGIN PFP */
+
+/* USER CODE END PFP */
+
+/* Private user code ---------------------------------------------------------*/
+/* USER CODE BEGIN 0 */
+#ifdef __GNUC__
+#define PUTCHAR_PROTOTYPE int __io_putchar(int ch)
+#else
+#define PUTCHAR_PROTOTYPE int fputc(int ch, FILE *f)
+#endif
+PUTCHAR_PROTOTYPE
+{
+ HAL_UART_Transmit(&huart1, (uint8_t *)&ch, 1, 0xFFFF);
+ return ch;
+}
+/* USER CODE END 0 */
+
+/**
+ * @brief The application entry point.
+ * @retval int
+ */
+int main(void)
+{
+ /* USER CODE BEGIN 1 */
+ uint8_t t = 0;
+ float pitch, roll, yaw;
+ short aacx, aacy, aacz;
+ short gyrox, gyroy, gyroz;
+ short temp;
+ /* USER CODE END 1 */
+
+ /* MCU Configuration--------------------------------------------------------*/
+
+ /* Reset of all peripherals, Initializes the Flash interface and the Systick. */
+ HAL_Init();
+
+ /* USER CODE BEGIN Init */
+
+ /* USER CODE END Init */
+
+ /* Configure the system clock */
+ SystemClock_Config();
+
+ /* USER CODE BEGIN SysInit */
+
+ /* USER CODE END SysInit */
+
+ /* Initialize all configured peripherals */
+ MX_GPIO_Init();
+ MX_USART1_UART_Init();
+ MX_TIM1_Init();
+ MX_TIM4_Init();
+ /* USER CODE BEGIN 2 */
+ MPU_Init();
+ while (mpu_dmp_init())
+ {
+ printf("MPU6050 Error!!!\r\n");
+ HAL_Delay(500);
+ }
+ printf("MPU6050 OK\r\n");
+ /* USER CODE END 2 */
+
+ /* Infinite loop */
+ /* USER CODE BEGIN WHILE */
+ while (1)
+ {
+ if (mpu_dmp_get_data(&pitch, &roll, &yaw) == 0)
+ {
+ temp = MPU_Get_Temperature();
+ MPU_Get_Accelerometer(&aacx, &aacy, &aacz);
+ MPU_Get_Gyroscope(&gyrox, &gyroy, &gyroz);
+ if (1)
+ {
+ if ((t % 10) == 0)
+ {
+// if (temp < 0)
+// {
+// temp = -temp; // 转为正数
+// printf(" Temp: -%d.%dC\r\n", temp / 100, temp % 10);
+// }
+// else
+// printf(" Temp: %d.%dC\r\n", temp / 100, temp % 10);
+
+ // pitch�??????
+ temp = yaw * 10;
+ if (temp < 0)
+ {
+ temp = -temp; // 转为正数
+ printf("-%d.%d\r\n", temp / 10, temp % 10);
+ }
+ else
+ printf("%d.%d\r\n", temp / 10, temp % 10);
+
+// // roll�??????
+// temp = roll * 10;
+// if (temp < 0)
+// {
+// temp = -temp; // 转为正数
+// printf(" Roll: -%d.%dC\r\n", temp / 10, temp % 10);
+// }
+// else
+// printf(" Roll: %d.%dC\r\n", temp / 10, temp % 10);
+//
+// temp = yaw * 10;
+// if (temp < 0)
+// {
+// temp = -temp; // 转为正数
+// printf(" Yaw: -%d.%dC\r\n", temp / 10, temp % 10);
+// }
+// else
+// printf(" Yaw: %d.%dC\r\n", temp / 10, temp % 10);
+//
+// printf("\r\n");
+ t = 0;
+ }
+ }
+ }
+ }
+ /* USER CODE END WHILE */
+
+ /* USER CODE BEGIN 3 */
+ /* USER CODE END 3 */
+}
+
+/**
+ * @brief System Clock Configuration
+ * @retval None
+ */
+void SystemClock_Config(void)
+{
+ RCC_OscInitTypeDef RCC_OscInitStruct = {0};
+ RCC_ClkInitTypeDef RCC_ClkInitStruct = {0};
+
+ /** Initializes the RCC Oscillators according to the specified parameters
+ * in the RCC_OscInitTypeDef structure.
+ */
+ RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSE;
+ RCC_OscInitStruct.HSEState = RCC_HSE_ON;
+ RCC_OscInitStruct.HSEPredivValue = RCC_HSE_PREDIV_DIV1;
+ RCC_OscInitStruct.HSIState = RCC_HSI_ON;
+ RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;
+ RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSE;
+ RCC_OscInitStruct.PLL.PLLMUL = RCC_PLL_MUL9;
+ if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK)
+ {
+ Error_Handler();
+ }
+
+ /** Initializes the CPU, AHB and APB buses clocks
+ */
+ RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK|RCC_CLOCKTYPE_SYSCLK
+ |RCC_CLOCKTYPE_PCLK1|RCC_CLOCKTYPE_PCLK2;
+ RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK;
+ RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1;
+ RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV2;
+ RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV1;
+
+ if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_2) != HAL_OK)
+ {
+ Error_Handler();
+ }
+}
+
+/* USER CODE BEGIN 4 */
+
+/* USER CODE END 4 */
+
+/**
+ * @brief This function is executed in case of error occurrence.
+ * @retval None
+ */
+void Error_Handler(void)
+{
+ /* USER CODE BEGIN Error_Handler_Debug */
+ /* User can add his own implementation to report the HAL error return state */
+ __disable_irq();
+ while (1)
+ {
+ }
+ /* USER CODE END Error_Handler_Debug */
+}
+
+#ifdef USE_FULL_ASSERT
+/**
+ * @brief Reports the name of the source file and the source line number
+ * where the assert_param error has occurred.
+ * @param file: pointer to the source file name
+ * @param line: assert_param error line source number
+ * @retval None
+ */
+void assert_failed(uint8_t *file, uint32_t line)
+{
+ /* USER CODE BEGIN 6 */
+ /* User can add his own implementation to report the file name and line number,
+ ex: printf("Wrong parameters value: file %s on line %d\r\n", file, line) */
+ /* USER CODE END 6 */
+}
+#endif /* USE_FULL_ASSERT */
diff --git a/Core/Src/mpu6050.c b/Core/Src/mpu6050.c
new file mode 100644
index 0000000000000000000000000000000000000000..265507fd60d3f818fcb1f3b99e45b20cc5d2b23a
--- /dev/null
+++ b/Core/Src/mpu6050.c
@@ -0,0 +1,256 @@
+/*
+ * mpu6050.c
+ *
+ * Created on: Jul 11, 2023
+ * Author: zzy
+ */
+
+#include "mpu6050.h"
+
+// 初始化MPU6050
+// 返回值:0,成功
+// 其他,错误代码
+uint8_t MPU_Init(void)
+{
+ uint8_t res;
+
+ MPU_IIC_Init(); // 初始化IIC总线
+ MPU_Write_Byte(MPU_PWR_MGMT1_REG, 0X80); // 复位MPU6050
+ delay_ms(100);
+ MPU_Write_Byte(MPU_PWR_MGMT1_REG, 0X00); // 唤醒MPU6050
+ MPU_Set_Gyro_Fsr(3); // 陀螺仪传感器,±2000dps
+ MPU_Set_Accel_Fsr(0); // 加速度传感器,±2g
+ MPU_Set_Rate(50); // 设置采样率50Hz
+ MPU_Write_Byte(MPU_INT_EN_REG, 0X00); // 关闭所有中断
+ MPU_Write_Byte(MPU_USER_CTRL_REG, 0X00); // I2C主模式关闭
+ MPU_Write_Byte(MPU_FIFO_EN_REG, 0X00); // 关闭FIFO
+ MPU_Write_Byte(MPU_INTBP_CFG_REG, 0X80); // INT引脚低电平有效
+ res = MPU_Read_Byte(MPU_DEVICE_ID_REG);
+ if (res == MPU_ADDR) // 器件ID正确
+ {
+ MPU_Write_Byte(MPU_PWR_MGMT1_REG, 0X01); // 设置CLKSEL,PLL X轴为参考
+ MPU_Write_Byte(MPU_PWR_MGMT2_REG, 0X00); // 加速度与陀螺仪都工作
+ MPU_Set_Rate(50); // 设置采样率为50Hz
+ }
+ else
+ return 1;
+ return 0;
+}
+
+// 设置MPU6050陀螺仪传感器满量程范围
+// fsr:0,±250dps;1,±500dps;2,±1000dps;3,±2000dps
+// 返回值:0,设置成功
+// 其他,设置失败
+uint8_t MPU_Set_Gyro_Fsr(uint8_t fsr)
+{
+ return MPU_Write_Byte(MPU_GYRO_CFG_REG, fsr << 3); // 设置陀螺仪满量程范围
+}
+
+// 设置MPU6050加速度传感器满量程范围
+// fsr:0,±2g;1,±4g;2,±8g;3,±16g
+// 返回值:0,设置成功
+// 其他,设置失败
+uint8_t MPU_Set_Accel_Fsr(uint8_t fsr)
+{
+ return MPU_Write_Byte(MPU_ACCEL_CFG_REG, fsr << 3); // 设置加速度传感器满量程范围
+}
+
+// 设置MPU6050的数字低通滤波器
+// lpf:数字低通滤波频率(Hz)
+// 返回值:0,设置成功
+// 其他,设置失败
+uint8_t MPU_Set_LPF(uint16_t lpf)
+{
+ uint8_t data = 0;
+ if (lpf >= 188)
+ data = 1;
+ else if (lpf >= 98)
+ data = 2;
+ else if (lpf >= 42)
+ data = 3;
+ else if (lpf >= 20)
+ data = 4;
+ else if (lpf >= 10)
+ data = 5;
+ else
+ data = 6;
+ return MPU_Write_Byte(MPU_CFG_REG, data); // 设置数字低通滤波器
+}
+
+// 设置MPU6050的采样率(假定Fs=1KHz)
+// rate:4~1000(Hz)
+// 返回值:0,设置成功
+// 其他,设置失败
+uint8_t MPU_Set_Rate(uint16_t rate)
+{
+ uint8_t data;
+ if (rate > 1000)
+ rate = 1000;
+ if (rate < 4)
+ rate = 4;
+ data = 1000 / rate - 1;
+ data = MPU_Write_Byte(MPU_SAMPLE_RATE_REG, data); // 设置数字低通滤波器
+ return MPU_Set_LPF(rate / 2); // 自动设置LPF为采样率的一半
+}
+
+// 得到温度值
+// 返回值:温度值(扩大了100倍)
+short MPU_Get_Temperature(void)
+{
+ uint8_t buf[2];
+ short raw;
+ float temp;
+ MPU_Read_Len(MPU_ADDR, MPU_TEMP_OUTH_REG, 2, buf);
+ raw = ((uint16_t)buf[0] << 8) | buf[1];
+ temp = 36.53 + ((double)raw) / 340;
+ return temp * 100;
+ ;
+}
+
+// 得到陀螺仪值(原始值)
+// gx,gy,gz:陀螺仪x,y,z轴的原始读数(带符号)
+// 返回值:0,成功
+// 其他,错误代码
+uint8_t MPU_Get_Gyroscope(short *gx, short *gy, short *gz)
+{
+ uint8_t buf[6], res;
+ res = MPU_Read_Len(MPU_ADDR, MPU_GYRO_XOUTH_REG, 6, buf);
+ if (res == 0)
+ {
+ *gx = ((uint16_t)buf[0] << 8) | buf[1];
+ *gy = ((uint16_t)buf[2] << 8) | buf[3];
+ *gz = ((uint16_t)buf[4] << 8) | buf[5];
+ }
+ return res;
+ ;
+}
+
+// 得到加速度值(原始值)
+// gx,gy,gz:陀螺仪x,y,z轴的原始读数(带符号)
+// 返回值:0,成功
+// 其他,错误代码
+uint8_t MPU_Get_Accelerometer(short *ax, short *ay, short *az)
+{
+ uint8_t buf[6], res;
+ res = MPU_Read_Len(MPU_ADDR, MPU_ACCEL_XOUTH_REG, 6, buf);
+ if (res == 0)
+ {
+ *ax = ((uint16_t)buf[0] << 8) | buf[1];
+ *ay = ((uint16_t)buf[2] << 8) | buf[3];
+ *az = ((uint16_t)buf[4] << 8) | buf[5];
+ }
+ return res;
+ ;
+}
+
+// IIC连续写
+// addr:器件地址
+// reg:寄存器地址
+// len:写入长度
+// buf:数据区
+// 返回值:0,正常
+// 其他,错误代码
+uint8_t MPU_Write_Len(uint8_t addr, uint8_t reg, uint8_t len, uint8_t *buf)
+{
+ uint8_t i;
+ MPU_IIC_Start();
+ MPU_IIC_Send_Byte((addr << 1) | 0); // 发送器件地址+写命令
+ if (MPU_IIC_Wait_Ack()) // 等待应答
+ {
+ MPU_IIC_Stop();
+ return 1;
+ }
+ MPU_IIC_Send_Byte(reg); // 写寄存器地址
+ MPU_IIC_Wait_Ack(); // 等待应答
+ for (i = 0; i < len; i++)
+ {
+ MPU_IIC_Send_Byte(buf[i]); // 发送数据
+ if (MPU_IIC_Wait_Ack()) // 等待ACK
+ {
+ MPU_IIC_Stop();
+ return 1;
+ }
+ }
+ MPU_IIC_Stop();
+ return 0;
+}
+
+// IIC连续读
+// addr:器件地址
+// reg:要读取的寄存器地址
+// len:要读取的长度
+// buf:读取到的数据存储区
+// 返回值:0,正常
+// 其他,错误代码
+uint8_t MPU_Read_Len(uint8_t addr, uint8_t reg, uint8_t len, uint8_t *buf)
+{
+ MPU_IIC_Start();
+ MPU_IIC_Send_Byte((addr << 1) | 0); // 发送器件地址+写命令
+ if (MPU_IIC_Wait_Ack()) // 等待应答
+ {
+ MPU_IIC_Stop();
+ return 1;
+ }
+ MPU_IIC_Send_Byte(reg); // 写寄存器地址
+ MPU_IIC_Wait_Ack(); // 等待应答
+ MPU_IIC_Start();
+ MPU_IIC_Send_Byte((addr << 1) | 1); // 发送器件地址+读命令
+ MPU_IIC_Wait_Ack(); // 等待应答
+ while (len)
+ {
+ if (len == 1)
+ *buf = MPU_IIC_Read_Byte(0); // 读数据,发送nACK
+ else
+ *buf = MPU_IIC_Read_Byte(1); // 读数据,发送ACK
+ len--;
+ buf++;
+ }
+ MPU_IIC_Stop(); // 产生一个停止条件
+ return 0;
+}
+
+// IIC写一个字节
+// reg:寄存器地址
+// data:数据
+// 返回值:0,正常
+// 其他,错误代码
+uint8_t MPU_Write_Byte(uint8_t reg, uint8_t data)
+{
+ MPU_IIC_Start();
+ MPU_IIC_Send_Byte((MPU_ADDR << 1) | 0); // 发送器件地址+写命令
+ if (MPU_IIC_Wait_Ack()) // 等待应答
+ {
+ MPU_IIC_Stop();
+ return 1;
+ }
+ MPU_IIC_Send_Byte(reg); // 写寄存器地址
+ MPU_IIC_Wait_Ack(); // 等待应答
+ MPU_IIC_Send_Byte(data); // 发送数据
+ if (MPU_IIC_Wait_Ack()) // 等待ACK
+ {
+ MPU_IIC_Stop();
+ return 1;
+ }
+ MPU_IIC_Stop();
+ return 0;
+}
+
+// IIC读一个字节
+// reg:寄存器地址
+// 返回值:读到的数据
+uint8_t MPU_Read_Byte(uint8_t reg)
+{
+ uint8_t res;
+ MPU_IIC_Start();
+ MPU_IIC_Send_Byte((MPU_ADDR << 1) | 0); // 发送器件地址+写命令
+ MPU_IIC_Wait_Ack(); // 等待应答
+ MPU_IIC_Send_Byte(reg); // 写寄存器地址
+ MPU_IIC_Wait_Ack(); // 等待应答
+ MPU_IIC_Start();
+ MPU_IIC_Send_Byte((MPU_ADDR << 1) | 1); // 发送器件地址+读命令
+ MPU_IIC_Wait_Ack(); // 等待应答
+ res = MPU_IIC_Read_Byte(0); // 读取数据,发送nACK
+ MPU_IIC_Stop(); // 产生一个停止条件
+ return res;
+}
+
diff --git a/Core/Src/stm32f1xx_hal_msp.c b/Core/Src/stm32f1xx_hal_msp.c
new file mode 100644
index 0000000000000000000000000000000000000000..9f76a2a299296f993d729fa664b9da56310d47f0
--- /dev/null
+++ b/Core/Src/stm32f1xx_hal_msp.c
@@ -0,0 +1,85 @@
+/* USER CODE BEGIN Header */
+/**
+ ******************************************************************************
+ * @file stm32f1xx_hal_msp.c
+ * @brief This file provides code for the MSP Initialization
+ * and de-Initialization codes.
+ ******************************************************************************
+ * @attention
+ *
+ * Copyright (c) 2023 STMicroelectronics.
+ * All rights reserved.
+ *
+ * This software is licensed under terms that can be found in the LICENSE file
+ * in the root directory of this software component.
+ * If no LICENSE file comes with this software, it is provided AS-IS.
+ *
+ ******************************************************************************
+ */
+/* USER CODE END Header */
+
+/* Includes ------------------------------------------------------------------*/
+#include "main.h"
+/* USER CODE BEGIN Includes */
+
+/* USER CODE END Includes */
+
+/* Private typedef -----------------------------------------------------------*/
+/* USER CODE BEGIN TD */
+
+/* USER CODE END TD */
+
+/* Private define ------------------------------------------------------------*/
+/* USER CODE BEGIN Define */
+
+/* USER CODE END Define */
+
+/* Private macro -------------------------------------------------------------*/
+/* USER CODE BEGIN Macro */
+
+/* USER CODE END Macro */
+
+/* Private variables ---------------------------------------------------------*/
+/* USER CODE BEGIN PV */
+
+/* USER CODE END PV */
+
+/* Private function prototypes -----------------------------------------------*/
+/* USER CODE BEGIN PFP */
+
+/* USER CODE END PFP */
+
+/* External functions --------------------------------------------------------*/
+/* USER CODE BEGIN ExternalFunctions */
+
+/* USER CODE END ExternalFunctions */
+
+/* USER CODE BEGIN 0 */
+
+/* USER CODE END 0 */
+/**
+ * Initializes the Global MSP.
+ */
+void HAL_MspInit(void)
+{
+ /* USER CODE BEGIN MspInit 0 */
+
+ /* USER CODE END MspInit 0 */
+
+ __HAL_RCC_AFIO_CLK_ENABLE();
+ __HAL_RCC_PWR_CLK_ENABLE();
+
+ /* System interrupt init*/
+
+ /** NOJTAG: JTAG-DP Disabled and SW-DP Enabled
+ */
+ __HAL_AFIO_REMAP_SWJ_NOJTAG();
+
+ /* USER CODE BEGIN MspInit 1 */
+
+ /* USER CODE END MspInit 1 */
+}
+
+/* USER CODE BEGIN 1 */
+
+/* USER CODE END 1 */
diff --git a/Core/Src/stm32f1xx_it.c b/Core/Src/stm32f1xx_it.c
new file mode 100644
index 0000000000000000000000000000000000000000..d706d3dc75b386a36a20b956506fde0fb2189d67
--- /dev/null
+++ b/Core/Src/stm32f1xx_it.c
@@ -0,0 +1,203 @@
+/* USER CODE BEGIN Header */
+/**
+ ******************************************************************************
+ * @file stm32f1xx_it.c
+ * @brief Interrupt Service Routines.
+ ******************************************************************************
+ * @attention
+ *
+ * Copyright (c) 2023 STMicroelectronics.
+ * All rights reserved.
+ *
+ * This software is licensed under terms that can be found in the LICENSE file
+ * in the root directory of this software component.
+ * If no LICENSE file comes with this software, it is provided AS-IS.
+ *
+ ******************************************************************************
+ */
+/* USER CODE END Header */
+
+/* Includes ------------------------------------------------------------------*/
+#include "main.h"
+#include "stm32f1xx_it.h"
+/* Private includes ----------------------------------------------------------*/
+/* USER CODE BEGIN Includes */
+/* USER CODE END Includes */
+
+/* Private typedef -----------------------------------------------------------*/
+/* USER CODE BEGIN TD */
+
+/* USER CODE END TD */
+
+/* Private define ------------------------------------------------------------*/
+/* USER CODE BEGIN PD */
+
+/* USER CODE END PD */
+
+/* Private macro -------------------------------------------------------------*/
+/* USER CODE BEGIN PM */
+
+/* USER CODE END PM */
+
+/* Private variables ---------------------------------------------------------*/
+/* USER CODE BEGIN PV */
+
+/* USER CODE END PV */
+
+/* Private function prototypes -----------------------------------------------*/
+/* USER CODE BEGIN PFP */
+
+/* USER CODE END PFP */
+
+/* Private user code ---------------------------------------------------------*/
+/* USER CODE BEGIN 0 */
+
+/* USER CODE END 0 */
+
+/* External variables --------------------------------------------------------*/
+
+/* USER CODE BEGIN EV */
+
+/* USER CODE END EV */
+
+/******************************************************************************/
+/* Cortex-M3 Processor Interruption and Exception Handlers */
+/******************************************************************************/
+/**
+ * @brief This function handles Non maskable interrupt.
+ */
+void NMI_Handler(void)
+{
+ /* USER CODE BEGIN NonMaskableInt_IRQn 0 */
+
+ /* USER CODE END NonMaskableInt_IRQn 0 */
+ /* USER CODE BEGIN NonMaskableInt_IRQn 1 */
+ while (1)
+ {
+ }
+ /* USER CODE END NonMaskableInt_IRQn 1 */
+}
+
+/**
+ * @brief This function handles Hard fault interrupt.
+ */
+void HardFault_Handler(void)
+{
+ /* USER CODE BEGIN HardFault_IRQn 0 */
+
+ /* USER CODE END HardFault_IRQn 0 */
+ while (1)
+ {
+ /* USER CODE BEGIN W1_HardFault_IRQn 0 */
+ /* USER CODE END W1_HardFault_IRQn 0 */
+ }
+}
+
+/**
+ * @brief This function handles Memory management fault.
+ */
+void MemManage_Handler(void)
+{
+ /* USER CODE BEGIN MemoryManagement_IRQn 0 */
+
+ /* USER CODE END MemoryManagement_IRQn 0 */
+ while (1)
+ {
+ /* USER CODE BEGIN W1_MemoryManagement_IRQn 0 */
+ /* USER CODE END W1_MemoryManagement_IRQn 0 */
+ }
+}
+
+/**
+ * @brief This function handles Prefetch fault, memory access fault.
+ */
+void BusFault_Handler(void)
+{
+ /* USER CODE BEGIN BusFault_IRQn 0 */
+
+ /* USER CODE END BusFault_IRQn 0 */
+ while (1)
+ {
+ /* USER CODE BEGIN W1_BusFault_IRQn 0 */
+ /* USER CODE END W1_BusFault_IRQn 0 */
+ }
+}
+
+/**
+ * @brief This function handles Undefined instruction or illegal state.
+ */
+void UsageFault_Handler(void)
+{
+ /* USER CODE BEGIN UsageFault_IRQn 0 */
+
+ /* USER CODE END UsageFault_IRQn 0 */
+ while (1)
+ {
+ /* USER CODE BEGIN W1_UsageFault_IRQn 0 */
+ /* USER CODE END W1_UsageFault_IRQn 0 */
+ }
+}
+
+/**
+ * @brief This function handles System service call via SWI instruction.
+ */
+void SVC_Handler(void)
+{
+ /* USER CODE BEGIN SVCall_IRQn 0 */
+
+ /* USER CODE END SVCall_IRQn 0 */
+ /* USER CODE BEGIN SVCall_IRQn 1 */
+
+ /* USER CODE END SVCall_IRQn 1 */
+}
+
+/**
+ * @brief This function handles Debug monitor.
+ */
+void DebugMon_Handler(void)
+{
+ /* USER CODE BEGIN DebugMonitor_IRQn 0 */
+
+ /* USER CODE END DebugMonitor_IRQn 0 */
+ /* USER CODE BEGIN DebugMonitor_IRQn 1 */
+
+ /* USER CODE END DebugMonitor_IRQn 1 */
+}
+
+/**
+ * @brief This function handles Pendable request for system service.
+ */
+void PendSV_Handler(void)
+{
+ /* USER CODE BEGIN PendSV_IRQn 0 */
+
+ /* USER CODE END PendSV_IRQn 0 */
+ /* USER CODE BEGIN PendSV_IRQn 1 */
+
+ /* USER CODE END PendSV_IRQn 1 */
+}
+
+/**
+ * @brief This function handles System tick timer.
+ */
+void SysTick_Handler(void)
+{
+ /* USER CODE BEGIN SysTick_IRQn 0 */
+
+ /* USER CODE END SysTick_IRQn 0 */
+ HAL_IncTick();
+ /* USER CODE BEGIN SysTick_IRQn 1 */
+
+ /* USER CODE END SysTick_IRQn 1 */
+}
+
+/******************************************************************************/
+/* STM32F1xx Peripheral Interrupt Handlers */
+/* Add here the Interrupt Handlers for the used peripherals. */
+/* For the available peripheral interrupt handler names, */
+/* please refer to the startup file (startup_stm32f1xx.s). */
+/******************************************************************************/
+
+/* USER CODE BEGIN 1 */
+
+/* USER CODE END 1 */
diff --git a/Core/Src/syscalls.c b/Core/Src/syscalls.c
new file mode 100644
index 0000000000000000000000000000000000000000..fadb992b15f7fab40c5895cd40108d27bd613cec
--- /dev/null
+++ b/Core/Src/syscalls.c
@@ -0,0 +1,155 @@
+/**
+ ******************************************************************************
+ * @file syscalls.c
+ * @author Auto-generated by STM32CubeIDE
+ * @brief STM32CubeIDE Minimal System calls file
+ *
+ * For more information about which c-functions
+ * need which of these lowlevel functions
+ * please consult the Newlib libc-manual
+ ******************************************************************************
+ * @attention
+ *
+ * Copyright (c) 2022 STMicroelectronics.
+ * All rights reserved.
+ *
+ * This software is licensed under terms that can be found in the LICENSE file
+ * in the root directory of this software component.
+ * If no LICENSE file comes with this software, it is provided AS-IS.
+ *
+ ******************************************************************************
+ */
+
+/* Includes */
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+
+/* Variables */
+extern int __io_putchar(int ch) __attribute__((weak));
+extern int __io_getchar(void) __attribute__((weak));
+
+
+char *__env[1] = { 0 };
+char **environ = __env;
+
+
+/* Functions */
+void initialise_monitor_handles()
+{
+}
+
+int _getpid(void)
+{
+ return 1;
+}
+
+int _kill(int pid, int sig)
+{
+ errno = EINVAL;
+ return -1;
+}
+
+void _exit (int status)
+{
+ _kill(status, -1);
+ while (1) {} /* Make sure we hang here */
+}
+
+__attribute__((weak)) int _read(int file, char *ptr, int len)
+{
+ int DataIdx;
+
+ for (DataIdx = 0; DataIdx < len; DataIdx++)
+ {
+ *ptr++ = __io_getchar();
+ }
+
+return len;
+}
+
+__attribute__((weak)) int _write(int file, char *ptr, int len)
+{
+ int DataIdx;
+
+ for (DataIdx = 0; DataIdx < len; DataIdx++)
+ {
+ __io_putchar(*ptr++);
+ }
+ return len;
+}
+
+int _close(int file)
+{
+ return -1;
+}
+
+
+int _fstat(int file, struct stat *st)
+{
+ st->st_mode = S_IFCHR;
+ return 0;
+}
+
+int _isatty(int file)
+{
+ return 1;
+}
+
+int _lseek(int file, int ptr, int dir)
+{
+ return 0;
+}
+
+int _open(char *path, int flags, ...)
+{
+ /* Pretend like we always fail */
+ return -1;
+}
+
+int _wait(int *status)
+{
+ errno = ECHILD;
+ return -1;
+}
+
+int _unlink(char *name)
+{
+ errno = ENOENT;
+ return -1;
+}
+
+int _times(struct tms *buf)
+{
+ return -1;
+}
+
+int _stat(char *file, struct stat *st)
+{
+ st->st_mode = S_IFCHR;
+ return 0;
+}
+
+int _link(char *old, char *new)
+{
+ errno = EMLINK;
+ return -1;
+}
+
+int _fork(void)
+{
+ errno = EAGAIN;
+ return -1;
+}
+
+int _execve(char *name, char **argv, char **env)
+{
+ errno = ENOMEM;
+ return -1;
+}
diff --git a/Core/Src/sysmem.c b/Core/Src/sysmem.c
new file mode 100644
index 0000000000000000000000000000000000000000..54081ac9b0107e5371a578307f7e73ffa435ad97
--- /dev/null
+++ b/Core/Src/sysmem.c
@@ -0,0 +1,79 @@
+/**
+ ******************************************************************************
+ * @file sysmem.c
+ * @author Generated by STM32CubeIDE
+ * @brief STM32CubeIDE System Memory calls file
+ *
+ * For more information about which C functions
+ * need which of these lowlevel functions
+ * please consult the newlib libc manual
+ ******************************************************************************
+ * @attention
+ *
+ * Copyright (c) 2022 STMicroelectronics.
+ * All rights reserved.
+ *
+ * This software is licensed under terms that can be found in the LICENSE file
+ * in the root directory of this software component.
+ * If no LICENSE file comes with this software, it is provided AS-IS.
+ *
+ ******************************************************************************
+ */
+
+/* Includes */
+#include
+#include
+
+/**
+ * Pointer to the current high watermark of the heap usage
+ */
+static uint8_t *__sbrk_heap_end = NULL;
+
+/**
+ * @brief _sbrk() allocates memory to the newlib heap and is used by malloc
+ * and others from the C library
+ *
+ * @verbatim
+ * ############################################################################
+ * # .data # .bss # newlib heap # MSP stack #
+ * # # # # Reserved by _Min_Stack_Size #
+ * ############################################################################
+ * ^-- RAM start ^-- _end _estack, RAM end --^
+ * @endverbatim
+ *
+ * This implementation starts allocating at the '_end' linker symbol
+ * The '_Min_Stack_Size' linker symbol reserves a memory for the MSP stack
+ * The implementation considers '_estack' linker symbol to be RAM end
+ * NOTE: If the MSP stack, at any point during execution, grows larger than the
+ * reserved size, please increase the '_Min_Stack_Size'.
+ *
+ * @param incr Memory size
+ * @return Pointer to allocated memory
+ */
+void *_sbrk(ptrdiff_t incr)
+{
+ extern uint8_t _end; /* Symbol defined in the linker script */
+ extern uint8_t _estack; /* Symbol defined in the linker script */
+ extern uint32_t _Min_Stack_Size; /* Symbol defined in the linker script */
+ const uint32_t stack_limit = (uint32_t)&_estack - (uint32_t)&_Min_Stack_Size;
+ const uint8_t *max_heap = (uint8_t *)stack_limit;
+ uint8_t *prev_heap_end;
+
+ /* Initialize heap end at first call */
+ if (NULL == __sbrk_heap_end)
+ {
+ __sbrk_heap_end = &_end;
+ }
+
+ /* Protect heap from growing into the reserved MSP stack */
+ if (__sbrk_heap_end + incr > max_heap)
+ {
+ errno = ENOMEM;
+ return (void *)-1;
+ }
+
+ prev_heap_end = __sbrk_heap_end;
+ __sbrk_heap_end += incr;
+
+ return (void *)prev_heap_end;
+}
diff --git a/Core/Src/system_stm32f1xx.c b/Core/Src/system_stm32f1xx.c
new file mode 100644
index 0000000000000000000000000000000000000000..3e277e61b92f5b2ea297dd3fee2f519f77581e37
--- /dev/null
+++ b/Core/Src/system_stm32f1xx.c
@@ -0,0 +1,406 @@
+/**
+ ******************************************************************************
+ * @file system_stm32f1xx.c
+ * @author MCD Application Team
+ * @brief CMSIS Cortex-M3 Device Peripheral Access Layer System Source File.
+ *
+ * 1. This file provides two functions and one global variable to be called from
+ * user application:
+ * - SystemInit(): Setups the system clock (System clock source, PLL Multiplier
+ * factors, AHB/APBx prescalers and Flash settings).
+ * This function is called at startup just after reset and
+ * before branch to main program. This call is made inside
+ * the "startup_stm32f1xx_xx.s" file.
+ *
+ * - SystemCoreClock variable: Contains the core clock (HCLK), it can be used
+ * by the user application to setup the SysTick
+ * timer or configure other parameters.
+ *
+ * - SystemCoreClockUpdate(): Updates the variable SystemCoreClock and must
+ * be called whenever the core clock is changed
+ * during program execution.
+ *
+ * 2. After each device reset the HSI (8 MHz) is used as system clock source.
+ * Then SystemInit() function is called, in "startup_stm32f1xx_xx.s" file, to
+ * configure the system clock before to branch to main program.
+ *
+ * 4. The default value of HSE crystal is set to 8 MHz (or 25 MHz, depending on
+ * the product used), refer to "HSE_VALUE".
+ * When HSE is used as system clock source, directly or through PLL, and you
+ * are using different crystal you have to adapt the HSE value to your own
+ * configuration.
+ *
+ ******************************************************************************
+ * @attention
+ *
+ * Copyright (c) 2017-2021 STMicroelectronics.
+ * All rights reserved.
+ *
+ * This software is licensed under terms that can be found in the LICENSE file
+ * in the root directory of this software component.
+ * If no LICENSE file comes with this software, it is provided AS-IS.
+ *
+ ******************************************************************************
+ */
+
+/** @addtogroup CMSIS
+ * @{
+ */
+
+/** @addtogroup stm32f1xx_system
+ * @{
+ */
+
+/** @addtogroup STM32F1xx_System_Private_Includes
+ * @{
+ */
+
+#include "stm32f1xx.h"
+
+/**
+ * @}
+ */
+
+/** @addtogroup STM32F1xx_System_Private_TypesDefinitions
+ * @{
+ */
+
+/**
+ * @}
+ */
+
+/** @addtogroup STM32F1xx_System_Private_Defines
+ * @{
+ */
+
+#if !defined (HSE_VALUE)
+ #define HSE_VALUE 8000000U /*!< Default value of the External oscillator in Hz.
+ This value can be provided and adapted by the user application. */
+#endif /* HSE_VALUE */
+
+#if !defined (HSI_VALUE)
+ #define HSI_VALUE 8000000U /*!< Default value of the Internal oscillator in Hz.
+ This value can be provided and adapted by the user application. */
+#endif /* HSI_VALUE */
+
+/*!< Uncomment the following line if you need to use external SRAM */
+#if defined(STM32F100xE) || defined(STM32F101xE) || defined(STM32F101xG) || defined(STM32F103xE) || defined(STM32F103xG)
+/* #define DATA_IN_ExtSRAM */
+#endif /* STM32F100xE || STM32F101xE || STM32F101xG || STM32F103xE || STM32F103xG */
+
+/* Note: Following vector table addresses must be defined in line with linker
+ configuration. */
+/*!< Uncomment the following line if you need to relocate the vector table
+ anywhere in Flash or Sram, else the vector table is kept at the automatic
+ remap of boot address selected */
+/* #define USER_VECT_TAB_ADDRESS */
+
+#if defined(USER_VECT_TAB_ADDRESS)
+/*!< Uncomment the following line if you need to relocate your vector Table
+ in Sram else user remap will be done in Flash. */
+/* #define VECT_TAB_SRAM */
+#if defined(VECT_TAB_SRAM)
+#define VECT_TAB_BASE_ADDRESS SRAM_BASE /*!< Vector Table base address field.
+ This value must be a multiple of 0x200. */
+#define VECT_TAB_OFFSET 0x00000000U /*!< Vector Table base offset field.
+ This value must be a multiple of 0x200. */
+#else
+#define VECT_TAB_BASE_ADDRESS FLASH_BASE /*!< Vector Table base address field.
+ This value must be a multiple of 0x200. */
+#define VECT_TAB_OFFSET 0x00000000U /*!< Vector Table base offset field.
+ This value must be a multiple of 0x200. */
+#endif /* VECT_TAB_SRAM */
+#endif /* USER_VECT_TAB_ADDRESS */
+
+/******************************************************************************/
+
+/**
+ * @}
+ */
+
+/** @addtogroup STM32F1xx_System_Private_Macros
+ * @{
+ */
+
+/**
+ * @}
+ */
+
+/** @addtogroup STM32F1xx_System_Private_Variables
+ * @{
+ */
+
+ /* This variable is updated in three ways:
+ 1) by calling CMSIS function SystemCoreClockUpdate()
+ 2) by calling HAL API function HAL_RCC_GetHCLKFreq()
+ 3) each time HAL_RCC_ClockConfig() is called to configure the system clock frequency
+ Note: If you use this function to configure the system clock; then there
+ is no need to call the 2 first functions listed above, since SystemCoreClock
+ variable is updated automatically.
+ */
+uint32_t SystemCoreClock = 16000000;
+const uint8_t AHBPrescTable[16U] = {0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 6, 7, 8, 9};
+const uint8_t APBPrescTable[8U] = {0, 0, 0, 0, 1, 2, 3, 4};
+
+/**
+ * @}
+ */
+
+/** @addtogroup STM32F1xx_System_Private_FunctionPrototypes
+ * @{
+ */
+
+#if defined(STM32F100xE) || defined(STM32F101xE) || defined(STM32F101xG) || defined(STM32F103xE) || defined(STM32F103xG)
+#ifdef DATA_IN_ExtSRAM
+ static void SystemInit_ExtMemCtl(void);
+#endif /* DATA_IN_ExtSRAM */
+#endif /* STM32F100xE || STM32F101xE || STM32F101xG || STM32F103xE || STM32F103xG */
+
+/**
+ * @}
+ */
+
+/** @addtogroup STM32F1xx_System_Private_Functions
+ * @{
+ */
+
+/**
+ * @brief Setup the microcontroller system
+ * Initialize the Embedded Flash Interface, the PLL and update the
+ * SystemCoreClock variable.
+ * @note This function should be used only after reset.
+ * @param None
+ * @retval None
+ */
+void SystemInit (void)
+{
+#if defined(STM32F100xE) || defined(STM32F101xE) || defined(STM32F101xG) || defined(STM32F103xE) || defined(STM32F103xG)
+ #ifdef DATA_IN_ExtSRAM
+ SystemInit_ExtMemCtl();
+ #endif /* DATA_IN_ExtSRAM */
+#endif
+
+ /* Configure the Vector Table location -------------------------------------*/
+#if defined(USER_VECT_TAB_ADDRESS)
+ SCB->VTOR = VECT_TAB_BASE_ADDRESS | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal SRAM. */
+#endif /* USER_VECT_TAB_ADDRESS */
+}
+
+/**
+ * @brief Update SystemCoreClock variable according to Clock Register Values.
+ * The SystemCoreClock variable contains the core clock (HCLK), it can
+ * be used by the user application to setup the SysTick timer or configure
+ * other parameters.
+ *
+ * @note Each time the core clock (HCLK) changes, this function must be called
+ * to update SystemCoreClock variable value. Otherwise, any configuration
+ * based on this variable will be incorrect.
+ *
+ * @note - The system frequency computed by this function is not the real
+ * frequency in the chip. It is calculated based on the predefined
+ * constant and the selected clock source:
+ *
+ * - If SYSCLK source is HSI, SystemCoreClock will contain the HSI_VALUE(*)
+ *
+ * - If SYSCLK source is HSE, SystemCoreClock will contain the HSE_VALUE(**)
+ *
+ * - If SYSCLK source is PLL, SystemCoreClock will contain the HSE_VALUE(**)
+ * or HSI_VALUE(*) multiplied by the PLL factors.
+ *
+ * (*) HSI_VALUE is a constant defined in stm32f1xx.h file (default value
+ * 8 MHz) but the real value may vary depending on the variations
+ * in voltage and temperature.
+ *
+ * (**) HSE_VALUE is a constant defined in stm32f1xx.h file (default value
+ * 8 MHz or 25 MHz, depending on the product used), user has to ensure
+ * that HSE_VALUE is same as the real frequency of the crystal used.
+ * Otherwise, this function may have wrong result.
+ *
+ * - The result of this function could be not correct when using fractional
+ * value for HSE crystal.
+ * @param None
+ * @retval None
+ */
+void SystemCoreClockUpdate (void)
+{
+ uint32_t tmp = 0U, pllmull = 0U, pllsource = 0U;
+
+#if defined(STM32F105xC) || defined(STM32F107xC)
+ uint32_t prediv1source = 0U, prediv1factor = 0U, prediv2factor = 0U, pll2mull = 0U;
+#endif /* STM32F105xC */
+
+#if defined(STM32F100xB) || defined(STM32F100xE)
+ uint32_t prediv1factor = 0U;
+#endif /* STM32F100xB or STM32F100xE */
+
+ /* Get SYSCLK source -------------------------------------------------------*/
+ tmp = RCC->CFGR & RCC_CFGR_SWS;
+
+ switch (tmp)
+ {
+ case 0x00U: /* HSI used as system clock */
+ SystemCoreClock = HSI_VALUE;
+ break;
+ case 0x04U: /* HSE used as system clock */
+ SystemCoreClock = HSE_VALUE;
+ break;
+ case 0x08U: /* PLL used as system clock */
+
+ /* Get PLL clock source and multiplication factor ----------------------*/
+ pllmull = RCC->CFGR & RCC_CFGR_PLLMULL;
+ pllsource = RCC->CFGR & RCC_CFGR_PLLSRC;
+
+#if !defined(STM32F105xC) && !defined(STM32F107xC)
+ pllmull = ( pllmull >> 18U) + 2U;
+
+ if (pllsource == 0x00U)
+ {
+ /* HSI oscillator clock divided by 2 selected as PLL clock entry */
+ SystemCoreClock = (HSI_VALUE >> 1U) * pllmull;
+ }
+ else
+ {
+ #if defined(STM32F100xB) || defined(STM32F100xE)
+ prediv1factor = (RCC->CFGR2 & RCC_CFGR2_PREDIV1) + 1U;
+ /* HSE oscillator clock selected as PREDIV1 clock entry */
+ SystemCoreClock = (HSE_VALUE / prediv1factor) * pllmull;
+ #else
+ /* HSE selected as PLL clock entry */
+ if ((RCC->CFGR & RCC_CFGR_PLLXTPRE) != (uint32_t)RESET)
+ {/* HSE oscillator clock divided by 2 */
+ SystemCoreClock = (HSE_VALUE >> 1U) * pllmull;
+ }
+ else
+ {
+ SystemCoreClock = HSE_VALUE * pllmull;
+ }
+ #endif
+ }
+#else
+ pllmull = pllmull >> 18U;
+
+ if (pllmull != 0x0DU)
+ {
+ pllmull += 2U;
+ }
+ else
+ { /* PLL multiplication factor = PLL input clock * 6.5 */
+ pllmull = 13U / 2U;
+ }
+
+ if (pllsource == 0x00U)
+ {
+ /* HSI oscillator clock divided by 2 selected as PLL clock entry */
+ SystemCoreClock = (HSI_VALUE >> 1U) * pllmull;
+ }
+ else
+ {/* PREDIV1 selected as PLL clock entry */
+
+ /* Get PREDIV1 clock source and division factor */
+ prediv1source = RCC->CFGR2 & RCC_CFGR2_PREDIV1SRC;
+ prediv1factor = (RCC->CFGR2 & RCC_CFGR2_PREDIV1) + 1U;
+
+ if (prediv1source == 0U)
+ {
+ /* HSE oscillator clock selected as PREDIV1 clock entry */
+ SystemCoreClock = (HSE_VALUE / prediv1factor) * pllmull;
+ }
+ else
+ {/* PLL2 clock selected as PREDIV1 clock entry */
+
+ /* Get PREDIV2 division factor and PLL2 multiplication factor */
+ prediv2factor = ((RCC->CFGR2 & RCC_CFGR2_PREDIV2) >> 4U) + 1U;
+ pll2mull = ((RCC->CFGR2 & RCC_CFGR2_PLL2MUL) >> 8U) + 2U;
+ SystemCoreClock = (((HSE_VALUE / prediv2factor) * pll2mull) / prediv1factor) * pllmull;
+ }
+ }
+#endif /* STM32F105xC */
+ break;
+
+ default:
+ SystemCoreClock = HSI_VALUE;
+ break;
+ }
+
+ /* Compute HCLK clock frequency ----------------*/
+ /* Get HCLK prescaler */
+ tmp = AHBPrescTable[((RCC->CFGR & RCC_CFGR_HPRE) >> 4U)];
+ /* HCLK clock frequency */
+ SystemCoreClock >>= tmp;
+}
+
+#if defined(STM32F100xE) || defined(STM32F101xE) || defined(STM32F101xG) || defined(STM32F103xE) || defined(STM32F103xG)
+/**
+ * @brief Setup the external memory controller. Called in startup_stm32f1xx.s
+ * before jump to __main
+ * @param None
+ * @retval None
+ */
+#ifdef DATA_IN_ExtSRAM
+/**
+ * @brief Setup the external memory controller.
+ * Called in startup_stm32f1xx_xx.s/.c before jump to main.
+ * This function configures the external SRAM mounted on STM3210E-EVAL
+ * board (STM32 High density devices). This SRAM will be used as program
+ * data memory (including heap and stack).
+ * @param None
+ * @retval None
+ */
+void SystemInit_ExtMemCtl(void)
+{
+ __IO uint32_t tmpreg;
+ /*!< FSMC Bank1 NOR/SRAM3 is used for the STM3210E-EVAL, if another Bank is
+ required, then adjust the Register Addresses */
+
+ /* Enable FSMC clock */
+ RCC->AHBENR = 0x00000114U;
+
+ /* Delay after an RCC peripheral clock enabling */
+ tmpreg = READ_BIT(RCC->AHBENR, RCC_AHBENR_FSMCEN);
+
+ /* Enable GPIOD, GPIOE, GPIOF and GPIOG clocks */
+ RCC->APB2ENR = 0x000001E0U;
+
+ /* Delay after an RCC peripheral clock enabling */
+ tmpreg = READ_BIT(RCC->APB2ENR, RCC_APB2ENR_IOPDEN);
+
+ (void)(tmpreg);
+
+/* --------------- SRAM Data lines, NOE and NWE configuration ---------------*/
+/*---------------- SRAM Address lines configuration -------------------------*/
+/*---------------- NOE and NWE configuration --------------------------------*/
+/*---------------- NE3 configuration ----------------------------------------*/
+/*---------------- NBL0, NBL1 configuration ---------------------------------*/
+
+ GPIOD->CRL = 0x44BB44BBU;
+ GPIOD->CRH = 0xBBBBBBBBU;
+
+ GPIOE->CRL = 0xB44444BBU;
+ GPIOE->CRH = 0xBBBBBBBBU;
+
+ GPIOF->CRL = 0x44BBBBBBU;
+ GPIOF->CRH = 0xBBBB4444U;
+
+ GPIOG->CRL = 0x44BBBBBBU;
+ GPIOG->CRH = 0x444B4B44U;
+
+/*---------------- FSMC Configuration ---------------------------------------*/
+/*---------------- Enable FSMC Bank1_SRAM Bank ------------------------------*/
+
+ FSMC_Bank1->BTCR[4U] = 0x00001091U;
+ FSMC_Bank1->BTCR[5U] = 0x00110212U;
+}
+#endif /* DATA_IN_ExtSRAM */
+#endif /* STM32F100xE || STM32F101xE || STM32F101xG || STM32F103xE || STM32F103xG */
+
+/**
+ * @}
+ */
+
+/**
+ * @}
+ */
+
+/**
+ * @}
+ */
diff --git a/Core/Src/tim.c b/Core/Src/tim.c
new file mode 100644
index 0000000000000000000000000000000000000000..a12de0df190a73bb760c50c24d6a11cd8c2b2fc3
--- /dev/null
+++ b/Core/Src/tim.c
@@ -0,0 +1,170 @@
+/* USER CODE BEGIN Header */
+/**
+ ******************************************************************************
+ * @file tim.c
+ * @brief This file provides code for the configuration
+ * of the TIM instances.
+ ******************************************************************************
+ * @attention
+ *
+ * Copyright (c) 2023 STMicroelectronics.
+ * All rights reserved.
+ *
+ * This software is licensed under terms that can be found in the LICENSE file
+ * in the root directory of this software component.
+ * If no LICENSE file comes with this software, it is provided AS-IS.
+ *
+ ******************************************************************************
+ */
+/* USER CODE END Header */
+/* Includes ------------------------------------------------------------------*/
+#include "tim.h"
+
+/* USER CODE BEGIN 0 */
+
+/* USER CODE END 0 */
+
+TIM_HandleTypeDef htim1;
+TIM_HandleTypeDef htim4;
+
+/* TIM1 init function */
+void MX_TIM1_Init(void)
+{
+
+ /* USER CODE BEGIN TIM1_Init 0 */
+
+ /* USER CODE END TIM1_Init 0 */
+
+ TIM_SlaveConfigTypeDef sSlaveConfig = {0};
+ TIM_MasterConfigTypeDef sMasterConfig = {0};
+
+ /* USER CODE BEGIN TIM1_Init 1 */
+
+ /* USER CODE END TIM1_Init 1 */
+ htim1.Instance = TIM1;
+ htim1.Init.Prescaler = 0;
+ htim1.Init.CounterMode = TIM_COUNTERMODE_UP;
+ htim1.Init.Period = 65535;
+ htim1.Init.ClockDivision = TIM_CLOCKDIVISION_DIV1;
+ htim1.Init.RepetitionCounter = 0;
+ htim1.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_DISABLE;
+ if (HAL_TIM_Base_Init(&htim1) != HAL_OK)
+ {
+ Error_Handler();
+ }
+ sSlaveConfig.SlaveMode = TIM_SLAVEMODE_DISABLE;
+ sSlaveConfig.InputTrigger = TIM_TS_ITR0;
+ if (HAL_TIM_SlaveConfigSynchro(&htim1, &sSlaveConfig) != HAL_OK)
+ {
+ Error_Handler();
+ }
+ sMasterConfig.MasterOutputTrigger = TIM_TRGO_RESET;
+ sMasterConfig.MasterSlaveMode = TIM_MASTERSLAVEMODE_DISABLE;
+ if (HAL_TIMEx_MasterConfigSynchronization(&htim1, &sMasterConfig) != HAL_OK)
+ {
+ Error_Handler();
+ }
+ /* USER CODE BEGIN TIM1_Init 2 */
+
+ /* USER CODE END TIM1_Init 2 */
+
+}
+/* TIM4 init function */
+void MX_TIM4_Init(void)
+{
+
+ /* USER CODE BEGIN TIM4_Init 0 */
+
+ /* USER CODE END TIM4_Init 0 */
+
+ TIM_SlaveConfigTypeDef sSlaveConfig = {0};
+ TIM_MasterConfigTypeDef sMasterConfig = {0};
+
+ /* USER CODE BEGIN TIM4_Init 1 */
+
+ /* USER CODE END TIM4_Init 1 */
+ htim4.Instance = TIM4;
+ htim4.Init.Prescaler = 0;
+ htim4.Init.CounterMode = TIM_COUNTERMODE_UP;
+ htim4.Init.Period = 65535;
+ htim4.Init.ClockDivision = TIM_CLOCKDIVISION_DIV1;
+ htim4.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_DISABLE;
+ if (HAL_TIM_Base_Init(&htim4) != HAL_OK)
+ {
+ Error_Handler();
+ }
+ sSlaveConfig.SlaveMode = TIM_SLAVEMODE_EXTERNAL1;
+ sSlaveConfig.InputTrigger = TIM_TS_ITR0;
+ if (HAL_TIM_SlaveConfigSynchro(&htim4, &sSlaveConfig) != HAL_OK)
+ {
+ Error_Handler();
+ }
+ sMasterConfig.MasterOutputTrigger = TIM_TRGO_RESET;
+ sMasterConfig.MasterSlaveMode = TIM_MASTERSLAVEMODE_DISABLE;
+ if (HAL_TIMEx_MasterConfigSynchronization(&htim4, &sMasterConfig) != HAL_OK)
+ {
+ Error_Handler();
+ }
+ /* USER CODE BEGIN TIM4_Init 2 */
+
+ /* USER CODE END TIM4_Init 2 */
+
+}
+
+void HAL_TIM_Base_MspInit(TIM_HandleTypeDef* tim_baseHandle)
+{
+
+ if(tim_baseHandle->Instance==TIM1)
+ {
+ /* USER CODE BEGIN TIM1_MspInit 0 */
+
+ /* USER CODE END TIM1_MspInit 0 */
+ /* TIM1 clock enable */
+ __HAL_RCC_TIM1_CLK_ENABLE();
+ /* USER CODE BEGIN TIM1_MspInit 1 */
+
+ /* USER CODE END TIM1_MspInit 1 */
+ }
+ else if(tim_baseHandle->Instance==TIM4)
+ {
+ /* USER CODE BEGIN TIM4_MspInit 0 */
+
+ /* USER CODE END TIM4_MspInit 0 */
+ /* TIM4 clock enable */
+ __HAL_RCC_TIM4_CLK_ENABLE();
+ /* USER CODE BEGIN TIM4_MspInit 1 */
+
+ /* USER CODE END TIM4_MspInit 1 */
+ }
+}
+
+void HAL_TIM_Base_MspDeInit(TIM_HandleTypeDef* tim_baseHandle)
+{
+
+ if(tim_baseHandle->Instance==TIM1)
+ {
+ /* USER CODE BEGIN TIM1_MspDeInit 0 */
+
+ /* USER CODE END TIM1_MspDeInit 0 */
+ /* Peripheral clock disable */
+ __HAL_RCC_TIM1_CLK_DISABLE();
+ /* USER CODE BEGIN TIM1_MspDeInit 1 */
+
+ /* USER CODE END TIM1_MspDeInit 1 */
+ }
+ else if(tim_baseHandle->Instance==TIM4)
+ {
+ /* USER CODE BEGIN TIM4_MspDeInit 0 */
+
+ /* USER CODE END TIM4_MspDeInit 0 */
+ /* Peripheral clock disable */
+ __HAL_RCC_TIM4_CLK_DISABLE();
+ /* USER CODE BEGIN TIM4_MspDeInit 1 */
+
+ /* USER CODE END TIM4_MspDeInit 1 */
+ }
+}
+
+/* USER CODE BEGIN 1 */
+
+/* USER CODE END 1 */
diff --git a/Core/Src/usart.c b/Core/Src/usart.c
new file mode 100644
index 0000000000000000000000000000000000000000..e51fda66b82233de39728c507bd75c89db485136
--- /dev/null
+++ b/Core/Src/usart.c
@@ -0,0 +1,117 @@
+/* USER CODE BEGIN Header */
+/**
+ ******************************************************************************
+ * @file usart.c
+ * @brief This file provides code for the configuration
+ * of the USART instances.
+ ******************************************************************************
+ * @attention
+ *
+ * Copyright (c) 2023 STMicroelectronics.
+ * All rights reserved.
+ *
+ * This software is licensed under terms that can be found in the LICENSE file
+ * in the root directory of this software component.
+ * If no LICENSE file comes with this software, it is provided AS-IS.
+ *
+ ******************************************************************************
+ */
+/* USER CODE END Header */
+/* Includes ------------------------------------------------------------------*/
+#include "usart.h"
+
+/* USER CODE BEGIN 0 */
+
+/* USER CODE END 0 */
+
+UART_HandleTypeDef huart1;
+
+/* USART1 init function */
+
+void MX_USART1_UART_Init(void)
+{
+
+ /* USER CODE BEGIN USART1_Init 0 */
+
+ /* USER CODE END USART1_Init 0 */
+
+ /* USER CODE BEGIN USART1_Init 1 */
+
+ /* USER CODE END USART1_Init 1 */
+ huart1.Instance = USART1;
+ huart1.Init.BaudRate = 115200;
+ huart1.Init.WordLength = UART_WORDLENGTH_8B;
+ huart1.Init.StopBits = UART_STOPBITS_1;
+ huart1.Init.Parity = UART_PARITY_NONE;
+ huart1.Init.Mode = UART_MODE_TX_RX;
+ huart1.Init.HwFlowCtl = UART_HWCONTROL_NONE;
+ huart1.Init.OverSampling = UART_OVERSAMPLING_16;
+ if (HAL_UART_Init(&huart1) != HAL_OK)
+ {
+ Error_Handler();
+ }
+ /* USER CODE BEGIN USART1_Init 2 */
+
+ /* USER CODE END USART1_Init 2 */
+
+}
+
+void HAL_UART_MspInit(UART_HandleTypeDef* uartHandle)
+{
+
+ GPIO_InitTypeDef GPIO_InitStruct = {0};
+ if(uartHandle->Instance==USART1)
+ {
+ /* USER CODE BEGIN USART1_MspInit 0 */
+
+ /* USER CODE END USART1_MspInit 0 */
+ /* USART1 clock enable */
+ __HAL_RCC_USART1_CLK_ENABLE();
+
+ __HAL_RCC_GPIOA_CLK_ENABLE();
+ /**USART1 GPIO Configuration
+ PA9 ------> USART1_TX
+ PA10 ------> USART1_RX
+ */
+ GPIO_InitStruct.Pin = GPIO_PIN_9;
+ GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
+ GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH;
+ HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
+
+ GPIO_InitStruct.Pin = GPIO_PIN_10;
+ GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
+ GPIO_InitStruct.Pull = GPIO_NOPULL;
+ HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
+
+ /* USER CODE BEGIN USART1_MspInit 1 */
+
+ /* USER CODE END USART1_MspInit 1 */
+ }
+}
+
+void HAL_UART_MspDeInit(UART_HandleTypeDef* uartHandle)
+{
+
+ if(uartHandle->Instance==USART1)
+ {
+ /* USER CODE BEGIN USART1_MspDeInit 0 */
+
+ /* USER CODE END USART1_MspDeInit 0 */
+ /* Peripheral clock disable */
+ __HAL_RCC_USART1_CLK_DISABLE();
+
+ /**USART1 GPIO Configuration
+ PA9 ------> USART1_TX
+ PA10 ------> USART1_RX
+ */
+ HAL_GPIO_DeInit(GPIOA, GPIO_PIN_9|GPIO_PIN_10);
+
+ /* USER CODE BEGIN USART1_MspDeInit 1 */
+
+ /* USER CODE END USART1_MspDeInit 1 */
+ }
+}
+
+/* USER CODE BEGIN 1 */
+
+/* USER CODE END 1 */
diff --git a/Core/Startup/startup_stm32f103c8tx.s b/Core/Startup/startup_stm32f103c8tx.s
new file mode 100644
index 0000000000000000000000000000000000000000..76142851d4e7d7b3941afffd677492770418048a
--- /dev/null
+++ b/Core/Startup/startup_stm32f103c8tx.s
@@ -0,0 +1,364 @@
+/**
+ *************** (C) COPYRIGHT 2017 STMicroelectronics ************************
+ * @file startup_stm32f103xb.s
+ * @author MCD Application Team
+ * @brief STM32F103xB Devices vector table for Atollic toolchain.
+ * This module performs:
+ * - Set the initial SP
+ * - Set the initial PC == Reset_Handler,
+ * - Set the vector table entries with the exceptions ISR address
+ * - Configure the clock system
+ * - Branches to main in the C library (which eventually
+ * calls main()).
+ * After Reset the Cortex-M3 processor is in Thread mode,
+ * priority is Privileged, and the Stack is set to Main.
+ ******************************************************************************
+ * @attention
+ *
+ * Copyright (c) 2017-2021 STMicroelectronics.
+ * All rights reserved.
+ *
+ * This software is licensed under terms that can be found in the LICENSE file
+ * in the root directory of this software component.
+ * If no LICENSE file comes with this software, it is provided AS-IS.
+ *
+ ******************************************************************************
+ */
+
+ .syntax unified
+ .cpu cortex-m3
+ .fpu softvfp
+ .thumb
+
+.global g_pfnVectors
+.global Default_Handler
+
+/* start address for the initialization values of the .data section.
+defined in linker script */
+.word _sidata
+/* start address for the .data section. defined in linker script */
+.word _sdata
+/* end address for the .data section. defined in linker script */
+.word _edata
+/* start address for the .bss section. defined in linker script */
+.word _sbss
+/* end address for the .bss section. defined in linker script */
+.word _ebss
+
+.equ BootRAM, 0xF108F85F
+/**
+ * @brief This is the code that gets called when the processor first
+ * starts execution following a reset event. Only the absolutely
+ * necessary set is performed, after which the application
+ * supplied main() routine is called.
+ * @param None
+ * @retval : None
+*/
+
+ .section .text.Reset_Handler
+ .weak Reset_Handler
+ .type Reset_Handler, %function
+Reset_Handler:
+
+/* Call the clock system initialization function.*/
+ bl SystemInit
+
+/* Copy the data segment initializers from flash to SRAM */
+ ldr r0, =_sdata
+ ldr r1, =_edata
+ ldr r2, =_sidata
+ movs r3, #0
+ b LoopCopyDataInit
+
+CopyDataInit:
+ ldr r4, [r2, r3]
+ str r4, [r0, r3]
+ adds r3, r3, #4
+
+LoopCopyDataInit:
+ adds r4, r0, r3
+ cmp r4, r1
+ bcc CopyDataInit
+
+/* Zero fill the bss segment. */
+ ldr r2, =_sbss
+ ldr r4, =_ebss
+ movs r3, #0
+ b LoopFillZerobss
+
+FillZerobss:
+ str r3, [r2]
+ adds r2, r2, #4
+
+LoopFillZerobss:
+ cmp r2, r4
+ bcc FillZerobss
+
+/* Call static constructors */
+ bl __libc_init_array
+/* Call the application's entry point.*/
+ bl main
+ bx lr
+.size Reset_Handler, .-Reset_Handler
+
+/**
+ * @brief This is the code that gets called when the processor receives an
+ * unexpected interrupt. This simply enters an infinite loop, preserving
+ * the system state for examination by a debugger.
+ *
+ * @param None
+ * @retval : None
+*/
+ .section .text.Default_Handler,"ax",%progbits
+Default_Handler:
+Infinite_Loop:
+ b Infinite_Loop
+ .size Default_Handler, .-Default_Handler
+/******************************************************************************
+*
+* The minimal vector table for a Cortex M3. Note that the proper constructs
+* must be placed on this to ensure that it ends up at physical address
+* 0x0000.0000.
+*
+******************************************************************************/
+ .section .isr_vector,"a",%progbits
+ .type g_pfnVectors, %object
+ .size g_pfnVectors, .-g_pfnVectors
+
+
+g_pfnVectors:
+
+ .word _estack
+ .word Reset_Handler
+ .word NMI_Handler
+ .word HardFault_Handler
+ .word MemManage_Handler
+ .word BusFault_Handler
+ .word UsageFault_Handler
+ .word 0
+ .word 0
+ .word 0
+ .word 0
+ .word SVC_Handler
+ .word DebugMon_Handler
+ .word 0
+ .word PendSV_Handler
+ .word SysTick_Handler
+ .word WWDG_IRQHandler
+ .word PVD_IRQHandler
+ .word TAMPER_IRQHandler
+ .word RTC_IRQHandler
+ .word FLASH_IRQHandler
+ .word RCC_IRQHandler
+ .word EXTI0_IRQHandler
+ .word EXTI1_IRQHandler
+ .word EXTI2_IRQHandler
+ .word EXTI3_IRQHandler
+ .word EXTI4_IRQHandler
+ .word DMA1_Channel1_IRQHandler
+ .word DMA1_Channel2_IRQHandler
+ .word DMA1_Channel3_IRQHandler
+ .word DMA1_Channel4_IRQHandler
+ .word DMA1_Channel5_IRQHandler
+ .word DMA1_Channel6_IRQHandler
+ .word DMA1_Channel7_IRQHandler
+ .word ADC1_2_IRQHandler
+ .word USB_HP_CAN1_TX_IRQHandler
+ .word USB_LP_CAN1_RX0_IRQHandler
+ .word CAN1_RX1_IRQHandler
+ .word CAN1_SCE_IRQHandler
+ .word EXTI9_5_IRQHandler
+ .word TIM1_BRK_IRQHandler
+ .word TIM1_UP_IRQHandler
+ .word TIM1_TRG_COM_IRQHandler
+ .word TIM1_CC_IRQHandler
+ .word TIM2_IRQHandler
+ .word TIM3_IRQHandler
+ .word TIM4_IRQHandler
+ .word I2C1_EV_IRQHandler
+ .word I2C1_ER_IRQHandler
+ .word I2C2_EV_IRQHandler
+ .word I2C2_ER_IRQHandler
+ .word SPI1_IRQHandler
+ .word SPI2_IRQHandler
+ .word USART1_IRQHandler
+ .word USART2_IRQHandler
+ .word USART3_IRQHandler
+ .word EXTI15_10_IRQHandler
+ .word RTC_Alarm_IRQHandler
+ .word USBWakeUp_IRQHandler
+ .word 0
+ .word 0
+ .word 0
+ .word 0
+ .word 0
+ .word 0
+ .word 0
+ .word BootRAM /* @0x108. This is for boot in RAM mode for
+ STM32F10x Medium Density devices. */
+
+/*******************************************************************************
+*
+* Provide weak aliases for each Exception handler to the Default_Handler.
+* As they are weak aliases, any function with the same name will override
+* this definition.
+*
+*******************************************************************************/
+
+ .weak NMI_Handler
+ .thumb_set NMI_Handler,Default_Handler
+
+ .weak HardFault_Handler
+ .thumb_set HardFault_Handler,Default_Handler
+
+ .weak MemManage_Handler
+ .thumb_set MemManage_Handler,Default_Handler
+
+ .weak BusFault_Handler
+ .thumb_set BusFault_Handler,Default_Handler
+
+ .weak UsageFault_Handler
+ .thumb_set UsageFault_Handler,Default_Handler
+
+ .weak SVC_Handler
+ .thumb_set SVC_Handler,Default_Handler
+
+ .weak DebugMon_Handler
+ .thumb_set DebugMon_Handler,Default_Handler
+
+ .weak PendSV_Handler
+ .thumb_set PendSV_Handler,Default_Handler
+
+ .weak SysTick_Handler
+ .thumb_set SysTick_Handler,Default_Handler
+
+ .weak WWDG_IRQHandler
+ .thumb_set WWDG_IRQHandler,Default_Handler
+
+ .weak PVD_IRQHandler
+ .thumb_set PVD_IRQHandler,Default_Handler
+
+ .weak TAMPER_IRQHandler
+ .thumb_set TAMPER_IRQHandler,Default_Handler
+
+ .weak RTC_IRQHandler
+ .thumb_set RTC_IRQHandler,Default_Handler
+
+ .weak FLASH_IRQHandler
+ .thumb_set FLASH_IRQHandler,Default_Handler
+
+ .weak RCC_IRQHandler
+ .thumb_set RCC_IRQHandler,Default_Handler
+
+ .weak EXTI0_IRQHandler
+ .thumb_set EXTI0_IRQHandler,Default_Handler
+
+ .weak EXTI1_IRQHandler
+ .thumb_set EXTI1_IRQHandler,Default_Handler
+
+ .weak EXTI2_IRQHandler
+ .thumb_set EXTI2_IRQHandler,Default_Handler
+
+ .weak EXTI3_IRQHandler
+ .thumb_set EXTI3_IRQHandler,Default_Handler
+
+ .weak EXTI4_IRQHandler
+ .thumb_set EXTI4_IRQHandler,Default_Handler
+
+ .weak DMA1_Channel1_IRQHandler
+ .thumb_set DMA1_Channel1_IRQHandler,Default_Handler
+
+ .weak DMA1_Channel2_IRQHandler
+ .thumb_set DMA1_Channel2_IRQHandler,Default_Handler
+
+ .weak DMA1_Channel3_IRQHandler
+ .thumb_set DMA1_Channel3_IRQHandler,Default_Handler
+
+ .weak DMA1_Channel4_IRQHandler
+ .thumb_set DMA1_Channel4_IRQHandler,Default_Handler
+
+ .weak DMA1_Channel5_IRQHandler
+ .thumb_set DMA1_Channel5_IRQHandler,Default_Handler
+
+ .weak DMA1_Channel6_IRQHandler
+ .thumb_set DMA1_Channel6_IRQHandler,Default_Handler
+
+ .weak DMA1_Channel7_IRQHandler
+ .thumb_set DMA1_Channel7_IRQHandler,Default_Handler
+
+ .weak ADC1_2_IRQHandler
+ .thumb_set ADC1_2_IRQHandler,Default_Handler
+
+ .weak USB_HP_CAN1_TX_IRQHandler
+ .thumb_set USB_HP_CAN1_TX_IRQHandler,Default_Handler
+
+ .weak USB_LP_CAN1_RX0_IRQHandler
+ .thumb_set USB_LP_CAN1_RX0_IRQHandler,Default_Handler
+
+ .weak CAN1_RX1_IRQHandler
+ .thumb_set CAN1_RX1_IRQHandler,Default_Handler
+
+ .weak CAN1_SCE_IRQHandler
+ .thumb_set CAN1_SCE_IRQHandler,Default_Handler
+
+ .weak EXTI9_5_IRQHandler
+ .thumb_set EXTI9_5_IRQHandler,Default_Handler
+
+ .weak TIM1_BRK_IRQHandler
+ .thumb_set TIM1_BRK_IRQHandler,Default_Handler
+
+ .weak TIM1_UP_IRQHandler
+ .thumb_set TIM1_UP_IRQHandler,Default_Handler
+
+ .weak TIM1_TRG_COM_IRQHandler
+ .thumb_set TIM1_TRG_COM_IRQHandler,Default_Handler
+
+ .weak TIM1_CC_IRQHandler
+ .thumb_set TIM1_CC_IRQHandler,Default_Handler
+
+ .weak TIM2_IRQHandler
+ .thumb_set TIM2_IRQHandler,Default_Handler
+
+ .weak TIM3_IRQHandler
+ .thumb_set TIM3_IRQHandler,Default_Handler
+
+ .weak TIM4_IRQHandler
+ .thumb_set TIM4_IRQHandler,Default_Handler
+
+ .weak I2C1_EV_IRQHandler
+ .thumb_set I2C1_EV_IRQHandler,Default_Handler
+
+ .weak I2C1_ER_IRQHandler
+ .thumb_set I2C1_ER_IRQHandler,Default_Handler
+
+ .weak I2C2_EV_IRQHandler
+ .thumb_set I2C2_EV_IRQHandler,Default_Handler
+
+ .weak I2C2_ER_IRQHandler
+ .thumb_set I2C2_ER_IRQHandler,Default_Handler
+
+ .weak SPI1_IRQHandler
+ .thumb_set SPI1_IRQHandler,Default_Handler
+
+ .weak SPI2_IRQHandler
+ .thumb_set SPI2_IRQHandler,Default_Handler
+
+ .weak USART1_IRQHandler
+ .thumb_set USART1_IRQHandler,Default_Handler
+
+ .weak USART2_IRQHandler
+ .thumb_set USART2_IRQHandler,Default_Handler
+
+ .weak USART3_IRQHandler
+ .thumb_set USART3_IRQHandler,Default_Handler
+
+ .weak EXTI15_10_IRQHandler
+ .thumb_set EXTI15_10_IRQHandler,Default_Handler
+
+ .weak RTC_Alarm_IRQHandler
+ .thumb_set RTC_Alarm_IRQHandler,Default_Handler
+
+ .weak USBWakeUp_IRQHandler
+ .thumb_set USBWakeUp_IRQHandler,Default_Handler
+
+
diff --git a/Debug/Core/Src/IIC.d b/Debug/Core/Src/IIC.d
new file mode 100644
index 0000000000000000000000000000000000000000..d7ab406b64642940fa3d573be392a779b4530aea
--- /dev/null
+++ b/Debug/Core/Src/IIC.d
@@ -0,0 +1,53 @@
+Core/Src/IIC.o: ../Core/Src/IIC.c ../Core/Inc/IIC.h ../Core/Inc/main.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h \
+ ../Core/Inc/stm32f1xx_hal_conf.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_def.h \
+ ../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h \
+ ../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f103xb.h \
+ ../Drivers/CMSIS/Include/core_cm3.h \
+ ../Drivers/CMSIS/Include/cmsis_version.h \
+ ../Drivers/CMSIS/Include/cmsis_compiler.h \
+ ../Drivers/CMSIS/Include/cmsis_gcc.h \
+ ../Drivers/CMSIS/Device/ST/STM32F1xx/Include/system_stm32f1xx.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc_ex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio_ex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_exti.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma_ex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_cortex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash_ex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_uart.h
+../Core/Inc/IIC.h:
+../Core/Inc/main.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h:
+../Core/Inc/stm32f1xx_hal_conf.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_def.h:
+../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h:
+../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f103xb.h:
+../Drivers/CMSIS/Include/core_cm3.h:
+../Drivers/CMSIS/Include/cmsis_version.h:
+../Drivers/CMSIS/Include/cmsis_compiler.h:
+../Drivers/CMSIS/Include/cmsis_gcc.h:
+../Drivers/CMSIS/Device/ST/STM32F1xx/Include/system_stm32f1xx.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc_ex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio_ex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_exti.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma_ex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_cortex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash_ex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_uart.h:
diff --git a/Debug/Core/Src/IIC.o b/Debug/Core/Src/IIC.o
new file mode 100644
index 0000000000000000000000000000000000000000..e6c83585bc65a8671720baedb4b9400d90e6720e
Binary files /dev/null and b/Debug/Core/Src/IIC.o differ
diff --git a/Debug/Core/Src/IIC.su b/Debug/Core/Src/IIC.su
new file mode 100644
index 0000000000000000000000000000000000000000..033317d830d23379b27856b2356984cefa564b49
--- /dev/null
+++ b/Debug/Core/Src/IIC.su
@@ -0,0 +1,10 @@
+../Core/Src/IIC.c:46:13:IIC_Delay 16 static
+../Core/Src/IIC.c:71:6:IIC_Start 8 static
+../Core/Src/IIC.c:91:6:IIC_Stop 8 static
+../Core/Src/IIC.c:108:6:IIC_Send_Byte 24 static
+../Core/Src/IIC.c:144:9:IIC_Read_Byte 24 static
+../Core/Src/IIC.c:178:9:IIC_Wait_Ack 16 static
+../Core/Src/IIC.c:207:6:IIC_Ack 8 static
+../Core/Src/IIC.c:226:6:IIC_NAck 8 static
+../Core/Src/IIC.c:244:6:IIC_GPIO_Init 32 static
+../Core/Src/IIC.c:276:9:IIC_CheckDevice 24 static
diff --git a/Debug/Core/Src/gpio.d b/Debug/Core/Src/gpio.d
new file mode 100644
index 0000000000000000000000000000000000000000..811558e45caec8414b0a65ce46671347860ea60d
--- /dev/null
+++ b/Debug/Core/Src/gpio.d
@@ -0,0 +1,53 @@
+Core/Src/gpio.o: ../Core/Src/gpio.c ../Core/Inc/gpio.h ../Core/Inc/main.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h \
+ ../Core/Inc/stm32f1xx_hal_conf.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_def.h \
+ ../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h \
+ ../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f103xb.h \
+ ../Drivers/CMSIS/Include/core_cm3.h \
+ ../Drivers/CMSIS/Include/cmsis_version.h \
+ ../Drivers/CMSIS/Include/cmsis_compiler.h \
+ ../Drivers/CMSIS/Include/cmsis_gcc.h \
+ ../Drivers/CMSIS/Device/ST/STM32F1xx/Include/system_stm32f1xx.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc_ex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio_ex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_exti.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma_ex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_cortex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash_ex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_uart.h
+../Core/Inc/gpio.h:
+../Core/Inc/main.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h:
+../Core/Inc/stm32f1xx_hal_conf.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_def.h:
+../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h:
+../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f103xb.h:
+../Drivers/CMSIS/Include/core_cm3.h:
+../Drivers/CMSIS/Include/cmsis_version.h:
+../Drivers/CMSIS/Include/cmsis_compiler.h:
+../Drivers/CMSIS/Include/cmsis_gcc.h:
+../Drivers/CMSIS/Device/ST/STM32F1xx/Include/system_stm32f1xx.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc_ex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio_ex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_exti.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma_ex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_cortex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash_ex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_uart.h:
diff --git a/Debug/Core/Src/gpio.o b/Debug/Core/Src/gpio.o
new file mode 100644
index 0000000000000000000000000000000000000000..f24029d0d70773dc5980465a191947442049eb5f
Binary files /dev/null and b/Debug/Core/Src/gpio.o differ
diff --git a/Debug/Core/Src/gpio.su b/Debug/Core/Src/gpio.su
new file mode 100644
index 0000000000000000000000000000000000000000..f0039196af1d7805472d467151f1e0d434f8e02c
--- /dev/null
+++ b/Debug/Core/Src/gpio.su
@@ -0,0 +1 @@
+../Core/Src/gpio.c:42:6:MX_GPIO_Init 40 static
diff --git a/Debug/Core/Src/inv_mpu.d b/Debug/Core/Src/inv_mpu.d
new file mode 100644
index 0000000000000000000000000000000000000000..97937a24d32af4831961e9c5738285b121718bf5
--- /dev/null
+++ b/Debug/Core/Src/inv_mpu.d
@@ -0,0 +1,59 @@
+Core/Src/inv_mpu.o: ../Core/Src/inv_mpu.c ../Core/Inc/inv_mpu.h \
+ ../Core/Inc/main.h ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h \
+ ../Core/Inc/stm32f1xx_hal_conf.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_def.h \
+ ../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h \
+ ../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f103xb.h \
+ ../Drivers/CMSIS/Include/core_cm3.h \
+ ../Drivers/CMSIS/Include/cmsis_version.h \
+ ../Drivers/CMSIS/Include/cmsis_compiler.h \
+ ../Drivers/CMSIS/Include/cmsis_gcc.h \
+ ../Drivers/CMSIS/Device/ST/STM32F1xx/Include/system_stm32f1xx.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc_ex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio_ex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_exti.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma_ex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_cortex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash_ex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_uart.h \
+ ../Core/Inc/inv_mpu_dmp_motion_driver.h ../Core/Inc/MPU6050.h \
+ ../Core/Inc/IIC.h ../Core/Inc/usart.h
+../Core/Inc/inv_mpu.h:
+../Core/Inc/main.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h:
+../Core/Inc/stm32f1xx_hal_conf.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_def.h:
+../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h:
+../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f103xb.h:
+../Drivers/CMSIS/Include/core_cm3.h:
+../Drivers/CMSIS/Include/cmsis_version.h:
+../Drivers/CMSIS/Include/cmsis_compiler.h:
+../Drivers/CMSIS/Include/cmsis_gcc.h:
+../Drivers/CMSIS/Device/ST/STM32F1xx/Include/system_stm32f1xx.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc_ex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio_ex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_exti.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma_ex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_cortex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash_ex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_uart.h:
+../Core/Inc/inv_mpu_dmp_motion_driver.h:
+../Core/Inc/MPU6050.h:
+../Core/Inc/IIC.h:
+../Core/Inc/usart.h:
diff --git a/Debug/Core/Src/inv_mpu.o b/Debug/Core/Src/inv_mpu.o
new file mode 100644
index 0000000000000000000000000000000000000000..17983ce6628179574733592afe0a848486ac4845
Binary files /dev/null and b/Debug/Core/Src/inv_mpu.o differ
diff --git a/Debug/Core/Src/inv_mpu.su b/Debug/Core/Src/inv_mpu.su
new file mode 100644
index 0000000000000000000000000000000000000000..6a05af2a9aff7d56bd62075125a9a7baae83bac0
--- /dev/null
+++ b/Debug/Core/Src/inv_mpu.su
@@ -0,0 +1,52 @@
+../Core/Src/inv_mpu.c:700:12:set_int_enable 24 static
+../Core/Src/inv_mpu.c:735:5:mpu_reg_dump 16 static
+../Core/Src/inv_mpu.c:758:5:mpu_read_reg 16 static
+../Core/Src/inv_mpu.c:780:5:mpu_init 16 static
+../Core/Src/inv_mpu.c:920:5:mpu_lp_accel_mode 24 static
+../Core/Src/inv_mpu.c:1012:5:mpu_get_gyro_reg 24 static
+../Core/Src/inv_mpu.c:1035:5:mpu_get_accel_reg 24 static
+../Core/Src/inv_mpu.c:1058:5:mpu_get_temperature 32 static
+../Core/Src/inv_mpu.c:1083:5:mpu_set_accel_bias 48 static
+../Core/Src/inv_mpu.c:1132:5:mpu_reset_fifo 16 static
+../Core/Src/inv_mpu.c:1197:5:mpu_get_gyro_fsr 16 static
+../Core/Src/inv_mpu.c:1225:5:mpu_set_gyro_fsr 24 static
+../Core/Src/inv_mpu.c:1263:5:mpu_get_accel_fsr 16 static
+../Core/Src/inv_mpu.c:1292:5:mpu_set_accel_fsr 24 static
+../Core/Src/inv_mpu.c:1330:5:mpu_get_lpf 16 static
+../Core/Src/inv_mpu.c:1367:5:mpu_set_lpf 24 static
+../Core/Src/inv_mpu.c:1400:5:mpu_get_sample_rate 16 static
+../Core/Src/inv_mpu.c:1415:5:mpu_set_sample_rate 24 static
+../Core/Src/inv_mpu.c:1465:5:mpu_get_compass_sample_rate 16 static
+../Core/Src/inv_mpu.c:1487:5:mpu_set_compass_sample_rate 16 static
+../Core/Src/inv_mpu.c:1509:5:mpu_get_gyro_sens 16 static
+../Core/Src/inv_mpu.c:1536:5:mpu_get_accel_sens 16 static
+../Core/Src/inv_mpu.c:1569:5:mpu_get_fifo_config 16 static
+../Core/Src/inv_mpu.c:1584:5:mpu_configure_fifo 24 static
+../Core/Src/inv_mpu.c:1629:5:mpu_get_power_state 16 static
+../Core/Src/inv_mpu.c:1648:5:mpu_set_sensors 24 static
+../Core/Src/inv_mpu.c:1730:5:mpu_get_int_status 24 static
+../Core/Src/inv_mpu.c:1759:5:mpu_read_fifo 48 static
+../Core/Src/inv_mpu.c:1846:5:mpu_read_fifo_stream 32 static
+../Core/Src/inv_mpu.c:1887:5:mpu_set_bypass 24 static
+../Core/Src/inv_mpu.c:1940:5:mpu_set_int_level 16 static
+../Core/Src/inv_mpu.c:1952:5:mpu_set_int_latched 24 static
+../Core/Src/inv_mpu.c:1973:12:get_accel_prod_shift 40 static
+../Core/Src/inv_mpu.c:2000:12:accel_self_test 48 static
+../Core/Src/inv_mpu.c:2023:12:gyro_self_test 40 static
+../Core/Src/inv_mpu.c:2111:12:get_st_biases 256 static
+../Core/Src/inv_mpu.c:2253:5:mpu_run_self_test 64 static
+../Core/Src/inv_mpu.c:2359:5:mpu_write_mem 24 static
+../Core/Src/inv_mpu.c:2392:5:mpu_read_mem 24 static
+../Core/Src/inv_mpu.c:2424:5:mpu_load_firmware 48 static
+../Core/Src/inv_mpu.c:2466:5:mpu_set_dmp_state 24 static
+../Core/Src/inv_mpu.c:2508:5:mpu_get_dmp_state 16 static
+../Core/Src/inv_mpu.c:2515:5:setup_compass 4 static
+../Core/Src/inv_mpu.c:2628:5:mpu_get_compass_reg 16 static
+../Core/Src/inv_mpu.c:2681:5:mpu_get_compass_fsr 16 static
+../Core/Src/inv_mpu.c:2735:5:mpu_lp_motion_interrupt 32 static
+../Core/Src/inv_mpu.c:2974:9:run_self_test 48 static
+../Core/Src/inv_mpu.c:3003:16:inv_orientation_matrix_to_scalar 24 static
+../Core/Src/inv_mpu.c:3023:16:inv_row_2_scale 24 static
+../Core/Src/inv_mpu.c:3044:6:mget_ms 16 static
+../Core/Src/inv_mpu.c:3050:9:mpu_dmp_init 16 static
+../Core/Src/inv_mpu.c:3096:9:mpu_dmp_get_data 104 static
diff --git a/Debug/Core/Src/inv_mpu_dmp_motion_driver.d b/Debug/Core/Src/inv_mpu_dmp_motion_driver.d
new file mode 100644
index 0000000000000000000000000000000000000000..d9111b7ff25c7658e2a6c02c5d2967671e827e33
--- /dev/null
+++ b/Debug/Core/Src/inv_mpu_dmp_motion_driver.d
@@ -0,0 +1,60 @@
+Core/Src/inv_mpu_dmp_motion_driver.o: \
+ ../Core/Src/inv_mpu_dmp_motion_driver.c ../Core/Inc/inv_mpu.h \
+ ../Core/Inc/main.h ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h \
+ ../Core/Inc/stm32f1xx_hal_conf.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_def.h \
+ ../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h \
+ ../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f103xb.h \
+ ../Drivers/CMSIS/Include/core_cm3.h \
+ ../Drivers/CMSIS/Include/cmsis_version.h \
+ ../Drivers/CMSIS/Include/cmsis_compiler.h \
+ ../Drivers/CMSIS/Include/cmsis_gcc.h \
+ ../Drivers/CMSIS/Device/ST/STM32F1xx/Include/system_stm32f1xx.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc_ex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio_ex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_exti.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma_ex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_cortex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash_ex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_uart.h \
+ ../Core/Inc/inv_mpu_dmp_motion_driver.h ../Core/Inc/dmpKey.h \
+ ../Core/Inc/dmpmap.h ../Core/Inc/usart.h
+../Core/Inc/inv_mpu.h:
+../Core/Inc/main.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h:
+../Core/Inc/stm32f1xx_hal_conf.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_def.h:
+../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h:
+../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f103xb.h:
+../Drivers/CMSIS/Include/core_cm3.h:
+../Drivers/CMSIS/Include/cmsis_version.h:
+../Drivers/CMSIS/Include/cmsis_compiler.h:
+../Drivers/CMSIS/Include/cmsis_gcc.h:
+../Drivers/CMSIS/Device/ST/STM32F1xx/Include/system_stm32f1xx.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc_ex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio_ex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_exti.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma_ex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_cortex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash_ex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_uart.h:
+../Core/Inc/inv_mpu_dmp_motion_driver.h:
+../Core/Inc/dmpKey.h:
+../Core/Inc/dmpmap.h:
+../Core/Inc/usart.h:
diff --git a/Debug/Core/Src/inv_mpu_dmp_motion_driver.o b/Debug/Core/Src/inv_mpu_dmp_motion_driver.o
new file mode 100644
index 0000000000000000000000000000000000000000..7b613995e6d89aad9c373fe091da6b2c2d63fc8a
Binary files /dev/null and b/Debug/Core/Src/inv_mpu_dmp_motion_driver.o differ
diff --git a/Debug/Core/Src/inv_mpu_dmp_motion_driver.su b/Debug/Core/Src/inv_mpu_dmp_motion_driver.su
new file mode 100644
index 0000000000000000000000000000000000000000..a2e2a969a79e4843a5dd4fde32d6dce66a958374
--- /dev/null
+++ b/Debug/Core/Src/inv_mpu_dmp_motion_driver.su
@@ -0,0 +1,28 @@
+../Core/Src/inv_mpu_dmp_motion_driver.c:519:5:dmp_load_motion_driver_firmware 8 static
+../Core/Src/inv_mpu_dmp_motion_driver.c:532:5:dmp_set_orientation 40 static
+../Core/Src/inv_mpu_dmp_motion_driver.c:590:5:dmp_set_gyro_bias 80 static
+../Core/Src/inv_mpu_dmp_motion_driver.c:642:5:dmp_set_accel_bias 112 static
+../Core/Src/inv_mpu_dmp_motion_driver.c:694:5:dmp_set_fifo_rate 40 static
+../Core/Src/inv_mpu_dmp_motion_driver.c:720:5:dmp_get_fifo_rate 16 static
+../Core/Src/inv_mpu_dmp_motion_driver.c:732:5:dmp_set_tap_thresh 32 static
+../Core/Src/inv_mpu_dmp_motion_driver.c:802:5:dmp_set_tap_axes 24 static
+../Core/Src/inv_mpu_dmp_motion_driver.c:820:5:dmp_set_tap_count 24 static
+../Core/Src/inv_mpu_dmp_motion_driver.c:838:5:dmp_set_tap_time 24 static
+../Core/Src/inv_mpu_dmp_motion_driver.c:854:5:dmp_set_tap_time_multi 24 static
+../Core/Src/inv_mpu_dmp_motion_driver.c:872:5:dmp_set_shake_reject_thresh 24 static
+../Core/Src/inv_mpu_dmp_motion_driver.c:891:5:dmp_set_shake_reject_time 24 static
+../Core/Src/inv_mpu_dmp_motion_driver.c:909:5:dmp_set_shake_reject_timeout 24 static
+../Core/Src/inv_mpu_dmp_motion_driver.c:924:5:dmp_get_pedometer_step_count 24 static
+../Core/Src/inv_mpu_dmp_motion_driver.c:945:5:dmp_set_pedometer_step_count 24 static
+../Core/Src/inv_mpu_dmp_motion_driver.c:961:5:dmp_get_pedometer_walk_time 24 static
+../Core/Src/inv_mpu_dmp_motion_driver.c:982:5:dmp_set_pedometer_walk_time 24 static
+../Core/Src/inv_mpu_dmp_motion_driver.c:1012:5:dmp_enable_feature 32 static
+../Core/Src/inv_mpu_dmp_motion_driver.c:1149:5:dmp_get_enabled_features 16 static
+../Core/Src/inv_mpu_dmp_motion_driver.c:1164:5:dmp_enable_gyro_cal 40 static
+../Core/Src/inv_mpu_dmp_motion_driver.c:1185:5:dmp_enable_lp_quat 24 static
+../Core/Src/inv_mpu_dmp_motion_driver.c:1210:5:dmp_enable_6x_lp_quat 24 static
+../Core/Src/inv_mpu_dmp_motion_driver.c:1233:12:decode_gesture 24 static
+../Core/Src/inv_mpu_dmp_motion_driver.c:1267:5:dmp_set_interrupt_mode 40 static
+../Core/Src/inv_mpu_dmp_motion_driver.c:1307:5:dmp_read_fifo 80 static
+../Core/Src/inv_mpu_dmp_motion_driver.c:1404:5:dmp_register_tap_cb 16 static
+../Core/Src/inv_mpu_dmp_motion_driver.c:1415:5:dmp_register_android_orient_cb 16 static
diff --git a/Debug/Core/Src/main.d b/Debug/Core/Src/main.d
new file mode 100644
index 0000000000000000000000000000000000000000..f7f91ae9396400aeb576ef3174f148d2dcf78de9
--- /dev/null
+++ b/Debug/Core/Src/main.d
@@ -0,0 +1,62 @@
+Core/Src/main.o: ../Core/Src/main.c ../Core/Inc/main.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h \
+ ../Core/Inc/stm32f1xx_hal_conf.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_def.h \
+ ../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h \
+ ../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f103xb.h \
+ ../Drivers/CMSIS/Include/core_cm3.h \
+ ../Drivers/CMSIS/Include/cmsis_version.h \
+ ../Drivers/CMSIS/Include/cmsis_compiler.h \
+ ../Drivers/CMSIS/Include/cmsis_gcc.h \
+ ../Drivers/CMSIS/Device/ST/STM32F1xx/Include/system_stm32f1xx.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc_ex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio_ex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_exti.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma_ex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_cortex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash_ex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_uart.h \
+ ../Core/Inc/tim.h ../Core/Inc/main.h ../Core/Inc/usart.h \
+ ../Core/Inc/gpio.h ../Core/Inc/IIC.h ../Core/Inc/mpu6050.h \
+ ../Core/Inc/IIC.h
+../Core/Inc/main.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h:
+../Core/Inc/stm32f1xx_hal_conf.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_def.h:
+../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h:
+../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f103xb.h:
+../Drivers/CMSIS/Include/core_cm3.h:
+../Drivers/CMSIS/Include/cmsis_version.h:
+../Drivers/CMSIS/Include/cmsis_compiler.h:
+../Drivers/CMSIS/Include/cmsis_gcc.h:
+../Drivers/CMSIS/Device/ST/STM32F1xx/Include/system_stm32f1xx.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc_ex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio_ex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_exti.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma_ex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_cortex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash_ex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_uart.h:
+../Core/Inc/tim.h:
+../Core/Inc/main.h:
+../Core/Inc/usart.h:
+../Core/Inc/gpio.h:
+../Core/Inc/IIC.h:
+../Core/Inc/mpu6050.h:
+../Core/Inc/IIC.h:
diff --git a/Debug/Core/Src/main.o b/Debug/Core/Src/main.o
new file mode 100644
index 0000000000000000000000000000000000000000..13747a0ea3689cedab3c9f515892fad6c2fcdbd2
Binary files /dev/null and b/Debug/Core/Src/main.o differ
diff --git a/Debug/Core/Src/main.su b/Debug/Core/Src/main.su
new file mode 100644
index 0000000000000000000000000000000000000000..941c3070a10a79a2bf770c484ce9882115d7bc55
--- /dev/null
+++ b/Debug/Core/Src/main.su
@@ -0,0 +1,4 @@
+../Core/Src/main.c:65:1:__io_putchar 16 static
+../Core/Src/main.c:76:5:main 40 static
+../Core/Src/main.c:183:6:SystemClock_Config 72 static
+../Core/Src/main.c:226:6:Error_Handler 4 static,ignoring_inline_asm
diff --git a/Debug/Core/Src/mpu6050.d b/Debug/Core/Src/mpu6050.d
new file mode 100644
index 0000000000000000000000000000000000000000..5e7ade1d994bcbcf719734406a99b728e8ce91b5
--- /dev/null
+++ b/Debug/Core/Src/mpu6050.d
@@ -0,0 +1,55 @@
+Core/Src/mpu6050.o: ../Core/Src/mpu6050.c ../Core/Inc/mpu6050.h \
+ ../Core/Inc/IIC.h ../Core/Inc/main.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h \
+ ../Core/Inc/stm32f1xx_hal_conf.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_def.h \
+ ../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h \
+ ../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f103xb.h \
+ ../Drivers/CMSIS/Include/core_cm3.h \
+ ../Drivers/CMSIS/Include/cmsis_version.h \
+ ../Drivers/CMSIS/Include/cmsis_compiler.h \
+ ../Drivers/CMSIS/Include/cmsis_gcc.h \
+ ../Drivers/CMSIS/Device/ST/STM32F1xx/Include/system_stm32f1xx.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc_ex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio_ex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_exti.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma_ex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_cortex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash_ex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_uart.h
+../Core/Inc/mpu6050.h:
+../Core/Inc/IIC.h:
+../Core/Inc/main.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h:
+../Core/Inc/stm32f1xx_hal_conf.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_def.h:
+../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h:
+../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f103xb.h:
+../Drivers/CMSIS/Include/core_cm3.h:
+../Drivers/CMSIS/Include/cmsis_version.h:
+../Drivers/CMSIS/Include/cmsis_compiler.h:
+../Drivers/CMSIS/Include/cmsis_gcc.h:
+../Drivers/CMSIS/Device/ST/STM32F1xx/Include/system_stm32f1xx.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc_ex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio_ex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_exti.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma_ex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_cortex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash_ex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_uart.h:
diff --git a/Debug/Core/Src/mpu6050.o b/Debug/Core/Src/mpu6050.o
new file mode 100644
index 0000000000000000000000000000000000000000..36916677f9c6f364b4d650093e3ac3d41b93930b
Binary files /dev/null and b/Debug/Core/Src/mpu6050.o differ
diff --git a/Debug/Core/Src/mpu6050.su b/Debug/Core/Src/mpu6050.su
new file mode 100644
index 0000000000000000000000000000000000000000..3e63c357f0823f8f549ad20afa7f5a516dc9e706
--- /dev/null
+++ b/Debug/Core/Src/mpu6050.su
@@ -0,0 +1,12 @@
+../Core/Src/mpu6050.c:13:9:MPU_Init 16 static
+../Core/Src/mpu6050.c:44:9:MPU_Set_Gyro_Fsr 16 static
+../Core/Src/mpu6050.c:53:9:MPU_Set_Accel_Fsr 16 static
+../Core/Src/mpu6050.c:62:9:MPU_Set_LPF 24 static
+../Core/Src/mpu6050.c:84:9:MPU_Set_Rate 24 static
+../Core/Src/mpu6050.c:98:7:MPU_Get_Temperature 24 static
+../Core/Src/mpu6050.c:114:9:MPU_Get_Gyroscope 32 static
+../Core/Src/mpu6050.c:132:9:MPU_Get_Accelerometer 32 static
+../Core/Src/mpu6050.c:153:9:MPU_Write_Len 24 static
+../Core/Src/mpu6050.c:185:9:MPU_Read_Len 16 static
+../Core/Src/mpu6050.c:217:9:MPU_Write_Byte 16 static
+../Core/Src/mpu6050.c:241:9:MPU_Read_Byte 24 static
diff --git a/Debug/Core/Src/stm32f1xx_hal_msp.d b/Debug/Core/Src/stm32f1xx_hal_msp.d
new file mode 100644
index 0000000000000000000000000000000000000000..cf4d99f7588d3c7fbac2364c5b0db8937db489f2
--- /dev/null
+++ b/Debug/Core/Src/stm32f1xx_hal_msp.d
@@ -0,0 +1,52 @@
+Core/Src/stm32f1xx_hal_msp.o: ../Core/Src/stm32f1xx_hal_msp.c \
+ ../Core/Inc/main.h ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h \
+ ../Core/Inc/stm32f1xx_hal_conf.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_def.h \
+ ../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h \
+ ../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f103xb.h \
+ ../Drivers/CMSIS/Include/core_cm3.h \
+ ../Drivers/CMSIS/Include/cmsis_version.h \
+ ../Drivers/CMSIS/Include/cmsis_compiler.h \
+ ../Drivers/CMSIS/Include/cmsis_gcc.h \
+ ../Drivers/CMSIS/Device/ST/STM32F1xx/Include/system_stm32f1xx.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc_ex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio_ex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_exti.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma_ex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_cortex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash_ex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_uart.h
+../Core/Inc/main.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h:
+../Core/Inc/stm32f1xx_hal_conf.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_def.h:
+../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h:
+../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f103xb.h:
+../Drivers/CMSIS/Include/core_cm3.h:
+../Drivers/CMSIS/Include/cmsis_version.h:
+../Drivers/CMSIS/Include/cmsis_compiler.h:
+../Drivers/CMSIS/Include/cmsis_gcc.h:
+../Drivers/CMSIS/Device/ST/STM32F1xx/Include/system_stm32f1xx.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc_ex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio_ex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_exti.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma_ex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_cortex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash_ex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_uart.h:
diff --git a/Debug/Core/Src/stm32f1xx_hal_msp.o b/Debug/Core/Src/stm32f1xx_hal_msp.o
new file mode 100644
index 0000000000000000000000000000000000000000..ec00ed6937142f6087b7046be77146818d07f106
Binary files /dev/null and b/Debug/Core/Src/stm32f1xx_hal_msp.o differ
diff --git a/Debug/Core/Src/stm32f1xx_hal_msp.su b/Debug/Core/Src/stm32f1xx_hal_msp.su
new file mode 100644
index 0000000000000000000000000000000000000000..abb0befe15a5d2a1f2ee518f8b3cbe8ace97e0b7
--- /dev/null
+++ b/Debug/Core/Src/stm32f1xx_hal_msp.su
@@ -0,0 +1 @@
+../Core/Src/stm32f1xx_hal_msp.c:63:6:HAL_MspInit 24 static
diff --git a/Debug/Core/Src/stm32f1xx_it.d b/Debug/Core/Src/stm32f1xx_it.d
new file mode 100644
index 0000000000000000000000000000000000000000..666d9e16f329823e359a576c2b601da426955160
--- /dev/null
+++ b/Debug/Core/Src/stm32f1xx_it.d
@@ -0,0 +1,54 @@
+Core/Src/stm32f1xx_it.o: ../Core/Src/stm32f1xx_it.c ../Core/Inc/main.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h \
+ ../Core/Inc/stm32f1xx_hal_conf.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_def.h \
+ ../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h \
+ ../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f103xb.h \
+ ../Drivers/CMSIS/Include/core_cm3.h \
+ ../Drivers/CMSIS/Include/cmsis_version.h \
+ ../Drivers/CMSIS/Include/cmsis_compiler.h \
+ ../Drivers/CMSIS/Include/cmsis_gcc.h \
+ ../Drivers/CMSIS/Device/ST/STM32F1xx/Include/system_stm32f1xx.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc_ex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio_ex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_exti.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma_ex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_cortex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash_ex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_uart.h \
+ ../Core/Inc/stm32f1xx_it.h
+../Core/Inc/main.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h:
+../Core/Inc/stm32f1xx_hal_conf.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_def.h:
+../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h:
+../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f103xb.h:
+../Drivers/CMSIS/Include/core_cm3.h:
+../Drivers/CMSIS/Include/cmsis_version.h:
+../Drivers/CMSIS/Include/cmsis_compiler.h:
+../Drivers/CMSIS/Include/cmsis_gcc.h:
+../Drivers/CMSIS/Device/ST/STM32F1xx/Include/system_stm32f1xx.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc_ex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio_ex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_exti.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma_ex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_cortex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash_ex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_uart.h:
+../Core/Inc/stm32f1xx_it.h:
diff --git a/Debug/Core/Src/stm32f1xx_it.o b/Debug/Core/Src/stm32f1xx_it.o
new file mode 100644
index 0000000000000000000000000000000000000000..a289bef996d5c9519ebd8cad34aa5e8132f37580
Binary files /dev/null and b/Debug/Core/Src/stm32f1xx_it.o differ
diff --git a/Debug/Core/Src/stm32f1xx_it.su b/Debug/Core/Src/stm32f1xx_it.su
new file mode 100644
index 0000000000000000000000000000000000000000..f554f4a6edf5e603c405f9211e3e277f9f5673d5
--- /dev/null
+++ b/Debug/Core/Src/stm32f1xx_it.su
@@ -0,0 +1,9 @@
+../Core/Src/stm32f1xx_it.c:69:6:NMI_Handler 4 static
+../Core/Src/stm32f1xx_it.c:84:6:HardFault_Handler 4 static
+../Core/Src/stm32f1xx_it.c:99:6:MemManage_Handler 4 static
+../Core/Src/stm32f1xx_it.c:114:6:BusFault_Handler 4 static
+../Core/Src/stm32f1xx_it.c:129:6:UsageFault_Handler 4 static
+../Core/Src/stm32f1xx_it.c:144:6:SVC_Handler 4 static
+../Core/Src/stm32f1xx_it.c:157:6:DebugMon_Handler 4 static
+../Core/Src/stm32f1xx_it.c:170:6:PendSV_Handler 4 static
+../Core/Src/stm32f1xx_it.c:183:6:SysTick_Handler 8 static
diff --git a/Debug/Core/Src/subdir.mk b/Debug/Core/Src/subdir.mk
new file mode 100644
index 0000000000000000000000000000000000000000..92843496cf5e79694ffdb1ceb2672442a9c73b49
--- /dev/null
+++ b/Debug/Core/Src/subdir.mk
@@ -0,0 +1,63 @@
+################################################################################
+# Automatically-generated file. Do not edit!
+# Toolchain: GNU Tools for STM32 (10.3-2021.10)
+################################################################################
+
+# Add inputs and outputs from these tool invocations to the build variables
+C_SRCS += \
+../Core/Src/IIC.c \
+../Core/Src/gpio.c \
+../Core/Src/inv_mpu.c \
+../Core/Src/inv_mpu_dmp_motion_driver.c \
+../Core/Src/main.c \
+../Core/Src/mpu6050.c \
+../Core/Src/stm32f1xx_hal_msp.c \
+../Core/Src/stm32f1xx_it.c \
+../Core/Src/syscalls.c \
+../Core/Src/sysmem.c \
+../Core/Src/system_stm32f1xx.c \
+../Core/Src/tim.c \
+../Core/Src/usart.c
+
+OBJS += \
+./Core/Src/IIC.o \
+./Core/Src/gpio.o \
+./Core/Src/inv_mpu.o \
+./Core/Src/inv_mpu_dmp_motion_driver.o \
+./Core/Src/main.o \
+./Core/Src/mpu6050.o \
+./Core/Src/stm32f1xx_hal_msp.o \
+./Core/Src/stm32f1xx_it.o \
+./Core/Src/syscalls.o \
+./Core/Src/sysmem.o \
+./Core/Src/system_stm32f1xx.o \
+./Core/Src/tim.o \
+./Core/Src/usart.o
+
+C_DEPS += \
+./Core/Src/IIC.d \
+./Core/Src/gpio.d \
+./Core/Src/inv_mpu.d \
+./Core/Src/inv_mpu_dmp_motion_driver.d \
+./Core/Src/main.d \
+./Core/Src/mpu6050.d \
+./Core/Src/stm32f1xx_hal_msp.d \
+./Core/Src/stm32f1xx_it.d \
+./Core/Src/syscalls.d \
+./Core/Src/sysmem.d \
+./Core/Src/system_stm32f1xx.d \
+./Core/Src/tim.d \
+./Core/Src/usart.d
+
+
+# Each subdirectory must supply rules for building sources it contributes
+Core/Src/%.o Core/Src/%.su: ../Core/Src/%.c Core/Src/subdir.mk
+ arm-none-eabi-gcc "$<" -mcpu=cortex-m3 -std=gnu11 -g3 -DDEBUG -DUSE_HAL_DRIVER -DSTM32F103xB -c -I../Core/Inc -I../Drivers/STM32F1xx_HAL_Driver/Inc/Legacy -I../Drivers/STM32F1xx_HAL_Driver/Inc -I../Drivers/CMSIS/Device/ST/STM32F1xx/Include -I../Drivers/CMSIS/Include -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"$(@:%.o=%.d)" -MT"$@" --specs=nano.specs -mfloat-abi=soft -mthumb -o "$@"
+
+clean: clean-Core-2f-Src
+
+clean-Core-2f-Src:
+ -$(RM) ./Core/Src/IIC.d ./Core/Src/IIC.o ./Core/Src/IIC.su ./Core/Src/gpio.d ./Core/Src/gpio.o ./Core/Src/gpio.su ./Core/Src/inv_mpu.d ./Core/Src/inv_mpu.o ./Core/Src/inv_mpu.su ./Core/Src/inv_mpu_dmp_motion_driver.d ./Core/Src/inv_mpu_dmp_motion_driver.o ./Core/Src/inv_mpu_dmp_motion_driver.su ./Core/Src/main.d ./Core/Src/main.o ./Core/Src/main.su ./Core/Src/mpu6050.d ./Core/Src/mpu6050.o ./Core/Src/mpu6050.su ./Core/Src/stm32f1xx_hal_msp.d ./Core/Src/stm32f1xx_hal_msp.o ./Core/Src/stm32f1xx_hal_msp.su ./Core/Src/stm32f1xx_it.d ./Core/Src/stm32f1xx_it.o ./Core/Src/stm32f1xx_it.su ./Core/Src/syscalls.d ./Core/Src/syscalls.o ./Core/Src/syscalls.su ./Core/Src/sysmem.d ./Core/Src/sysmem.o ./Core/Src/sysmem.su ./Core/Src/system_stm32f1xx.d ./Core/Src/system_stm32f1xx.o ./Core/Src/system_stm32f1xx.su ./Core/Src/tim.d ./Core/Src/tim.o ./Core/Src/tim.su ./Core/Src/usart.d ./Core/Src/usart.o ./Core/Src/usart.su
+
+.PHONY: clean-Core-2f-Src
+
diff --git a/Debug/Core/Src/syscalls.d b/Debug/Core/Src/syscalls.d
new file mode 100644
index 0000000000000000000000000000000000000000..8667c7088e17e4d2ff09a5767472c8950dd307dd
--- /dev/null
+++ b/Debug/Core/Src/syscalls.d
@@ -0,0 +1 @@
+Core/Src/syscalls.o: ../Core/Src/syscalls.c
diff --git a/Debug/Core/Src/syscalls.o b/Debug/Core/Src/syscalls.o
new file mode 100644
index 0000000000000000000000000000000000000000..bb0781769ef9cf15fdd61e7fe88dbeb7c2e74d7c
Binary files /dev/null and b/Debug/Core/Src/syscalls.o differ
diff --git a/Debug/Core/Src/syscalls.su b/Debug/Core/Src/syscalls.su
new file mode 100644
index 0000000000000000000000000000000000000000..a7d10e5be83ed810edbcc8a344986a1631ea236c
--- /dev/null
+++ b/Debug/Core/Src/syscalls.su
@@ -0,0 +1,18 @@
+../Core/Src/syscalls.c:44:6:initialise_monitor_handles 4 static
+../Core/Src/syscalls.c:48:5:_getpid 4 static
+../Core/Src/syscalls.c:53:5:_kill 16 static
+../Core/Src/syscalls.c:59:6:_exit 16 static
+../Core/Src/syscalls.c:65:27:_read 32 static
+../Core/Src/syscalls.c:77:27:_write 32 static
+../Core/Src/syscalls.c:88:5:_close 16 static
+../Core/Src/syscalls.c:94:5:_fstat 16 static
+../Core/Src/syscalls.c:100:5:_isatty 16 static
+../Core/Src/syscalls.c:105:5:_lseek 24 static
+../Core/Src/syscalls.c:110:5:_open 12 static
+../Core/Src/syscalls.c:116:5:_wait 16 static
+../Core/Src/syscalls.c:122:5:_unlink 16 static
+../Core/Src/syscalls.c:128:5:_times 16 static
+../Core/Src/syscalls.c:133:5:_stat 16 static
+../Core/Src/syscalls.c:139:5:_link 16 static
+../Core/Src/syscalls.c:145:5:_fork 8 static
+../Core/Src/syscalls.c:151:5:_execve 24 static
diff --git a/Debug/Core/Src/sysmem.d b/Debug/Core/Src/sysmem.d
new file mode 100644
index 0000000000000000000000000000000000000000..74fecf9bbd2ee3a0f3eb51d9c593580cb8075fa2
--- /dev/null
+++ b/Debug/Core/Src/sysmem.d
@@ -0,0 +1 @@
+Core/Src/sysmem.o: ../Core/Src/sysmem.c
diff --git a/Debug/Core/Src/sysmem.o b/Debug/Core/Src/sysmem.o
new file mode 100644
index 0000000000000000000000000000000000000000..8da742207a9883a96e7a3e995c048d87c58d27f8
Binary files /dev/null and b/Debug/Core/Src/sysmem.o differ
diff --git a/Debug/Core/Src/sysmem.su b/Debug/Core/Src/sysmem.su
new file mode 100644
index 0000000000000000000000000000000000000000..12d5f17720e96b8a37ebbf516fdf5627f8f9b754
--- /dev/null
+++ b/Debug/Core/Src/sysmem.su
@@ -0,0 +1 @@
+../Core/Src/sysmem.c:53:7:_sbrk 32 static
diff --git a/Debug/Core/Src/system_stm32f1xx.d b/Debug/Core/Src/system_stm32f1xx.d
new file mode 100644
index 0000000000000000000000000000000000000000..1df9dd53902ab47a592c54553f66ed034d6a2c00
--- /dev/null
+++ b/Debug/Core/Src/system_stm32f1xx.d
@@ -0,0 +1,51 @@
+Core/Src/system_stm32f1xx.o: ../Core/Src/system_stm32f1xx.c \
+ ../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h \
+ ../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f103xb.h \
+ ../Drivers/CMSIS/Include/core_cm3.h \
+ ../Drivers/CMSIS/Include/cmsis_version.h \
+ ../Drivers/CMSIS/Include/cmsis_compiler.h \
+ ../Drivers/CMSIS/Include/cmsis_gcc.h \
+ ../Drivers/CMSIS/Device/ST/STM32F1xx/Include/system_stm32f1xx.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h \
+ ../Core/Inc/stm32f1xx_hal_conf.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_def.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc_ex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio_ex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_exti.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma_ex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_cortex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash_ex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_uart.h
+../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h:
+../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f103xb.h:
+../Drivers/CMSIS/Include/core_cm3.h:
+../Drivers/CMSIS/Include/cmsis_version.h:
+../Drivers/CMSIS/Include/cmsis_compiler.h:
+../Drivers/CMSIS/Include/cmsis_gcc.h:
+../Drivers/CMSIS/Device/ST/STM32F1xx/Include/system_stm32f1xx.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h:
+../Core/Inc/stm32f1xx_hal_conf.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_def.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc_ex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio_ex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_exti.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma_ex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_cortex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash_ex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_uart.h:
diff --git a/Debug/Core/Src/system_stm32f1xx.o b/Debug/Core/Src/system_stm32f1xx.o
new file mode 100644
index 0000000000000000000000000000000000000000..cd73cf7d4c32fd1eb3626a720a15e58dd49c0bbb
Binary files /dev/null and b/Debug/Core/Src/system_stm32f1xx.o differ
diff --git a/Debug/Core/Src/system_stm32f1xx.su b/Debug/Core/Src/system_stm32f1xx.su
new file mode 100644
index 0000000000000000000000000000000000000000..04bd7598468753c3c4aca1627f2f0fa1dae710b9
--- /dev/null
+++ b/Debug/Core/Src/system_stm32f1xx.su
@@ -0,0 +1,2 @@
+../Core/Src/system_stm32f1xx.c:175:6:SystemInit 4 static
+../Core/Src/system_stm32f1xx.c:224:6:SystemCoreClockUpdate 24 static
diff --git a/Debug/Core/Src/tim.d b/Debug/Core/Src/tim.d
new file mode 100644
index 0000000000000000000000000000000000000000..c7d5f8150eb9946ad89841dd566e4404bef08567
--- /dev/null
+++ b/Debug/Core/Src/tim.d
@@ -0,0 +1,53 @@
+Core/Src/tim.o: ../Core/Src/tim.c ../Core/Inc/tim.h ../Core/Inc/main.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h \
+ ../Core/Inc/stm32f1xx_hal_conf.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_def.h \
+ ../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h \
+ ../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f103xb.h \
+ ../Drivers/CMSIS/Include/core_cm3.h \
+ ../Drivers/CMSIS/Include/cmsis_version.h \
+ ../Drivers/CMSIS/Include/cmsis_compiler.h \
+ ../Drivers/CMSIS/Include/cmsis_gcc.h \
+ ../Drivers/CMSIS/Device/ST/STM32F1xx/Include/system_stm32f1xx.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc_ex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio_ex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_exti.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma_ex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_cortex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash_ex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_uart.h
+../Core/Inc/tim.h:
+../Core/Inc/main.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h:
+../Core/Inc/stm32f1xx_hal_conf.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_def.h:
+../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h:
+../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f103xb.h:
+../Drivers/CMSIS/Include/core_cm3.h:
+../Drivers/CMSIS/Include/cmsis_version.h:
+../Drivers/CMSIS/Include/cmsis_compiler.h:
+../Drivers/CMSIS/Include/cmsis_gcc.h:
+../Drivers/CMSIS/Device/ST/STM32F1xx/Include/system_stm32f1xx.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc_ex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio_ex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_exti.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma_ex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_cortex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash_ex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_uart.h:
diff --git a/Debug/Core/Src/tim.o b/Debug/Core/Src/tim.o
new file mode 100644
index 0000000000000000000000000000000000000000..beb1a005ec264dfdaccc773948901b2ab200bd26
Binary files /dev/null and b/Debug/Core/Src/tim.o differ
diff --git a/Debug/Core/Src/tim.su b/Debug/Core/Src/tim.su
new file mode 100644
index 0000000000000000000000000000000000000000..1f24642cc09d711ee69395b8e30446642be8b3ec
--- /dev/null
+++ b/Debug/Core/Src/tim.su
@@ -0,0 +1,4 @@
+../Core/Src/tim.c:31:6:MX_TIM1_Init 40 static
+../Core/Src/tim.c:73:6:MX_TIM4_Init 40 static
+../Core/Src/tim.c:114:6:HAL_TIM_Base_MspInit 24 static
+../Core/Src/tim.c:141:6:HAL_TIM_Base_MspDeInit 16 static
diff --git a/Debug/Core/Src/usart.d b/Debug/Core/Src/usart.d
new file mode 100644
index 0000000000000000000000000000000000000000..341b1fdb5a156bcb21c8bc269bca8f4010abcf88
--- /dev/null
+++ b/Debug/Core/Src/usart.d
@@ -0,0 +1,53 @@
+Core/Src/usart.o: ../Core/Src/usart.c ../Core/Inc/usart.h \
+ ../Core/Inc/main.h ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h \
+ ../Core/Inc/stm32f1xx_hal_conf.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_def.h \
+ ../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h \
+ ../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f103xb.h \
+ ../Drivers/CMSIS/Include/core_cm3.h \
+ ../Drivers/CMSIS/Include/cmsis_version.h \
+ ../Drivers/CMSIS/Include/cmsis_compiler.h \
+ ../Drivers/CMSIS/Include/cmsis_gcc.h \
+ ../Drivers/CMSIS/Device/ST/STM32F1xx/Include/system_stm32f1xx.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc_ex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio_ex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_exti.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma_ex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_cortex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash_ex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_uart.h
+../Core/Inc/usart.h:
+../Core/Inc/main.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h:
+../Core/Inc/stm32f1xx_hal_conf.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_def.h:
+../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h:
+../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f103xb.h:
+../Drivers/CMSIS/Include/core_cm3.h:
+../Drivers/CMSIS/Include/cmsis_version.h:
+../Drivers/CMSIS/Include/cmsis_compiler.h:
+../Drivers/CMSIS/Include/cmsis_gcc.h:
+../Drivers/CMSIS/Device/ST/STM32F1xx/Include/system_stm32f1xx.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc_ex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio_ex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_exti.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma_ex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_cortex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash_ex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_uart.h:
diff --git a/Debug/Core/Src/usart.o b/Debug/Core/Src/usart.o
new file mode 100644
index 0000000000000000000000000000000000000000..0aa093e1993b346dfa1d09966a25661e48538914
Binary files /dev/null and b/Debug/Core/Src/usart.o differ
diff --git a/Debug/Core/Src/usart.su b/Debug/Core/Src/usart.su
new file mode 100644
index 0000000000000000000000000000000000000000..3ac2fe68f10015e588d1f1b510083e50cb8be2b9
--- /dev/null
+++ b/Debug/Core/Src/usart.su
@@ -0,0 +1,3 @@
+../Core/Src/usart.c:31:6:MX_USART1_UART_Init 8 static
+../Core/Src/usart.c:59:6:HAL_UART_MspInit 40 static
+../Core/Src/usart.c:92:6:HAL_UART_MspDeInit 16 static
diff --git a/Debug/Core/Startup/startup_stm32f103c8tx.d b/Debug/Core/Startup/startup_stm32f103c8tx.d
new file mode 100644
index 0000000000000000000000000000000000000000..8737f10509c1185d7f6af8d1365906af34e1cec0
--- /dev/null
+++ b/Debug/Core/Startup/startup_stm32f103c8tx.d
@@ -0,0 +1,2 @@
+Core/Startup/startup_stm32f103c8tx.o: \
+ ../Core/Startup/startup_stm32f103c8tx.s
diff --git a/Debug/Core/Startup/startup_stm32f103c8tx.o b/Debug/Core/Startup/startup_stm32f103c8tx.o
new file mode 100644
index 0000000000000000000000000000000000000000..8894446c99dcb6b7523a452f5d2a871653cf510b
Binary files /dev/null and b/Debug/Core/Startup/startup_stm32f103c8tx.o differ
diff --git a/Debug/Core/Startup/subdir.mk b/Debug/Core/Startup/subdir.mk
new file mode 100644
index 0000000000000000000000000000000000000000..32bde9aaff1106c3c1b75a8cd589c93c241a8e7e
--- /dev/null
+++ b/Debug/Core/Startup/subdir.mk
@@ -0,0 +1,27 @@
+################################################################################
+# Automatically-generated file. Do not edit!
+# Toolchain: GNU Tools for STM32 (10.3-2021.10)
+################################################################################
+
+# Add inputs and outputs from these tool invocations to the build variables
+S_SRCS += \
+../Core/Startup/startup_stm32f103c8tx.s
+
+OBJS += \
+./Core/Startup/startup_stm32f103c8tx.o
+
+S_DEPS += \
+./Core/Startup/startup_stm32f103c8tx.d
+
+
+# Each subdirectory must supply rules for building sources it contributes
+Core/Startup/%.o: ../Core/Startup/%.s Core/Startup/subdir.mk
+ arm-none-eabi-gcc -mcpu=cortex-m3 -g3 -DDEBUG -c -x assembler-with-cpp -MMD -MP -MF"$(@:%.o=%.d)" -MT"$@" --specs=nano.specs -mfloat-abi=soft -mthumb -o "$@" "$<"
+
+clean: clean-Core-2f-Startup
+
+clean-Core-2f-Startup:
+ -$(RM) ./Core/Startup/startup_stm32f103c8tx.d ./Core/Startup/startup_stm32f103c8tx.o
+
+.PHONY: clean-Core-2f-Startup
+
diff --git a/Debug/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal.d b/Debug/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal.d
new file mode 100644
index 0000000000000000000000000000000000000000..89b63e242e17bb1910ac82a93e660c3feebb1ef5
--- /dev/null
+++ b/Debug/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal.d
@@ -0,0 +1,52 @@
+Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal.o: \
+ ../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal.c \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h \
+ ../Core/Inc/stm32f1xx_hal_conf.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_def.h \
+ ../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h \
+ ../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f103xb.h \
+ ../Drivers/CMSIS/Include/core_cm3.h \
+ ../Drivers/CMSIS/Include/cmsis_version.h \
+ ../Drivers/CMSIS/Include/cmsis_compiler.h \
+ ../Drivers/CMSIS/Include/cmsis_gcc.h \
+ ../Drivers/CMSIS/Device/ST/STM32F1xx/Include/system_stm32f1xx.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc_ex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio_ex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_exti.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma_ex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_cortex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash_ex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_uart.h
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h:
+../Core/Inc/stm32f1xx_hal_conf.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_def.h:
+../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h:
+../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f103xb.h:
+../Drivers/CMSIS/Include/core_cm3.h:
+../Drivers/CMSIS/Include/cmsis_version.h:
+../Drivers/CMSIS/Include/cmsis_compiler.h:
+../Drivers/CMSIS/Include/cmsis_gcc.h:
+../Drivers/CMSIS/Device/ST/STM32F1xx/Include/system_stm32f1xx.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc_ex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio_ex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_exti.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma_ex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_cortex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash_ex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_uart.h:
diff --git a/Debug/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal.o b/Debug/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal.o
new file mode 100644
index 0000000000000000000000000000000000000000..802b17e0b64e678c24b36371575b5a9b075e6b69
Binary files /dev/null and b/Debug/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal.o differ
diff --git a/Debug/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal.su b/Debug/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal.su
new file mode 100644
index 0000000000000000000000000000000000000000..e0e4d0f09a22dc8da4df2f0f8689665e739c124f
--- /dev/null
+++ b/Debug/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal.su
@@ -0,0 +1,25 @@
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal.c:142:19:HAL_Init 8 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal.c:175:19:HAL_DeInit 8 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal.c:200:13:HAL_MspInit 4 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal.c:211:13:HAL_MspDeInit 4 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal.c:234:26:HAL_InitTick 16 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal.c:293:13:HAL_IncTick 4 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal.c:304:17:HAL_GetTick 4 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal.c:313:10:HAL_GetTickPrio 4 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal.c:322:19:HAL_SetTickFreq 24 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal.c:355:21:HAL_GetTickFreq 4 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal.c:371:13:HAL_Delay 24 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal.c:397:13:HAL_SuspendTick 4 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal.c:413:13:HAL_ResumeTick 4 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal.c:423:10:HAL_GetHalVersion 4 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal.c:439:10:HAL_GetREVID 4 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal.c:455:10:HAL_GetDEVID 4 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal.c:464:10:HAL_GetUIDw0 4 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal.c:473:10:HAL_GetUIDw1 4 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal.c:482:10:HAL_GetUIDw2 4 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal.c:491:6:HAL_DBGMCU_EnableDBGSleepMode 4 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal.c:507:6:HAL_DBGMCU_DisableDBGSleepMode 4 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal.c:537:6:HAL_DBGMCU_EnableDBGStopMode 4 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal.c:553:6:HAL_DBGMCU_DisableDBGStopMode 4 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal.c:569:6:HAL_DBGMCU_EnableDBGStandbyMode 4 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal.c:585:6:HAL_DBGMCU_DisableDBGStandbyMode 4 static
diff --git a/Debug/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_cortex.d b/Debug/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_cortex.d
new file mode 100644
index 0000000000000000000000000000000000000000..204846125cc68f45c2ab8f5020593ce35b900860
--- /dev/null
+++ b/Debug/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_cortex.d
@@ -0,0 +1,52 @@
+Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_cortex.o: \
+ ../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_cortex.c \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h \
+ ../Core/Inc/stm32f1xx_hal_conf.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_def.h \
+ ../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h \
+ ../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f103xb.h \
+ ../Drivers/CMSIS/Include/core_cm3.h \
+ ../Drivers/CMSIS/Include/cmsis_version.h \
+ ../Drivers/CMSIS/Include/cmsis_compiler.h \
+ ../Drivers/CMSIS/Include/cmsis_gcc.h \
+ ../Drivers/CMSIS/Device/ST/STM32F1xx/Include/system_stm32f1xx.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc_ex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio_ex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_exti.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma_ex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_cortex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash_ex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_uart.h
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h:
+../Core/Inc/stm32f1xx_hal_conf.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_def.h:
+../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h:
+../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f103xb.h:
+../Drivers/CMSIS/Include/core_cm3.h:
+../Drivers/CMSIS/Include/cmsis_version.h:
+../Drivers/CMSIS/Include/cmsis_compiler.h:
+../Drivers/CMSIS/Include/cmsis_gcc.h:
+../Drivers/CMSIS/Device/ST/STM32F1xx/Include/system_stm32f1xx.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc_ex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio_ex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_exti.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma_ex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_cortex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash_ex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_uart.h:
diff --git a/Debug/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_cortex.o b/Debug/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_cortex.o
new file mode 100644
index 0000000000000000000000000000000000000000..716a233358d59d3b505c65e3ae2d6fd9996330b1
Binary files /dev/null and b/Debug/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_cortex.o differ
diff --git a/Debug/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_cortex.su b/Debug/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_cortex.su
new file mode 100644
index 0000000000000000000000000000000000000000..d6fc2b1497f0363cc64a485d20497a584a46bb8d
--- /dev/null
+++ b/Debug/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_cortex.su
@@ -0,0 +1,29 @@
+../Drivers/CMSIS/Include/core_cm3.h:1480:22:__NVIC_SetPriorityGrouping 24 static
+../Drivers/CMSIS/Include/core_cm3.h:1499:26:__NVIC_GetPriorityGrouping 4 static
+../Drivers/CMSIS/Include/core_cm3.h:1511:22:__NVIC_EnableIRQ 16 static
+../Drivers/CMSIS/Include/core_cm3.h:1547:22:__NVIC_DisableIRQ 16 static,ignoring_inline_asm
+../Drivers/CMSIS/Include/core_cm3.h:1566:26:__NVIC_GetPendingIRQ 16 static
+../Drivers/CMSIS/Include/core_cm3.h:1585:22:__NVIC_SetPendingIRQ 16 static
+../Drivers/CMSIS/Include/core_cm3.h:1600:22:__NVIC_ClearPendingIRQ 16 static
+../Drivers/CMSIS/Include/core_cm3.h:1617:26:__NVIC_GetActive 16 static
+../Drivers/CMSIS/Include/core_cm3.h:1639:22:__NVIC_SetPriority 16 static
+../Drivers/CMSIS/Include/core_cm3.h:1661:26:__NVIC_GetPriority 16 static
+../Drivers/CMSIS/Include/core_cm3.h:1686:26:NVIC_EncodePriority 40 static
+../Drivers/CMSIS/Include/core_cm3.h:1713:22:NVIC_DecodePriority 40 static
+../Drivers/CMSIS/Include/core_cm3.h:1762:34:__NVIC_SystemReset 4 static,ignoring_inline_asm
+../Drivers/CMSIS/Include/core_cm3.h:1834:26:SysTick_Config 16 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_cortex.c:142:6:HAL_NVIC_SetPriorityGrouping 16 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_cortex.c:164:6:HAL_NVIC_SetPriority 32 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_cortex.c:186:6:HAL_NVIC_EnableIRQ 16 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_cortex.c:202:6:HAL_NVIC_DisableIRQ 16 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_cortex.c:215:6:HAL_NVIC_SystemReset 8 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_cortex.c:228:10:HAL_SYSTICK_Config 16 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_cortex.c:343:10:HAL_NVIC_GetPriorityGrouping 8 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_cortex.c:370:6:HAL_NVIC_GetPriority 24 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_cortex.c:385:6:HAL_NVIC_SetPendingIRQ 16 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_cortex.c:403:10:HAL_NVIC_GetPendingIRQ 16 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_cortex.c:419:6:HAL_NVIC_ClearPendingIRQ 16 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_cortex.c:436:10:HAL_NVIC_GetActive 16 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_cortex.c:453:6:HAL_SYSTICK_CLKSourceConfig 16 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_cortex.c:471:6:HAL_SYSTICK_IRQHandler 8 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_cortex.c:480:13:HAL_SYSTICK_Callback 4 static
diff --git a/Debug/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_dma.d b/Debug/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_dma.d
new file mode 100644
index 0000000000000000000000000000000000000000..7150092c46ae55e0fe8799b91c0ad5b12e216ecc
--- /dev/null
+++ b/Debug/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_dma.d
@@ -0,0 +1,52 @@
+Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_dma.o: \
+ ../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_dma.c \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h \
+ ../Core/Inc/stm32f1xx_hal_conf.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_def.h \
+ ../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h \
+ ../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f103xb.h \
+ ../Drivers/CMSIS/Include/core_cm3.h \
+ ../Drivers/CMSIS/Include/cmsis_version.h \
+ ../Drivers/CMSIS/Include/cmsis_compiler.h \
+ ../Drivers/CMSIS/Include/cmsis_gcc.h \
+ ../Drivers/CMSIS/Device/ST/STM32F1xx/Include/system_stm32f1xx.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc_ex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio_ex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_exti.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma_ex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_cortex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash_ex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_uart.h
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h:
+../Core/Inc/stm32f1xx_hal_conf.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_def.h:
+../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h:
+../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f103xb.h:
+../Drivers/CMSIS/Include/core_cm3.h:
+../Drivers/CMSIS/Include/cmsis_version.h:
+../Drivers/CMSIS/Include/cmsis_compiler.h:
+../Drivers/CMSIS/Include/cmsis_gcc.h:
+../Drivers/CMSIS/Device/ST/STM32F1xx/Include/system_stm32f1xx.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc_ex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio_ex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_exti.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma_ex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_cortex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash_ex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_uart.h:
diff --git a/Debug/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_dma.o b/Debug/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_dma.o
new file mode 100644
index 0000000000000000000000000000000000000000..51af988a8986ba12791ae29ddd30a5186c90a426
Binary files /dev/null and b/Debug/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_dma.o differ
diff --git a/Debug/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_dma.su b/Debug/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_dma.su
new file mode 100644
index 0000000000000000000000000000000000000000..dd631862e6f53643c0f72546aa54812a2b194cc0
--- /dev/null
+++ b/Debug/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_dma.su
@@ -0,0 +1,13 @@
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_dma.c:142:19:HAL_DMA_Init 24 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_dma.c:219:19:HAL_DMA_DeInit 16 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_dma.c:318:19:HAL_DMA_Start 32 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_dma.c:361:19:HAL_DMA_Start_IT 32 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_dma.c:415:19:HAL_DMA_Abort 24 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_dma.c:456:19:HAL_DMA_Abort_IT 24 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_dma.c:501:19:HAL_DMA_PollForTransfer 32 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_dma.c:602:6:HAL_DMA_IRQHandler 24 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_dma.c:692:19:HAL_DMA_RegisterCallback 32 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_dma.c:743:19:HAL_DMA_UnRegisterCallback 24 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_dma.c:819:22:HAL_DMA_GetState 16 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_dma.c:831:10:HAL_DMA_GetError 16 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_dma.c:857:13:DMA_SetConfig 24 static
diff --git a/Debug/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_exti.d b/Debug/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_exti.d
new file mode 100644
index 0000000000000000000000000000000000000000..1f764e337865c13fa8b6144f69bac2542ff06d84
--- /dev/null
+++ b/Debug/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_exti.d
@@ -0,0 +1,52 @@
+Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_exti.o: \
+ ../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_exti.c \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h \
+ ../Core/Inc/stm32f1xx_hal_conf.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_def.h \
+ ../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h \
+ ../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f103xb.h \
+ ../Drivers/CMSIS/Include/core_cm3.h \
+ ../Drivers/CMSIS/Include/cmsis_version.h \
+ ../Drivers/CMSIS/Include/cmsis_compiler.h \
+ ../Drivers/CMSIS/Include/cmsis_gcc.h \
+ ../Drivers/CMSIS/Device/ST/STM32F1xx/Include/system_stm32f1xx.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc_ex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio_ex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_exti.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma_ex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_cortex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash_ex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_uart.h
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h:
+../Core/Inc/stm32f1xx_hal_conf.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_def.h:
+../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h:
+../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f103xb.h:
+../Drivers/CMSIS/Include/core_cm3.h:
+../Drivers/CMSIS/Include/cmsis_version.h:
+../Drivers/CMSIS/Include/cmsis_compiler.h:
+../Drivers/CMSIS/Include/cmsis_gcc.h:
+../Drivers/CMSIS/Device/ST/STM32F1xx/Include/system_stm32f1xx.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc_ex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio_ex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_exti.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma_ex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_cortex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash_ex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_uart.h:
diff --git a/Debug/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_exti.o b/Debug/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_exti.o
new file mode 100644
index 0000000000000000000000000000000000000000..c265e211d23a6bf75d445745da8180d3396bf1e6
Binary files /dev/null and b/Debug/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_exti.o differ
diff --git a/Debug/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_exti.su b/Debug/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_exti.su
new file mode 100644
index 0000000000000000000000000000000000000000..f036813878fb4d3d80251230b5c9379bdb302a97
--- /dev/null
+++ b/Debug/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_exti.su
@@ -0,0 +1,9 @@
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_exti.c:142:19:HAL_EXTI_SetConfigLine 32 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_exti.c:237:19:HAL_EXTI_GetConfigLine 32 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_exti.c:316:19:HAL_EXTI_ClearConfigLine 32 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_exti.c:369:19:HAL_EXTI_RegisterCallback 32 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_exti.c:394:19:HAL_EXTI_GetHandle 16 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_exti.c:434:6:HAL_EXTI_IRQHandler 24 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_exti.c:466:10:HAL_EXTI_GetPending 32 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_exti.c:498:6:HAL_EXTI_ClearPending 24 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_exti.c:522:6:HAL_EXTI_GenerateSWI 24 static
diff --git a/Debug/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.d b/Debug/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.d
new file mode 100644
index 0000000000000000000000000000000000000000..725ee0b7c61b81ffb86274a68da2e65dd9eb040b
--- /dev/null
+++ b/Debug/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.d
@@ -0,0 +1,52 @@
+Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.o: \
+ ../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h \
+ ../Core/Inc/stm32f1xx_hal_conf.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_def.h \
+ ../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h \
+ ../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f103xb.h \
+ ../Drivers/CMSIS/Include/core_cm3.h \
+ ../Drivers/CMSIS/Include/cmsis_version.h \
+ ../Drivers/CMSIS/Include/cmsis_compiler.h \
+ ../Drivers/CMSIS/Include/cmsis_gcc.h \
+ ../Drivers/CMSIS/Device/ST/STM32F1xx/Include/system_stm32f1xx.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc_ex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio_ex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_exti.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma_ex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_cortex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash_ex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_uart.h
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h:
+../Core/Inc/stm32f1xx_hal_conf.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_def.h:
+../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h:
+../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f103xb.h:
+../Drivers/CMSIS/Include/core_cm3.h:
+../Drivers/CMSIS/Include/cmsis_version.h:
+../Drivers/CMSIS/Include/cmsis_compiler.h:
+../Drivers/CMSIS/Include/cmsis_gcc.h:
+../Drivers/CMSIS/Device/ST/STM32F1xx/Include/system_stm32f1xx.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc_ex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio_ex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_exti.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma_ex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_cortex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash_ex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_uart.h:
diff --git a/Debug/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.o b/Debug/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.o
new file mode 100644
index 0000000000000000000000000000000000000000..254fdb63763d54c6ebb5ffee0c5011e31cd90d76
Binary files /dev/null and b/Debug/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.o differ
diff --git a/Debug/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.su b/Debug/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.su
new file mode 100644
index 0000000000000000000000000000000000000000..c5041ca4c9e20dbddbcf5e6b753ed8fca48bb4d3
--- /dev/null
+++ b/Debug/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.su
@@ -0,0 +1,14 @@
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c:166:19:HAL_FLASH_Program 48 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c:265:19:HAL_FLASH_Program_IT 32 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c:330:6:HAL_FLASH_IRQHandler 16 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c:604:13:HAL_FLASH_EndOfOperationCallback 16 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c:622:13:HAL_FLASH_OperationErrorCallback 16 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c:655:19:HAL_FLASH_Unlock 16 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c:693:19:HAL_FLASH_Lock 4 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c:710:19:HAL_FLASH_OB_Unlock 4 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c:730:19:HAL_FLASH_OB_Lock 4 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c:743:6:HAL_FLASH_OB_Launch 8 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c:772:10:HAL_FLASH_GetError 4 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c:795:13:FLASH_Program_HalfWord 16 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c:824:19:FLASH_WaitForLastOperation 24 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c:912:13:FLASH_SetErrorCode 16 static
diff --git a/Debug/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash_ex.d b/Debug/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash_ex.d
new file mode 100644
index 0000000000000000000000000000000000000000..00efe16bc06b5cd6305c24937254598790299d62
--- /dev/null
+++ b/Debug/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash_ex.d
@@ -0,0 +1,52 @@
+Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash_ex.o: \
+ ../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash_ex.c \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h \
+ ../Core/Inc/stm32f1xx_hal_conf.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_def.h \
+ ../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h \
+ ../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f103xb.h \
+ ../Drivers/CMSIS/Include/core_cm3.h \
+ ../Drivers/CMSIS/Include/cmsis_version.h \
+ ../Drivers/CMSIS/Include/cmsis_compiler.h \
+ ../Drivers/CMSIS/Include/cmsis_gcc.h \
+ ../Drivers/CMSIS/Device/ST/STM32F1xx/Include/system_stm32f1xx.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc_ex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio_ex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_exti.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma_ex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_cortex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash_ex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_uart.h
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h:
+../Core/Inc/stm32f1xx_hal_conf.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_def.h:
+../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h:
+../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f103xb.h:
+../Drivers/CMSIS/Include/core_cm3.h:
+../Drivers/CMSIS/Include/cmsis_version.h:
+../Drivers/CMSIS/Include/cmsis_compiler.h:
+../Drivers/CMSIS/Include/cmsis_gcc.h:
+../Drivers/CMSIS/Device/ST/STM32F1xx/Include/system_stm32f1xx.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc_ex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio_ex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_exti.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma_ex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_cortex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash_ex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_uart.h:
diff --git a/Debug/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash_ex.o b/Debug/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash_ex.o
new file mode 100644
index 0000000000000000000000000000000000000000..7e33a09a1076bf84491b5388c0e67ab071020d61
Binary files /dev/null and b/Debug/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash_ex.o differ
diff --git a/Debug/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash_ex.su b/Debug/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash_ex.su
new file mode 100644
index 0000000000000000000000000000000000000000..7cf9db4b8745e31baf14fb40211b1c4b7745e7cb
--- /dev/null
+++ b/Debug/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash_ex.su
@@ -0,0 +1,16 @@
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash_ex.c:157:19:HAL_FLASHEx_Erase 24 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash_ex.c:317:19:HAL_FLASHEx_Erase_IT 24 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash_ex.c:395:19:HAL_FLASHEx_OBErase 16 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash_ex.c:444:19:HAL_FLASHEx_OBProgram 24 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash_ex.c:525:6:HAL_FLASHEx_OBGetConfig 16 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash_ex.c:547:10:HAL_FLASHEx_OBGetUserData 24 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash_ex.c:593:13:FLASH_MassErase 16 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash_ex.c:642:26:FLASH_OB_EnableWRP 32 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash_ex.c:765:26:FLASH_OB_DisableWRP 32 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash_ex.c:884:26:FLASH_OB_RDP_LevelConfig 24 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash_ex.c:935:26:FLASH_OB_UserConfig 24 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash_ex.c:986:26:FLASH_OB_ProgramData 24 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash_ex.c:1019:17:FLASH_OB_GetWRP 4 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash_ex.c:1032:17:FLASH_OB_GetRDP 16 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash_ex.c:1058:16:FLASH_OB_GetUser 4 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash_ex.c:1087:6:FLASH_PageErase 16 static
diff --git a/Debug/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_gpio.d b/Debug/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_gpio.d
new file mode 100644
index 0000000000000000000000000000000000000000..7a5fb319326cfe6cda59fce7e0783741040d224c
--- /dev/null
+++ b/Debug/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_gpio.d
@@ -0,0 +1,52 @@
+Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_gpio.o: \
+ ../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_gpio.c \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h \
+ ../Core/Inc/stm32f1xx_hal_conf.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_def.h \
+ ../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h \
+ ../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f103xb.h \
+ ../Drivers/CMSIS/Include/core_cm3.h \
+ ../Drivers/CMSIS/Include/cmsis_version.h \
+ ../Drivers/CMSIS/Include/cmsis_compiler.h \
+ ../Drivers/CMSIS/Include/cmsis_gcc.h \
+ ../Drivers/CMSIS/Device/ST/STM32F1xx/Include/system_stm32f1xx.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc_ex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio_ex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_exti.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma_ex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_cortex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash_ex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_uart.h
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h:
+../Core/Inc/stm32f1xx_hal_conf.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_def.h:
+../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h:
+../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f103xb.h:
+../Drivers/CMSIS/Include/core_cm3.h:
+../Drivers/CMSIS/Include/cmsis_version.h:
+../Drivers/CMSIS/Include/cmsis_compiler.h:
+../Drivers/CMSIS/Include/cmsis_gcc.h:
+../Drivers/CMSIS/Device/ST/STM32F1xx/Include/system_stm32f1xx.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc_ex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio_ex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_exti.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma_ex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_cortex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash_ex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_uart.h:
diff --git a/Debug/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_gpio.o b/Debug/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_gpio.o
new file mode 100644
index 0000000000000000000000000000000000000000..5185c75457de34edc9eb3d9715c25a0c3ff44098
Binary files /dev/null and b/Debug/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_gpio.o differ
diff --git a/Debug/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_gpio.su b/Debug/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_gpio.su
new file mode 100644
index 0000000000000000000000000000000000000000..9e46e34a407b738c8df7509111128852f9f4758a
--- /dev/null
+++ b/Debug/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_gpio.su
@@ -0,0 +1,8 @@
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_gpio.c:178:6:HAL_GPIO_Init 48 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_gpio.c:351:6:HAL_GPIO_DeInit 40 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_gpio.c:431:15:HAL_GPIO_ReadPin 24 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_gpio.c:465:6:HAL_GPIO_WritePin 16 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_gpio.c:487:6:HAL_GPIO_TogglePin 24 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_gpio.c:511:19:HAL_GPIO_LockPin 24 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_gpio.c:546:6:HAL_GPIO_EXTI_IRQHandler 16 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_gpio.c:561:13:HAL_GPIO_EXTI_Callback 16 static
diff --git a/Debug/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_gpio_ex.d b/Debug/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_gpio_ex.d
new file mode 100644
index 0000000000000000000000000000000000000000..29398009d5855acfe76d6cf56ae65cb19b314e03
--- /dev/null
+++ b/Debug/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_gpio_ex.d
@@ -0,0 +1,52 @@
+Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_gpio_ex.o: \
+ ../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_gpio_ex.c \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h \
+ ../Core/Inc/stm32f1xx_hal_conf.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_def.h \
+ ../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h \
+ ../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f103xb.h \
+ ../Drivers/CMSIS/Include/core_cm3.h \
+ ../Drivers/CMSIS/Include/cmsis_version.h \
+ ../Drivers/CMSIS/Include/cmsis_compiler.h \
+ ../Drivers/CMSIS/Include/cmsis_gcc.h \
+ ../Drivers/CMSIS/Device/ST/STM32F1xx/Include/system_stm32f1xx.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc_ex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio_ex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_exti.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma_ex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_cortex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash_ex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_uart.h
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h:
+../Core/Inc/stm32f1xx_hal_conf.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_def.h:
+../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h:
+../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f103xb.h:
+../Drivers/CMSIS/Include/core_cm3.h:
+../Drivers/CMSIS/Include/cmsis_version.h:
+../Drivers/CMSIS/Include/cmsis_compiler.h:
+../Drivers/CMSIS/Include/cmsis_gcc.h:
+../Drivers/CMSIS/Device/ST/STM32F1xx/Include/system_stm32f1xx.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc_ex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio_ex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_exti.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma_ex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_cortex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash_ex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_uart.h:
diff --git a/Debug/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_gpio_ex.o b/Debug/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_gpio_ex.o
new file mode 100644
index 0000000000000000000000000000000000000000..52967c3907f9130ae6dbfa6a0f56832b7d91b24a
Binary files /dev/null and b/Debug/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_gpio_ex.o differ
diff --git a/Debug/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_gpio_ex.su b/Debug/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_gpio_ex.su
new file mode 100644
index 0000000000000000000000000000000000000000..d484009cab498ddc1eb80803c051418dc79c9bc7
--- /dev/null
+++ b/Debug/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_gpio_ex.su
@@ -0,0 +1,3 @@
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_gpio_ex.c:81:6:HAL_GPIOEx_ConfigEventout 16 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_gpio_ex.c:95:6:HAL_GPIOEx_EnableEventout 4 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_gpio_ex.c:104:6:HAL_GPIOEx_DisableEventout 4 static
diff --git a/Debug/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_pwr.d b/Debug/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_pwr.d
new file mode 100644
index 0000000000000000000000000000000000000000..9ca58b7597b1452c37cc61a5239c44242741dc68
--- /dev/null
+++ b/Debug/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_pwr.d
@@ -0,0 +1,52 @@
+Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_pwr.o: \
+ ../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_pwr.c \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h \
+ ../Core/Inc/stm32f1xx_hal_conf.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_def.h \
+ ../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h \
+ ../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f103xb.h \
+ ../Drivers/CMSIS/Include/core_cm3.h \
+ ../Drivers/CMSIS/Include/cmsis_version.h \
+ ../Drivers/CMSIS/Include/cmsis_compiler.h \
+ ../Drivers/CMSIS/Include/cmsis_gcc.h \
+ ../Drivers/CMSIS/Device/ST/STM32F1xx/Include/system_stm32f1xx.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc_ex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio_ex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_exti.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma_ex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_cortex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash_ex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_uart.h
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h:
+../Core/Inc/stm32f1xx_hal_conf.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_def.h:
+../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h:
+../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f103xb.h:
+../Drivers/CMSIS/Include/core_cm3.h:
+../Drivers/CMSIS/Include/cmsis_version.h:
+../Drivers/CMSIS/Include/cmsis_compiler.h:
+../Drivers/CMSIS/Include/cmsis_gcc.h:
+../Drivers/CMSIS/Device/ST/STM32F1xx/Include/system_stm32f1xx.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc_ex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio_ex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_exti.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma_ex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_cortex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash_ex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_uart.h:
diff --git a/Debug/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_pwr.o b/Debug/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_pwr.o
new file mode 100644
index 0000000000000000000000000000000000000000..0a13deee8b185a185d296b7da12834e08d5a8cee
Binary files /dev/null and b/Debug/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_pwr.o differ
diff --git a/Debug/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_pwr.su b/Debug/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_pwr.su
new file mode 100644
index 0000000000000000000000000000000000000000..be6db7da0b495de2bc27b929dbd13ccf94b19b67
--- /dev/null
+++ b/Debug/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_pwr.su
@@ -0,0 +1,18 @@
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_pwr.c:116:13:PWR_OverloadWfe 4 static,ignoring_inline_asm
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_pwr.c:155:6:HAL_PWR_DeInit 4 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_pwr.c:168:6:HAL_PWR_EnableBkUpAccess 4 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_pwr.c:181:6:HAL_PWR_DisableBkUpAccess 4 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_pwr.c:315:6:HAL_PWR_ConfigPVD 16 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_pwr.c:358:6:HAL_PWR_EnablePVD 4 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_pwr.c:368:6:HAL_PWR_DisablePVD 4 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_pwr.c:381:6:HAL_PWR_EnableWakeUpPin 24 static,ignoring_inline_asm
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_pwr.c:396:6:HAL_PWR_DisableWakeUpPin 24 static,ignoring_inline_asm
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_pwr.c:416:6:HAL_PWR_EnterSLEEPMode 16 static,ignoring_inline_asm
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_pwr.c:462:6:HAL_PWR_EnterSTOPMode 16 static,ignoring_inline_asm
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_pwr.c:502:6:HAL_PWR_EnterSTANDBYMode 4 static,ignoring_inline_asm
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_pwr.c:527:6:HAL_PWR_EnableSleepOnExit 4 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_pwr.c:540:6:HAL_PWR_DisableSleepOnExit 4 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_pwr.c:553:6:HAL_PWR_EnableSEVOnPend 4 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_pwr.c:566:6:HAL_PWR_DisableSEVOnPend 4 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_pwr.c:579:6:HAL_PWR_PVD_IRQHandler 8 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_pwr.c:596:13:HAL_PWR_PVDCallback 4 static
diff --git a/Debug/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc.d b/Debug/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc.d
new file mode 100644
index 0000000000000000000000000000000000000000..018c963f5b2b9958933c34d602cfa9e25ae3bbee
--- /dev/null
+++ b/Debug/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc.d
@@ -0,0 +1,52 @@
+Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc.o: \
+ ../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc.c \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h \
+ ../Core/Inc/stm32f1xx_hal_conf.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_def.h \
+ ../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h \
+ ../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f103xb.h \
+ ../Drivers/CMSIS/Include/core_cm3.h \
+ ../Drivers/CMSIS/Include/cmsis_version.h \
+ ../Drivers/CMSIS/Include/cmsis_compiler.h \
+ ../Drivers/CMSIS/Include/cmsis_gcc.h \
+ ../Drivers/CMSIS/Device/ST/STM32F1xx/Include/system_stm32f1xx.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc_ex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio_ex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_exti.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma_ex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_cortex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash_ex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_uart.h
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h:
+../Core/Inc/stm32f1xx_hal_conf.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_def.h:
+../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h:
+../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f103xb.h:
+../Drivers/CMSIS/Include/core_cm3.h:
+../Drivers/CMSIS/Include/cmsis_version.h:
+../Drivers/CMSIS/Include/cmsis_compiler.h:
+../Drivers/CMSIS/Include/cmsis_gcc.h:
+../Drivers/CMSIS/Device/ST/STM32F1xx/Include/system_stm32f1xx.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc_ex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio_ex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_exti.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma_ex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_cortex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash_ex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_uart.h:
diff --git a/Debug/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc.o b/Debug/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc.o
new file mode 100644
index 0000000000000000000000000000000000000000..057ab5212c9d5c078604d0eb60e923766b3c7459
Binary files /dev/null and b/Debug/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc.o differ
diff --git a/Debug/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc.su b/Debug/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc.su
new file mode 100644
index 0000000000000000000000000000000000000000..26a3a08ef03d2c5218ecf4544c83bfae6a46580d
--- /dev/null
+++ b/Debug/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc.su
@@ -0,0 +1,15 @@
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc.c:200:19:HAL_RCC_DeInit 16 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc.c:345:19:HAL_RCC_OscConfig 32 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc.c:811:19:HAL_RCC_ClockConfig 24 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc.c:1000:6:HAL_RCC_MCOConfig 48 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc.c:1037:6:HAL_RCC_EnableCSS 4 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc.c:1046:6:HAL_RCC_DisableCSS 4 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc.c:1080:10:HAL_RCC_GetSysClockFreq 32 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc.c:1174:10:HAL_RCC_GetHCLKFreq 4 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc.c:1185:10:HAL_RCC_GetPCLK1Freq 8 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc.c:1197:10:HAL_RCC_GetPCLK2Freq 8 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc.c:1210:6:HAL_RCC_GetOscConfig 16 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc.c:1310:6:HAL_RCC_GetClockConfig 16 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc.c:1345:6:HAL_RCC_NMI_IRQHandler 8 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc.c:1363:13:RCC_Delay 24 static,ignoring_inline_asm
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc.c:1377:13:HAL_RCC_CSSCallback 4 static
diff --git a/Debug/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc_ex.d b/Debug/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc_ex.d
new file mode 100644
index 0000000000000000000000000000000000000000..829fcb954b2ac581ac976519b92e16bda8ccd4e5
--- /dev/null
+++ b/Debug/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc_ex.d
@@ -0,0 +1,52 @@
+Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc_ex.o: \
+ ../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc_ex.c \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h \
+ ../Core/Inc/stm32f1xx_hal_conf.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_def.h \
+ ../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h \
+ ../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f103xb.h \
+ ../Drivers/CMSIS/Include/core_cm3.h \
+ ../Drivers/CMSIS/Include/cmsis_version.h \
+ ../Drivers/CMSIS/Include/cmsis_compiler.h \
+ ../Drivers/CMSIS/Include/cmsis_gcc.h \
+ ../Drivers/CMSIS/Device/ST/STM32F1xx/Include/system_stm32f1xx.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc_ex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio_ex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_exti.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma_ex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_cortex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash_ex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_uart.h
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h:
+../Core/Inc/stm32f1xx_hal_conf.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_def.h:
+../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h:
+../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f103xb.h:
+../Drivers/CMSIS/Include/core_cm3.h:
+../Drivers/CMSIS/Include/cmsis_version.h:
+../Drivers/CMSIS/Include/cmsis_compiler.h:
+../Drivers/CMSIS/Include/cmsis_gcc.h:
+../Drivers/CMSIS/Device/ST/STM32F1xx/Include/system_stm32f1xx.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc_ex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio_ex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_exti.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma_ex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_cortex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash_ex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_uart.h:
diff --git a/Debug/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc_ex.o b/Debug/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc_ex.o
new file mode 100644
index 0000000000000000000000000000000000000000..6982ffc5429bc4f67faba4b8e1ba591540063f3b
Binary files /dev/null and b/Debug/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc_ex.o differ
diff --git a/Debug/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc_ex.su b/Debug/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc_ex.su
new file mode 100644
index 0000000000000000000000000000000000000000..2037c3ff3c1c3e6105386a8cdd76f559a5ba8519
--- /dev/null
+++ b/Debug/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc_ex.su
@@ -0,0 +1,3 @@
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc_ex.c:98:19:HAL_RCCEx_PeriphCLKConfig 32 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc_ex.c:292:6:HAL_RCCEx_GetPeriphCLKConfig 24 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc_ex.c:385:10:HAL_RCCEx_GetPeriphCLKFreq 40 static
diff --git a/Debug/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.d b/Debug/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.d
new file mode 100644
index 0000000000000000000000000000000000000000..a2cd3ec3112c5200501a3b04a6850ab35646e47a
--- /dev/null
+++ b/Debug/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.d
@@ -0,0 +1,52 @@
+Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.o: \
+ ../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h \
+ ../Core/Inc/stm32f1xx_hal_conf.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_def.h \
+ ../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h \
+ ../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f103xb.h \
+ ../Drivers/CMSIS/Include/core_cm3.h \
+ ../Drivers/CMSIS/Include/cmsis_version.h \
+ ../Drivers/CMSIS/Include/cmsis_compiler.h \
+ ../Drivers/CMSIS/Include/cmsis_gcc.h \
+ ../Drivers/CMSIS/Device/ST/STM32F1xx/Include/system_stm32f1xx.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc_ex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio_ex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_exti.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma_ex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_cortex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash_ex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_uart.h
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h:
+../Core/Inc/stm32f1xx_hal_conf.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_def.h:
+../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h:
+../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f103xb.h:
+../Drivers/CMSIS/Include/core_cm3.h:
+../Drivers/CMSIS/Include/cmsis_version.h:
+../Drivers/CMSIS/Include/cmsis_compiler.h:
+../Drivers/CMSIS/Include/cmsis_gcc.h:
+../Drivers/CMSIS/Device/ST/STM32F1xx/Include/system_stm32f1xx.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc_ex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio_ex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_exti.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma_ex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_cortex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash_ex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_uart.h:
diff --git a/Debug/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.o b/Debug/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.o
new file mode 100644
index 0000000000000000000000000000000000000000..24a2d655519c404bb9aa86d69d87de01a7818243
Binary files /dev/null and b/Debug/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.o differ
diff --git a/Debug/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.su b/Debug/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.su
new file mode 100644
index 0000000000000000000000000000000000000000..e87b6f29534b8154dcd7aab5bdea4e60320c62c4
--- /dev/null
+++ b/Debug/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.su
@@ -0,0 +1,119 @@
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c:266:19:HAL_TIM_Base_Init 16 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c:326:19:HAL_TIM_Base_DeInit 16 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c:369:13:HAL_TIM_Base_MspInit 16 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c:384:13:HAL_TIM_Base_MspDeInit 16 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c:400:19:HAL_TIM_Base_Start 24 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c:439:19:HAL_TIM_Base_Stop 16 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c:459:19:HAL_TIM_Base_Start_IT 24 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c:501:19:HAL_TIM_Base_Stop_IT 16 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c:526:19:HAL_TIM_Base_Start_DMA 32 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c:595:19:HAL_TIM_Base_Stop_DMA 16 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c:650:19:HAL_TIM_OC_Init 16 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c:710:19:HAL_TIM_OC_DeInit 16 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c:753:13:HAL_TIM_OC_MspInit 16 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c:768:13:HAL_TIM_OC_MspDeInit 16 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c:789:19:HAL_TIM_OC_Start 24 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c:843:19:HAL_TIM_OC_Stop 16 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c:878:19:HAL_TIM_OC_Start_IT 24 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c:971:19:HAL_TIM_OC_Stop_IT 24 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c:1048:19:HAL_TIM_OC_Start_DMA 32 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c:1212:19:HAL_TIM_OC_Stop_DMA 24 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c:1315:19:HAL_TIM_PWM_Init 16 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c:1375:19:HAL_TIM_PWM_DeInit 16 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c:1418:13:HAL_TIM_PWM_MspInit 16 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c:1433:13:HAL_TIM_PWM_MspDeInit 16 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c:1454:19:HAL_TIM_PWM_Start 24 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c:1508:19:HAL_TIM_PWM_Stop 16 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c:1543:19:HAL_TIM_PWM_Start_IT 24 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c:1636:19:HAL_TIM_PWM_Stop_IT 24 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c:1713:19:HAL_TIM_PWM_Start_DMA 32 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c:1876:19:HAL_TIM_PWM_Stop_DMA 24 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c:1979:19:HAL_TIM_IC_Init 16 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c:2039:19:HAL_TIM_IC_DeInit 16 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c:2082:13:HAL_TIM_IC_MspInit 16 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c:2097:13:HAL_TIM_IC_MspDeInit 16 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c:2118:19:HAL_TIM_IC_Start 24 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c:2170:19:HAL_TIM_IC_Stop 16 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c:2200:19:HAL_TIM_IC_Start_IT 24 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c:2292:19:HAL_TIM_IC_Stop_IT 24 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c:2364:19:HAL_TIM_IC_Start_DMA 32 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c:2523:19:HAL_TIM_IC_Stop_DMA 24 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c:2628:19:HAL_TIM_OnePulse_Init 16 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c:2697:19:HAL_TIM_OnePulse_DeInit 16 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c:2742:13:HAL_TIM_OnePulse_MspInit 16 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c:2757:13:HAL_TIM_OnePulse_MspDeInit 16 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c:2777:19:HAL_TIM_OnePulse_Start 24 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c:2834:19:HAL_TIM_OnePulse_Stop 16 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c:2877:19:HAL_TIM_OnePulse_Start_IT 24 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c:2940:19:HAL_TIM_OnePulse_Stop_IT 16 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c:3019:19:HAL_TIM_Encoder_Init 32 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c:3133:19:HAL_TIM_Encoder_DeInit 16 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c:3178:13:HAL_TIM_Encoder_MspInit 16 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c:3193:13:HAL_TIM_Encoder_MspDeInit 16 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c:3213:19:HAL_TIM_Encoder_Start 24 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c:3307:19:HAL_TIM_Encoder_Stop 16 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c:3367:19:HAL_TIM_Encoder_Start_IT 24 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c:3467:19:HAL_TIM_Encoder_Stop_IT 16 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c:3532:19:HAL_TIM_Encoder_Start_DMA 32 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c:3745:19:HAL_TIM_Encoder_Stop_DMA 16 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c:3822:6:HAL_TIM_IRQHandler 16 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c:4037:19:HAL_TIM_OC_ConfigChannel 32 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c:4116:19:HAL_TIM_IC_ConfigChannel 32 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c:4215:19:HAL_TIM_PWM_ConfigChannel 32 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c:4329:19:HAL_TIM_OnePulse_ConfigChannel 56 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c:4477:19:HAL_TIM_DMABurst_WriteStart 40 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c:4529:19:HAL_TIM_DMABurst_MultiWriteStart 32 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c:4713:19:HAL_TIM_DMABurst_WriteStop 24 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c:4814:19:HAL_TIM_DMABurst_ReadStart 40 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c:4865:19:HAL_TIM_DMABurst_MultiReadStart 32 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c:5049:19:HAL_TIM_DMABurst_ReadStop 24 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c:5132:19:HAL_TIM_GenerateEvent 16 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c:5169:19:HAL_TIM_ConfigOCrefClear 32 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c:5299:19:HAL_TIM_ConfigClockSource 24 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c:5453:19:HAL_TIM_ConfigTI1Input 24 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c:5485:19:HAL_TIM_SlaveConfigSynchro 16 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c:5525:19:HAL_TIM_SlaveConfigSynchro_IT 16 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c:5568:10:HAL_TIM_ReadCapturedValue 24 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c:5652:13:HAL_TIM_PeriodElapsedCallback 16 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c:5667:13:HAL_TIM_PeriodElapsedHalfCpltCallback 16 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c:5682:13:HAL_TIM_OC_DelayElapsedCallback 16 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c:5697:13:HAL_TIM_IC_CaptureCallback 16 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c:5712:13:HAL_TIM_IC_CaptureHalfCpltCallback 16 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c:5727:13:HAL_TIM_PWM_PulseFinishedCallback 16 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c:5742:13:HAL_TIM_PWM_PulseFinishedHalfCpltCallback 16 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c:5757:13:HAL_TIM_TriggerCallback 16 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c:5772:13:HAL_TIM_TriggerHalfCpltCallback 16 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c:5787:13:HAL_TIM_ErrorCallback 16 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c:6334:22:HAL_TIM_Base_GetState 16 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c:6344:22:HAL_TIM_OC_GetState 16 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c:6354:22:HAL_TIM_PWM_GetState 16 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c:6364:22:HAL_TIM_IC_GetState 16 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c:6374:22:HAL_TIM_OnePulse_GetState 16 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c:6384:22:HAL_TIM_Encoder_GetState 16 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c:6394:23:HAL_TIM_GetActiveChannel 16 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c:6412:29:HAL_TIM_GetChannelState 24 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c:6429:30:HAL_TIM_DMABurstState 16 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c:6454:6:TIM_DMAError 24 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c:6497:13:TIM_DMADelayPulseCplt 24 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c:6556:6:TIM_DMADelayPulseHalfCplt 24 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c:6595:6:TIM_DMACaptureCplt 24 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c:6658:6:TIM_DMACaptureHalfCplt 24 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c:6697:13:TIM_DMAPeriodElapsedCplt 24 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c:6718:13:TIM_DMAPeriodElapsedHalfCplt 24 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c:6734:13:TIM_DMATriggerCplt 24 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c:6755:13:TIM_DMATriggerHalfCplt 24 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c:6772:6:TIM_Base_SetConfig 24 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c:6820:13:TIM_OC1_SetConfig 32 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c:6896:6:TIM_OC2_SetConfig 32 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c:6973:13:TIM_OC3_SetConfig 32 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c:7048:13:TIM_OC4_SetConfig 32 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c:7109:26:TIM_SlaveTimer_SetConfig 32 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c:7243:6:TIM_TI1_SetConfig 32 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c:7290:13:TIM_TI1_ConfigInputStage 32 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c:7333:13:TIM_TI2_SetConfig 32 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c:7373:13:TIM_TI2_ConfigInputStage 32 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c:7415:13:TIM_TI3_SetConfig 32 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c:7462:13:TIM_TI4_SetConfig 32 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c:7505:13:TIM_ITRx_SetConfig 24 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c:7535:6:TIM_ETR_SetConfig 32 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c:7565:6:TIM_CCxChannelCmd 32 static
diff --git a/Debug/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim_ex.d b/Debug/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim_ex.d
new file mode 100644
index 0000000000000000000000000000000000000000..f4e1e9b95762f9c9f70ff3b6d168b091c92cd248
--- /dev/null
+++ b/Debug/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim_ex.d
@@ -0,0 +1,52 @@
+Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim_ex.o: \
+ ../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim_ex.c \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h \
+ ../Core/Inc/stm32f1xx_hal_conf.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_def.h \
+ ../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h \
+ ../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f103xb.h \
+ ../Drivers/CMSIS/Include/core_cm3.h \
+ ../Drivers/CMSIS/Include/cmsis_version.h \
+ ../Drivers/CMSIS/Include/cmsis_compiler.h \
+ ../Drivers/CMSIS/Include/cmsis_gcc.h \
+ ../Drivers/CMSIS/Device/ST/STM32F1xx/Include/system_stm32f1xx.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc_ex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio_ex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_exti.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma_ex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_cortex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash_ex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_uart.h
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h:
+../Core/Inc/stm32f1xx_hal_conf.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_def.h:
+../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h:
+../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f103xb.h:
+../Drivers/CMSIS/Include/core_cm3.h:
+../Drivers/CMSIS/Include/cmsis_version.h:
+../Drivers/CMSIS/Include/cmsis_compiler.h:
+../Drivers/CMSIS/Include/cmsis_gcc.h:
+../Drivers/CMSIS/Device/ST/STM32F1xx/Include/system_stm32f1xx.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc_ex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio_ex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_exti.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma_ex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_cortex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash_ex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_uart.h:
diff --git a/Debug/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim_ex.o b/Debug/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim_ex.o
new file mode 100644
index 0000000000000000000000000000000000000000..d126a68236fb95331697f40b2a4fe728435d8c10
Binary files /dev/null and b/Debug/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim_ex.o differ
diff --git a/Debug/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim_ex.su b/Debug/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim_ex.su
new file mode 100644
index 0000000000000000000000000000000000000000..8ee40135006e7b95eb1e51716192698919d5931c
--- /dev/null
+++ b/Debug/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim_ex.su
@@ -0,0 +1,42 @@
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim_ex.c:138:19:HAL_TIMEx_HallSensor_Init 48 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim_ex.c:240:19:HAL_TIMEx_HallSensor_DeInit 16 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim_ex.c:285:13:HAL_TIMEx_HallSensor_MspInit 16 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim_ex.c:300:13:HAL_TIMEx_HallSensor_MspDeInit 16 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim_ex.c:315:19:HAL_TIMEx_HallSensor_Start 24 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim_ex.c:369:19:HAL_TIMEx_HallSensor_Stop 16 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim_ex.c:397:19:HAL_TIMEx_HallSensor_Start_IT 24 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim_ex.c:454:19:HAL_TIMEx_HallSensor_Stop_IT 16 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim_ex.c:487:19:HAL_TIMEx_HallSensor_Start_DMA 32 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim_ex.c:563:19:HAL_TIMEx_HallSensor_Stop_DMA 16 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim_ex.c:625:19:HAL_TIMEx_OCN_Start 24 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim_ex.c:676:19:HAL_TIMEx_OCN_Stop 16 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim_ex.c:708:19:HAL_TIMEx_OCN_Start_IT 24 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim_ex.c:795:19:HAL_TIMEx_OCN_Stop_IT 24 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim_ex.c:870:19:HAL_TIMEx_OCN_Start_DMA 32 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim_ex.c:1008:19:HAL_TIMEx_OCN_Stop_DMA 24 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim_ex.c:1109:19:HAL_TIMEx_PWMN_Start 24 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim_ex.c:1159:19:HAL_TIMEx_PWMN_Stop 16 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim_ex.c:1191:19:HAL_TIMEx_PWMN_Start_IT 24 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim_ex.c:1277:19:HAL_TIMEx_PWMN_Stop_IT 24 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim_ex.c:1352:19:HAL_TIMEx_PWMN_Start_DMA 32 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim_ex.c:1490:19:HAL_TIMEx_PWMN_Stop_DMA 24 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim_ex.c:1581:19:HAL_TIMEx_OnePulseN_Start 24 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim_ex.c:1630:19:HAL_TIMEx_OnePulseN_Stop 24 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim_ex.c:1669:19:HAL_TIMEx_OnePulseN_Start_IT 24 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim_ex.c:1724:19:HAL_TIMEx_OnePulseN_Stop_IT 24 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim_ex.c:1803:19:HAL_TIMEx_ConfigCommutEvent 24 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim_ex.c:1859:19:HAL_TIMEx_ConfigCommutEvent_IT 24 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim_ex.c:1916:19:HAL_TIMEx_ConfigCommutEvent_DMA 24 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim_ex.c:1965:19:HAL_TIMEx_MasterConfigSynchronization 24 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim_ex.c:2026:19:HAL_TIMEx_ConfigBreakDeadTime 24 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim_ex.c:2073:19:HAL_TIMEx_RemapConfig 16 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim_ex.c:2107:13:HAL_TIMEx_CommutCallback 16 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim_ex.c:2121:13:HAL_TIMEx_CommutHalfCpltCallback 16 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim_ex.c:2136:13:HAL_TIMEx_BreakCallback 16 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim_ex.c:2169:22:HAL_TIMEx_HallSensor_GetState 16 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim_ex.c:2184:29:HAL_TIMEx_GetChannelNState 24 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim_ex.c:2213:6:TIMEx_DMACommutationCplt 24 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim_ex.c:2232:6:TIMEx_DMACommutationHalfCplt 24 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim_ex.c:2252:13:TIM_DMADelayPulseNCplt 24 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim_ex.c:2311:13:TIM_DMAErrorCCxN 24 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim_ex.c:2356:13:TIM_CCxNChannelCmd 32 static
diff --git a/Debug/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_uart.d b/Debug/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_uart.d
new file mode 100644
index 0000000000000000000000000000000000000000..daa4c84cabf07d6f990eae28d349a16952a7f6a5
--- /dev/null
+++ b/Debug/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_uart.d
@@ -0,0 +1,52 @@
+Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_uart.o: \
+ ../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_uart.c \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h \
+ ../Core/Inc/stm32f1xx_hal_conf.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_def.h \
+ ../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h \
+ ../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f103xb.h \
+ ../Drivers/CMSIS/Include/core_cm3.h \
+ ../Drivers/CMSIS/Include/cmsis_version.h \
+ ../Drivers/CMSIS/Include/cmsis_compiler.h \
+ ../Drivers/CMSIS/Include/cmsis_gcc.h \
+ ../Drivers/CMSIS/Device/ST/STM32F1xx/Include/system_stm32f1xx.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc_ex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio_ex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_exti.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma_ex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_cortex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash_ex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_uart.h
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h:
+../Core/Inc/stm32f1xx_hal_conf.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_def.h:
+../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h:
+../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f103xb.h:
+../Drivers/CMSIS/Include/core_cm3.h:
+../Drivers/CMSIS/Include/cmsis_version.h:
+../Drivers/CMSIS/Include/cmsis_compiler.h:
+../Drivers/CMSIS/Include/cmsis_gcc.h:
+../Drivers/CMSIS/Device/ST/STM32F1xx/Include/system_stm32f1xx.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc_ex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio_ex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_exti.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma_ex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_cortex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash_ex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_uart.h:
diff --git a/Debug/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_uart.o b/Debug/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_uart.o
new file mode 100644
index 0000000000000000000000000000000000000000..5d75a50121375a91a86d825b71ffd49ba3bb422d
Binary files /dev/null and b/Debug/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_uart.o differ
diff --git a/Debug/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_uart.su b/Debug/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_uart.su
new file mode 100644
index 0000000000000000000000000000000000000000..458b0265aa18bbde55d11216b60983d5b96cf19d
--- /dev/null
+++ b/Debug/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_uart.su
@@ -0,0 +1,62 @@
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_uart.c:354:19:HAL_UART_Init 16 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_uart.c:432:19:HAL_HalfDuplex_Init 16 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_uart.c:508:19:HAL_LIN_Init 16 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_uart.c:592:19:HAL_MultiProcessor_Init 24 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_uart.c:672:19:HAL_UART_DeInit 16 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_uart.c:718:13:HAL_UART_MspInit 16 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_uart.c:733:13:HAL_UART_MspDeInit 16 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_uart.c:1138:19:HAL_UART_Transmit 48 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_uart.c:1220:19:HAL_UART_Receive 48 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_uart.c:1305:19:HAL_UART_Transmit_IT 24 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_uart.c:1344:19:HAL_UART_Receive_IT 24 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_uart.c:1376:19:HAL_UART_Transmit_DMA 56 static,ignoring_inline_asm
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_uart.c:1438:19:HAL_UART_Receive_DMA 24 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_uart.c:1465:19:HAL_UART_DMAPause 120 static,ignoring_inline_asm
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_uart.c:1496:19:HAL_UART_DMAResume 120 static,ignoring_inline_asm
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_uart.c:1530:19:HAL_UART_DMAStop 72 static,ignoring_inline_asm
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_uart.c:1585:19:HAL_UARTEx_ReceiveToIdle 40 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_uart.c:1710:19:HAL_UARTEx_ReceiveToIdle_IT 56 static,ignoring_inline_asm
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_uart.c:1770:19:HAL_UARTEx_ReceiveToIdle_DMA 56 static,ignoring_inline_asm
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_uart.c:1838:29:HAL_UARTEx_GetRxEventType 16 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_uart.c:1856:19:HAL_UART_Abort 136 static,ignoring_inline_asm
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_uart.c:1945:19:HAL_UART_AbortTransmit 64 static,ignoring_inline_asm
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_uart.c:1996:19:HAL_UART_AbortReceive 112 static,ignoring_inline_asm
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_uart.c:2057:19:HAL_UART_Abort_IT 144 static,ignoring_inline_asm
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_uart.c:2192:19:HAL_UART_AbortTransmit_IT 64 static,ignoring_inline_asm
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_uart.c:2269:19:HAL_UART_AbortReceive_IT 112 static,ignoring_inline_asm
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_uart.c:2347:6:HAL_UART_IRQHandler 240 static,ignoring_inline_asm
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_uart.c:2589:13:HAL_UART_TxCpltCallback 16 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_uart.c:2604:13:HAL_UART_TxHalfCpltCallback 16 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_uart.c:2619:13:HAL_UART_RxCpltCallback 16 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_uart.c:2634:13:HAL_UART_RxHalfCpltCallback 16 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_uart.c:2649:13:HAL_UART_ErrorCallback 16 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_uart.c:2663:13:HAL_UART_AbortCpltCallback 16 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_uart.c:2678:13:HAL_UART_AbortTransmitCpltCallback 16 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_uart.c:2693:13:HAL_UART_AbortReceiveCpltCallback 16 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_uart.c:2710:13:HAL_UARTEx_RxEventCallback 16 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_uart.c:2750:19:HAL_LIN_SendBreak 40 static,ignoring_inline_asm
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_uart.c:2777:19:HAL_MultiProcessor_EnterMuteMode 40 static,ignoring_inline_asm
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_uart.c:2805:19:HAL_MultiProcessor_ExitMuteMode 40 static,ignoring_inline_asm
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_uart.c:2833:19:HAL_HalfDuplex_EnableTransmitter 24 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_uart.c:2868:19:HAL_HalfDuplex_EnableReceiver 24 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_uart.c:2925:23:HAL_UART_GetState 24 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_uart.c:2940:10:HAL_UART_GetError 16 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_uart.c:2985:13:UART_DMATransmitCplt 72 static,ignoring_inline_asm
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_uart.c:3020:13:UART_DMATxHalfCplt 24 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_uart.c:3039:13:UART_DMAReceiveCplt 120 static,ignoring_inline_asm
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_uart.c:3101:13:UART_DMARxHalfCplt 24 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_uart.c:3140:13:UART_DMAError 24 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_uart.c:3182:26:UART_WaitOnFlagUntilTimeout 72 static,ignoring_inline_asm
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_uart.c:3221:19:UART_Start_Receive_IT 24 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_uart.c:3256:19:UART_Start_Receive_DMA 104 static,ignoring_inline_asm
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_uart.c:3306:13:UART_EndTxTransfer 40 static,ignoring_inline_asm
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_uart.c:3320:13:UART_EndRxTransfer 88 static,ignoring_inline_asm
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_uart.c:3344:13:UART_DMAAbortOnError 24 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_uart.c:3368:13:UART_DMATxAbortCallback 24 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_uart.c:3414:13:UART_DMARxAbortCallback 24 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_uart.c:3460:13:UART_DMATxOnlyAbortCallback 24 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_uart.c:3488:13:UART_DMARxOnlyAbortCallback 24 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_uart.c:3514:26:UART_Transmit_IT 24 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_uart.c:3554:26:UART_EndTransmit_IT 16 static
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_uart.c:3579:26:UART_Receive_IT 56 static,ignoring_inline_asm
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_uart.c:3680:13:UART_SetConfig 24 static
diff --git a/Debug/Drivers/STM32F1xx_HAL_Driver/Src/subdir.mk b/Debug/Drivers/STM32F1xx_HAL_Driver/Src/subdir.mk
new file mode 100644
index 0000000000000000000000000000000000000000..491edbddfe2e258ccb4599e8e34a8bbb2dba1dbf
--- /dev/null
+++ b/Debug/Drivers/STM32F1xx_HAL_Driver/Src/subdir.mk
@@ -0,0 +1,66 @@
+################################################################################
+# Automatically-generated file. Do not edit!
+# Toolchain: GNU Tools for STM32 (10.3-2021.10)
+################################################################################
+
+# Add inputs and outputs from these tool invocations to the build variables
+C_SRCS += \
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal.c \
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_cortex.c \
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_dma.c \
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_exti.c \
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c \
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash_ex.c \
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_gpio.c \
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_gpio_ex.c \
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_pwr.c \
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc.c \
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc_ex.c \
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c \
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim_ex.c \
+../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_uart.c
+
+OBJS += \
+./Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal.o \
+./Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_cortex.o \
+./Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_dma.o \
+./Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_exti.o \
+./Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.o \
+./Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash_ex.o \
+./Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_gpio.o \
+./Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_gpio_ex.o \
+./Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_pwr.o \
+./Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc.o \
+./Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc_ex.o \
+./Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.o \
+./Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim_ex.o \
+./Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_uart.o
+
+C_DEPS += \
+./Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal.d \
+./Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_cortex.d \
+./Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_dma.d \
+./Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_exti.d \
+./Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.d \
+./Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash_ex.d \
+./Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_gpio.d \
+./Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_gpio_ex.d \
+./Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_pwr.d \
+./Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc.d \
+./Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc_ex.d \
+./Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.d \
+./Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim_ex.d \
+./Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_uart.d
+
+
+# Each subdirectory must supply rules for building sources it contributes
+Drivers/STM32F1xx_HAL_Driver/Src/%.o Drivers/STM32F1xx_HAL_Driver/Src/%.su: ../Drivers/STM32F1xx_HAL_Driver/Src/%.c Drivers/STM32F1xx_HAL_Driver/Src/subdir.mk
+ arm-none-eabi-gcc "$<" -mcpu=cortex-m3 -std=gnu11 -g3 -DDEBUG -DUSE_HAL_DRIVER -DSTM32F103xB -c -I../Core/Inc -I../Drivers/STM32F1xx_HAL_Driver/Inc/Legacy -I../Drivers/STM32F1xx_HAL_Driver/Inc -I../Drivers/CMSIS/Device/ST/STM32F1xx/Include -I../Drivers/CMSIS/Include -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"$(@:%.o=%.d)" -MT"$@" --specs=nano.specs -mfloat-abi=soft -mthumb -o "$@"
+
+clean: clean-Drivers-2f-STM32F1xx_HAL_Driver-2f-Src
+
+clean-Drivers-2f-STM32F1xx_HAL_Driver-2f-Src:
+ -$(RM) ./Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal.d ./Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal.o ./Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal.su ./Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_cortex.d ./Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_cortex.o ./Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_cortex.su ./Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_dma.d ./Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_dma.o ./Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_dma.su ./Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_exti.d ./Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_exti.o ./Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_exti.su ./Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.d ./Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.o ./Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.su ./Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash_ex.d ./Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash_ex.o ./Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash_ex.su ./Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_gpio.d ./Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_gpio.o ./Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_gpio.su ./Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_gpio_ex.d ./Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_gpio_ex.o ./Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_gpio_ex.su ./Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_pwr.d ./Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_pwr.o ./Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_pwr.su ./Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc.d ./Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc.o ./Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc.su ./Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc_ex.d ./Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc_ex.o ./Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc_ex.su ./Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.d ./Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.o ./Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.su ./Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim_ex.d ./Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim_ex.o ./Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim_ex.su ./Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_uart.d ./Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_uart.o ./Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_uart.su
+
+.PHONY: clean-Drivers-2f-STM32F1xx_HAL_Driver-2f-Src
+
diff --git a/Debug/makefile b/Debug/makefile
new file mode 100644
index 0000000000000000000000000000000000000000..550b46832c80228e8c5caad104d0fccfce157ced
--- /dev/null
+++ b/Debug/makefile
@@ -0,0 +1,94 @@
+################################################################################
+# Automatically-generated file. Do not edit!
+# Toolchain: GNU Tools for STM32 (10.3-2021.10)
+################################################################################
+
+-include ../makefile.init
+
+RM := rm -rf
+
+# All of the sources participating in the build are defined here
+-include sources.mk
+-include Drivers/STM32F1xx_HAL_Driver/Src/subdir.mk
+-include Core/Startup/subdir.mk
+-include Core/Src/subdir.mk
+-include objects.mk
+
+ifneq ($(MAKECMDGOALS),clean)
+ifneq ($(strip $(S_DEPS)),)
+-include $(S_DEPS)
+endif
+ifneq ($(strip $(S_UPPER_DEPS)),)
+-include $(S_UPPER_DEPS)
+endif
+ifneq ($(strip $(C_DEPS)),)
+-include $(C_DEPS)
+endif
+endif
+
+-include ../makefile.defs
+
+OPTIONAL_TOOL_DEPS := \
+$(wildcard ../makefile.defs) \
+$(wildcard ../makefile.init) \
+$(wildcard ../makefile.targets) \
+
+
+BUILD_ARTIFACT_NAME := pjsspoon
+BUILD_ARTIFACT_EXTENSION := elf
+BUILD_ARTIFACT_PREFIX :=
+BUILD_ARTIFACT := $(BUILD_ARTIFACT_PREFIX)$(BUILD_ARTIFACT_NAME)$(if $(BUILD_ARTIFACT_EXTENSION),.$(BUILD_ARTIFACT_EXTENSION),)
+
+# Add inputs and outputs from these tool invocations to the build variables
+EXECUTABLES += \
+pjsspoon.elf \
+
+MAP_FILES += \
+pjsspoon.map \
+
+SIZE_OUTPUT += \
+default.size.stdout \
+
+OBJDUMP_LIST += \
+pjsspoon.list \
+
+
+# All Target
+all: main-build
+
+# Main-build Target
+main-build: pjsspoon.elf secondary-outputs
+
+# Tool invocations
+pjsspoon.elf pjsspoon.map: $(OBJS) $(USER_OBJS) C:\Users\86131\STM32CubeIDE\workspace_1.10.1\pjsspoon\STM32F103C8TX_FLASH.ld makefile objects.list $(OPTIONAL_TOOL_DEPS)
+ arm-none-eabi-gcc -o "pjsspoon.elf" @"objects.list" $(USER_OBJS) $(LIBS) -mcpu=cortex-m3 -T"C:\Users\86131\STM32CubeIDE\workspace_1.10.1\pjsspoon\STM32F103C8TX_FLASH.ld" -Wl,-Map="pjsspoon.map" -Wl,--gc-sections -static --specs=nano.specs -mfloat-abi=soft -mthumb -Wl,--start-group -lc -lm -Wl,--end-group
+ @echo 'Finished building target: $@'
+ @echo ' '
+
+default.size.stdout: $(EXECUTABLES) makefile objects.list $(OPTIONAL_TOOL_DEPS)
+ arm-none-eabi-size $(EXECUTABLES)
+ @echo 'Finished building: $@'
+ @echo ' '
+
+pjsspoon.list: $(EXECUTABLES) makefile objects.list $(OPTIONAL_TOOL_DEPS)
+ arm-none-eabi-objdump -h -S $(EXECUTABLES) > "pjsspoon.list"
+ @echo 'Finished building: $@'
+ @echo ' '
+
+# Other Targets
+clean:
+ -$(RM) default.size.stdout pjsspoon.elf pjsspoon.list pjsspoon.map
+ -@echo ' '
+
+secondary-outputs: $(SIZE_OUTPUT) $(OBJDUMP_LIST)
+
+fail-specified-linker-script-missing:
+ @echo 'Error: Cannot find the specified linker script. Check the linker settings in the build configuration.'
+ @exit 2
+
+warn-no-linker-script-specified:
+ @echo 'Warning: No linker script specified. Check the linker settings in the build configuration.'
+
+.PHONY: all clean dependents main-build fail-specified-linker-script-missing warn-no-linker-script-specified
+
+-include ../makefile.targets
diff --git a/Debug/objects.list b/Debug/objects.list
new file mode 100644
index 0000000000000000000000000000000000000000..cc3decfc0c4878ca1ed5b3382d4792c24ed0c96b
--- /dev/null
+++ b/Debug/objects.list
@@ -0,0 +1,28 @@
+"./Core/Src/IIC.o"
+"./Core/Src/gpio.o"
+"./Core/Src/inv_mpu.o"
+"./Core/Src/inv_mpu_dmp_motion_driver.o"
+"./Core/Src/main.o"
+"./Core/Src/mpu6050.o"
+"./Core/Src/stm32f1xx_hal_msp.o"
+"./Core/Src/stm32f1xx_it.o"
+"./Core/Src/syscalls.o"
+"./Core/Src/sysmem.o"
+"./Core/Src/system_stm32f1xx.o"
+"./Core/Src/tim.o"
+"./Core/Src/usart.o"
+"./Core/Startup/startup_stm32f103c8tx.o"
+"./Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal.o"
+"./Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_cortex.o"
+"./Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_dma.o"
+"./Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_exti.o"
+"./Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.o"
+"./Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash_ex.o"
+"./Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_gpio.o"
+"./Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_gpio_ex.o"
+"./Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_pwr.o"
+"./Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc.o"
+"./Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc_ex.o"
+"./Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.o"
+"./Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim_ex.o"
+"./Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_uart.o"
diff --git a/Debug/objects.mk b/Debug/objects.mk
new file mode 100644
index 0000000000000000000000000000000000000000..e423e316bda403424845e6516b52667b6c3723b1
--- /dev/null
+++ b/Debug/objects.mk
@@ -0,0 +1,9 @@
+################################################################################
+# Automatically-generated file. Do not edit!
+# Toolchain: GNU Tools for STM32 (10.3-2021.10)
+################################################################################
+
+USER_OBJS :=
+
+LIBS :=
+
diff --git a/Debug/pjsspoon.elf b/Debug/pjsspoon.elf
new file mode 100644
index 0000000000000000000000000000000000000000..9f20f0149616465061332bac920e48c6172aa394
Binary files /dev/null and b/Debug/pjsspoon.elf differ
diff --git a/Debug/pjsspoon.list b/Debug/pjsspoon.list
new file mode 100644
index 0000000000000000000000000000000000000000..ea713b3642128a91d5ac0dc958559eeabc81e02c
--- /dev/null
+++ b/Debug/pjsspoon.list
@@ -0,0 +1,19419 @@
+
+pjsspoon.elf: file format elf32-littlearm
+
+Sections:
+Idx Name Size VMA LMA File off Algn
+ 0 .isr_vector 0000010c 08000000 08000000 00010000 2**0
+ CONTENTS, ALLOC, LOAD, READONLY, DATA
+ 1 .text 00008b18 08000110 08000110 00010110 2**3
+ CONTENTS, ALLOC, LOAD, READONLY, CODE
+ 2 .rodata 00000ea0 08008c28 08008c28 00018c28 2**3
+ CONTENTS, ALLOC, LOAD, READONLY, DATA
+ 3 .ARM.extab 00000000 08009ac8 08009ac8 000200a8 2**0
+ CONTENTS
+ 4 .ARM 00000008 08009ac8 08009ac8 00019ac8 2**2
+ CONTENTS, ALLOC, LOAD, READONLY, DATA
+ 5 .preinit_array 00000000 08009ad0 08009ad0 000200a8 2**0
+ CONTENTS, ALLOC, LOAD, DATA
+ 6 .init_array 00000004 08009ad0 08009ad0 00019ad0 2**2
+ CONTENTS, ALLOC, LOAD, DATA
+ 7 .fini_array 00000004 08009ad4 08009ad4 00019ad4 2**2
+ CONTENTS, ALLOC, LOAD, DATA
+ 8 .data 000000a8 20000000 08009ad8 00020000 2**2
+ CONTENTS, ALLOC, LOAD, DATA
+ 9 .bss 0000011c 200000a8 08009b80 000200a8 2**2
+ ALLOC
+ 10 ._user_heap_stack 00000604 200001c4 08009b80 000201c4 2**0
+ ALLOC
+ 11 .ARM.attributes 00000029 00000000 00000000 000200a8 2**0
+ CONTENTS, READONLY
+ 12 .debug_info 0000edc3 00000000 00000000 000200d1 2**0
+ CONTENTS, READONLY, DEBUGGING, OCTETS
+ 13 .debug_abbrev 00002548 00000000 00000000 0002ee94 2**0
+ CONTENTS, READONLY, DEBUGGING, OCTETS
+ 14 .debug_aranges 00000ff0 00000000 00000000 000313e0 2**3
+ CONTENTS, READONLY, DEBUGGING, OCTETS
+ 15 .debug_ranges 00000f08 00000000 00000000 000323d0 2**3
+ CONTENTS, READONLY, DEBUGGING, OCTETS
+ 16 .debug_macro 0001bb99 00000000 00000000 000332d8 2**0
+ CONTENTS, READONLY, DEBUGGING, OCTETS
+ 17 .debug_line 00012a89 00000000 00000000 0004ee71 2**0
+ CONTENTS, READONLY, DEBUGGING, OCTETS
+ 18 .debug_str 00093be9 00000000 00000000 000618fa 2**0
+ CONTENTS, READONLY, DEBUGGING, OCTETS
+ 19 .comment 00000050 00000000 00000000 000f54e3 2**0
+ CONTENTS, READONLY
+ 20 .debug_frame 00004fac 00000000 00000000 000f5534 2**2
+ CONTENTS, READONLY, DEBUGGING, OCTETS
+
+Disassembly of section .text:
+
+08000110 <__do_global_dtors_aux>:
+ 8000110: b510 push {r4, lr}
+ 8000112: 4c05 ldr r4, [pc, #20] ; (8000128 <__do_global_dtors_aux+0x18>)
+ 8000114: 7823 ldrb r3, [r4, #0]
+ 8000116: b933 cbnz r3, 8000126 <__do_global_dtors_aux+0x16>
+ 8000118: 4b04 ldr r3, [pc, #16] ; (800012c <__do_global_dtors_aux+0x1c>)
+ 800011a: b113 cbz r3, 8000122 <__do_global_dtors_aux+0x12>
+ 800011c: 4804 ldr r0, [pc, #16] ; (8000130 <__do_global_dtors_aux+0x20>)
+ 800011e: f3af 8000 nop.w
+ 8000122: 2301 movs r3, #1
+ 8000124: 7023 strb r3, [r4, #0]
+ 8000126: bd10 pop {r4, pc}
+ 8000128: 200000a8 .word 0x200000a8
+ 800012c: 00000000 .word 0x00000000
+ 8000130: 08008c10 .word 0x08008c10
+
+08000134 :
+ 8000134: b508 push {r3, lr}
+ 8000136: 4b03 ldr r3, [pc, #12] ; (8000144 )
+ 8000138: b11b cbz r3, 8000142
+ 800013a: 4903 ldr r1, [pc, #12] ; (8000148 )
+ 800013c: 4803 ldr r0, [pc, #12] ; (800014c )
+ 800013e: f3af 8000 nop.w
+ 8000142: bd08 pop {r3, pc}
+ 8000144: 00000000 .word 0x00000000
+ 8000148: 200000ac .word 0x200000ac
+ 800014c: 08008c10 .word 0x08008c10
+
+08000150 <__aeabi_drsub>:
+ 8000150: f081 4100 eor.w r1, r1, #2147483648 ; 0x80000000
+ 8000154: e002 b.n 800015c <__adddf3>
+ 8000156: bf00 nop
+
+08000158 <__aeabi_dsub>:
+ 8000158: f083 4300 eor.w r3, r3, #2147483648 ; 0x80000000
+
+0800015c <__adddf3>:
+ 800015c: b530 push {r4, r5, lr}
+ 800015e: ea4f 0441 mov.w r4, r1, lsl #1
+ 8000162: ea4f 0543 mov.w r5, r3, lsl #1
+ 8000166: ea94 0f05 teq r4, r5
+ 800016a: bf08 it eq
+ 800016c: ea90 0f02 teqeq r0, r2
+ 8000170: bf1f itttt ne
+ 8000172: ea54 0c00 orrsne.w ip, r4, r0
+ 8000176: ea55 0c02 orrsne.w ip, r5, r2
+ 800017a: ea7f 5c64 mvnsne.w ip, r4, asr #21
+ 800017e: ea7f 5c65 mvnsne.w ip, r5, asr #21
+ 8000182: f000 80e2 beq.w 800034a <__adddf3+0x1ee>
+ 8000186: ea4f 5454 mov.w r4, r4, lsr #21
+ 800018a: ebd4 5555 rsbs r5, r4, r5, lsr #21
+ 800018e: bfb8 it lt
+ 8000190: 426d neglt r5, r5
+ 8000192: dd0c ble.n 80001ae <__adddf3+0x52>
+ 8000194: 442c add r4, r5
+ 8000196: ea80 0202 eor.w r2, r0, r2
+ 800019a: ea81 0303 eor.w r3, r1, r3
+ 800019e: ea82 0000 eor.w r0, r2, r0
+ 80001a2: ea83 0101 eor.w r1, r3, r1
+ 80001a6: ea80 0202 eor.w r2, r0, r2
+ 80001aa: ea81 0303 eor.w r3, r1, r3
+ 80001ae: 2d36 cmp r5, #54 ; 0x36
+ 80001b0: bf88 it hi
+ 80001b2: bd30 pophi {r4, r5, pc}
+ 80001b4: f011 4f00 tst.w r1, #2147483648 ; 0x80000000
+ 80001b8: ea4f 3101 mov.w r1, r1, lsl #12
+ 80001bc: f44f 1c80 mov.w ip, #1048576 ; 0x100000
+ 80001c0: ea4c 3111 orr.w r1, ip, r1, lsr #12
+ 80001c4: d002 beq.n 80001cc <__adddf3+0x70>
+ 80001c6: 4240 negs r0, r0
+ 80001c8: eb61 0141 sbc.w r1, r1, r1, lsl #1
+ 80001cc: f013 4f00 tst.w r3, #2147483648 ; 0x80000000
+ 80001d0: ea4f 3303 mov.w r3, r3, lsl #12
+ 80001d4: ea4c 3313 orr.w r3, ip, r3, lsr #12
+ 80001d8: d002 beq.n 80001e0 <__adddf3+0x84>
+ 80001da: 4252 negs r2, r2
+ 80001dc: eb63 0343 sbc.w r3, r3, r3, lsl #1
+ 80001e0: ea94 0f05 teq r4, r5
+ 80001e4: f000 80a7 beq.w 8000336 <__adddf3+0x1da>
+ 80001e8: f1a4 0401 sub.w r4, r4, #1
+ 80001ec: f1d5 0e20 rsbs lr, r5, #32
+ 80001f0: db0d blt.n 800020e <__adddf3+0xb2>
+ 80001f2: fa02 fc0e lsl.w ip, r2, lr
+ 80001f6: fa22 f205 lsr.w r2, r2, r5
+ 80001fa: 1880 adds r0, r0, r2
+ 80001fc: f141 0100 adc.w r1, r1, #0
+ 8000200: fa03 f20e lsl.w r2, r3, lr
+ 8000204: 1880 adds r0, r0, r2
+ 8000206: fa43 f305 asr.w r3, r3, r5
+ 800020a: 4159 adcs r1, r3
+ 800020c: e00e b.n 800022c <__adddf3+0xd0>
+ 800020e: f1a5 0520 sub.w r5, r5, #32
+ 8000212: f10e 0e20 add.w lr, lr, #32
+ 8000216: 2a01 cmp r2, #1
+ 8000218: fa03 fc0e lsl.w ip, r3, lr
+ 800021c: bf28 it cs
+ 800021e: f04c 0c02 orrcs.w ip, ip, #2
+ 8000222: fa43 f305 asr.w r3, r3, r5
+ 8000226: 18c0 adds r0, r0, r3
+ 8000228: eb51 71e3 adcs.w r1, r1, r3, asr #31
+ 800022c: f001 4500 and.w r5, r1, #2147483648 ; 0x80000000
+ 8000230: d507 bpl.n 8000242 <__adddf3+0xe6>
+ 8000232: f04f 0e00 mov.w lr, #0
+ 8000236: f1dc 0c00 rsbs ip, ip, #0
+ 800023a: eb7e 0000 sbcs.w r0, lr, r0
+ 800023e: eb6e 0101 sbc.w r1, lr, r1
+ 8000242: f5b1 1f80 cmp.w r1, #1048576 ; 0x100000
+ 8000246: d31b bcc.n 8000280 <__adddf3+0x124>
+ 8000248: f5b1 1f00 cmp.w r1, #2097152 ; 0x200000
+ 800024c: d30c bcc.n 8000268 <__adddf3+0x10c>
+ 800024e: 0849 lsrs r1, r1, #1
+ 8000250: ea5f 0030 movs.w r0, r0, rrx
+ 8000254: ea4f 0c3c mov.w ip, ip, rrx
+ 8000258: f104 0401 add.w r4, r4, #1
+ 800025c: ea4f 5244 mov.w r2, r4, lsl #21
+ 8000260: f512 0f80 cmn.w r2, #4194304 ; 0x400000
+ 8000264: f080 809a bcs.w 800039c <__adddf3+0x240>
+ 8000268: f1bc 4f00 cmp.w ip, #2147483648 ; 0x80000000
+ 800026c: bf08 it eq
+ 800026e: ea5f 0c50 movseq.w ip, r0, lsr #1
+ 8000272: f150 0000 adcs.w r0, r0, #0
+ 8000276: eb41 5104 adc.w r1, r1, r4, lsl #20
+ 800027a: ea41 0105 orr.w r1, r1, r5
+ 800027e: bd30 pop {r4, r5, pc}
+ 8000280: ea5f 0c4c movs.w ip, ip, lsl #1
+ 8000284: 4140 adcs r0, r0
+ 8000286: eb41 0101 adc.w r1, r1, r1
+ 800028a: 3c01 subs r4, #1
+ 800028c: bf28 it cs
+ 800028e: f5b1 1f80 cmpcs.w r1, #1048576 ; 0x100000
+ 8000292: d2e9 bcs.n 8000268 <__adddf3+0x10c>
+ 8000294: f091 0f00 teq r1, #0
+ 8000298: bf04 itt eq
+ 800029a: 4601 moveq r1, r0
+ 800029c: 2000 moveq r0, #0
+ 800029e: fab1 f381 clz r3, r1
+ 80002a2: bf08 it eq
+ 80002a4: 3320 addeq r3, #32
+ 80002a6: f1a3 030b sub.w r3, r3, #11
+ 80002aa: f1b3 0220 subs.w r2, r3, #32
+ 80002ae: da0c bge.n 80002ca <__adddf3+0x16e>
+ 80002b0: 320c adds r2, #12
+ 80002b2: dd08 ble.n 80002c6 <__adddf3+0x16a>
+ 80002b4: f102 0c14 add.w ip, r2, #20
+ 80002b8: f1c2 020c rsb r2, r2, #12
+ 80002bc: fa01 f00c lsl.w r0, r1, ip
+ 80002c0: fa21 f102 lsr.w r1, r1, r2
+ 80002c4: e00c b.n 80002e0 <__adddf3+0x184>
+ 80002c6: f102 0214 add.w r2, r2, #20
+ 80002ca: bfd8 it le
+ 80002cc: f1c2 0c20 rsble ip, r2, #32
+ 80002d0: fa01 f102 lsl.w r1, r1, r2
+ 80002d4: fa20 fc0c lsr.w ip, r0, ip
+ 80002d8: bfdc itt le
+ 80002da: ea41 010c orrle.w r1, r1, ip
+ 80002de: 4090 lslle r0, r2
+ 80002e0: 1ae4 subs r4, r4, r3
+ 80002e2: bfa2 ittt ge
+ 80002e4: eb01 5104 addge.w r1, r1, r4, lsl #20
+ 80002e8: 4329 orrge r1, r5
+ 80002ea: bd30 popge {r4, r5, pc}
+ 80002ec: ea6f 0404 mvn.w r4, r4
+ 80002f0: 3c1f subs r4, #31
+ 80002f2: da1c bge.n 800032e <__adddf3+0x1d2>
+ 80002f4: 340c adds r4, #12
+ 80002f6: dc0e bgt.n 8000316 <__adddf3+0x1ba>
+ 80002f8: f104 0414 add.w r4, r4, #20
+ 80002fc: f1c4 0220 rsb r2, r4, #32
+ 8000300: fa20 f004 lsr.w r0, r0, r4
+ 8000304: fa01 f302 lsl.w r3, r1, r2
+ 8000308: ea40 0003 orr.w r0, r0, r3
+ 800030c: fa21 f304 lsr.w r3, r1, r4
+ 8000310: ea45 0103 orr.w r1, r5, r3
+ 8000314: bd30 pop {r4, r5, pc}
+ 8000316: f1c4 040c rsb r4, r4, #12
+ 800031a: f1c4 0220 rsb r2, r4, #32
+ 800031e: fa20 f002 lsr.w r0, r0, r2
+ 8000322: fa01 f304 lsl.w r3, r1, r4
+ 8000326: ea40 0003 orr.w r0, r0, r3
+ 800032a: 4629 mov r1, r5
+ 800032c: bd30 pop {r4, r5, pc}
+ 800032e: fa21 f004 lsr.w r0, r1, r4
+ 8000332: 4629 mov r1, r5
+ 8000334: bd30 pop {r4, r5, pc}
+ 8000336: f094 0f00 teq r4, #0
+ 800033a: f483 1380 eor.w r3, r3, #1048576 ; 0x100000
+ 800033e: bf06 itte eq
+ 8000340: f481 1180 eoreq.w r1, r1, #1048576 ; 0x100000
+ 8000344: 3401 addeq r4, #1
+ 8000346: 3d01 subne r5, #1
+ 8000348: e74e b.n 80001e8 <__adddf3+0x8c>
+ 800034a: ea7f 5c64 mvns.w ip, r4, asr #21
+ 800034e: bf18 it ne
+ 8000350: ea7f 5c65 mvnsne.w ip, r5, asr #21
+ 8000354: d029 beq.n 80003aa <__adddf3+0x24e>
+ 8000356: ea94 0f05 teq r4, r5
+ 800035a: bf08 it eq
+ 800035c: ea90 0f02 teqeq r0, r2
+ 8000360: d005 beq.n 800036e <__adddf3+0x212>
+ 8000362: ea54 0c00 orrs.w ip, r4, r0
+ 8000366: bf04 itt eq
+ 8000368: 4619 moveq r1, r3
+ 800036a: 4610 moveq r0, r2
+ 800036c: bd30 pop {r4, r5, pc}
+ 800036e: ea91 0f03 teq r1, r3
+ 8000372: bf1e ittt ne
+ 8000374: 2100 movne r1, #0
+ 8000376: 2000 movne r0, #0
+ 8000378: bd30 popne {r4, r5, pc}
+ 800037a: ea5f 5c54 movs.w ip, r4, lsr #21
+ 800037e: d105 bne.n 800038c <__adddf3+0x230>
+ 8000380: 0040 lsls r0, r0, #1
+ 8000382: 4149 adcs r1, r1
+ 8000384: bf28 it cs
+ 8000386: f041 4100 orrcs.w r1, r1, #2147483648 ; 0x80000000
+ 800038a: bd30 pop {r4, r5, pc}
+ 800038c: f514 0480 adds.w r4, r4, #4194304 ; 0x400000
+ 8000390: bf3c itt cc
+ 8000392: f501 1180 addcc.w r1, r1, #1048576 ; 0x100000
+ 8000396: bd30 popcc {r4, r5, pc}
+ 8000398: f001 4500 and.w r5, r1, #2147483648 ; 0x80000000
+ 800039c: f045 41fe orr.w r1, r5, #2130706432 ; 0x7f000000
+ 80003a0: f441 0170 orr.w r1, r1, #15728640 ; 0xf00000
+ 80003a4: f04f 0000 mov.w r0, #0
+ 80003a8: bd30 pop {r4, r5, pc}
+ 80003aa: ea7f 5c64 mvns.w ip, r4, asr #21
+ 80003ae: bf1a itte ne
+ 80003b0: 4619 movne r1, r3
+ 80003b2: 4610 movne r0, r2
+ 80003b4: ea7f 5c65 mvnseq.w ip, r5, asr #21
+ 80003b8: bf1c itt ne
+ 80003ba: 460b movne r3, r1
+ 80003bc: 4602 movne r2, r0
+ 80003be: ea50 3401 orrs.w r4, r0, r1, lsl #12
+ 80003c2: bf06 itte eq
+ 80003c4: ea52 3503 orrseq.w r5, r2, r3, lsl #12
+ 80003c8: ea91 0f03 teqeq r1, r3
+ 80003cc: f441 2100 orrne.w r1, r1, #524288 ; 0x80000
+ 80003d0: bd30 pop {r4, r5, pc}
+ 80003d2: bf00 nop
+
+080003d4 <__aeabi_ui2d>:
+ 80003d4: f090 0f00 teq r0, #0
+ 80003d8: bf04 itt eq
+ 80003da: 2100 moveq r1, #0
+ 80003dc: 4770 bxeq lr
+ 80003de: b530 push {r4, r5, lr}
+ 80003e0: f44f 6480 mov.w r4, #1024 ; 0x400
+ 80003e4: f104 0432 add.w r4, r4, #50 ; 0x32
+ 80003e8: f04f 0500 mov.w r5, #0
+ 80003ec: f04f 0100 mov.w r1, #0
+ 80003f0: e750 b.n 8000294 <__adddf3+0x138>
+ 80003f2: bf00 nop
+
+080003f4 <__aeabi_i2d>:
+ 80003f4: f090 0f00 teq r0, #0
+ 80003f8: bf04 itt eq
+ 80003fa: 2100 moveq r1, #0
+ 80003fc: 4770 bxeq lr
+ 80003fe: b530 push {r4, r5, lr}
+ 8000400: f44f 6480 mov.w r4, #1024 ; 0x400
+ 8000404: f104 0432 add.w r4, r4, #50 ; 0x32
+ 8000408: f010 4500 ands.w r5, r0, #2147483648 ; 0x80000000
+ 800040c: bf48 it mi
+ 800040e: 4240 negmi r0, r0
+ 8000410: f04f 0100 mov.w r1, #0
+ 8000414: e73e b.n 8000294 <__adddf3+0x138>
+ 8000416: bf00 nop
+
+08000418 <__aeabi_f2d>:
+ 8000418: 0042 lsls r2, r0, #1
+ 800041a: ea4f 01e2 mov.w r1, r2, asr #3
+ 800041e: ea4f 0131 mov.w r1, r1, rrx
+ 8000422: ea4f 7002 mov.w r0, r2, lsl #28
+ 8000426: bf1f itttt ne
+ 8000428: f012 437f andsne.w r3, r2, #4278190080 ; 0xff000000
+ 800042c: f093 4f7f teqne r3, #4278190080 ; 0xff000000
+ 8000430: f081 5160 eorne.w r1, r1, #939524096 ; 0x38000000
+ 8000434: 4770 bxne lr
+ 8000436: f032 427f bics.w r2, r2, #4278190080 ; 0xff000000
+ 800043a: bf08 it eq
+ 800043c: 4770 bxeq lr
+ 800043e: f093 4f7f teq r3, #4278190080 ; 0xff000000
+ 8000442: bf04 itt eq
+ 8000444: f441 2100 orreq.w r1, r1, #524288 ; 0x80000
+ 8000448: 4770 bxeq lr
+ 800044a: b530 push {r4, r5, lr}
+ 800044c: f44f 7460 mov.w r4, #896 ; 0x380
+ 8000450: f001 4500 and.w r5, r1, #2147483648 ; 0x80000000
+ 8000454: f021 4100 bic.w r1, r1, #2147483648 ; 0x80000000
+ 8000458: e71c b.n 8000294 <__adddf3+0x138>
+ 800045a: bf00 nop
+
+0800045c <__aeabi_ul2d>:
+ 800045c: ea50 0201 orrs.w r2, r0, r1
+ 8000460: bf08 it eq
+ 8000462: 4770 bxeq lr
+ 8000464: b530 push {r4, r5, lr}
+ 8000466: f04f 0500 mov.w r5, #0
+ 800046a: e00a b.n 8000482 <__aeabi_l2d+0x16>
+
+0800046c <__aeabi_l2d>:
+ 800046c: ea50 0201 orrs.w r2, r0, r1
+ 8000470: bf08 it eq
+ 8000472: 4770 bxeq lr
+ 8000474: b530 push {r4, r5, lr}
+ 8000476: f011 4500 ands.w r5, r1, #2147483648 ; 0x80000000
+ 800047a: d502 bpl.n 8000482 <__aeabi_l2d+0x16>
+ 800047c: 4240 negs r0, r0
+ 800047e: eb61 0141 sbc.w r1, r1, r1, lsl #1
+ 8000482: f44f 6480 mov.w r4, #1024 ; 0x400
+ 8000486: f104 0432 add.w r4, r4, #50 ; 0x32
+ 800048a: ea5f 5c91 movs.w ip, r1, lsr #22
+ 800048e: f43f aed8 beq.w 8000242 <__adddf3+0xe6>
+ 8000492: f04f 0203 mov.w r2, #3
+ 8000496: ea5f 0cdc movs.w ip, ip, lsr #3
+ 800049a: bf18 it ne
+ 800049c: 3203 addne r2, #3
+ 800049e: ea5f 0cdc movs.w ip, ip, lsr #3
+ 80004a2: bf18 it ne
+ 80004a4: 3203 addne r2, #3
+ 80004a6: eb02 02dc add.w r2, r2, ip, lsr #3
+ 80004aa: f1c2 0320 rsb r3, r2, #32
+ 80004ae: fa00 fc03 lsl.w ip, r0, r3
+ 80004b2: fa20 f002 lsr.w r0, r0, r2
+ 80004b6: fa01 fe03 lsl.w lr, r1, r3
+ 80004ba: ea40 000e orr.w r0, r0, lr
+ 80004be: fa21 f102 lsr.w r1, r1, r2
+ 80004c2: 4414 add r4, r2
+ 80004c4: e6bd b.n 8000242 <__adddf3+0xe6>
+ 80004c6: bf00 nop
+
+080004c8 <__aeabi_dmul>:
+ 80004c8: b570 push {r4, r5, r6, lr}
+ 80004ca: f04f 0cff mov.w ip, #255 ; 0xff
+ 80004ce: f44c 6ce0 orr.w ip, ip, #1792 ; 0x700
+ 80004d2: ea1c 5411 ands.w r4, ip, r1, lsr #20
+ 80004d6: bf1d ittte ne
+ 80004d8: ea1c 5513 andsne.w r5, ip, r3, lsr #20
+ 80004dc: ea94 0f0c teqne r4, ip
+ 80004e0: ea95 0f0c teqne r5, ip
+ 80004e4: f000 f8de bleq 80006a4 <__aeabi_dmul+0x1dc>
+ 80004e8: 442c add r4, r5
+ 80004ea: ea81 0603 eor.w r6, r1, r3
+ 80004ee: ea21 514c bic.w r1, r1, ip, lsl #21
+ 80004f2: ea23 534c bic.w r3, r3, ip, lsl #21
+ 80004f6: ea50 3501 orrs.w r5, r0, r1, lsl #12
+ 80004fa: bf18 it ne
+ 80004fc: ea52 3503 orrsne.w r5, r2, r3, lsl #12
+ 8000500: f441 1180 orr.w r1, r1, #1048576 ; 0x100000
+ 8000504: f443 1380 orr.w r3, r3, #1048576 ; 0x100000
+ 8000508: d038 beq.n 800057c <__aeabi_dmul+0xb4>
+ 800050a: fba0 ce02 umull ip, lr, r0, r2
+ 800050e: f04f 0500 mov.w r5, #0
+ 8000512: fbe1 e502 umlal lr, r5, r1, r2
+ 8000516: f006 4200 and.w r2, r6, #2147483648 ; 0x80000000
+ 800051a: fbe0 e503 umlal lr, r5, r0, r3
+ 800051e: f04f 0600 mov.w r6, #0
+ 8000522: fbe1 5603 umlal r5, r6, r1, r3
+ 8000526: f09c 0f00 teq ip, #0
+ 800052a: bf18 it ne
+ 800052c: f04e 0e01 orrne.w lr, lr, #1
+ 8000530: f1a4 04ff sub.w r4, r4, #255 ; 0xff
+ 8000534: f5b6 7f00 cmp.w r6, #512 ; 0x200
+ 8000538: f564 7440 sbc.w r4, r4, #768 ; 0x300
+ 800053c: d204 bcs.n 8000548 <__aeabi_dmul+0x80>
+ 800053e: ea5f 0e4e movs.w lr, lr, lsl #1
+ 8000542: 416d adcs r5, r5
+ 8000544: eb46 0606 adc.w r6, r6, r6
+ 8000548: ea42 21c6 orr.w r1, r2, r6, lsl #11
+ 800054c: ea41 5155 orr.w r1, r1, r5, lsr #21
+ 8000550: ea4f 20c5 mov.w r0, r5, lsl #11
+ 8000554: ea40 505e orr.w r0, r0, lr, lsr #21
+ 8000558: ea4f 2ece mov.w lr, lr, lsl #11
+ 800055c: f1b4 0cfd subs.w ip, r4, #253 ; 0xfd
+ 8000560: bf88 it hi
+ 8000562: f5bc 6fe0 cmphi.w ip, #1792 ; 0x700
+ 8000566: d81e bhi.n 80005a6 <__aeabi_dmul+0xde>
+ 8000568: f1be 4f00 cmp.w lr, #2147483648 ; 0x80000000
+ 800056c: bf08 it eq
+ 800056e: ea5f 0e50 movseq.w lr, r0, lsr #1
+ 8000572: f150 0000 adcs.w r0, r0, #0
+ 8000576: eb41 5104 adc.w r1, r1, r4, lsl #20
+ 800057a: bd70 pop {r4, r5, r6, pc}
+ 800057c: f006 4600 and.w r6, r6, #2147483648 ; 0x80000000
+ 8000580: ea46 0101 orr.w r1, r6, r1
+ 8000584: ea40 0002 orr.w r0, r0, r2
+ 8000588: ea81 0103 eor.w r1, r1, r3
+ 800058c: ebb4 045c subs.w r4, r4, ip, lsr #1
+ 8000590: bfc2 ittt gt
+ 8000592: ebd4 050c rsbsgt r5, r4, ip
+ 8000596: ea41 5104 orrgt.w r1, r1, r4, lsl #20
+ 800059a: bd70 popgt {r4, r5, r6, pc}
+ 800059c: f441 1180 orr.w r1, r1, #1048576 ; 0x100000
+ 80005a0: f04f 0e00 mov.w lr, #0
+ 80005a4: 3c01 subs r4, #1
+ 80005a6: f300 80ab bgt.w 8000700 <__aeabi_dmul+0x238>
+ 80005aa: f114 0f36 cmn.w r4, #54 ; 0x36
+ 80005ae: bfde ittt le
+ 80005b0: 2000 movle r0, #0
+ 80005b2: f001 4100 andle.w r1, r1, #2147483648 ; 0x80000000
+ 80005b6: bd70 pople {r4, r5, r6, pc}
+ 80005b8: f1c4 0400 rsb r4, r4, #0
+ 80005bc: 3c20 subs r4, #32
+ 80005be: da35 bge.n 800062c <__aeabi_dmul+0x164>
+ 80005c0: 340c adds r4, #12
+ 80005c2: dc1b bgt.n 80005fc <__aeabi_dmul+0x134>
+ 80005c4: f104 0414 add.w r4, r4, #20
+ 80005c8: f1c4 0520 rsb r5, r4, #32
+ 80005cc: fa00 f305 lsl.w r3, r0, r5
+ 80005d0: fa20 f004 lsr.w r0, r0, r4
+ 80005d4: fa01 f205 lsl.w r2, r1, r5
+ 80005d8: ea40 0002 orr.w r0, r0, r2
+ 80005dc: f001 4200 and.w r2, r1, #2147483648 ; 0x80000000
+ 80005e0: f021 4100 bic.w r1, r1, #2147483648 ; 0x80000000
+ 80005e4: eb10 70d3 adds.w r0, r0, r3, lsr #31
+ 80005e8: fa21 f604 lsr.w r6, r1, r4
+ 80005ec: eb42 0106 adc.w r1, r2, r6
+ 80005f0: ea5e 0e43 orrs.w lr, lr, r3, lsl #1
+ 80005f4: bf08 it eq
+ 80005f6: ea20 70d3 biceq.w r0, r0, r3, lsr #31
+ 80005fa: bd70 pop {r4, r5, r6, pc}
+ 80005fc: f1c4 040c rsb r4, r4, #12
+ 8000600: f1c4 0520 rsb r5, r4, #32
+ 8000604: fa00 f304 lsl.w r3, r0, r4
+ 8000608: fa20 f005 lsr.w r0, r0, r5
+ 800060c: fa01 f204 lsl.w r2, r1, r4
+ 8000610: ea40 0002 orr.w r0, r0, r2
+ 8000614: f001 4100 and.w r1, r1, #2147483648 ; 0x80000000
+ 8000618: eb10 70d3 adds.w r0, r0, r3, lsr #31
+ 800061c: f141 0100 adc.w r1, r1, #0
+ 8000620: ea5e 0e43 orrs.w lr, lr, r3, lsl #1
+ 8000624: bf08 it eq
+ 8000626: ea20 70d3 biceq.w r0, r0, r3, lsr #31
+ 800062a: bd70 pop {r4, r5, r6, pc}
+ 800062c: f1c4 0520 rsb r5, r4, #32
+ 8000630: fa00 f205 lsl.w r2, r0, r5
+ 8000634: ea4e 0e02 orr.w lr, lr, r2
+ 8000638: fa20 f304 lsr.w r3, r0, r4
+ 800063c: fa01 f205 lsl.w r2, r1, r5
+ 8000640: ea43 0302 orr.w r3, r3, r2
+ 8000644: fa21 f004 lsr.w r0, r1, r4
+ 8000648: f001 4100 and.w r1, r1, #2147483648 ; 0x80000000
+ 800064c: fa21 f204 lsr.w r2, r1, r4
+ 8000650: ea20 0002 bic.w r0, r0, r2
+ 8000654: eb00 70d3 add.w r0, r0, r3, lsr #31
+ 8000658: ea5e 0e43 orrs.w lr, lr, r3, lsl #1
+ 800065c: bf08 it eq
+ 800065e: ea20 70d3 biceq.w r0, r0, r3, lsr #31
+ 8000662: bd70 pop {r4, r5, r6, pc}
+ 8000664: f094 0f00 teq r4, #0
+ 8000668: d10f bne.n 800068a <__aeabi_dmul+0x1c2>
+ 800066a: f001 4600 and.w r6, r1, #2147483648 ; 0x80000000
+ 800066e: 0040 lsls r0, r0, #1
+ 8000670: eb41 0101 adc.w r1, r1, r1
+ 8000674: f411 1f80 tst.w r1, #1048576 ; 0x100000
+ 8000678: bf08 it eq
+ 800067a: 3c01 subeq r4, #1
+ 800067c: d0f7 beq.n 800066e <__aeabi_dmul+0x1a6>
+ 800067e: ea41 0106 orr.w r1, r1, r6
+ 8000682: f095 0f00 teq r5, #0
+ 8000686: bf18 it ne
+ 8000688: 4770 bxne lr
+ 800068a: f003 4600 and.w r6, r3, #2147483648 ; 0x80000000
+ 800068e: 0052 lsls r2, r2, #1
+ 8000690: eb43 0303 adc.w r3, r3, r3
+ 8000694: f413 1f80 tst.w r3, #1048576 ; 0x100000
+ 8000698: bf08 it eq
+ 800069a: 3d01 subeq r5, #1
+ 800069c: d0f7 beq.n 800068e <__aeabi_dmul+0x1c6>
+ 800069e: ea43 0306 orr.w r3, r3, r6
+ 80006a2: 4770 bx lr
+ 80006a4: ea94 0f0c teq r4, ip
+ 80006a8: ea0c 5513 and.w r5, ip, r3, lsr #20
+ 80006ac: bf18 it ne
+ 80006ae: ea95 0f0c teqne r5, ip
+ 80006b2: d00c beq.n 80006ce <__aeabi_dmul+0x206>
+ 80006b4: ea50 0641 orrs.w r6, r0, r1, lsl #1
+ 80006b8: bf18 it ne
+ 80006ba: ea52 0643 orrsne.w r6, r2, r3, lsl #1
+ 80006be: d1d1 bne.n 8000664 <__aeabi_dmul+0x19c>
+ 80006c0: ea81 0103 eor.w r1, r1, r3
+ 80006c4: f001 4100 and.w r1, r1, #2147483648 ; 0x80000000
+ 80006c8: f04f 0000 mov.w r0, #0
+ 80006cc: bd70 pop {r4, r5, r6, pc}
+ 80006ce: ea50 0641 orrs.w r6, r0, r1, lsl #1
+ 80006d2: bf06 itte eq
+ 80006d4: 4610 moveq r0, r2
+ 80006d6: 4619 moveq r1, r3
+ 80006d8: ea52 0643 orrsne.w r6, r2, r3, lsl #1
+ 80006dc: d019 beq.n 8000712 <__aeabi_dmul+0x24a>
+ 80006de: ea94 0f0c teq r4, ip
+ 80006e2: d102 bne.n 80006ea <__aeabi_dmul+0x222>
+ 80006e4: ea50 3601 orrs.w r6, r0, r1, lsl #12
+ 80006e8: d113 bne.n 8000712 <__aeabi_dmul+0x24a>
+ 80006ea: ea95 0f0c teq r5, ip
+ 80006ee: d105 bne.n 80006fc <__aeabi_dmul+0x234>
+ 80006f0: ea52 3603 orrs.w r6, r2, r3, lsl #12
+ 80006f4: bf1c itt ne
+ 80006f6: 4610 movne r0, r2
+ 80006f8: 4619 movne r1, r3
+ 80006fa: d10a bne.n 8000712 <__aeabi_dmul+0x24a>
+ 80006fc: ea81 0103 eor.w r1, r1, r3
+ 8000700: f001 4100 and.w r1, r1, #2147483648 ; 0x80000000
+ 8000704: f041 41fe orr.w r1, r1, #2130706432 ; 0x7f000000
+ 8000708: f441 0170 orr.w r1, r1, #15728640 ; 0xf00000
+ 800070c: f04f 0000 mov.w r0, #0
+ 8000710: bd70 pop {r4, r5, r6, pc}
+ 8000712: f041 41fe orr.w r1, r1, #2130706432 ; 0x7f000000
+ 8000716: f441 0178 orr.w r1, r1, #16252928 ; 0xf80000
+ 800071a: bd70 pop {r4, r5, r6, pc}
+
+0800071c <__aeabi_ddiv>:
+ 800071c: b570 push {r4, r5, r6, lr}
+ 800071e: f04f 0cff mov.w ip, #255 ; 0xff
+ 8000722: f44c 6ce0 orr.w ip, ip, #1792 ; 0x700
+ 8000726: ea1c 5411 ands.w r4, ip, r1, lsr #20
+ 800072a: bf1d ittte ne
+ 800072c: ea1c 5513 andsne.w r5, ip, r3, lsr #20
+ 8000730: ea94 0f0c teqne r4, ip
+ 8000734: ea95 0f0c teqne r5, ip
+ 8000738: f000 f8a7 bleq 800088a <__aeabi_ddiv+0x16e>
+ 800073c: eba4 0405 sub.w r4, r4, r5
+ 8000740: ea81 0e03 eor.w lr, r1, r3
+ 8000744: ea52 3503 orrs.w r5, r2, r3, lsl #12
+ 8000748: ea4f 3101 mov.w r1, r1, lsl #12
+ 800074c: f000 8088 beq.w 8000860 <__aeabi_ddiv+0x144>
+ 8000750: ea4f 3303 mov.w r3, r3, lsl #12
+ 8000754: f04f 5580 mov.w r5, #268435456 ; 0x10000000
+ 8000758: ea45 1313 orr.w r3, r5, r3, lsr #4
+ 800075c: ea43 6312 orr.w r3, r3, r2, lsr #24
+ 8000760: ea4f 2202 mov.w r2, r2, lsl #8
+ 8000764: ea45 1511 orr.w r5, r5, r1, lsr #4
+ 8000768: ea45 6510 orr.w r5, r5, r0, lsr #24
+ 800076c: ea4f 2600 mov.w r6, r0, lsl #8
+ 8000770: f00e 4100 and.w r1, lr, #2147483648 ; 0x80000000
+ 8000774: 429d cmp r5, r3
+ 8000776: bf08 it eq
+ 8000778: 4296 cmpeq r6, r2
+ 800077a: f144 04fd adc.w r4, r4, #253 ; 0xfd
+ 800077e: f504 7440 add.w r4, r4, #768 ; 0x300
+ 8000782: d202 bcs.n 800078a <__aeabi_ddiv+0x6e>
+ 8000784: 085b lsrs r3, r3, #1
+ 8000786: ea4f 0232 mov.w r2, r2, rrx
+ 800078a: 1ab6 subs r6, r6, r2
+ 800078c: eb65 0503 sbc.w r5, r5, r3
+ 8000790: 085b lsrs r3, r3, #1
+ 8000792: ea4f 0232 mov.w r2, r2, rrx
+ 8000796: f44f 1080 mov.w r0, #1048576 ; 0x100000
+ 800079a: f44f 2c00 mov.w ip, #524288 ; 0x80000
+ 800079e: ebb6 0e02 subs.w lr, r6, r2
+ 80007a2: eb75 0e03 sbcs.w lr, r5, r3
+ 80007a6: bf22 ittt cs
+ 80007a8: 1ab6 subcs r6, r6, r2
+ 80007aa: 4675 movcs r5, lr
+ 80007ac: ea40 000c orrcs.w r0, r0, ip
+ 80007b0: 085b lsrs r3, r3, #1
+ 80007b2: ea4f 0232 mov.w r2, r2, rrx
+ 80007b6: ebb6 0e02 subs.w lr, r6, r2
+ 80007ba: eb75 0e03 sbcs.w lr, r5, r3
+ 80007be: bf22 ittt cs
+ 80007c0: 1ab6 subcs r6, r6, r2
+ 80007c2: 4675 movcs r5, lr
+ 80007c4: ea40 005c orrcs.w r0, r0, ip, lsr #1
+ 80007c8: 085b lsrs r3, r3, #1
+ 80007ca: ea4f 0232 mov.w r2, r2, rrx
+ 80007ce: ebb6 0e02 subs.w lr, r6, r2
+ 80007d2: eb75 0e03 sbcs.w lr, r5, r3
+ 80007d6: bf22 ittt cs
+ 80007d8: 1ab6 subcs r6, r6, r2
+ 80007da: 4675 movcs r5, lr
+ 80007dc: ea40 009c orrcs.w r0, r0, ip, lsr #2
+ 80007e0: 085b lsrs r3, r3, #1
+ 80007e2: ea4f 0232 mov.w r2, r2, rrx
+ 80007e6: ebb6 0e02 subs.w lr, r6, r2
+ 80007ea: eb75 0e03 sbcs.w lr, r5, r3
+ 80007ee: bf22 ittt cs
+ 80007f0: 1ab6 subcs r6, r6, r2
+ 80007f2: 4675 movcs r5, lr
+ 80007f4: ea40 00dc orrcs.w r0, r0, ip, lsr #3
+ 80007f8: ea55 0e06 orrs.w lr, r5, r6
+ 80007fc: d018 beq.n 8000830 <__aeabi_ddiv+0x114>
+ 80007fe: ea4f 1505 mov.w r5, r5, lsl #4
+ 8000802: ea45 7516 orr.w r5, r5, r6, lsr #28
+ 8000806: ea4f 1606 mov.w r6, r6, lsl #4
+ 800080a: ea4f 03c3 mov.w r3, r3, lsl #3
+ 800080e: ea43 7352 orr.w r3, r3, r2, lsr #29
+ 8000812: ea4f 02c2 mov.w r2, r2, lsl #3
+ 8000816: ea5f 1c1c movs.w ip, ip, lsr #4
+ 800081a: d1c0 bne.n 800079e <__aeabi_ddiv+0x82>
+ 800081c: f411 1f80 tst.w r1, #1048576 ; 0x100000
+ 8000820: d10b bne.n 800083a <__aeabi_ddiv+0x11e>
+ 8000822: ea41 0100 orr.w r1, r1, r0
+ 8000826: f04f 0000 mov.w r0, #0
+ 800082a: f04f 4c00 mov.w ip, #2147483648 ; 0x80000000
+ 800082e: e7b6 b.n 800079e <__aeabi_ddiv+0x82>
+ 8000830: f411 1f80 tst.w r1, #1048576 ; 0x100000
+ 8000834: bf04 itt eq
+ 8000836: 4301 orreq r1, r0
+ 8000838: 2000 moveq r0, #0
+ 800083a: f1b4 0cfd subs.w ip, r4, #253 ; 0xfd
+ 800083e: bf88 it hi
+ 8000840: f5bc 6fe0 cmphi.w ip, #1792 ; 0x700
+ 8000844: f63f aeaf bhi.w 80005a6 <__aeabi_dmul+0xde>
+ 8000848: ebb5 0c03 subs.w ip, r5, r3
+ 800084c: bf04 itt eq
+ 800084e: ebb6 0c02 subseq.w ip, r6, r2
+ 8000852: ea5f 0c50 movseq.w ip, r0, lsr #1
+ 8000856: f150 0000 adcs.w r0, r0, #0
+ 800085a: eb41 5104 adc.w r1, r1, r4, lsl #20
+ 800085e: bd70 pop {r4, r5, r6, pc}
+ 8000860: f00e 4e00 and.w lr, lr, #2147483648 ; 0x80000000
+ 8000864: ea4e 3111 orr.w r1, lr, r1, lsr #12
+ 8000868: eb14 045c adds.w r4, r4, ip, lsr #1
+ 800086c: bfc2 ittt gt
+ 800086e: ebd4 050c rsbsgt r5, r4, ip
+ 8000872: ea41 5104 orrgt.w r1, r1, r4, lsl #20
+ 8000876: bd70 popgt {r4, r5, r6, pc}
+ 8000878: f441 1180 orr.w r1, r1, #1048576 ; 0x100000
+ 800087c: f04f 0e00 mov.w lr, #0
+ 8000880: 3c01 subs r4, #1
+ 8000882: e690 b.n 80005a6 <__aeabi_dmul+0xde>
+ 8000884: ea45 0e06 orr.w lr, r5, r6
+ 8000888: e68d b.n 80005a6 <__aeabi_dmul+0xde>
+ 800088a: ea0c 5513 and.w r5, ip, r3, lsr #20
+ 800088e: ea94 0f0c teq r4, ip
+ 8000892: bf08 it eq
+ 8000894: ea95 0f0c teqeq r5, ip
+ 8000898: f43f af3b beq.w 8000712 <__aeabi_dmul+0x24a>
+ 800089c: ea94 0f0c teq r4, ip
+ 80008a0: d10a bne.n 80008b8 <__aeabi_ddiv+0x19c>
+ 80008a2: ea50 3401 orrs.w r4, r0, r1, lsl #12
+ 80008a6: f47f af34 bne.w 8000712 <__aeabi_dmul+0x24a>
+ 80008aa: ea95 0f0c teq r5, ip
+ 80008ae: f47f af25 bne.w 80006fc <__aeabi_dmul+0x234>
+ 80008b2: 4610 mov r0, r2
+ 80008b4: 4619 mov r1, r3
+ 80008b6: e72c b.n 8000712 <__aeabi_dmul+0x24a>
+ 80008b8: ea95 0f0c teq r5, ip
+ 80008bc: d106 bne.n 80008cc <__aeabi_ddiv+0x1b0>
+ 80008be: ea52 3503 orrs.w r5, r2, r3, lsl #12
+ 80008c2: f43f aefd beq.w 80006c0 <__aeabi_dmul+0x1f8>
+ 80008c6: 4610 mov r0, r2
+ 80008c8: 4619 mov r1, r3
+ 80008ca: e722 b.n 8000712 <__aeabi_dmul+0x24a>
+ 80008cc: ea50 0641 orrs.w r6, r0, r1, lsl #1
+ 80008d0: bf18 it ne
+ 80008d2: ea52 0643 orrsne.w r6, r2, r3, lsl #1
+ 80008d6: f47f aec5 bne.w 8000664 <__aeabi_dmul+0x19c>
+ 80008da: ea50 0441 orrs.w r4, r0, r1, lsl #1
+ 80008de: f47f af0d bne.w 80006fc <__aeabi_dmul+0x234>
+ 80008e2: ea52 0543 orrs.w r5, r2, r3, lsl #1
+ 80008e6: f47f aeeb bne.w 80006c0 <__aeabi_dmul+0x1f8>
+ 80008ea: e712 b.n 8000712 <__aeabi_dmul+0x24a>
+
+080008ec <__gedf2>:
+ 80008ec: f04f 3cff mov.w ip, #4294967295
+ 80008f0: e006 b.n 8000900 <__cmpdf2+0x4>
+ 80008f2: bf00 nop
+
+080008f4 <__ledf2>:
+ 80008f4: f04f 0c01 mov.w ip, #1
+ 80008f8: e002 b.n 8000900 <__cmpdf2+0x4>
+ 80008fa: bf00 nop
+
+080008fc <__cmpdf2>:
+ 80008fc: f04f 0c01 mov.w ip, #1
+ 8000900: f84d cd04 str.w ip, [sp, #-4]!
+ 8000904: ea4f 0c41 mov.w ip, r1, lsl #1
+ 8000908: ea7f 5c6c mvns.w ip, ip, asr #21
+ 800090c: ea4f 0c43 mov.w ip, r3, lsl #1
+ 8000910: bf18 it ne
+ 8000912: ea7f 5c6c mvnsne.w ip, ip, asr #21
+ 8000916: d01b beq.n 8000950 <__cmpdf2+0x54>
+ 8000918: b001 add sp, #4
+ 800091a: ea50 0c41 orrs.w ip, r0, r1, lsl #1
+ 800091e: bf0c ite eq
+ 8000920: ea52 0c43 orrseq.w ip, r2, r3, lsl #1
+ 8000924: ea91 0f03 teqne r1, r3
+ 8000928: bf02 ittt eq
+ 800092a: ea90 0f02 teqeq r0, r2
+ 800092e: 2000 moveq r0, #0
+ 8000930: 4770 bxeq lr
+ 8000932: f110 0f00 cmn.w r0, #0
+ 8000936: ea91 0f03 teq r1, r3
+ 800093a: bf58 it pl
+ 800093c: 4299 cmppl r1, r3
+ 800093e: bf08 it eq
+ 8000940: 4290 cmpeq r0, r2
+ 8000942: bf2c ite cs
+ 8000944: 17d8 asrcs r0, r3, #31
+ 8000946: ea6f 70e3 mvncc.w r0, r3, asr #31
+ 800094a: f040 0001 orr.w r0, r0, #1
+ 800094e: 4770 bx lr
+ 8000950: ea4f 0c41 mov.w ip, r1, lsl #1
+ 8000954: ea7f 5c6c mvns.w ip, ip, asr #21
+ 8000958: d102 bne.n 8000960 <__cmpdf2+0x64>
+ 800095a: ea50 3c01 orrs.w ip, r0, r1, lsl #12
+ 800095e: d107 bne.n 8000970 <__cmpdf2+0x74>
+ 8000960: ea4f 0c43 mov.w ip, r3, lsl #1
+ 8000964: ea7f 5c6c mvns.w ip, ip, asr #21
+ 8000968: d1d6 bne.n 8000918 <__cmpdf2+0x1c>
+ 800096a: ea52 3c03 orrs.w ip, r2, r3, lsl #12
+ 800096e: d0d3 beq.n 8000918 <__cmpdf2+0x1c>
+ 8000970: f85d 0b04 ldr.w r0, [sp], #4
+ 8000974: 4770 bx lr
+ 8000976: bf00 nop
+
+08000978 <__aeabi_cdrcmple>:
+ 8000978: 4684 mov ip, r0
+ 800097a: 4610 mov r0, r2
+ 800097c: 4662 mov r2, ip
+ 800097e: 468c mov ip, r1
+ 8000980: 4619 mov r1, r3
+ 8000982: 4663 mov r3, ip
+ 8000984: e000 b.n 8000988 <__aeabi_cdcmpeq>
+ 8000986: bf00 nop
+
+08000988 <__aeabi_cdcmpeq>:
+ 8000988: b501 push {r0, lr}
+ 800098a: f7ff ffb7 bl 80008fc <__cmpdf2>
+ 800098e: 2800 cmp r0, #0
+ 8000990: bf48 it mi
+ 8000992: f110 0f00 cmnmi.w r0, #0
+ 8000996: bd01 pop {r0, pc}
+
+08000998 <__aeabi_dcmpeq>:
+ 8000998: f84d ed08 str.w lr, [sp, #-8]!
+ 800099c: f7ff fff4 bl 8000988 <__aeabi_cdcmpeq>
+ 80009a0: bf0c ite eq
+ 80009a2: 2001 moveq r0, #1
+ 80009a4: 2000 movne r0, #0
+ 80009a6: f85d fb08 ldr.w pc, [sp], #8
+ 80009aa: bf00 nop
+
+080009ac <__aeabi_dcmplt>:
+ 80009ac: f84d ed08 str.w lr, [sp, #-8]!
+ 80009b0: f7ff ffea bl 8000988 <__aeabi_cdcmpeq>
+ 80009b4: bf34 ite cc
+ 80009b6: 2001 movcc r0, #1
+ 80009b8: 2000 movcs r0, #0
+ 80009ba: f85d fb08 ldr.w pc, [sp], #8
+ 80009be: bf00 nop
+
+080009c0 <__aeabi_dcmple>:
+ 80009c0: f84d ed08 str.w lr, [sp, #-8]!
+ 80009c4: f7ff ffe0 bl 8000988 <__aeabi_cdcmpeq>
+ 80009c8: bf94 ite ls
+ 80009ca: 2001 movls r0, #1
+ 80009cc: 2000 movhi r0, #0
+ 80009ce: f85d fb08 ldr.w pc, [sp], #8
+ 80009d2: bf00 nop
+
+080009d4 <__aeabi_dcmpge>:
+ 80009d4: f84d ed08 str.w lr, [sp, #-8]!
+ 80009d8: f7ff ffce bl 8000978 <__aeabi_cdrcmple>
+ 80009dc: bf94 ite ls
+ 80009de: 2001 movls r0, #1
+ 80009e0: 2000 movhi r0, #0
+ 80009e2: f85d fb08 ldr.w pc, [sp], #8
+ 80009e6: bf00 nop
+
+080009e8 <__aeabi_dcmpgt>:
+ 80009e8: f84d ed08 str.w lr, [sp, #-8]!
+ 80009ec: f7ff ffc4 bl 8000978 <__aeabi_cdrcmple>
+ 80009f0: bf34 ite cc
+ 80009f2: 2001 movcc r0, #1
+ 80009f4: 2000 movcs r0, #0
+ 80009f6: f85d fb08 ldr.w pc, [sp], #8
+ 80009fa: bf00 nop
+
+080009fc <__aeabi_dcmpun>:
+ 80009fc: ea4f 0c41 mov.w ip, r1, lsl #1
+ 8000a00: ea7f 5c6c mvns.w ip, ip, asr #21
+ 8000a04: d102 bne.n 8000a0c <__aeabi_dcmpun+0x10>
+ 8000a06: ea50 3c01 orrs.w ip, r0, r1, lsl #12
+ 8000a0a: d10a bne.n 8000a22 <__aeabi_dcmpun+0x26>
+ 8000a0c: ea4f 0c43 mov.w ip, r3, lsl #1
+ 8000a10: ea7f 5c6c mvns.w ip, ip, asr #21
+ 8000a14: d102 bne.n 8000a1c <__aeabi_dcmpun+0x20>
+ 8000a16: ea52 3c03 orrs.w ip, r2, r3, lsl #12
+ 8000a1a: d102 bne.n 8000a22 <__aeabi_dcmpun+0x26>
+ 8000a1c: f04f 0000 mov.w r0, #0
+ 8000a20: 4770 bx lr
+ 8000a22: f04f 0001 mov.w r0, #1
+ 8000a26: 4770 bx lr
+
+08000a28 <__aeabi_d2f>:
+ 8000a28: ea4f 0241 mov.w r2, r1, lsl #1
+ 8000a2c: f1b2 43e0 subs.w r3, r2, #1879048192 ; 0x70000000
+ 8000a30: bf24 itt cs
+ 8000a32: f5b3 1c00 subscs.w ip, r3, #2097152 ; 0x200000
+ 8000a36: f1dc 5cfe rsbscs ip, ip, #532676608 ; 0x1fc00000
+ 8000a3a: d90d bls.n 8000a58 <__aeabi_d2f+0x30>
+ 8000a3c: f001 4c00 and.w ip, r1, #2147483648 ; 0x80000000
+ 8000a40: ea4f 02c0 mov.w r2, r0, lsl #3
+ 8000a44: ea4c 7050 orr.w r0, ip, r0, lsr #29
+ 8000a48: f1b2 4f00 cmp.w r2, #2147483648 ; 0x80000000
+ 8000a4c: eb40 0083 adc.w r0, r0, r3, lsl #2
+ 8000a50: bf08 it eq
+ 8000a52: f020 0001 biceq.w r0, r0, #1
+ 8000a56: 4770 bx lr
+ 8000a58: f011 4f80 tst.w r1, #1073741824 ; 0x40000000
+ 8000a5c: d121 bne.n 8000aa2 <__aeabi_d2f+0x7a>
+ 8000a5e: f113 7238 adds.w r2, r3, #48234496 ; 0x2e00000
+ 8000a62: bfbc itt lt
+ 8000a64: f001 4000 andlt.w r0, r1, #2147483648 ; 0x80000000
+ 8000a68: 4770 bxlt lr
+ 8000a6a: f441 1180 orr.w r1, r1, #1048576 ; 0x100000
+ 8000a6e: ea4f 5252 mov.w r2, r2, lsr #21
+ 8000a72: f1c2 0218 rsb r2, r2, #24
+ 8000a76: f1c2 0c20 rsb ip, r2, #32
+ 8000a7a: fa10 f30c lsls.w r3, r0, ip
+ 8000a7e: fa20 f002 lsr.w r0, r0, r2
+ 8000a82: bf18 it ne
+ 8000a84: f040 0001 orrne.w r0, r0, #1
+ 8000a88: ea4f 23c1 mov.w r3, r1, lsl #11
+ 8000a8c: ea4f 23d3 mov.w r3, r3, lsr #11
+ 8000a90: fa03 fc0c lsl.w ip, r3, ip
+ 8000a94: ea40 000c orr.w r0, r0, ip
+ 8000a98: fa23 f302 lsr.w r3, r3, r2
+ 8000a9c: ea4f 0343 mov.w r3, r3, lsl #1
+ 8000aa0: e7cc b.n 8000a3c <__aeabi_d2f+0x14>
+ 8000aa2: ea7f 5362 mvns.w r3, r2, asr #21
+ 8000aa6: d107 bne.n 8000ab8 <__aeabi_d2f+0x90>
+ 8000aa8: ea50 3301 orrs.w r3, r0, r1, lsl #12
+ 8000aac: bf1e ittt ne
+ 8000aae: f04f 40fe movne.w r0, #2130706432 ; 0x7f000000
+ 8000ab2: f440 0040 orrne.w r0, r0, #12582912 ; 0xc00000
+ 8000ab6: 4770 bxne lr
+ 8000ab8: f001 4000 and.w r0, r1, #2147483648 ; 0x80000000
+ 8000abc: f040 40fe orr.w r0, r0, #2130706432 ; 0x7f000000
+ 8000ac0: f440 0000 orr.w r0, r0, #8388608 ; 0x800000
+ 8000ac4: 4770 bx lr
+ 8000ac6: bf00 nop
+
+08000ac8 <__aeabi_frsub>:
+ 8000ac8: f080 4000 eor.w r0, r0, #2147483648 ; 0x80000000
+ 8000acc: e002 b.n 8000ad4 <__addsf3>
+ 8000ace: bf00 nop
+
+08000ad0 <__aeabi_fsub>:
+ 8000ad0: f081 4100 eor.w r1, r1, #2147483648 ; 0x80000000
+
+08000ad4 <__addsf3>:
+ 8000ad4: 0042 lsls r2, r0, #1
+ 8000ad6: bf1f itttt ne
+ 8000ad8: ea5f 0341 movsne.w r3, r1, lsl #1
+ 8000adc: ea92 0f03 teqne r2, r3
+ 8000ae0: ea7f 6c22 mvnsne.w ip, r2, asr #24
+ 8000ae4: ea7f 6c23 mvnsne.w ip, r3, asr #24
+ 8000ae8: d06a beq.n 8000bc0 <__addsf3+0xec>
+ 8000aea: ea4f 6212 mov.w r2, r2, lsr #24
+ 8000aee: ebd2 6313 rsbs r3, r2, r3, lsr #24
+ 8000af2: bfc1 itttt gt
+ 8000af4: 18d2 addgt r2, r2, r3
+ 8000af6: 4041 eorgt r1, r0
+ 8000af8: 4048 eorgt r0, r1
+ 8000afa: 4041 eorgt r1, r0
+ 8000afc: bfb8 it lt
+ 8000afe: 425b neglt r3, r3
+ 8000b00: 2b19 cmp r3, #25
+ 8000b02: bf88 it hi
+ 8000b04: 4770 bxhi lr
+ 8000b06: f010 4f00 tst.w r0, #2147483648 ; 0x80000000
+ 8000b0a: f440 0000 orr.w r0, r0, #8388608 ; 0x800000
+ 8000b0e: f020 407f bic.w r0, r0, #4278190080 ; 0xff000000
+ 8000b12: bf18 it ne
+ 8000b14: 4240 negne r0, r0
+ 8000b16: f011 4f00 tst.w r1, #2147483648 ; 0x80000000
+ 8000b1a: f441 0100 orr.w r1, r1, #8388608 ; 0x800000
+ 8000b1e: f021 417f bic.w r1, r1, #4278190080 ; 0xff000000
+ 8000b22: bf18 it ne
+ 8000b24: 4249 negne r1, r1
+ 8000b26: ea92 0f03 teq r2, r3
+ 8000b2a: d03f beq.n 8000bac <__addsf3+0xd8>
+ 8000b2c: f1a2 0201 sub.w r2, r2, #1
+ 8000b30: fa41 fc03 asr.w ip, r1, r3
+ 8000b34: eb10 000c adds.w r0, r0, ip
+ 8000b38: f1c3 0320 rsb r3, r3, #32
+ 8000b3c: fa01 f103 lsl.w r1, r1, r3
+ 8000b40: f000 4300 and.w r3, r0, #2147483648 ; 0x80000000
+ 8000b44: d502 bpl.n 8000b4c <__addsf3+0x78>
+ 8000b46: 4249 negs r1, r1
+ 8000b48: eb60 0040 sbc.w r0, r0, r0, lsl #1
+ 8000b4c: f5b0 0f00 cmp.w r0, #8388608 ; 0x800000
+ 8000b50: d313 bcc.n 8000b7a <__addsf3+0xa6>
+ 8000b52: f1b0 7f80 cmp.w r0, #16777216 ; 0x1000000
+ 8000b56: d306 bcc.n 8000b66 <__addsf3+0x92>
+ 8000b58: 0840 lsrs r0, r0, #1
+ 8000b5a: ea4f 0131 mov.w r1, r1, rrx
+ 8000b5e: f102 0201 add.w r2, r2, #1
+ 8000b62: 2afe cmp r2, #254 ; 0xfe
+ 8000b64: d251 bcs.n 8000c0a <__addsf3+0x136>
+ 8000b66: f1b1 4f00 cmp.w r1, #2147483648 ; 0x80000000
+ 8000b6a: eb40 50c2 adc.w r0, r0, r2, lsl #23
+ 8000b6e: bf08 it eq
+ 8000b70: f020 0001 biceq.w r0, r0, #1
+ 8000b74: ea40 0003 orr.w r0, r0, r3
+ 8000b78: 4770 bx lr
+ 8000b7a: 0049 lsls r1, r1, #1
+ 8000b7c: eb40 0000 adc.w r0, r0, r0
+ 8000b80: 3a01 subs r2, #1
+ 8000b82: bf28 it cs
+ 8000b84: f5b0 0f00 cmpcs.w r0, #8388608 ; 0x800000
+ 8000b88: d2ed bcs.n 8000b66 <__addsf3+0x92>
+ 8000b8a: fab0 fc80 clz ip, r0
+ 8000b8e: f1ac 0c08 sub.w ip, ip, #8
+ 8000b92: ebb2 020c subs.w r2, r2, ip
+ 8000b96: fa00 f00c lsl.w r0, r0, ip
+ 8000b9a: bfaa itet ge
+ 8000b9c: eb00 50c2 addge.w r0, r0, r2, lsl #23
+ 8000ba0: 4252 neglt r2, r2
+ 8000ba2: 4318 orrge r0, r3
+ 8000ba4: bfbc itt lt
+ 8000ba6: 40d0 lsrlt r0, r2
+ 8000ba8: 4318 orrlt r0, r3
+ 8000baa: 4770 bx lr
+ 8000bac: f092 0f00 teq r2, #0
+ 8000bb0: f481 0100 eor.w r1, r1, #8388608 ; 0x800000
+ 8000bb4: bf06 itte eq
+ 8000bb6: f480 0000 eoreq.w r0, r0, #8388608 ; 0x800000
+ 8000bba: 3201 addeq r2, #1
+ 8000bbc: 3b01 subne r3, #1
+ 8000bbe: e7b5 b.n 8000b2c <__addsf3+0x58>
+ 8000bc0: ea4f 0341 mov.w r3, r1, lsl #1
+ 8000bc4: ea7f 6c22 mvns.w ip, r2, asr #24
+ 8000bc8: bf18 it ne
+ 8000bca: ea7f 6c23 mvnsne.w ip, r3, asr #24
+ 8000bce: d021 beq.n 8000c14 <__addsf3+0x140>
+ 8000bd0: ea92 0f03 teq r2, r3
+ 8000bd4: d004 beq.n 8000be0 <__addsf3+0x10c>
+ 8000bd6: f092 0f00 teq r2, #0
+ 8000bda: bf08 it eq
+ 8000bdc: 4608 moveq r0, r1
+ 8000bde: 4770 bx lr
+ 8000be0: ea90 0f01 teq r0, r1
+ 8000be4: bf1c itt ne
+ 8000be6: 2000 movne r0, #0
+ 8000be8: 4770 bxne lr
+ 8000bea: f012 4f7f tst.w r2, #4278190080 ; 0xff000000
+ 8000bee: d104 bne.n 8000bfa <__addsf3+0x126>
+ 8000bf0: 0040 lsls r0, r0, #1
+ 8000bf2: bf28 it cs
+ 8000bf4: f040 4000 orrcs.w r0, r0, #2147483648 ; 0x80000000
+ 8000bf8: 4770 bx lr
+ 8000bfa: f112 7200 adds.w r2, r2, #33554432 ; 0x2000000
+ 8000bfe: bf3c itt cc
+ 8000c00: f500 0000 addcc.w r0, r0, #8388608 ; 0x800000
+ 8000c04: 4770 bxcc lr
+ 8000c06: f000 4300 and.w r3, r0, #2147483648 ; 0x80000000
+ 8000c0a: f043 40fe orr.w r0, r3, #2130706432 ; 0x7f000000
+ 8000c0e: f440 0000 orr.w r0, r0, #8388608 ; 0x800000
+ 8000c12: 4770 bx lr
+ 8000c14: ea7f 6222 mvns.w r2, r2, asr #24
+ 8000c18: bf16 itet ne
+ 8000c1a: 4608 movne r0, r1
+ 8000c1c: ea7f 6323 mvnseq.w r3, r3, asr #24
+ 8000c20: 4601 movne r1, r0
+ 8000c22: 0242 lsls r2, r0, #9
+ 8000c24: bf06 itte eq
+ 8000c26: ea5f 2341 movseq.w r3, r1, lsl #9
+ 8000c2a: ea90 0f01 teqeq r0, r1
+ 8000c2e: f440 0080 orrne.w r0, r0, #4194304 ; 0x400000
+ 8000c32: 4770 bx lr
+
+08000c34 <__aeabi_ui2f>:
+ 8000c34: f04f 0300 mov.w r3, #0
+ 8000c38: e004 b.n 8000c44 <__aeabi_i2f+0x8>
+ 8000c3a: bf00 nop
+
+08000c3c <__aeabi_i2f>:
+ 8000c3c: f010 4300 ands.w r3, r0, #2147483648 ; 0x80000000
+ 8000c40: bf48 it mi
+ 8000c42: 4240 negmi r0, r0
+ 8000c44: ea5f 0c00 movs.w ip, r0
+ 8000c48: bf08 it eq
+ 8000c4a: 4770 bxeq lr
+ 8000c4c: f043 4396 orr.w r3, r3, #1258291200 ; 0x4b000000
+ 8000c50: 4601 mov r1, r0
+ 8000c52: f04f 0000 mov.w r0, #0
+ 8000c56: e01c b.n 8000c92 <__aeabi_l2f+0x2a>
+
+08000c58 <__aeabi_ul2f>:
+ 8000c58: ea50 0201 orrs.w r2, r0, r1
+ 8000c5c: bf08 it eq
+ 8000c5e: 4770 bxeq lr
+ 8000c60: f04f 0300 mov.w r3, #0
+ 8000c64: e00a b.n 8000c7c <__aeabi_l2f+0x14>
+ 8000c66: bf00 nop
+
+08000c68 <__aeabi_l2f>:
+ 8000c68: ea50 0201 orrs.w r2, r0, r1
+ 8000c6c: bf08 it eq
+ 8000c6e: 4770 bxeq lr
+ 8000c70: f011 4300 ands.w r3, r1, #2147483648 ; 0x80000000
+ 8000c74: d502 bpl.n 8000c7c <__aeabi_l2f+0x14>
+ 8000c76: 4240 negs r0, r0
+ 8000c78: eb61 0141 sbc.w r1, r1, r1, lsl #1
+ 8000c7c: ea5f 0c01 movs.w ip, r1
+ 8000c80: bf02 ittt eq
+ 8000c82: 4684 moveq ip, r0
+ 8000c84: 4601 moveq r1, r0
+ 8000c86: 2000 moveq r0, #0
+ 8000c88: f043 43b6 orr.w r3, r3, #1526726656 ; 0x5b000000
+ 8000c8c: bf08 it eq
+ 8000c8e: f1a3 5380 subeq.w r3, r3, #268435456 ; 0x10000000
+ 8000c92: f5a3 0300 sub.w r3, r3, #8388608 ; 0x800000
+ 8000c96: fabc f28c clz r2, ip
+ 8000c9a: 3a08 subs r2, #8
+ 8000c9c: eba3 53c2 sub.w r3, r3, r2, lsl #23
+ 8000ca0: db10 blt.n 8000cc4 <__aeabi_l2f+0x5c>
+ 8000ca2: fa01 fc02 lsl.w ip, r1, r2
+ 8000ca6: 4463 add r3, ip
+ 8000ca8: fa00 fc02 lsl.w ip, r0, r2
+ 8000cac: f1c2 0220 rsb r2, r2, #32
+ 8000cb0: f1bc 4f00 cmp.w ip, #2147483648 ; 0x80000000
+ 8000cb4: fa20 f202 lsr.w r2, r0, r2
+ 8000cb8: eb43 0002 adc.w r0, r3, r2
+ 8000cbc: bf08 it eq
+ 8000cbe: f020 0001 biceq.w r0, r0, #1
+ 8000cc2: 4770 bx lr
+ 8000cc4: f102 0220 add.w r2, r2, #32
+ 8000cc8: fa01 fc02 lsl.w ip, r1, r2
+ 8000ccc: f1c2 0220 rsb r2, r2, #32
+ 8000cd0: ea50 004c orrs.w r0, r0, ip, lsl #1
+ 8000cd4: fa21 f202 lsr.w r2, r1, r2
+ 8000cd8: eb43 0002 adc.w r0, r3, r2
+ 8000cdc: bf08 it eq
+ 8000cde: ea20 70dc biceq.w r0, r0, ip, lsr #31
+ 8000ce2: 4770 bx lr
+
+08000ce4 <__aeabi_fmul>:
+ 8000ce4: f04f 0cff mov.w ip, #255 ; 0xff
+ 8000ce8: ea1c 52d0 ands.w r2, ip, r0, lsr #23
+ 8000cec: bf1e ittt ne
+ 8000cee: ea1c 53d1 andsne.w r3, ip, r1, lsr #23
+ 8000cf2: ea92 0f0c teqne r2, ip
+ 8000cf6: ea93 0f0c teqne r3, ip
+ 8000cfa: d06f beq.n 8000ddc <__aeabi_fmul+0xf8>
+ 8000cfc: 441a add r2, r3
+ 8000cfe: ea80 0c01 eor.w ip, r0, r1
+ 8000d02: 0240 lsls r0, r0, #9
+ 8000d04: bf18 it ne
+ 8000d06: ea5f 2141 movsne.w r1, r1, lsl #9
+ 8000d0a: d01e beq.n 8000d4a <__aeabi_fmul+0x66>
+ 8000d0c: f04f 6300 mov.w r3, #134217728 ; 0x8000000
+ 8000d10: ea43 1050 orr.w r0, r3, r0, lsr #5
+ 8000d14: ea43 1151 orr.w r1, r3, r1, lsr #5
+ 8000d18: fba0 3101 umull r3, r1, r0, r1
+ 8000d1c: f00c 4000 and.w r0, ip, #2147483648 ; 0x80000000
+ 8000d20: f5b1 0f00 cmp.w r1, #8388608 ; 0x800000
+ 8000d24: bf3e ittt cc
+ 8000d26: 0049 lslcc r1, r1, #1
+ 8000d28: ea41 71d3 orrcc.w r1, r1, r3, lsr #31
+ 8000d2c: 005b lslcc r3, r3, #1
+ 8000d2e: ea40 0001 orr.w r0, r0, r1
+ 8000d32: f162 027f sbc.w r2, r2, #127 ; 0x7f
+ 8000d36: 2afd cmp r2, #253 ; 0xfd
+ 8000d38: d81d bhi.n 8000d76 <__aeabi_fmul+0x92>
+ 8000d3a: f1b3 4f00 cmp.w r3, #2147483648 ; 0x80000000
+ 8000d3e: eb40 50c2 adc.w r0, r0, r2, lsl #23
+ 8000d42: bf08 it eq
+ 8000d44: f020 0001 biceq.w r0, r0, #1
+ 8000d48: 4770 bx lr
+ 8000d4a: f090 0f00 teq r0, #0
+ 8000d4e: f00c 4c00 and.w ip, ip, #2147483648 ; 0x80000000
+ 8000d52: bf08 it eq
+ 8000d54: 0249 lsleq r1, r1, #9
+ 8000d56: ea4c 2050 orr.w r0, ip, r0, lsr #9
+ 8000d5a: ea40 2051 orr.w r0, r0, r1, lsr #9
+ 8000d5e: 3a7f subs r2, #127 ; 0x7f
+ 8000d60: bfc2 ittt gt
+ 8000d62: f1d2 03ff rsbsgt r3, r2, #255 ; 0xff
+ 8000d66: ea40 50c2 orrgt.w r0, r0, r2, lsl #23
+ 8000d6a: 4770 bxgt lr
+ 8000d6c: f440 0000 orr.w r0, r0, #8388608 ; 0x800000
+ 8000d70: f04f 0300 mov.w r3, #0
+ 8000d74: 3a01 subs r2, #1
+ 8000d76: dc5d bgt.n 8000e34 <__aeabi_fmul+0x150>
+ 8000d78: f112 0f19 cmn.w r2, #25
+ 8000d7c: bfdc itt le
+ 8000d7e: f000 4000 andle.w r0, r0, #2147483648 ; 0x80000000
+ 8000d82: 4770 bxle lr
+ 8000d84: f1c2 0200 rsb r2, r2, #0
+ 8000d88: 0041 lsls r1, r0, #1
+ 8000d8a: fa21 f102 lsr.w r1, r1, r2
+ 8000d8e: f1c2 0220 rsb r2, r2, #32
+ 8000d92: fa00 fc02 lsl.w ip, r0, r2
+ 8000d96: ea5f 0031 movs.w r0, r1, rrx
+ 8000d9a: f140 0000 adc.w r0, r0, #0
+ 8000d9e: ea53 034c orrs.w r3, r3, ip, lsl #1
+ 8000da2: bf08 it eq
+ 8000da4: ea20 70dc biceq.w r0, r0, ip, lsr #31
+ 8000da8: 4770 bx lr
+ 8000daa: f092 0f00 teq r2, #0
+ 8000dae: f000 4c00 and.w ip, r0, #2147483648 ; 0x80000000
+ 8000db2: bf02 ittt eq
+ 8000db4: 0040 lsleq r0, r0, #1
+ 8000db6: f410 0f00 tsteq.w r0, #8388608 ; 0x800000
+ 8000dba: 3a01 subeq r2, #1
+ 8000dbc: d0f9 beq.n 8000db2 <__aeabi_fmul+0xce>
+ 8000dbe: ea40 000c orr.w r0, r0, ip
+ 8000dc2: f093 0f00 teq r3, #0
+ 8000dc6: f001 4c00 and.w ip, r1, #2147483648 ; 0x80000000
+ 8000dca: bf02 ittt eq
+ 8000dcc: 0049 lsleq r1, r1, #1
+ 8000dce: f411 0f00 tsteq.w r1, #8388608 ; 0x800000
+ 8000dd2: 3b01 subeq r3, #1
+ 8000dd4: d0f9 beq.n 8000dca <__aeabi_fmul+0xe6>
+ 8000dd6: ea41 010c orr.w r1, r1, ip
+ 8000dda: e78f b.n 8000cfc <__aeabi_fmul+0x18>
+ 8000ddc: ea0c 53d1 and.w r3, ip, r1, lsr #23
+ 8000de0: ea92 0f0c teq r2, ip
+ 8000de4: bf18 it ne
+ 8000de6: ea93 0f0c teqne r3, ip
+ 8000dea: d00a beq.n 8000e02 <__aeabi_fmul+0x11e>
+ 8000dec: f030 4c00 bics.w ip, r0, #2147483648 ; 0x80000000
+ 8000df0: bf18 it ne
+ 8000df2: f031 4c00 bicsne.w ip, r1, #2147483648 ; 0x80000000
+ 8000df6: d1d8 bne.n 8000daa <__aeabi_fmul+0xc6>
+ 8000df8: ea80 0001 eor.w r0, r0, r1
+ 8000dfc: f000 4000 and.w r0, r0, #2147483648 ; 0x80000000
+ 8000e00: 4770 bx lr
+ 8000e02: f090 0f00 teq r0, #0
+ 8000e06: bf17 itett ne
+ 8000e08: f090 4f00 teqne r0, #2147483648 ; 0x80000000
+ 8000e0c: 4608 moveq r0, r1
+ 8000e0e: f091 0f00 teqne r1, #0
+ 8000e12: f091 4f00 teqne r1, #2147483648 ; 0x80000000
+ 8000e16: d014 beq.n 8000e42 <__aeabi_fmul+0x15e>
+ 8000e18: ea92 0f0c teq r2, ip
+ 8000e1c: d101 bne.n 8000e22 <__aeabi_fmul+0x13e>
+ 8000e1e: 0242 lsls r2, r0, #9
+ 8000e20: d10f bne.n 8000e42 <__aeabi_fmul+0x15e>
+ 8000e22: ea93 0f0c teq r3, ip
+ 8000e26: d103 bne.n 8000e30 <__aeabi_fmul+0x14c>
+ 8000e28: 024b lsls r3, r1, #9
+ 8000e2a: bf18 it ne
+ 8000e2c: 4608 movne r0, r1
+ 8000e2e: d108 bne.n 8000e42 <__aeabi_fmul+0x15e>
+ 8000e30: ea80 0001 eor.w r0, r0, r1
+ 8000e34: f000 4000 and.w r0, r0, #2147483648 ; 0x80000000
+ 8000e38: f040 40fe orr.w r0, r0, #2130706432 ; 0x7f000000
+ 8000e3c: f440 0000 orr.w r0, r0, #8388608 ; 0x800000
+ 8000e40: 4770 bx lr
+ 8000e42: f040 40fe orr.w r0, r0, #2130706432 ; 0x7f000000
+ 8000e46: f440 0040 orr.w r0, r0, #12582912 ; 0xc00000
+ 8000e4a: 4770 bx lr
+
+08000e4c <__aeabi_fdiv>:
+ 8000e4c: f04f 0cff mov.w ip, #255 ; 0xff
+ 8000e50: ea1c 52d0 ands.w r2, ip, r0, lsr #23
+ 8000e54: bf1e ittt ne
+ 8000e56: ea1c 53d1 andsne.w r3, ip, r1, lsr #23
+ 8000e5a: ea92 0f0c teqne r2, ip
+ 8000e5e: ea93 0f0c teqne r3, ip
+ 8000e62: d069 beq.n 8000f38 <__aeabi_fdiv+0xec>
+ 8000e64: eba2 0203 sub.w r2, r2, r3
+ 8000e68: ea80 0c01 eor.w ip, r0, r1
+ 8000e6c: 0249 lsls r1, r1, #9
+ 8000e6e: ea4f 2040 mov.w r0, r0, lsl #9
+ 8000e72: d037 beq.n 8000ee4 <__aeabi_fdiv+0x98>
+ 8000e74: f04f 5380 mov.w r3, #268435456 ; 0x10000000
+ 8000e78: ea43 1111 orr.w r1, r3, r1, lsr #4
+ 8000e7c: ea43 1310 orr.w r3, r3, r0, lsr #4
+ 8000e80: f00c 4000 and.w r0, ip, #2147483648 ; 0x80000000
+ 8000e84: 428b cmp r3, r1
+ 8000e86: bf38 it cc
+ 8000e88: 005b lslcc r3, r3, #1
+ 8000e8a: f142 027d adc.w r2, r2, #125 ; 0x7d
+ 8000e8e: f44f 0c00 mov.w ip, #8388608 ; 0x800000
+ 8000e92: 428b cmp r3, r1
+ 8000e94: bf24 itt cs
+ 8000e96: 1a5b subcs r3, r3, r1
+ 8000e98: ea40 000c orrcs.w r0, r0, ip
+ 8000e9c: ebb3 0f51 cmp.w r3, r1, lsr #1
+ 8000ea0: bf24 itt cs
+ 8000ea2: eba3 0351 subcs.w r3, r3, r1, lsr #1
+ 8000ea6: ea40 005c orrcs.w r0, r0, ip, lsr #1
+ 8000eaa: ebb3 0f91 cmp.w r3, r1, lsr #2
+ 8000eae: bf24 itt cs
+ 8000eb0: eba3 0391 subcs.w r3, r3, r1, lsr #2
+ 8000eb4: ea40 009c orrcs.w r0, r0, ip, lsr #2
+ 8000eb8: ebb3 0fd1 cmp.w r3, r1, lsr #3
+ 8000ebc: bf24 itt cs
+ 8000ebe: eba3 03d1 subcs.w r3, r3, r1, lsr #3
+ 8000ec2: ea40 00dc orrcs.w r0, r0, ip, lsr #3
+ 8000ec6: 011b lsls r3, r3, #4
+ 8000ec8: bf18 it ne
+ 8000eca: ea5f 1c1c movsne.w ip, ip, lsr #4
+ 8000ece: d1e0 bne.n 8000e92 <__aeabi_fdiv+0x46>
+ 8000ed0: 2afd cmp r2, #253 ; 0xfd
+ 8000ed2: f63f af50 bhi.w 8000d76 <__aeabi_fmul+0x92>
+ 8000ed6: 428b cmp r3, r1
+ 8000ed8: eb40 50c2 adc.w r0, r0, r2, lsl #23
+ 8000edc: bf08 it eq
+ 8000ede: f020 0001 biceq.w r0, r0, #1
+ 8000ee2: 4770 bx lr
+ 8000ee4: f00c 4c00 and.w ip, ip, #2147483648 ; 0x80000000
+ 8000ee8: ea4c 2050 orr.w r0, ip, r0, lsr #9
+ 8000eec: 327f adds r2, #127 ; 0x7f
+ 8000eee: bfc2 ittt gt
+ 8000ef0: f1d2 03ff rsbsgt r3, r2, #255 ; 0xff
+ 8000ef4: ea40 50c2 orrgt.w r0, r0, r2, lsl #23
+ 8000ef8: 4770 bxgt lr
+ 8000efa: f440 0000 orr.w r0, r0, #8388608 ; 0x800000
+ 8000efe: f04f 0300 mov.w r3, #0
+ 8000f02: 3a01 subs r2, #1
+ 8000f04: e737 b.n 8000d76 <__aeabi_fmul+0x92>
+ 8000f06: f092 0f00 teq r2, #0
+ 8000f0a: f000 4c00 and.w ip, r0, #2147483648 ; 0x80000000
+ 8000f0e: bf02 ittt eq
+ 8000f10: 0040 lsleq r0, r0, #1
+ 8000f12: f410 0f00 tsteq.w r0, #8388608 ; 0x800000
+ 8000f16: 3a01 subeq r2, #1
+ 8000f18: d0f9 beq.n 8000f0e <__aeabi_fdiv+0xc2>
+ 8000f1a: ea40 000c orr.w r0, r0, ip
+ 8000f1e: f093 0f00 teq r3, #0
+ 8000f22: f001 4c00 and.w ip, r1, #2147483648 ; 0x80000000
+ 8000f26: bf02 ittt eq
+ 8000f28: 0049 lsleq r1, r1, #1
+ 8000f2a: f411 0f00 tsteq.w r1, #8388608 ; 0x800000
+ 8000f2e: 3b01 subeq r3, #1
+ 8000f30: d0f9 beq.n 8000f26 <__aeabi_fdiv+0xda>
+ 8000f32: ea41 010c orr.w r1, r1, ip
+ 8000f36: e795 b.n 8000e64 <__aeabi_fdiv+0x18>
+ 8000f38: ea0c 53d1 and.w r3, ip, r1, lsr #23
+ 8000f3c: ea92 0f0c teq r2, ip
+ 8000f40: d108 bne.n 8000f54 <__aeabi_fdiv+0x108>
+ 8000f42: 0242 lsls r2, r0, #9
+ 8000f44: f47f af7d bne.w 8000e42 <__aeabi_fmul+0x15e>
+ 8000f48: ea93 0f0c teq r3, ip
+ 8000f4c: f47f af70 bne.w 8000e30 <__aeabi_fmul+0x14c>
+ 8000f50: 4608 mov r0, r1
+ 8000f52: e776 b.n 8000e42 <__aeabi_fmul+0x15e>
+ 8000f54: ea93 0f0c teq r3, ip
+ 8000f58: d104 bne.n 8000f64 <__aeabi_fdiv+0x118>
+ 8000f5a: 024b lsls r3, r1, #9
+ 8000f5c: f43f af4c beq.w 8000df8 <__aeabi_fmul+0x114>
+ 8000f60: 4608 mov r0, r1
+ 8000f62: e76e b.n 8000e42 <__aeabi_fmul+0x15e>
+ 8000f64: f030 4c00 bics.w ip, r0, #2147483648 ; 0x80000000
+ 8000f68: bf18 it ne
+ 8000f6a: f031 4c00 bicsne.w ip, r1, #2147483648 ; 0x80000000
+ 8000f6e: d1ca bne.n 8000f06 <__aeabi_fdiv+0xba>
+ 8000f70: f030 4200 bics.w r2, r0, #2147483648 ; 0x80000000
+ 8000f74: f47f af5c bne.w 8000e30 <__aeabi_fmul+0x14c>
+ 8000f78: f031 4300 bics.w r3, r1, #2147483648 ; 0x80000000
+ 8000f7c: f47f af3c bne.w 8000df8 <__aeabi_fmul+0x114>
+ 8000f80: e75f b.n 8000e42 <__aeabi_fmul+0x15e>
+ 8000f82: bf00 nop
+
+08000f84 <__gesf2>:
+ 8000f84: f04f 3cff mov.w ip, #4294967295
+ 8000f88: e006 b.n 8000f98 <__cmpsf2+0x4>
+ 8000f8a: bf00 nop
+
+08000f8c <__lesf2>:
+ 8000f8c: f04f 0c01 mov.w ip, #1
+ 8000f90: e002 b.n 8000f98 <__cmpsf2+0x4>
+ 8000f92: bf00 nop
+
+08000f94 <__cmpsf2>:
+ 8000f94: f04f 0c01 mov.w ip, #1
+ 8000f98: f84d cd04 str.w ip, [sp, #-4]!
+ 8000f9c: ea4f 0240 mov.w r2, r0, lsl #1
+ 8000fa0: ea4f 0341 mov.w r3, r1, lsl #1
+ 8000fa4: ea7f 6c22 mvns.w ip, r2, asr #24
+ 8000fa8: bf18 it ne
+ 8000faa: ea7f 6c23 mvnsne.w ip, r3, asr #24
+ 8000fae: d011 beq.n 8000fd4 <__cmpsf2+0x40>
+ 8000fb0: b001 add sp, #4
+ 8000fb2: ea52 0c53 orrs.w ip, r2, r3, lsr #1
+ 8000fb6: bf18 it ne
+ 8000fb8: ea90 0f01 teqne r0, r1
+ 8000fbc: bf58 it pl
+ 8000fbe: ebb2 0003 subspl.w r0, r2, r3
+ 8000fc2: bf88 it hi
+ 8000fc4: 17c8 asrhi r0, r1, #31
+ 8000fc6: bf38 it cc
+ 8000fc8: ea6f 70e1 mvncc.w r0, r1, asr #31
+ 8000fcc: bf18 it ne
+ 8000fce: f040 0001 orrne.w r0, r0, #1
+ 8000fd2: 4770 bx lr
+ 8000fd4: ea7f 6c22 mvns.w ip, r2, asr #24
+ 8000fd8: d102 bne.n 8000fe0 <__cmpsf2+0x4c>
+ 8000fda: ea5f 2c40 movs.w ip, r0, lsl #9
+ 8000fde: d105 bne.n 8000fec <__cmpsf2+0x58>
+ 8000fe0: ea7f 6c23 mvns.w ip, r3, asr #24
+ 8000fe4: d1e4 bne.n 8000fb0 <__cmpsf2+0x1c>
+ 8000fe6: ea5f 2c41 movs.w ip, r1, lsl #9
+ 8000fea: d0e1 beq.n 8000fb0 <__cmpsf2+0x1c>
+ 8000fec: f85d 0b04 ldr.w r0, [sp], #4
+ 8000ff0: 4770 bx lr
+ 8000ff2: bf00 nop
+
+08000ff4 <__aeabi_cfrcmple>:
+ 8000ff4: 4684 mov ip, r0
+ 8000ff6: 4608 mov r0, r1
+ 8000ff8: 4661 mov r1, ip
+ 8000ffa: e7ff b.n 8000ffc <__aeabi_cfcmpeq>
+
+08000ffc <__aeabi_cfcmpeq>:
+ 8000ffc: b50f push {r0, r1, r2, r3, lr}
+ 8000ffe: f7ff ffc9 bl 8000f94 <__cmpsf2>
+ 8001002: 2800 cmp r0, #0
+ 8001004: bf48 it mi
+ 8001006: f110 0f00 cmnmi.w r0, #0
+ 800100a: bd0f pop {r0, r1, r2, r3, pc}
+
+0800100c <__aeabi_fcmpeq>:
+ 800100c: f84d ed08 str.w lr, [sp, #-8]!
+ 8001010: f7ff fff4 bl 8000ffc <__aeabi_cfcmpeq>
+ 8001014: bf0c ite eq
+ 8001016: 2001 moveq r0, #1
+ 8001018: 2000 movne r0, #0
+ 800101a: f85d fb08 ldr.w pc, [sp], #8
+ 800101e: bf00 nop
+
+08001020 <__aeabi_fcmplt>:
+ 8001020: f84d ed08 str.w lr, [sp, #-8]!
+ 8001024: f7ff ffea bl 8000ffc <__aeabi_cfcmpeq>
+ 8001028: bf34 ite cc
+ 800102a: 2001 movcc r0, #1
+ 800102c: 2000 movcs r0, #0
+ 800102e: f85d fb08 ldr.w pc, [sp], #8
+ 8001032: bf00 nop
+
+08001034 <__aeabi_fcmple>:
+ 8001034: f84d ed08 str.w lr, [sp, #-8]!
+ 8001038: f7ff ffe0 bl 8000ffc <__aeabi_cfcmpeq>
+ 800103c: bf94 ite ls
+ 800103e: 2001 movls r0, #1
+ 8001040: 2000 movhi r0, #0
+ 8001042: f85d fb08 ldr.w pc, [sp], #8
+ 8001046: bf00 nop
+
+08001048 <__aeabi_fcmpge>:
+ 8001048: f84d ed08 str.w lr, [sp, #-8]!
+ 800104c: f7ff ffd2 bl 8000ff4 <__aeabi_cfrcmple>
+ 8001050: bf94 ite ls
+ 8001052: 2001 movls r0, #1
+ 8001054: 2000 movhi r0, #0
+ 8001056: f85d fb08 ldr.w pc, [sp], #8
+ 800105a: bf00 nop
+
+0800105c <__aeabi_fcmpgt>:
+ 800105c: f84d ed08 str.w lr, [sp, #-8]!
+ 8001060: f7ff ffc8 bl 8000ff4 <__aeabi_cfrcmple>
+ 8001064: bf34 ite cc
+ 8001066: 2001 movcc r0, #1
+ 8001068: 2000 movcs r0, #0
+ 800106a: f85d fb08 ldr.w pc, [sp], #8
+ 800106e: bf00 nop
+
+08001070 <__aeabi_f2iz>:
+ 8001070: ea4f 0240 mov.w r2, r0, lsl #1
+ 8001074: f1b2 4ffe cmp.w r2, #2130706432 ; 0x7f000000
+ 8001078: d30f bcc.n 800109a <__aeabi_f2iz+0x2a>
+ 800107a: f04f 039e mov.w r3, #158 ; 0x9e
+ 800107e: ebb3 6212 subs.w r2, r3, r2, lsr #24
+ 8001082: d90d bls.n 80010a0 <__aeabi_f2iz+0x30>
+ 8001084: ea4f 2300 mov.w r3, r0, lsl #8
+ 8001088: f043 4300 orr.w r3, r3, #2147483648 ; 0x80000000
+ 800108c: f010 4f00 tst.w r0, #2147483648 ; 0x80000000
+ 8001090: fa23 f002 lsr.w r0, r3, r2
+ 8001094: bf18 it ne
+ 8001096: 4240 negne r0, r0
+ 8001098: 4770 bx lr
+ 800109a: f04f 0000 mov.w r0, #0
+ 800109e: 4770 bx lr
+ 80010a0: f112 0f61 cmn.w r2, #97 ; 0x61
+ 80010a4: d101 bne.n 80010aa <__aeabi_f2iz+0x3a>
+ 80010a6: 0242 lsls r2, r0, #9
+ 80010a8: d105 bne.n 80010b6 <__aeabi_f2iz+0x46>
+ 80010aa: f010 4000 ands.w r0, r0, #2147483648 ; 0x80000000
+ 80010ae: bf08 it eq
+ 80010b0: f06f 4000 mvneq.w r0, #2147483648 ; 0x80000000
+ 80010b4: 4770 bx lr
+ 80010b6: f04f 0000 mov.w r0, #0
+ 80010ba: 4770 bx lr
+
+080010bc <__aeabi_f2uiz>:
+ 80010bc: 0042 lsls r2, r0, #1
+ 80010be: d20e bcs.n 80010de <__aeabi_f2uiz+0x22>
+ 80010c0: f1b2 4ffe cmp.w r2, #2130706432 ; 0x7f000000
+ 80010c4: d30b bcc.n 80010de <__aeabi_f2uiz+0x22>
+ 80010c6: f04f 039e mov.w r3, #158 ; 0x9e
+ 80010ca: ebb3 6212 subs.w r2, r3, r2, lsr #24
+ 80010ce: d409 bmi.n 80010e4 <__aeabi_f2uiz+0x28>
+ 80010d0: ea4f 2300 mov.w r3, r0, lsl #8
+ 80010d4: f043 4300 orr.w r3, r3, #2147483648 ; 0x80000000
+ 80010d8: fa23 f002 lsr.w r0, r3, r2
+ 80010dc: 4770 bx lr
+ 80010de: f04f 0000 mov.w r0, #0
+ 80010e2: 4770 bx lr
+ 80010e4: f112 0f61 cmn.w r2, #97 ; 0x61
+ 80010e8: d101 bne.n 80010ee <__aeabi_f2uiz+0x32>
+ 80010ea: 0242 lsls r2, r0, #9
+ 80010ec: d102 bne.n 80010f4 <__aeabi_f2uiz+0x38>
+ 80010ee: f04f 30ff mov.w r0, #4294967295
+ 80010f2: 4770 bx lr
+ 80010f4: f04f 0000 mov.w r0, #0
+ 80010f8: 4770 bx lr
+ 80010fa: bf00 nop
+
+080010fc <__aeabi_ldivmod>:
+ 80010fc: b97b cbnz r3, 800111e <__aeabi_ldivmod+0x22>
+ 80010fe: b972 cbnz r2, 800111e <__aeabi_ldivmod+0x22>
+ 8001100: 2900 cmp r1, #0
+ 8001102: bfbe ittt lt
+ 8001104: 2000 movlt r0, #0
+ 8001106: f04f 4100 movlt.w r1, #2147483648 ; 0x80000000
+ 800110a: e006 blt.n 800111a <__aeabi_ldivmod+0x1e>
+ 800110c: bf08 it eq
+ 800110e: 2800 cmpeq r0, #0
+ 8001110: bf1c itt ne
+ 8001112: f06f 4100 mvnne.w r1, #2147483648 ; 0x80000000
+ 8001116: f04f 30ff movne.w r0, #4294967295
+ 800111a: f000 b9a9 b.w 8001470 <__aeabi_idiv0>
+ 800111e: f1ad 0c08 sub.w ip, sp, #8
+ 8001122: e96d ce04 strd ip, lr, [sp, #-16]!
+ 8001126: 2900 cmp r1, #0
+ 8001128: db09 blt.n 800113e <__aeabi_ldivmod+0x42>
+ 800112a: 2b00 cmp r3, #0
+ 800112c: db1a blt.n 8001164 <__aeabi_ldivmod+0x68>
+ 800112e: f000 f835 bl 800119c <__udivmoddi4>
+ 8001132: f8dd e004 ldr.w lr, [sp, #4]
+ 8001136: e9dd 2302 ldrd r2, r3, [sp, #8]
+ 800113a: b004 add sp, #16
+ 800113c: 4770 bx lr
+ 800113e: 4240 negs r0, r0
+ 8001140: eb61 0141 sbc.w r1, r1, r1, lsl #1
+ 8001144: 2b00 cmp r3, #0
+ 8001146: db1b blt.n 8001180 <__aeabi_ldivmod+0x84>
+ 8001148: f000 f828 bl 800119c <__udivmoddi4>
+ 800114c: f8dd e004 ldr.w lr, [sp, #4]
+ 8001150: e9dd 2302 ldrd r2, r3, [sp, #8]
+ 8001154: b004 add sp, #16
+ 8001156: 4240 negs r0, r0
+ 8001158: eb61 0141 sbc.w r1, r1, r1, lsl #1
+ 800115c: 4252 negs r2, r2
+ 800115e: eb63 0343 sbc.w r3, r3, r3, lsl #1
+ 8001162: 4770 bx lr
+ 8001164: 4252 negs r2, r2
+ 8001166: eb63 0343 sbc.w r3, r3, r3, lsl #1
+ 800116a: f000 f817 bl 800119c <__udivmoddi4>
+ 800116e: f8dd e004 ldr.w lr, [sp, #4]
+ 8001172: e9dd 2302 ldrd r2, r3, [sp, #8]
+ 8001176: b004 add sp, #16
+ 8001178: 4240 negs r0, r0
+ 800117a: eb61 0141 sbc.w r1, r1, r1, lsl #1
+ 800117e: 4770 bx lr
+ 8001180: 4252 negs r2, r2
+ 8001182: eb63 0343 sbc.w r3, r3, r3, lsl #1
+ 8001186: f000 f809 bl 800119c <__udivmoddi4>
+ 800118a: f8dd e004 ldr.w lr, [sp, #4]
+ 800118e: e9dd 2302 ldrd r2, r3, [sp, #8]
+ 8001192: b004 add sp, #16
+ 8001194: 4252 negs r2, r2
+ 8001196: eb63 0343 sbc.w r3, r3, r3, lsl #1
+ 800119a: 4770 bx lr
+
+0800119c <__udivmoddi4>:
+ 800119c: e92d 47f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, lr}
+ 80011a0: 9e08 ldr r6, [sp, #32]
+ 80011a2: 460d mov r5, r1
+ 80011a4: 4604 mov r4, r0
+ 80011a6: 4688 mov r8, r1
+ 80011a8: 2b00 cmp r3, #0
+ 80011aa: d14d bne.n 8001248 <__udivmoddi4+0xac>
+ 80011ac: 428a cmp r2, r1
+ 80011ae: 4694 mov ip, r2
+ 80011b0: d968 bls.n 8001284 <__udivmoddi4+0xe8>
+ 80011b2: fab2 f282 clz r2, r2
+ 80011b6: b152 cbz r2, 80011ce <__udivmoddi4+0x32>
+ 80011b8: fa01 f302 lsl.w r3, r1, r2
+ 80011bc: f1c2 0120 rsb r1, r2, #32
+ 80011c0: fa20 f101 lsr.w r1, r0, r1
+ 80011c4: fa0c fc02 lsl.w ip, ip, r2
+ 80011c8: ea41 0803 orr.w r8, r1, r3
+ 80011cc: 4094 lsls r4, r2
+ 80011ce: ea4f 411c mov.w r1, ip, lsr #16
+ 80011d2: fbb8 f7f1 udiv r7, r8, r1
+ 80011d6: fa1f fe8c uxth.w lr, ip
+ 80011da: fb01 8817 mls r8, r1, r7, r8
+ 80011de: fb07 f00e mul.w r0, r7, lr
+ 80011e2: 0c23 lsrs r3, r4, #16
+ 80011e4: ea43 4308 orr.w r3, r3, r8, lsl #16
+ 80011e8: 4298 cmp r0, r3
+ 80011ea: d90a bls.n 8001202 <__udivmoddi4+0x66>
+ 80011ec: eb1c 0303 adds.w r3, ip, r3
+ 80011f0: f107 35ff add.w r5, r7, #4294967295
+ 80011f4: f080 811e bcs.w 8001434 <__udivmoddi4+0x298>
+ 80011f8: 4298 cmp r0, r3
+ 80011fa: f240 811b bls.w 8001434 <__udivmoddi4+0x298>
+ 80011fe: 3f02 subs r7, #2
+ 8001200: 4463 add r3, ip
+ 8001202: 1a1b subs r3, r3, r0
+ 8001204: fbb3 f0f1 udiv r0, r3, r1
+ 8001208: fb01 3310 mls r3, r1, r0, r3
+ 800120c: fb00 fe0e mul.w lr, r0, lr
+ 8001210: b2a4 uxth r4, r4
+ 8001212: ea44 4403 orr.w r4, r4, r3, lsl #16
+ 8001216: 45a6 cmp lr, r4
+ 8001218: d90a bls.n 8001230 <__udivmoddi4+0x94>
+ 800121a: eb1c 0404 adds.w r4, ip, r4
+ 800121e: f100 33ff add.w r3, r0, #4294967295
+ 8001222: f080 8109 bcs.w 8001438 <__udivmoddi4+0x29c>
+ 8001226: 45a6 cmp lr, r4
+ 8001228: f240 8106 bls.w 8001438 <__udivmoddi4+0x29c>
+ 800122c: 4464 add r4, ip
+ 800122e: 3802 subs r0, #2
+ 8001230: 2100 movs r1, #0
+ 8001232: eba4 040e sub.w r4, r4, lr
+ 8001236: ea40 4007 orr.w r0, r0, r7, lsl #16
+ 800123a: b11e cbz r6, 8001244 <__udivmoddi4+0xa8>
+ 800123c: 2300 movs r3, #0
+ 800123e: 40d4 lsrs r4, r2
+ 8001240: e9c6 4300 strd r4, r3, [r6]
+ 8001244: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc}
+ 8001248: 428b cmp r3, r1
+ 800124a: d908 bls.n 800125e <__udivmoddi4+0xc2>
+ 800124c: 2e00 cmp r6, #0
+ 800124e: f000 80ee beq.w 800142e <__udivmoddi4+0x292>
+ 8001252: 2100 movs r1, #0
+ 8001254: e9c6 0500 strd r0, r5, [r6]
+ 8001258: 4608 mov r0, r1
+ 800125a: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc}
+ 800125e: fab3 f183 clz r1, r3
+ 8001262: 2900 cmp r1, #0
+ 8001264: d14a bne.n 80012fc <__udivmoddi4+0x160>
+ 8001266: 42ab cmp r3, r5
+ 8001268: d302 bcc.n 8001270 <__udivmoddi4+0xd4>
+ 800126a: 4282 cmp r2, r0
+ 800126c: f200 80fc bhi.w 8001468 <__udivmoddi4+0x2cc>
+ 8001270: 1a84 subs r4, r0, r2
+ 8001272: eb65 0303 sbc.w r3, r5, r3
+ 8001276: 2001 movs r0, #1
+ 8001278: 4698 mov r8, r3
+ 800127a: 2e00 cmp r6, #0
+ 800127c: d0e2 beq.n 8001244 <__udivmoddi4+0xa8>
+ 800127e: e9c6 4800 strd r4, r8, [r6]
+ 8001282: e7df b.n 8001244 <__udivmoddi4+0xa8>
+ 8001284: b902 cbnz r2, 8001288 <__udivmoddi4+0xec>
+ 8001286: deff udf #255 ; 0xff
+ 8001288: fab2 f282 clz r2, r2
+ 800128c: 2a00 cmp r2, #0
+ 800128e: f040 8091 bne.w 80013b4 <__udivmoddi4+0x218>
+ 8001292: eba1 000c sub.w r0, r1, ip
+ 8001296: 2101 movs r1, #1
+ 8001298: ea4f 471c mov.w r7, ip, lsr #16
+ 800129c: fa1f fe8c uxth.w lr, ip
+ 80012a0: fbb0 f3f7 udiv r3, r0, r7
+ 80012a4: fb07 0013 mls r0, r7, r3, r0
+ 80012a8: 0c25 lsrs r5, r4, #16
+ 80012aa: ea45 4500 orr.w r5, r5, r0, lsl #16
+ 80012ae: fb0e f003 mul.w r0, lr, r3
+ 80012b2: 42a8 cmp r0, r5
+ 80012b4: d908 bls.n 80012c8 <__udivmoddi4+0x12c>
+ 80012b6: eb1c 0505 adds.w r5, ip, r5
+ 80012ba: f103 38ff add.w r8, r3, #4294967295
+ 80012be: d202 bcs.n 80012c6 <__udivmoddi4+0x12a>
+ 80012c0: 42a8 cmp r0, r5
+ 80012c2: f200 80ce bhi.w 8001462 <__udivmoddi4+0x2c6>
+ 80012c6: 4643 mov r3, r8
+ 80012c8: 1a2d subs r5, r5, r0
+ 80012ca: fbb5 f0f7 udiv r0, r5, r7
+ 80012ce: fb07 5510 mls r5, r7, r0, r5
+ 80012d2: fb0e fe00 mul.w lr, lr, r0
+ 80012d6: b2a4 uxth r4, r4
+ 80012d8: ea44 4405 orr.w r4, r4, r5, lsl #16
+ 80012dc: 45a6 cmp lr, r4
+ 80012de: d908 bls.n 80012f2 <__udivmoddi4+0x156>
+ 80012e0: eb1c 0404 adds.w r4, ip, r4
+ 80012e4: f100 35ff add.w r5, r0, #4294967295
+ 80012e8: d202 bcs.n 80012f0 <__udivmoddi4+0x154>
+ 80012ea: 45a6 cmp lr, r4
+ 80012ec: f200 80b6 bhi.w 800145c <__udivmoddi4+0x2c0>
+ 80012f0: 4628 mov r0, r5
+ 80012f2: eba4 040e sub.w r4, r4, lr
+ 80012f6: ea40 4003 orr.w r0, r0, r3, lsl #16
+ 80012fa: e79e b.n 800123a <__udivmoddi4+0x9e>
+ 80012fc: f1c1 0720 rsb r7, r1, #32
+ 8001300: 408b lsls r3, r1
+ 8001302: fa22 fc07 lsr.w ip, r2, r7
+ 8001306: ea4c 0c03 orr.w ip, ip, r3
+ 800130a: fa25 fa07 lsr.w sl, r5, r7
+ 800130e: ea4f 491c mov.w r9, ip, lsr #16
+ 8001312: fbba f8f9 udiv r8, sl, r9
+ 8001316: fa20 f307 lsr.w r3, r0, r7
+ 800131a: fb09 aa18 mls sl, r9, r8, sl
+ 800131e: 408d lsls r5, r1
+ 8001320: fa1f fe8c uxth.w lr, ip
+ 8001324: 431d orrs r5, r3
+ 8001326: fa00 f301 lsl.w r3, r0, r1
+ 800132a: fb08 f00e mul.w r0, r8, lr
+ 800132e: 0c2c lsrs r4, r5, #16
+ 8001330: ea44 440a orr.w r4, r4, sl, lsl #16
+ 8001334: 42a0 cmp r0, r4
+ 8001336: fa02 f201 lsl.w r2, r2, r1
+ 800133a: d90b bls.n 8001354 <__udivmoddi4+0x1b8>
+ 800133c: eb1c 0404 adds.w r4, ip, r4
+ 8001340: f108 3aff add.w sl, r8, #4294967295
+ 8001344: f080 8088 bcs.w 8001458 <__udivmoddi4+0x2bc>
+ 8001348: 42a0 cmp r0, r4
+ 800134a: f240 8085 bls.w 8001458 <__udivmoddi4+0x2bc>
+ 800134e: f1a8 0802 sub.w r8, r8, #2
+ 8001352: 4464 add r4, ip
+ 8001354: 1a24 subs r4, r4, r0
+ 8001356: fbb4 f0f9 udiv r0, r4, r9
+ 800135a: fb09 4410 mls r4, r9, r0, r4
+ 800135e: fb00 fe0e mul.w lr, r0, lr
+ 8001362: b2ad uxth r5, r5
+ 8001364: ea45 4404 orr.w r4, r5, r4, lsl #16
+ 8001368: 45a6 cmp lr, r4
+ 800136a: d908 bls.n 800137e <__udivmoddi4+0x1e2>
+ 800136c: eb1c 0404 adds.w r4, ip, r4
+ 8001370: f100 35ff add.w r5, r0, #4294967295
+ 8001374: d26c bcs.n 8001450 <__udivmoddi4+0x2b4>
+ 8001376: 45a6 cmp lr, r4
+ 8001378: d96a bls.n 8001450 <__udivmoddi4+0x2b4>
+ 800137a: 3802 subs r0, #2
+ 800137c: 4464 add r4, ip
+ 800137e: ea40 4008 orr.w r0, r0, r8, lsl #16
+ 8001382: fba0 9502 umull r9, r5, r0, r2
+ 8001386: eba4 040e sub.w r4, r4, lr
+ 800138a: 42ac cmp r4, r5
+ 800138c: 46c8 mov r8, r9
+ 800138e: 46ae mov lr, r5
+ 8001390: d356 bcc.n 8001440 <__udivmoddi4+0x2a4>
+ 8001392: d053 beq.n 800143c <__udivmoddi4+0x2a0>
+ 8001394: 2e00 cmp r6, #0
+ 8001396: d069 beq.n 800146c <__udivmoddi4+0x2d0>
+ 8001398: ebb3 0208 subs.w r2, r3, r8
+ 800139c: eb64 040e sbc.w r4, r4, lr
+ 80013a0: fa22 f301 lsr.w r3, r2, r1
+ 80013a4: fa04 f707 lsl.w r7, r4, r7
+ 80013a8: 431f orrs r7, r3
+ 80013aa: 40cc lsrs r4, r1
+ 80013ac: e9c6 7400 strd r7, r4, [r6]
+ 80013b0: 2100 movs r1, #0
+ 80013b2: e747 b.n 8001244 <__udivmoddi4+0xa8>
+ 80013b4: fa0c fc02 lsl.w ip, ip, r2
+ 80013b8: f1c2 0120 rsb r1, r2, #32
+ 80013bc: fa25 f301 lsr.w r3, r5, r1
+ 80013c0: ea4f 471c mov.w r7, ip, lsr #16
+ 80013c4: fa20 f101 lsr.w r1, r0, r1
+ 80013c8: 4095 lsls r5, r2
+ 80013ca: 430d orrs r5, r1
+ 80013cc: fbb3 f1f7 udiv r1, r3, r7
+ 80013d0: fb07 3311 mls r3, r7, r1, r3
+ 80013d4: fa1f fe8c uxth.w lr, ip
+ 80013d8: 0c28 lsrs r0, r5, #16
+ 80013da: ea40 4003 orr.w r0, r0, r3, lsl #16
+ 80013de: fb01 f30e mul.w r3, r1, lr
+ 80013e2: 4283 cmp r3, r0
+ 80013e4: fa04 f402 lsl.w r4, r4, r2
+ 80013e8: d908 bls.n 80013fc <__udivmoddi4+0x260>
+ 80013ea: eb1c 0000 adds.w r0, ip, r0
+ 80013ee: f101 38ff add.w r8, r1, #4294967295
+ 80013f2: d22f bcs.n 8001454 <__udivmoddi4+0x2b8>
+ 80013f4: 4283 cmp r3, r0
+ 80013f6: d92d bls.n 8001454 <__udivmoddi4+0x2b8>
+ 80013f8: 3902 subs r1, #2
+ 80013fa: 4460 add r0, ip
+ 80013fc: 1ac0 subs r0, r0, r3
+ 80013fe: fbb0 f3f7 udiv r3, r0, r7
+ 8001402: fb07 0013 mls r0, r7, r3, r0
+ 8001406: b2ad uxth r5, r5
+ 8001408: ea45 4500 orr.w r5, r5, r0, lsl #16
+ 800140c: fb03 f00e mul.w r0, r3, lr
+ 8001410: 42a8 cmp r0, r5
+ 8001412: d908 bls.n 8001426 <__udivmoddi4+0x28a>
+ 8001414: eb1c 0505 adds.w r5, ip, r5
+ 8001418: f103 38ff add.w r8, r3, #4294967295
+ 800141c: d216 bcs.n 800144c <__udivmoddi4+0x2b0>
+ 800141e: 42a8 cmp r0, r5
+ 8001420: d914 bls.n 800144c <__udivmoddi4+0x2b0>
+ 8001422: 3b02 subs r3, #2
+ 8001424: 4465 add r5, ip
+ 8001426: 1a28 subs r0, r5, r0
+ 8001428: ea43 4101 orr.w r1, r3, r1, lsl #16
+ 800142c: e738 b.n 80012a0 <__udivmoddi4+0x104>
+ 800142e: 4631 mov r1, r6
+ 8001430: 4630 mov r0, r6
+ 8001432: e707 b.n 8001244 <__udivmoddi4+0xa8>
+ 8001434: 462f mov r7, r5
+ 8001436: e6e4 b.n 8001202 <__udivmoddi4+0x66>
+ 8001438: 4618 mov r0, r3
+ 800143a: e6f9 b.n 8001230 <__udivmoddi4+0x94>
+ 800143c: 454b cmp r3, r9
+ 800143e: d2a9 bcs.n 8001394 <__udivmoddi4+0x1f8>
+ 8001440: ebb9 0802 subs.w r8, r9, r2
+ 8001444: eb65 0e0c sbc.w lr, r5, ip
+ 8001448: 3801 subs r0, #1
+ 800144a: e7a3 b.n 8001394 <__udivmoddi4+0x1f8>
+ 800144c: 4643 mov r3, r8
+ 800144e: e7ea b.n 8001426 <__udivmoddi4+0x28a>
+ 8001450: 4628 mov r0, r5
+ 8001452: e794 b.n 800137e <__udivmoddi4+0x1e2>
+ 8001454: 4641 mov r1, r8
+ 8001456: e7d1 b.n 80013fc <__udivmoddi4+0x260>
+ 8001458: 46d0 mov r8, sl
+ 800145a: e77b b.n 8001354 <__udivmoddi4+0x1b8>
+ 800145c: 4464 add r4, ip
+ 800145e: 3802 subs r0, #2
+ 8001460: e747 b.n 80012f2 <__udivmoddi4+0x156>
+ 8001462: 3b02 subs r3, #2
+ 8001464: 4465 add r5, ip
+ 8001466: e72f b.n 80012c8 <__udivmoddi4+0x12c>
+ 8001468: 4608 mov r0, r1
+ 800146a: e706 b.n 800127a <__udivmoddi4+0xde>
+ 800146c: 4631 mov r1, r6
+ 800146e: e6e9 b.n 8001244 <__udivmoddi4+0xa8>
+
+08001470 <__aeabi_idiv0>:
+ 8001470: 4770 bx lr
+ 8001472: bf00 nop
+
+08001474 :
+* 形 参:无
+* 返 回 值: 无
+*********************************************************************************************************
+*/
+static void IIC_Delay(void)
+{
+ 8001474: b480 push {r7}
+ 8001476: b083 sub sp, #12
+ 8001478: af00 add r7, sp, #0
+ 循环次数为7时,SCL频率 = 347KHz, SCL高电平时间1.5us,SCL低电平时间2.87us
+ 循环次数为5时,SCL频率 = 421KHz, SCL高电平时间1.25us,SCL低电平时间2.375us
+
+ IAR工程编译效率高,不能设置为7
+ */
+ for (i = 0; i < 10; i++)
+ 800147a: 2300 movs r3, #0
+ 800147c: 71fb strb r3, [r7, #7]
+ 800147e: e002 b.n 8001486
+ 8001480: 79fb ldrb r3, [r7, #7]
+ 8001482: 3301 adds r3, #1
+ 8001484: 71fb strb r3, [r7, #7]
+ 8001486: 79fb ldrb r3, [r7, #7]
+ 8001488: 2b09 cmp r3, #9
+ 800148a: d9f9 bls.n 8001480
+ ;
+}
+ 800148c: bf00 nop
+ 800148e: bf00 nop
+ 8001490: 370c adds r7, #12
+ 8001492: 46bd mov sp, r7
+ 8001494: bc80 pop {r7}
+ 8001496: 4770 bx lr
+
+08001498 :
+* 形 参:无
+* 返 回 值: 无
+*********************************************************************************************************
+*/
+void IIC_Start(void)
+{
+ 8001498: b580 push {r7, lr}
+ 800149a: af00 add r7, sp, #0
+ /* 当SCL高电平时,SDA出现一个下跳沿表示IIC总线启动信号 */
+ IIC_SDA_1();
+ 800149c: 2201 movs r2, #1
+ 800149e: f44f 7100 mov.w r1, #512 ; 0x200
+ 80014a2: 480e ldr r0, [pc, #56] ; (80014dc )
+ 80014a4: f004 fdd1 bl 800604a
+ IIC_SCL_1();
+ 80014a8: 2201 movs r2, #1
+ 80014aa: f44f 7180 mov.w r1, #256 ; 0x100
+ 80014ae: 480b ldr r0, [pc, #44] ; (80014dc )
+ 80014b0: f004 fdcb bl 800604a
+ IIC_Delay();
+ 80014b4: f7ff ffde bl 8001474
+ IIC_SDA_0();
+ 80014b8: 2200 movs r2, #0
+ 80014ba: f44f 7100 mov.w r1, #512 ; 0x200
+ 80014be: 4807 ldr r0, [pc, #28] ; (80014dc )
+ 80014c0: f004 fdc3 bl 800604a
+ IIC_Delay();
+ 80014c4: f7ff ffd6 bl 8001474
+ IIC_SCL_0();
+ 80014c8: 2200 movs r2, #0
+ 80014ca: f44f 7180 mov.w r1, #256 ; 0x100
+ 80014ce: 4803 ldr r0, [pc, #12] ; (80014dc )
+ 80014d0: f004 fdbb bl 800604a
+ IIC_Delay();
+ 80014d4: f7ff ffce bl 8001474
+}
+ 80014d8: bf00 nop
+ 80014da: bd80 pop {r7, pc}
+ 80014dc: 40010c00 .word 0x40010c00
+
+080014e0 :
+* 形 参:无
+* 返 回 值: 无
+*********************************************************************************************************
+*/
+void IIC_Stop(void)
+{
+ 80014e0: b580 push {r7, lr}
+ 80014e2: af00 add r7, sp, #0
+ /* 当SCL高电平时,SDA出现一个上跳沿表示IIC总线停止信号 */
+ IIC_SDA_0();
+ 80014e4: 2200 movs r2, #0
+ 80014e6: f44f 7100 mov.w r1, #512 ; 0x200
+ 80014ea: 4809 ldr r0, [pc, #36] ; (8001510 )
+ 80014ec: f004 fdad bl 800604a
+ IIC_SCL_1();
+ 80014f0: 2201 movs r2, #1
+ 80014f2: f44f 7180 mov.w r1, #256 ; 0x100
+ 80014f6: 4806 ldr r0, [pc, #24] ; (8001510 )
+ 80014f8: f004 fda7 bl 800604a
+ IIC_Delay();
+ 80014fc: f7ff ffba bl 8001474
+ IIC_SDA_1();
+ 8001500: 2201 movs r2, #1
+ 8001502: f44f 7100 mov.w r1, #512 ; 0x200
+ 8001506: 4802 ldr r0, [pc, #8] ; (8001510 )
+ 8001508: f004 fd9f bl 800604a
+}
+ 800150c: bf00 nop
+ 800150e: bd80 pop {r7, pc}
+ 8001510: 40010c00 .word 0x40010c00
+
+08001514 :
+* 形 参:_ucByte : 等待发送的字节
+* 返 回 值: 无
+*********************************************************************************************************
+*/
+void IIC_Send_Byte(uint8_t _ucByte)
+{
+ 8001514: b580 push {r7, lr}
+ 8001516: b084 sub sp, #16
+ 8001518: af00 add r7, sp, #0
+ 800151a: 4603 mov r3, r0
+ 800151c: 71fb strb r3, [r7, #7]
+ uint8_t i;
+
+ /* 先发送字节的高位bit7 */
+ for (i = 0; i < 8; i++)
+ 800151e: 2300 movs r3, #0
+ 8001520: 73fb strb r3, [r7, #15]
+ 8001522: e031 b.n 8001588
+ {
+ if (_ucByte & 0x80)
+ 8001524: f997 3007 ldrsb.w r3, [r7, #7]
+ 8001528: 2b00 cmp r3, #0
+ 800152a: da06 bge.n 800153a
+ {
+ IIC_SDA_1();
+ 800152c: 2201 movs r2, #1
+ 800152e: f44f 7100 mov.w r1, #512 ; 0x200
+ 8001532: 4819 ldr r0, [pc, #100] ; (8001598 )
+ 8001534: f004 fd89 bl 800604a
+ 8001538: e005 b.n 8001546
+ }
+ else
+ {
+ IIC_SDA_0();
+ 800153a: 2200 movs r2, #0
+ 800153c: f44f 7100 mov.w r1, #512 ; 0x200
+ 8001540: 4815 ldr r0, [pc, #84] ; (8001598 )
+ 8001542: f004 fd82 bl 800604a
+ }
+ IIC_Delay();
+ 8001546: f7ff ff95 bl 8001474
+ IIC_SCL_1();
+ 800154a: 2201 movs r2, #1
+ 800154c: f44f 7180 mov.w r1, #256 ; 0x100
+ 8001550: 4811 ldr r0, [pc, #68] ; (8001598 )
+ 8001552: f004 fd7a bl 800604a
+ IIC_Delay();
+ 8001556: f7ff ff8d bl 8001474
+ IIC_SCL_0();
+ 800155a: 2200 movs r2, #0
+ 800155c: f44f 7180 mov.w r1, #256 ; 0x100
+ 8001560: 480d ldr r0, [pc, #52] ; (8001598 )
+ 8001562: f004 fd72 bl 800604a
+ if (i == 7)
+ 8001566: 7bfb ldrb r3, [r7, #15]
+ 8001568: 2b07 cmp r3, #7
+ 800156a: d105 bne.n 8001578
+ {
+ IIC_SDA_1(); // 释放总线
+ 800156c: 2201 movs r2, #1
+ 800156e: f44f 7100 mov.w r1, #512 ; 0x200
+ 8001572: 4809 ldr r0, [pc, #36] ; (8001598 )
+ 8001574: f004 fd69 bl 800604a
+ }
+ _ucByte <<= 1; /* 左移一个bit */
+ 8001578: 79fb ldrb r3, [r7, #7]
+ 800157a: 005b lsls r3, r3, #1
+ 800157c: 71fb strb r3, [r7, #7]
+ IIC_Delay();
+ 800157e: f7ff ff79 bl 8001474
+ for (i = 0; i < 8; i++)
+ 8001582: 7bfb ldrb r3, [r7, #15]
+ 8001584: 3301 adds r3, #1
+ 8001586: 73fb strb r3, [r7, #15]
+ 8001588: 7bfb ldrb r3, [r7, #15]
+ 800158a: 2b07 cmp r3, #7
+ 800158c: d9ca bls.n 8001524
+ }
+}
+ 800158e: bf00 nop
+ 8001590: bf00 nop
+ 8001592: 3710 adds r7, #16
+ 8001594: 46bd mov sp, r7
+ 8001596: bd80 pop {r7, pc}
+ 8001598: 40010c00 .word 0x40010c00
+
+0800159c :
+* 形 参:无
+* 返 回 值: 读到的数据
+*********************************************************************************************************
+*/
+uint8_t IIC_Read_Byte(uint8_t ack)
+{
+ 800159c: b580 push {r7, lr}
+ 800159e: b084 sub sp, #16
+ 80015a0: af00 add r7, sp, #0
+ 80015a2: 4603 mov r3, r0
+ 80015a4: 71fb strb r3, [r7, #7]
+ uint8_t i;
+ uint8_t value;
+
+ /* 读到第1个bit为数据的bit7 */
+ value = 0;
+ 80015a6: 2300 movs r3, #0
+ 80015a8: 73bb strb r3, [r7, #14]
+ for (i = 0; i < 8; i++)
+ 80015aa: 2300 movs r3, #0
+ 80015ac: 73fb strb r3, [r7, #15]
+ 80015ae: e020 b.n 80015f2
+ {
+ value <<= 1;
+ 80015b0: 7bbb ldrb r3, [r7, #14]
+ 80015b2: 005b lsls r3, r3, #1
+ 80015b4: 73bb strb r3, [r7, #14]
+ IIC_SCL_1();
+ 80015b6: 2201 movs r2, #1
+ 80015b8: f44f 7180 mov.w r1, #256 ; 0x100
+ 80015bc: 4815 ldr r0, [pc, #84] ; (8001614 )
+ 80015be: f004 fd44 bl 800604a
+ IIC_Delay();
+ 80015c2: f7ff ff57 bl 8001474
+ if (IIC_SDA_READ())
+ 80015c6: f44f 7100 mov.w r1, #512 ; 0x200
+ 80015ca: 4812 ldr r0, [pc, #72] ; (8001614 )
+ 80015cc: f004 fd26 bl 800601c
+ 80015d0: 4603 mov r3, r0
+ 80015d2: 2b00 cmp r3, #0
+ 80015d4: d002 beq.n 80015dc
+ {
+ value++;
+ 80015d6: 7bbb ldrb r3, [r7, #14]
+ 80015d8: 3301 adds r3, #1
+ 80015da: 73bb strb r3, [r7, #14]
+ }
+ IIC_SCL_0();
+ 80015dc: 2200 movs r2, #0
+ 80015de: f44f 7180 mov.w r1, #256 ; 0x100
+ 80015e2: 480c ldr r0, [pc, #48] ; (8001614 )
+ 80015e4: f004 fd31 bl 800604a
+ IIC_Delay();
+ 80015e8: f7ff ff44 bl 8001474
+ for (i = 0; i < 8; i++)
+ 80015ec: 7bfb ldrb r3, [r7, #15]
+ 80015ee: 3301 adds r3, #1
+ 80015f0: 73fb strb r3, [r7, #15]
+ 80015f2: 7bfb ldrb r3, [r7, #15]
+ 80015f4: 2b07 cmp r3, #7
+ 80015f6: d9db bls.n 80015b0
+ }
+ if (ack == 0)
+ 80015f8: 79fb ldrb r3, [r7, #7]
+ 80015fa: 2b00 cmp r3, #0
+ 80015fc: d102 bne.n 8001604
+ IIC_NAck();
+ 80015fe: f000 f85f bl 80016c0
+ 8001602: e001 b.n 8001608
+ else
+ IIC_Ack();
+ 8001604: f000 f838 bl 8001678
+ return value;
+ 8001608: 7bbb ldrb r3, [r7, #14]
+}
+ 800160a: 4618 mov r0, r3
+ 800160c: 3710 adds r7, #16
+ 800160e: 46bd mov sp, r7
+ 8001610: bd80 pop {r7, pc}
+ 8001612: bf00 nop
+ 8001614: 40010c00 .word 0x40010c00
+
+08001618 :
+* 形 参:无
+* 返 回 值: 返回0表示正确应答,1表示无器件响应
+*********************************************************************************************************
+*/
+uint8_t IIC_Wait_Ack(void)
+{
+ 8001618: b580 push {r7, lr}
+ 800161a: b082 sub sp, #8
+ 800161c: af00 add r7, sp, #0
+ uint8_t re;
+
+ IIC_SDA_1(); /* CPU释放SDA总线 */
+ 800161e: 2201 movs r2, #1
+ 8001620: f44f 7100 mov.w r1, #512 ; 0x200
+ 8001624: 4813 ldr r0, [pc, #76] ; (8001674 )
+ 8001626: f004 fd10 bl 800604a
+ IIC_Delay();
+ 800162a: f7ff ff23 bl 8001474
+ IIC_SCL_1(); /* CPU驱动SCL = 1, 此时器件会返回ACK应答 */
+ 800162e: 2201 movs r2, #1
+ 8001630: f44f 7180 mov.w r1, #256 ; 0x100
+ 8001634: 480f ldr r0, [pc, #60] ; (8001674 )
+ 8001636: f004 fd08 bl 800604a
+ IIC_Delay();
+ 800163a: f7ff ff1b bl 8001474
+ if (IIC_SDA_READ()) /* CPU读取SDA口线状态 */
+ 800163e: f44f 7100 mov.w r1, #512 ; 0x200
+ 8001642: 480c ldr r0, [pc, #48] ; (8001674 )
+ 8001644: f004 fcea bl 800601c
+ 8001648: 4603 mov r3, r0
+ 800164a: 2b00 cmp r3, #0
+ 800164c: d002 beq.n 8001654
+ {
+ re = 1;
+ 800164e: 2301 movs r3, #1
+ 8001650: 71fb strb r3, [r7, #7]
+ 8001652: e001 b.n 8001658
+ }
+ else
+ {
+ re = 0;
+ 8001654: 2300 movs r3, #0
+ 8001656: 71fb strb r3, [r7, #7]
+ }
+ IIC_SCL_0();
+ 8001658: 2200 movs r2, #0
+ 800165a: f44f 7180 mov.w r1, #256 ; 0x100
+ 800165e: 4805 ldr r0, [pc, #20] ; (8001674 )
+ 8001660: f004 fcf3 bl 800604a
+ IIC_Delay();
+ 8001664: f7ff ff06 bl 8001474
+ return re;
+ 8001668: 79fb ldrb r3, [r7, #7]
+}
+ 800166a: 4618 mov r0, r3
+ 800166c: 3708 adds r7, #8
+ 800166e: 46bd mov sp, r7
+ 8001670: bd80 pop {r7, pc}
+ 8001672: bf00 nop
+ 8001674: 40010c00 .word 0x40010c00
+
+08001678 :
+* 形 参:无
+* 返 回 值: 无
+*********************************************************************************************************
+*/
+void IIC_Ack(void)
+{
+ 8001678: b580 push {r7, lr}
+ 800167a: af00 add r7, sp, #0
+ IIC_SDA_0(); /* CPU驱动SDA = 0 */
+ 800167c: 2200 movs r2, #0
+ 800167e: f44f 7100 mov.w r1, #512 ; 0x200
+ 8001682: 480e ldr r0, [pc, #56] ; (80016bc )
+ 8001684: f004 fce1 bl 800604a
+ IIC_Delay();
+ 8001688: f7ff fef4 bl 8001474
+ IIC_SCL_1(); /* CPU产生1个时钟 */
+ 800168c: 2201 movs r2, #1
+ 800168e: f44f 7180 mov.w r1, #256 ; 0x100
+ 8001692: 480a ldr r0, [pc, #40] ; (80016bc )
+ 8001694: f004 fcd9 bl 800604a
+ IIC_Delay();
+ 8001698: f7ff feec bl 8001474
+ IIC_SCL_0();
+ 800169c: 2200 movs r2, #0
+ 800169e: f44f 7180 mov.w r1, #256 ; 0x100
+ 80016a2: 4806 ldr r0, [pc, #24] ; (80016bc )
+ 80016a4: f004 fcd1 bl 800604a
+ IIC_Delay();
+ 80016a8: f7ff fee4 bl 8001474
+ IIC_SDA_1(); /* CPU释放SDA总线 */
+ 80016ac: 2201 movs r2, #1
+ 80016ae: f44f 7100 mov.w r1, #512 ; 0x200
+ 80016b2: 4802 ldr r0, [pc, #8] ; (80016bc )
+ 80016b4: f004 fcc9 bl 800604a
+}
+ 80016b8: bf00 nop
+ 80016ba: bd80 pop {r7, pc}
+ 80016bc: 40010c00 .word 0x40010c00
+
+080016c0 :
+* 形 参:无
+* 返 回 值: 无
+*********************************************************************************************************
+*/
+void IIC_NAck(void)
+{
+ 80016c0: b580 push {r7, lr}
+ 80016c2: af00 add r7, sp, #0
+ IIC_SDA_1(); /* CPU驱动SDA = 1 */
+ 80016c4: 2201 movs r2, #1
+ 80016c6: f44f 7100 mov.w r1, #512 ; 0x200
+ 80016ca: 480b ldr r0, [pc, #44] ; (80016f8 )
+ 80016cc: f004 fcbd bl 800604a
+ IIC_Delay();
+ 80016d0: f7ff fed0 bl 8001474
+ IIC_SCL_1(); /* CPU产生1个时钟 */
+ 80016d4: 2201 movs r2, #1
+ 80016d6: f44f 7180 mov.w r1, #256 ; 0x100
+ 80016da: 4807 ldr r0, [pc, #28] ; (80016f8 )
+ 80016dc: f004 fcb5 bl 800604a
+ IIC_Delay();
+ 80016e0: f7ff fec8 bl 8001474
+ IIC_SCL_0();
+ 80016e4: 2200 movs r2, #0
+ 80016e6: f44f 7180 mov.w r1, #256 ; 0x100
+ 80016ea: 4803 ldr r0, [pc, #12] ; (80016f8 )
+ 80016ec: f004 fcad bl 800604a
+ IIC_Delay();
+ 80016f0: f7ff fec0 bl 8001474
+}
+ 80016f4: bf00 nop
+ 80016f6: bd80 pop {r7, pc}
+ 80016f8: 40010c00 .word 0x40010c00
+
+080016fc :
+* 形 参:无
+* 返 回 值: 无
+*********************************************************************************************************
+*/
+void IIC_GPIO_Init(void)
+{
+ 80016fc: b580 push {r7, lr}
+ 80016fe: b086 sub sp, #24
+ 8001700: af00 add r7, sp, #0
+ GPIO_InitTypeDef GPIO_InitStructure;
+
+ RCC_IIC_ENABLE; /* 打开GPIO时钟 */
+ 8001702: 4b1c ldr r3, [pc, #112] ; (8001774 )
+ 8001704: 699b ldr r3, [r3, #24]
+ 8001706: 4a1b ldr r2, [pc, #108] ; (8001774 )
+ 8001708: f043 0308 orr.w r3, r3, #8
+ 800170c: 6193 str r3, [r2, #24]
+ 800170e: 4b19 ldr r3, [pc, #100] ; (8001774 )
+ 8001710: 699b ldr r3, [r3, #24]
+ 8001712: f003 0308 and.w r3, r3, #8
+ 8001716: 607b str r3, [r7, #4]
+ 8001718: 687b ldr r3, [r7, #4]
+
+ GPIO_InitStructure.Pin = IIC_SDA_PIN;
+ 800171a: f44f 7300 mov.w r3, #512 ; 0x200
+ 800171e: 60bb str r3, [r7, #8]
+ GPIO_InitStructure.Speed = GPIO_SPEED_FREQ_HIGH;
+ 8001720: 2303 movs r3, #3
+ 8001722: 617b str r3, [r7, #20]
+ GPIO_InitStructure.Mode = GPIO_MODE_OUTPUT_OD; /* 开漏输出 */
+ 8001724: 2311 movs r3, #17
+ 8001726: 60fb str r3, [r7, #12]
+
+ HAL_GPIO_Init(GPIO_PORT_IIC, &GPIO_InitStructure);
+ 8001728: f107 0308 add.w r3, r7, #8
+ 800172c: 4619 mov r1, r3
+ 800172e: 4812 ldr r0, [pc, #72] ; (8001778 )
+ 8001730: f004 faf0 bl 8005d14
+
+ RCC_IIC_ENABLE; /* 打开GPIO时钟 */
+ 8001734: 4b0f ldr r3, [pc, #60] ; (8001774 )
+ 8001736: 699b ldr r3, [r3, #24]
+ 8001738: 4a0e ldr r2, [pc, #56] ; (8001774 )
+ 800173a: f043 0308 orr.w r3, r3, #8
+ 800173e: 6193 str r3, [r2, #24]
+ 8001740: 4b0c ldr r3, [pc, #48] ; (8001774 )
+ 8001742: 699b ldr r3, [r3, #24]
+ 8001744: f003 0308 and.w r3, r3, #8
+ 8001748: 603b str r3, [r7, #0]
+ 800174a: 683b ldr r3, [r7, #0]
+
+ GPIO_InitStructure.Pin = IIC_SCL_PIN;
+ 800174c: f44f 7380 mov.w r3, #256 ; 0x100
+ 8001750: 60bb str r3, [r7, #8]
+ GPIO_InitStructure.Speed = GPIO_SPEED_FREQ_HIGH;
+ 8001752: 2303 movs r3, #3
+ 8001754: 617b str r3, [r7, #20]
+ GPIO_InitStructure.Mode = GPIO_MODE_OUTPUT_PP; /* 推挽输出 */
+ 8001756: 2301 movs r3, #1
+ 8001758: 60fb str r3, [r7, #12]
+
+ HAL_GPIO_Init(GPIO_PORT_IIC, &GPIO_InitStructure);
+ 800175a: f107 0308 add.w r3, r7, #8
+ 800175e: 4619 mov r1, r3
+ 8001760: 4805 ldr r0, [pc, #20] ; (8001778 )
+ 8001762: f004 fad7 bl 8005d14
+
+ /* 给一个停止信号, 复位IIC总线上的所有设备到待机模式 */
+ IIC_Stop();
+ 8001766: f7ff febb bl 80014e0
+}
+ 800176a: bf00 nop
+ 800176c: 3718 adds r7, #24
+ 800176e: 46bd mov sp, r7
+ 8001770: bd80 pop {r7, pc}
+ 8001772: bf00 nop
+ 8001774: 40021000 .word 0x40021000
+ 8001778: 40010c00 .word 0x40010c00
+
+0800177c :
+ * Output
+ * EVENT_OUT
+ * EXTI
+*/
+void MX_GPIO_Init(void)
+{
+ 800177c: b580 push {r7, lr}
+ 800177e: b088 sub sp, #32
+ 8001780: af00 add r7, sp, #0
+
+ GPIO_InitTypeDef GPIO_InitStruct = {0};
+ 8001782: f107 0310 add.w r3, r7, #16
+ 8001786: 2200 movs r2, #0
+ 8001788: 601a str r2, [r3, #0]
+ 800178a: 605a str r2, [r3, #4]
+ 800178c: 609a str r2, [r3, #8]
+ 800178e: 60da str r2, [r3, #12]
+
+ /* GPIO Ports Clock Enable */
+ __HAL_RCC_GPIOC_CLK_ENABLE();
+ 8001790: 4b3c ldr r3, [pc, #240] ; (8001884 )
+ 8001792: 699b ldr r3, [r3, #24]
+ 8001794: 4a3b ldr r2, [pc, #236] ; (8001884 )
+ 8001796: f043 0310 orr.w r3, r3, #16
+ 800179a: 6193 str r3, [r2, #24]
+ 800179c: 4b39 ldr r3, [pc, #228] ; (8001884 )
+ 800179e: 699b ldr r3, [r3, #24]
+ 80017a0: f003 0310 and.w r3, r3, #16
+ 80017a4: 60fb str r3, [r7, #12]
+ 80017a6: 68fb ldr r3, [r7, #12]
+ __HAL_RCC_GPIOD_CLK_ENABLE();
+ 80017a8: 4b36 ldr r3, [pc, #216] ; (8001884 )
+ 80017aa: 699b ldr r3, [r3, #24]
+ 80017ac: 4a35 ldr r2, [pc, #212] ; (8001884 )
+ 80017ae: f043 0320 orr.w r3, r3, #32
+ 80017b2: 6193 str r3, [r2, #24]
+ 80017b4: 4b33 ldr r3, [pc, #204] ; (8001884 )
+ 80017b6: 699b ldr r3, [r3, #24]
+ 80017b8: f003 0320 and.w r3, r3, #32
+ 80017bc: 60bb str r3, [r7, #8]
+ 80017be: 68bb ldr r3, [r7, #8]
+ __HAL_RCC_GPIOA_CLK_ENABLE();
+ 80017c0: 4b30 ldr r3, [pc, #192] ; (8001884 )
+ 80017c2: 699b ldr r3, [r3, #24]
+ 80017c4: 4a2f ldr r2, [pc, #188] ; (8001884 )
+ 80017c6: f043 0304 orr.w r3, r3, #4
+ 80017ca: 6193 str r3, [r2, #24]
+ 80017cc: 4b2d ldr r3, [pc, #180] ; (8001884 )
+ 80017ce: 699b ldr r3, [r3, #24]
+ 80017d0: f003 0304 and.w r3, r3, #4
+ 80017d4: 607b str r3, [r7, #4]
+ 80017d6: 687b ldr r3, [r7, #4]
+ __HAL_RCC_GPIOB_CLK_ENABLE();
+ 80017d8: 4b2a ldr r3, [pc, #168] ; (8001884 )
+ 80017da: 699b ldr r3, [r3, #24]
+ 80017dc: 4a29 ldr r2, [pc, #164] ; (8001884 )
+ 80017de: f043 0308 orr.w r3, r3, #8
+ 80017e2: 6193 str r3, [r2, #24]
+ 80017e4: 4b27 ldr r3, [pc, #156] ; (8001884 )
+ 80017e6: 699b ldr r3, [r3, #24]
+ 80017e8: f003 0308 and.w r3, r3, #8
+ 80017ec: 603b str r3, [r7, #0]
+ 80017ee: 683b ldr r3, [r7, #0]
+
+ /*Configure GPIO pin Output Level */
+ HAL_GPIO_WritePin(GPIOA, GPIO_PIN_1|GPIO_PIN_7, GPIO_PIN_SET);
+ 80017f0: 2201 movs r2, #1
+ 80017f2: 2182 movs r1, #130 ; 0x82
+ 80017f4: 4824 ldr r0, [pc, #144] ; (8001888 )
+ 80017f6: f004 fc28 bl 800604a
+
+ /*Configure GPIO pin Output Level */
+ HAL_GPIO_WritePin(GPIOA, GPIO_PIN_5, GPIO_PIN_RESET);
+ 80017fa: 2200 movs r2, #0
+ 80017fc: 2120 movs r1, #32
+ 80017fe: 4822 ldr r0, [pc, #136] ; (8001888 )
+ 8001800: f004 fc23 bl 800604a
+
+ /*Configure GPIO pin Output Level */
+ HAL_GPIO_WritePin(GPIOB, GPIO_PIN_11|GPIO_PIN_8|GPIO_PIN_9, GPIO_PIN_SET);
+ 8001804: 2201 movs r2, #1
+ 8001806: f44f 6130 mov.w r1, #2816 ; 0xb00
+ 800180a: 4820 ldr r0, [pc, #128] ; (800188c )
+ 800180c: f004 fc1d bl 800604a
+
+ /*Configure GPIO pins : PA1 PA7 */
+ GPIO_InitStruct.Pin = GPIO_PIN_1|GPIO_PIN_7;
+ 8001810: 2382 movs r3, #130 ; 0x82
+ 8001812: 613b str r3, [r7, #16]
+ GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
+ 8001814: 2301 movs r3, #1
+ 8001816: 617b str r3, [r7, #20]
+ GPIO_InitStruct.Pull = GPIO_NOPULL;
+ 8001818: 2300 movs r3, #0
+ 800181a: 61bb str r3, [r7, #24]
+ GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH;
+ 800181c: 2303 movs r3, #3
+ 800181e: 61fb str r3, [r7, #28]
+ HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
+ 8001820: f107 0310 add.w r3, r7, #16
+ 8001824: 4619 mov r1, r3
+ 8001826: 4818 ldr r0, [pc, #96] ; (8001888 )
+ 8001828: f004 fa74 bl 8005d14
+
+ /*Configure GPIO pin : PA5 */
+ GPIO_InitStruct.Pin = GPIO_PIN_5;
+ 800182c: 2320 movs r3, #32
+ 800182e: 613b str r3, [r7, #16]
+ GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
+ 8001830: 2301 movs r3, #1
+ 8001832: 617b str r3, [r7, #20]
+ GPIO_InitStruct.Pull = GPIO_NOPULL;
+ 8001834: 2300 movs r3, #0
+ 8001836: 61bb str r3, [r7, #24]
+ GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
+ 8001838: 2302 movs r3, #2
+ 800183a: 61fb str r3, [r7, #28]
+ HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
+ 800183c: f107 0310 add.w r3, r7, #16
+ 8001840: 4619 mov r1, r3
+ 8001842: 4811 ldr r0, [pc, #68] ; (8001888 )
+ 8001844: f004 fa66 bl 8005d14
+
+ /*Configure GPIO pins : PB11 PB8 PB9 */
+ GPIO_InitStruct.Pin = GPIO_PIN_11|GPIO_PIN_8|GPIO_PIN_9;
+ 8001848: f44f 6330 mov.w r3, #2816 ; 0xb00
+ 800184c: 613b str r3, [r7, #16]
+ GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
+ 800184e: 2301 movs r3, #1
+ 8001850: 617b str r3, [r7, #20]
+ GPIO_InitStruct.Pull = GPIO_NOPULL;
+ 8001852: 2300 movs r3, #0
+ 8001854: 61bb str r3, [r7, #24]
+ GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH;
+ 8001856: 2303 movs r3, #3
+ 8001858: 61fb str r3, [r7, #28]
+ HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
+ 800185a: f107 0310 add.w r3, r7, #16
+ 800185e: 4619 mov r1, r3
+ 8001860: 480a ldr r0, [pc, #40] ; (800188c )
+ 8001862: f004 fa57 bl 8005d14
+
+ /*Configure GPIO pin : PB7 */
+ GPIO_InitStruct.Pin = GPIO_PIN_7;
+ 8001866: 2380 movs r3, #128 ; 0x80
+ 8001868: 613b str r3, [r7, #16]
+ GPIO_InitStruct.Mode = GPIO_MODE_ANALOG;
+ 800186a: 2303 movs r3, #3
+ 800186c: 617b str r3, [r7, #20]
+ HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
+ 800186e: f107 0310 add.w r3, r7, #16
+ 8001872: 4619 mov r1, r3
+ 8001874: 4805 ldr r0, [pc, #20] ; (800188c )
+ 8001876: f004 fa4d bl 8005d14
+
+}
+ 800187a: bf00 nop
+ 800187c: 3720 adds r7, #32
+ 800187e: 46bd mov sp, r7
+ 8001880: bd80 pop {r7, pc}
+ 8001882: bf00 nop
+ 8001884: 40021000 .word 0x40021000
+ 8001888: 40010800 .word 0x40010800
+ 800188c: 40010c00 .word 0x40010c00
+
+08001890 :
+ * interrupt is used.
+ * @param[in] enable 1 to enable interrupt.
+ * @return 0 if successful.
+ */
+static int set_int_enable(unsigned char enable)
+{
+ 8001890: b580 push {r7, lr}
+ 8001892: b084 sub sp, #16
+ 8001894: af00 add r7, sp, #0
+ 8001896: 4603 mov r3, r0
+ 8001898: 71fb strb r3, [r7, #7]
+ unsigned char tmp;
+
+ if (st.chip_cfg.dmp_on)
+ 800189a: 4b29 ldr r3, [pc, #164] ; (8001940 )
+ 800189c: f893 3024 ldrb.w r3, [r3, #36] ; 0x24
+ 80018a0: 2b00 cmp r3, #0
+ 80018a2: d01c beq.n 80018de
+ {
+ if (enable)
+ 80018a4: 79fb ldrb r3, [r7, #7]
+ 80018a6: 2b00 cmp r3, #0
+ 80018a8: d002 beq.n 80018b0
+ tmp = BIT_DMP_INT_EN;
+ 80018aa: 2302 movs r3, #2
+ 80018ac: 73fb strb r3, [r7, #15]
+ 80018ae: e001 b.n 80018b4
+ else
+ tmp = 0x00;
+ 80018b0: 2300 movs r3, #0
+ 80018b2: 73fb strb r3, [r7, #15]
+ if (i2c_write(st.hw->addr, st.reg->int_enable, 1, &tmp))
+ 80018b4: 4b22 ldr r3, [pc, #136] ; (8001940 )
+ 80018b6: 685b ldr r3, [r3, #4]
+ 80018b8: 7818 ldrb r0, [r3, #0]
+ 80018ba: 4b21 ldr r3, [pc, #132] ; (8001940 )
+ 80018bc: 681b ldr r3, [r3, #0]
+ 80018be: 7bd9 ldrb r1, [r3, #15]
+ 80018c0: f107 030f add.w r3, r7, #15
+ 80018c4: 2201 movs r2, #1
+ 80018c6: f003 fd63 bl 8005390
+ 80018ca: 4603 mov r3, r0
+ 80018cc: 2b00 cmp r3, #0
+ 80018ce: d002 beq.n 80018d6
+ return -1;
+ 80018d0: f04f 33ff mov.w r3, #4294967295
+ 80018d4: e030 b.n 8001938
+ st.chip_cfg.int_enable = tmp;
+ 80018d6: 7bfa ldrb r2, [r7, #15]
+ 80018d8: 4b19 ldr r3, [pc, #100] ; (8001940 )
+ 80018da: 745a strb r2, [r3, #17]
+ 80018dc: e02b b.n 8001936
+ }
+ else
+ {
+ if (!st.chip_cfg.sensors)
+ 80018de: 4b18 ldr r3, [pc, #96] ; (8001940 )
+ 80018e0: 7a9b ldrb r3, [r3, #10]
+ 80018e2: 2b00 cmp r3, #0
+ 80018e4: d102 bne.n 80018ec
+ return -1;
+ 80018e6: f04f 33ff mov.w r3, #4294967295
+ 80018ea: e025 b.n 8001938
+ if (enable && st.chip_cfg.int_enable)
+ 80018ec: 79fb ldrb r3, [r7, #7]
+ 80018ee: 2b00 cmp r3, #0
+ 80018f0: d005 beq.n 80018fe
+ 80018f2: 4b13 ldr r3, [pc, #76] ; (8001940 )
+ 80018f4: 7c5b ldrb r3, [r3, #17]
+ 80018f6: 2b00 cmp r3, #0
+ 80018f8: d001 beq.n 80018fe
+ return 0;
+ 80018fa: 2300 movs r3, #0
+ 80018fc: e01c b.n 8001938
+ if (enable)
+ 80018fe: 79fb ldrb r3, [r7, #7]
+ 8001900: 2b00 cmp r3, #0
+ 8001902: d002 beq.n 800190a
+ tmp = BIT_DATA_RDY_EN;
+ 8001904: 2301 movs r3, #1
+ 8001906: 73fb strb r3, [r7, #15]
+ 8001908: e001 b.n 800190e
+ else
+ tmp = 0x00;
+ 800190a: 2300 movs r3, #0
+ 800190c: 73fb strb r3, [r7, #15]
+ if (i2c_write(st.hw->addr, st.reg->int_enable, 1, &tmp))
+ 800190e: 4b0c ldr r3, [pc, #48] ; (8001940 )
+ 8001910: 685b ldr r3, [r3, #4]
+ 8001912: 7818 ldrb r0, [r3, #0]
+ 8001914: 4b0a ldr r3, [pc, #40] ; (8001940 )
+ 8001916: 681b ldr r3, [r3, #0]
+ 8001918: 7bd9 ldrb r1, [r3, #15]
+ 800191a: f107 030f add.w r3, r7, #15
+ 800191e: 2201 movs r2, #1
+ 8001920: f003 fd36 bl 8005390
+ 8001924: 4603 mov r3, r0
+ 8001926: 2b00 cmp r3, #0
+ 8001928: d002 beq.n 8001930
+ return -1;
+ 800192a: f04f 33ff mov.w r3, #4294967295
+ 800192e: e003 b.n 8001938
+ st.chip_cfg.int_enable = tmp;
+ 8001930: 7bfa ldrb r2, [r7, #15]
+ 8001932: 4b03 ldr r3, [pc, #12] ; (8001940 )
+ 8001934: 745a strb r2, [r3, #17]
+ }
+ return 0;
+ 8001936: 2300 movs r3, #0
+}
+ 8001938: 4618 mov r0, r3
+ 800193a: 3710 adds r7, #16
+ 800193c: 46bd mov sp, r7
+ 800193e: bd80 pop {r7, pc}
+ 8001940: 20000000 .word 0x20000000
+
+08001944 :
+ * Data ready interrupt: Disabled, active low, unlatched.
+ * @param[in] int_param Platform-specific parameters to interrupt API.
+ * @return 0 if successful.
+ */
+int mpu_init(void)
+{
+ 8001944: b580 push {r7, lr}
+ 8001946: b082 sub sp, #8
+ 8001948: af00 add r7, sp, #0
+ unsigned char data[6], rev;
+
+ /* Reset device. */
+ data[0] = BIT_RESET;
+ 800194a: 2380 movs r3, #128 ; 0x80
+ 800194c: 703b strb r3, [r7, #0]
+ if (i2c_write(st.hw->addr, st.reg->pwr_mgmt_1, 1, data))
+ 800194e: 4b82 ldr r3, [pc, #520] ; (8001b58 )
+ 8001950: 685b ldr r3, [r3, #4]
+ 8001952: 7818 ldrb r0, [r3, #0]
+ 8001954: 4b80 ldr r3, [pc, #512] ; (8001b58 )
+ 8001956: 681b ldr r3, [r3, #0]
+ 8001958: 7c99 ldrb r1, [r3, #18]
+ 800195a: 463b mov r3, r7
+ 800195c: 2201 movs r2, #1
+ 800195e: f003 fd17 bl 8005390
+ 8001962: 4603 mov r3, r0
+ 8001964: 2b00 cmp r3, #0
+ 8001966: d002 beq.n 800196e
+ return -1;
+ 8001968: f04f 33ff mov.w r3, #4294967295
+ 800196c: e0ef b.n 8001b4e
+ HAL_Delay(100);
+ 800196e: 2064 movs r0, #100 ; 0x64
+ 8001970: f004 f8c8 bl 8005b04
+
+ /* Wake up chip. */
+ data[0] = 0x00;
+ 8001974: 2300 movs r3, #0
+ 8001976: 703b strb r3, [r7, #0]
+ if (i2c_write(st.hw->addr, st.reg->pwr_mgmt_1, 1, data))
+ 8001978: 4b77 ldr r3, [pc, #476] ; (8001b58 )
+ 800197a: 685b ldr r3, [r3, #4]
+ 800197c: 7818 ldrb r0, [r3, #0]
+ 800197e: 4b76 ldr r3, [pc, #472] ; (8001b58 )
+ 8001980: 681b ldr r3, [r3, #0]
+ 8001982: 7c99 ldrb r1, [r3, #18]
+ 8001984: 463b mov r3, r7
+ 8001986: 2201 movs r2, #1
+ 8001988: f003 fd02 bl 8005390
+ 800198c: 4603 mov r3, r0
+ 800198e: 2b00 cmp r3, #0
+ 8001990: d002 beq.n 8001998
+ return -1;
+ 8001992: f04f 33ff mov.w r3, #4294967295
+ 8001996: e0da b.n 8001b4e
+
+#if defined MPU6050
+ /* Check product revision. */
+ if (i2c_read(st.hw->addr, st.reg->accel_offs, 6, data))
+ 8001998: 4b6f ldr r3, [pc, #444] ; (8001b58 )
+ 800199a: 685b ldr r3, [r3, #4]
+ 800199c: 7818 ldrb r0, [r3, #0]
+ 800199e: 4b6e ldr r3, [pc, #440] ; (8001b58 )
+ 80019a0: 681b ldr r3, [r3, #0]
+ 80019a2: 7d99 ldrb r1, [r3, #22]
+ 80019a4: 463b mov r3, r7
+ 80019a6: 2206 movs r2, #6
+ 80019a8: f003 fd34 bl 8005414
+ 80019ac: 4603 mov r3, r0
+ 80019ae: 2b00 cmp r3, #0
+ 80019b0: d002 beq.n 80019b8
+ return -1;
+ 80019b2: f04f 33ff mov.w r3, #4294967295
+ 80019b6: e0ca b.n 8001b4e
+ rev = ((data[5] & 0x01) << 2) | ((data[3] & 0x01) << 1) |
+ 80019b8: 797b ldrb r3, [r7, #5]
+ 80019ba: 009b lsls r3, r3, #2
+ 80019bc: b25b sxtb r3, r3
+ 80019be: f003 0304 and.w r3, r3, #4
+ 80019c2: b25a sxtb r2, r3
+ 80019c4: 78fb ldrb r3, [r7, #3]
+ 80019c6: 005b lsls r3, r3, #1
+ 80019c8: b25b sxtb r3, r3
+ 80019ca: f003 0302 and.w r3, r3, #2
+ 80019ce: b25b sxtb r3, r3
+ 80019d0: 4313 orrs r3, r2
+ 80019d2: b25a sxtb r2, r3
+ (data[1] & 0x01);
+ 80019d4: 787b ldrb r3, [r7, #1]
+ 80019d6: b25b sxtb r3, r3
+ 80019d8: f003 0301 and.w r3, r3, #1
+ 80019dc: b25b sxtb r3, r3
+ rev = ((data[5] & 0x01) << 2) | ((data[3] & 0x01) << 1) |
+ 80019de: 4313 orrs r3, r2
+ 80019e0: b25b sxtb r3, r3
+ 80019e2: 71fb strb r3, [r7, #7]
+
+ if (rev)
+ 80019e4: 79fb ldrb r3, [r7, #7]
+ 80019e6: 2b00 cmp r3, #0
+ 80019e8: d015 beq.n 8001a16
+ {
+ /* Congrats, these parts are better. */
+ if (rev == 1)
+ 80019ea: 79fb ldrb r3, [r7, #7]
+ 80019ec: 2b01 cmp r3, #1
+ 80019ee: d103 bne.n 80019f8
+ st.chip_cfg.accel_half = 1;
+ 80019f0: 4b59 ldr r3, [pc, #356] ; (8001b58 )
+ 80019f2: 2201 movs r2, #1
+ 80019f4: 74da strb r2, [r3, #19]
+ 80019f6: e038 b.n 8001a6a
+ else if (rev == 2)
+ 80019f8: 79fb ldrb r3, [r7, #7]
+ 80019fa: 2b02 cmp r3, #2
+ 80019fc: d103 bne.n 8001a06
+ st.chip_cfg.accel_half = 0;
+ 80019fe: 4b56 ldr r3, [pc, #344] ; (8001b58 )
+ 8001a00: 2200 movs r2, #0
+ 8001a02: 74da strb r2, [r3, #19]
+ 8001a04: e031 b.n 8001a6a
+ else
+ {
+ log_e("Unsupported software product rev %d.\n", rev);
+ 8001a06: 79fb ldrb r3, [r7, #7]
+ 8001a08: 4619 mov r1, r3
+ 8001a0a: 4854 ldr r0, [pc, #336] ; (8001b5c )
+ 8001a0c: f005 fbb8 bl 8007180
+ return -1;
+ 8001a10: f04f 33ff mov.w r3, #4294967295
+ 8001a14: e09b b.n 8001b4e
+ }
+ }
+ else
+ {
+ if (i2c_read(st.hw->addr, st.reg->prod_id, 1, data))
+ 8001a16: 4b50 ldr r3, [pc, #320] ; (8001b58 )
+ 8001a18: 685b ldr r3, [r3, #4]
+ 8001a1a: 7818 ldrb r0, [r3, #0]
+ 8001a1c: 4b4e ldr r3, [pc, #312] ; (8001b58 )
+ 8001a1e: 681b ldr r3, [r3, #0]
+ 8001a20: 78d9 ldrb r1, [r3, #3]
+ 8001a22: 463b mov r3, r7
+ 8001a24: 2201 movs r2, #1
+ 8001a26: f003 fcf5 bl 8005414
+ 8001a2a: 4603 mov r3, r0
+ 8001a2c: 2b00 cmp r3, #0
+ 8001a2e: d002 beq.n 8001a36
+ return -1;
+ 8001a30: f04f 33ff mov.w r3, #4294967295
+ 8001a34: e08b b.n 8001b4e
+ rev = data[0] & 0x0F;
+ 8001a36: 783b ldrb r3, [r7, #0]
+ 8001a38: f003 030f and.w r3, r3, #15
+ 8001a3c: 71fb strb r3, [r7, #7]
+ if (!rev)
+ 8001a3e: 79fb ldrb r3, [r7, #7]
+ 8001a40: 2b00 cmp r3, #0
+ 8001a42: d105 bne.n 8001a50
+ {
+ log_e("Product ID read as 0 indicates device is either "
+ 8001a44: 4846 ldr r0, [pc, #280] ; (8001b60 )
+ 8001a46: f005 fc21 bl 800728c
+ "incompatible or an MPU3050.\n");
+ return -1;
+ 8001a4a: f04f 33ff mov.w r3, #4294967295
+ 8001a4e: e07e b.n 8001b4e
+ }
+ else if (rev == 4)
+ 8001a50: 79fb ldrb r3, [r7, #7]
+ 8001a52: 2b04 cmp r3, #4
+ 8001a54: d106 bne.n 8001a64
+ {
+ log_i("Half sensitivity part found.\n");
+ 8001a56: 4843 ldr r0, [pc, #268] ; (8001b64 )
+ 8001a58: f005 fc18 bl 800728c
+ st.chip_cfg.accel_half = 1;
+ 8001a5c: 4b3e ldr r3, [pc, #248] ; (8001b58 )
+ 8001a5e: 2201 movs r2, #1
+ 8001a60: 74da strb r2, [r3, #19]
+ 8001a62: e002 b.n 8001a6a
+ }
+ else
+ st.chip_cfg.accel_half = 0;
+ 8001a64: 4b3c ldr r3, [pc, #240] ; (8001b58 )
+ 8001a66: 2200 movs r2, #0
+ 8001a68: 74da strb r2, [r3, #19]
+ if (i2c_write(st.hw->addr, st.reg->accel_cfg2, 1, data))
+ return -1;
+#endif
+
+ /* Set to invalid values to ensure no I2C writes are skipped. */
+ st.chip_cfg.sensors = 0xFF;
+ 8001a6a: 4b3b ldr r3, [pc, #236] ; (8001b58 )
+ 8001a6c: 22ff movs r2, #255 ; 0xff
+ 8001a6e: 729a strb r2, [r3, #10]
+ st.chip_cfg.gyro_fsr = 0xFF;
+ 8001a70: 4b39 ldr r3, [pc, #228] ; (8001b58 )
+ 8001a72: 22ff movs r2, #255 ; 0xff
+ 8001a74: 721a strb r2, [r3, #8]
+ st.chip_cfg.accel_fsr = 0xFF;
+ 8001a76: 4b38 ldr r3, [pc, #224] ; (8001b58 )
+ 8001a78: 22ff movs r2, #255 ; 0xff
+ 8001a7a: 725a strb r2, [r3, #9]
+ st.chip_cfg.lpf = 0xFF;
+ 8001a7c: 4b36 ldr r3, [pc, #216] ; (8001b58 )
+ 8001a7e: 22ff movs r2, #255 ; 0xff
+ 8001a80: 72da strb r2, [r3, #11]
+ st.chip_cfg.sample_rate = 0xFFFF;
+ 8001a82: 4b35 ldr r3, [pc, #212] ; (8001b58 )
+ 8001a84: f64f 72ff movw r2, #65535 ; 0xffff
+ 8001a88: 81da strh r2, [r3, #14]
+ st.chip_cfg.fifo_enable = 0xFF;
+ 8001a8a: 4b33 ldr r3, [pc, #204] ; (8001b58 )
+ 8001a8c: 22ff movs r2, #255 ; 0xff
+ 8001a8e: 741a strb r2, [r3, #16]
+ st.chip_cfg.bypass_mode = 0xFF;
+ 8001a90: 4b31 ldr r3, [pc, #196] ; (8001b58 )
+ 8001a92: 22ff movs r2, #255 ; 0xff
+ 8001a94: 749a strb r2, [r3, #18]
+#ifdef AK89xx_SECONDARY
+ st.chip_cfg.compass_sample_rate = 0xFFFF;
+#endif
+ /* mpu_set_sensors always preserves this setting. */
+ st.chip_cfg.clk_src = INV_CLK_PLL;
+ 8001a96: 4b30 ldr r3, [pc, #192] ; (8001b58 )
+ 8001a98: 2201 movs r2, #1
+ 8001a9a: 731a strb r2, [r3, #12]
+ /* Handled in next call to mpu_set_bypass. */
+ st.chip_cfg.active_low_int = 1;
+ 8001a9c: 4b2e ldr r3, [pc, #184] ; (8001b58 )
+ 8001a9e: 2201 movs r2, #1
+ 8001aa0: f883 2022 strb.w r2, [r3, #34] ; 0x22
+ st.chip_cfg.latched_int = 0;
+ 8001aa4: 4b2c ldr r3, [pc, #176] ; (8001b58 )
+ 8001aa6: 2200 movs r2, #0
+ 8001aa8: f883 2023 strb.w r2, [r3, #35] ; 0x23
+ st.chip_cfg.int_motion_only = 0;
+ 8001aac: 4b2a ldr r3, [pc, #168] ; (8001b58 )
+ 8001aae: 2200 movs r2, #0
+ 8001ab0: 755a strb r2, [r3, #21]
+ st.chip_cfg.lp_accel_mode = 0;
+ 8001ab2: 4b29 ldr r3, [pc, #164] ; (8001b58 )
+ 8001ab4: 2200 movs r2, #0
+ 8001ab6: 751a strb r2, [r3, #20]
+ memset(&st.chip_cfg.cache, 0, sizeof(st.chip_cfg.cache));
+ 8001ab8: 220c movs r2, #12
+ 8001aba: 2100 movs r1, #0
+ 8001abc: 482a ldr r0, [pc, #168] ; (8001b68 )
+ 8001abe: f005 fb57 bl 8007170
+ st.chip_cfg.dmp_on = 0;
+ 8001ac2: 4b25 ldr r3, [pc, #148] ; (8001b58 )
+ 8001ac4: 2200 movs r2, #0
+ 8001ac6: f883 2024 strb.w r2, [r3, #36] ; 0x24
+ st.chip_cfg.dmp_loaded = 0;
+ 8001aca: 4b23 ldr r3, [pc, #140] ; (8001b58 )
+ 8001acc: 2200 movs r2, #0
+ 8001ace: f883 2025 strb.w r2, [r3, #37] ; 0x25
+ st.chip_cfg.dmp_sample_rate = 0;
+ 8001ad2: 4b21 ldr r3, [pc, #132] ; (8001b58 )
+ 8001ad4: 2200 movs r2, #0
+ 8001ad6: 84da strh r2, [r3, #38] ; 0x26
+
+ if (mpu_set_gyro_fsr(2000))
+ 8001ad8: f44f 60fa mov.w r0, #2000 ; 0x7d0
+ 8001adc: f000 f9fa bl 8001ed4
+ 8001ae0: 4603 mov r3, r0
+ 8001ae2: 2b00 cmp r3, #0
+ 8001ae4: d002 beq.n 8001aec
+ return -1;
+ 8001ae6: f04f 33ff mov.w r3, #4294967295
+ 8001aea: e030 b.n 8001b4e
+ if (mpu_set_accel_fsr(2))
+ 8001aec: 2002 movs r0, #2
+ 8001aee: f000 fa7f bl 8001ff0
+ 8001af2: 4603 mov r3, r0
+ 8001af4: 2b00 cmp r3, #0
+ 8001af6: d002 beq.n 8001afe
+ return -1;
+ 8001af8: f04f 33ff mov.w r3, #4294967295
+ 8001afc: e027 b.n 8001b4e
+ if (mpu_set_lpf(42))
+ 8001afe: 202a movs r0, #42 ; 0x2a
+ 8001b00: f000 fb1a bl 8002138
+ 8001b04: 4603 mov r3, r0
+ 8001b06: 2b00 cmp r3, #0
+ 8001b08: d002 beq.n 8001b10
+ return -1;
+ 8001b0a: f04f 33ff mov.w r3, #4294967295
+ 8001b0e: e01e b.n 8001b4e
+ if (mpu_set_sample_rate(50))
+ 8001b10: 2032 movs r0, #50 ; 0x32
+ 8001b12: f000 fb77 bl 8002204