GeekIMU/2.Firmware/STM32/Firmware/system/delay/delay.h

50 lines
1.9 KiB
C
Raw Permalink Normal View History

2024-11-09 21:39:20 +08:00
/******************** (C) COPYRIGHT 2020 GEEKIMU *******************************
* File Name : delay.h
* Current Version : V2.0 & ST 3.5.0
* Author : zhanli 719901725@qq.com & JustFeng.
* Date of Issued : 2015.5.15 zhanli : Create
* Comments : STM32ϵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
********************************************************************************/
#ifndef _DELAY_H_
#define _DELAY_H_
#include <stdint.h>
/**----------------------------------------------------------------------
* Function : Delay_Init
* Author : zhanli&719901725@qq.com
* Description : <EFBFBD><EFBFBD>ʼ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>֧<EFBFBD><EFBFBD>ucos<EFBFBD><EFBFBD>
* Date : 2015/2/13 zhanli
*---------------------------------------------------------------------**/
void Delay_Init(void);
/**----------------------------------------------------------------------
* Function : Delay_DeInit
* Author : zhanli&719901725@qq.com
* Description : <EFBFBD><EFBFBD><EFBFBD>³<EFBFBD>ʼ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>֧<EFBFBD><EFBFBD>ucos<EFBFBD><EFBFBD>
* Date : 2015/2/13 zhanli
*---------------------------------------------------------------------**/
void Delay_DeInit(void);
/**----------------------------------------------------------------------
* Function : Delay_Ms(uint32_t ms)
* Description : <EFBFBD><EFBFBD>ʱn<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD>ȡֵ<EFBFBD><EFBFBD><EFBFBD>ܴ<EFBFBD><EFBFBD><EFBFBD>1864.SysTick->LOADΪ
24λ<EFBFBD>Ĵ<EFBFBD><EFBFBD><EFBFBD>,<EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱΪ:
nms <= 0xffffff * 8 * 1000 / SYSCLK; SYSCLK<EFBFBD><EFBFBD>λΪHz,nms<EFBFBD><EFBFBD>
λΪms.<EFBFBD><EFBFBD>Ӧ72M<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ,nms<=1864nms<EFBFBD><EFBFBD>
* Author : zhanli&719901725@qq.com
* Date : 2015/2/13 zhanli
*---------------------------------------------------------------------**/
void Delay_Ms(uint32_t ms);
/**----------------------------------------------------------------------
* Function : Delay_Us(uint32_t nus)
* Description : <EFBFBD><EFBFBD>ʱn΢<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD>ȡֵ<EFBFBD><EFBFBD><EFBFBD>ܴ<EFBFBD><EFBFBD><EFBFBD>1864us
* Author : zhanli&719901725@qq.com
* Date : 2015/2/13 zhanli
*---------------------------------------------------------------------**/
void Delay_Us(uint32_t nus);
#endif /* _DELAY_H_ */