重构bsp层,bsp层将和HAL的配置一致,修改CubeMX之后不需要修改bsp。重构bmi088。

This commit is contained in:
NeoZng
2022-12-30 23:39:04 +08:00
parent ab1a9726b1
commit a3631a5ca5
39 changed files with 842 additions and 256 deletions

39
bsp/dwt/bsp_dwt.h Normal file
View File

@@ -0,0 +1,39 @@
/**
******************************************************************************
* @file bsp_dwt.h
* @author Wang Hongxi
* @version V1.1.0
* @date 2022/3/8
* @brief
******************************************************************************
* @attention
*
******************************************************************************
*/
#ifndef _BSP_DWT_H
#define _BSP_DWT_H
#include "main.h"
#include "stdint.h"
typedef struct
{
uint32_t s;
uint16_t ms;
uint16_t us;
} DWT_Time_t;
extern DWT_Time_t SysTime;
void DWT_Init(uint32_t CPU_Freq_mHz);
float DWT_GetDeltaT(uint32_t *cnt_last);
double DWT_GetDeltaT64(uint32_t *cnt_last);
float DWT_GetTimeline_s(void);
float DWT_GetTimeline_ms(void);
uint64_t DWT_GetTimeline_us(void);
void DWT_Delay(float Delay);
void DWT_SysTimeUpdate(void);
#endif /* BSP_DWT_H_ */