-
大小: 608KB文件類型: .zip金幣: 2下載: 0 次發布日期: 2021-06-13
- 語言: 其他
- 標簽: stm32??mpu6050??dmp??mpu6050dmp??
資源簡介
cubemx生成hal庫的f103c8t6工程,通過IIC讀取mpu6050,通過dmp計算歐拉角,通過串口1(波特率15200)打印出數據,目前只打印pitch,可以自己修改,引腳信息可以自己在cubemx看。其中IIC驅動移植于野火,可以通過修改四個宏定義實現引腳更換,mpu6050和dmp移植于原子。已經測試可以使用,有問題歡迎交流!

代碼片段和文件信息
/**
??******************************************************************************
??*?@file????stm32f1xx_hal.c
??*?@author??MCD?Application?Team
??*?@brief???HAL?module?driver.
??*??????????This?is?the?common?part?of?the?HAL?initialization
??*
??@verbatim
??==============================================================================
?????????????????????#####?How?to?use?this?driver?#####
??==============================================================================
????[..]
????The?common?HAL?driver?contains?a?set?of?generic?and?common?APIs?that?can?be
????used?by?the?PPP?peripheral?drivers?and?the?user?to?start?using?the?HAL.
????[..]
????The?HAL?contains?two?APIs‘?categories:
?????????(+)?Common?HAL?APIs
?????????(+)?Services?HAL?APIs
??@endverbatim
??******************************************************************************
??*?@attention
??*
??*?©?Copyright?(c)?2016?STMicroelectronics.
??*?All?rights?reserved.
??*
??*?This?software?component?is?licensed?by?ST?under?BSD?3-Clause?license
??*?the?“License“;?You?may?not?use?this?file?except?in?compliance?with?the
??*?License.?You?may?obtain?a?copy?of?the?License?at:
??*????????????????????????opensource.org/licenses/BSD-3-Clause
??*
??******************************************************************************
??*/
/*?Includes?------------------------------------------------------------------*/
#include?“stm32f1xx_hal.h“
/**?@addtogroup?STM32F1xx_HAL_Driver
??*?@{
??*/
/**?@defgroup?HAL?HAL
??*?@brief?HAL?module?driver.
??*?@{
??*/
#ifdef?HAL_MODULE_ENABLED
/*?Private?typedef?-----------------------------------------------------------*/
/*?Private?define?------------------------------------------------------------*/
/**?@defgroup?HAL_Private_Constants?HAL?Private?Constants
??*?@{
??*/
/**
?*?@brief?STM32F1xx?HAL?Driver?version?number?V1.1.4
???*/
#define?__STM32F1xx_HAL_VERSION_MAIN???(0x01U)?/*![31:24]?main?version?*/
#define?__STM32F1xx_HAL_VERSION_SUB1???(0x01U)?/*![23:16]?sub1?version?*/
#define?__STM32F1xx_HAL_VERSION_SUB2???(0x04U)?/*![15:8]??sub2?version?*/
#define?__STM32F1xx_HAL_VERSION_RC?????(0x00U)?/*![7:0]??release?candidate?*/
#define?__STM32F1xx_HAL_VERSION?????????((__STM32F1xx_HAL_VERSION_MAIN?<24)\
????????????????????????????????????????|(__STM32F1xx_HAL_VERSION_SUB1?<16)\
????????????????????????????????????????|(__STM32F1xx_HAL_VERSION_SUB2?<8?)\
????????????????????????????????????????|(__STM32F1xx_HAL_VERSION_RC))
#define?IDCODE_DEVID_MASK????0x00000FFFU
/**
??*?@}
??*/
/*?Private?macro?-------------------------------------------------------------*/
/*?Private?variables?---------------------------------------------------------*/
/**?@defgroup?HAL_Private_Variables?HAL?Private?Variables
??*?@{
??*/
__IO?uint32_t?uwTick;
uint32_t?uwTickPrio???=?(1UL?<HAL_TickFreqTypeDef?uwTickFreq?=?HAL_TI
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2020-08-04?10:43??MPU6050_DMP\
?????文件????????6061??2020-08-04?08:36??MPU6050_DMP\.mxproject
?????目錄???????????0??2020-08-03?23:19??MPU6050_DMP\Drivers\
?????目錄???????????0??2020-08-04?08:36??MPU6050_DMP\Drivers\CMSIS\
?????目錄???????????0??2020-08-03?23:19??MPU6050_DMP\Drivers\CMSIS\Device\
?????目錄???????????0??2020-08-03?23:19??MPU6050_DMP\Drivers\CMSIS\Device\ST\
?????目錄???????????0??2020-08-04?08:36??MPU6050_DMP\Drivers\CMSIS\Device\ST\STM32F1xx\
?????目錄???????????0??2020-08-04?08:36??MPU6050_DMP\Drivers\CMSIS\Device\ST\STM32F1xx\Include\
?????文件??????853289??2020-05-16?11:03??MPU6050_DMP\Drivers\CMSIS\Device\ST\STM32F1xx\Include\stm32f103xb.h
?????文件????????7481??2020-05-16?11:03??MPU6050_DMP\Drivers\CMSIS\Device\ST\STM32F1xx\Include\stm32f1xx.h
?????文件????????2029??2020-05-16?11:03??MPU6050_DMP\Drivers\CMSIS\Device\ST\STM32F1xx\Include\system_stm32f1xx.h
?????目錄???????????0??2020-08-04?08:36??MPU6050_DMP\Drivers\CMSIS\Device\ST\STM32F1xx\Source\
?????目錄???????????0??2020-08-04?08:36??MPU6050_DMP\Drivers\CMSIS\Device\ST\STM32F1xx\Source\Templates\
?????目錄???????????0??2020-08-04?08:36??MPU6050_DMP\Drivers\CMSIS\Include\
?????文件???????28208??2020-05-16?11:03??MPU6050_DMP\Drivers\CMSIS\Include\cmsis_armcc.h
?????文件???????56497??2020-05-16?11:03??MPU6050_DMP\Drivers\CMSIS\Include\cmsis_armclang.h
?????文件????????9014??2020-05-16?11:03??MPU6050_DMP\Drivers\CMSIS\Include\cmsis_compiler.h
?????文件???????62344??2020-05-16?11:03??MPU6050_DMP\Drivers\CMSIS\Include\cmsis_gcc.h
?????文件???????28414??2020-05-16?11:03??MPU6050_DMP\Drivers\CMSIS\Include\cmsis_iccarm.h
?????文件????????1716??2020-05-16?11:03??MPU6050_DMP\Drivers\CMSIS\Include\cmsis_version.h
?????文件???????97995??2020-05-16?11:03??MPU6050_DMP\Drivers\CMSIS\Include\core_armv8mbl.h
?????文件??????168914??2020-05-16?11:03??MPU6050_DMP\Drivers\CMSIS\Include\core_armv8mml.h
?????文件???????42208??2020-05-16?11:03??MPU6050_DMP\Drivers\CMSIS\Include\core_cm0.h
?????文件???????50464??2020-05-16?11:03??MPU6050_DMP\Drivers\CMSIS\Include\core_cm0plus.h
?????文件???????43456??2020-05-16?11:03??MPU6050_DMP\Drivers\CMSIS\Include\core_cm1.h
?????文件??????104628??2020-05-16?11:03??MPU6050_DMP\Drivers\CMSIS\Include\core_cm23.h
?????文件??????111854??2020-05-16?11:03??MPU6050_DMP\Drivers\CMSIS\Include\core_cm3.h
?????文件??????175600??2020-05-16?11:03??MPU6050_DMP\Drivers\CMSIS\Include\core_cm33.h
?????文件??????123607??2020-05-16?11:03??MPU6050_DMP\Drivers\CMSIS\Include\core_cm4.h
?????文件??????148588??2020-05-16?11:03??MPU6050_DMP\Drivers\CMSIS\Include\core_cm7.h
?????文件???????47249??2020-05-16?11:03??MPU6050_DMP\Drivers\CMSIS\Include\core_sc000.h
............此處省略78個文件信息
評論
共有 條評論