mirror of
https://gitee.com/dlmu-cone/bf_original_balance_chassis
synced 2026-07-24 03:27:45 +08:00
重构bsp层,bsp层将和HAL的配置一致,修改CubeMX之后不需要修改bsp。重构bmi088。
This commit is contained in:
39
bsp/dwt/bsp_dwt.h
Normal file
39
bsp/dwt/bsp_dwt.h
Normal 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_ */
|
||||
Reference in New Issue
Block a user