ChipTest/PAN159/PAN159-Template/Library/StdDriver/driver/lib_driver_delay_pan159.h
2021-09-26 17:19:12 +08:00

33 lines
980 B
C
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*******************************************************************************
* @note Copyright (C) 2017 Shanghai Panchip Microelectronics Co., Ltd.
* All rights reserved.
*
* @file lib_driver_delay_pan159_v1p0.h
* @brief PAN159 delay
* 注意该延时函数在系统时钟为48MHz时准确
*
* @history - V1.0, 2017-09-12, xiaoguolin, first implementation.
*******************************************************************************/
#ifndef __DRIVER_DELAY_PAN159_H
#define __DRIVER_DELAY_PAN159_H
#ifdef __cplusplus
extern "C"{
#endif
#include "Mini58Series.h"
void __delay_pan159(uint32_t cycle);
#define delay_pan159_us(us) do{if((us)){__delay_pan159((us)*12);}}while(0)
#define delay_pan159_ms(ms) do{uint32_t cnt=(ms);while(cnt--){delay_pan159_us(2070);}}while(0)
#define delay_us delay_pan159_us
#define delay_ms delay_pan159_ms
#ifdef __cplusplus
}
#endif
#endif // __DRIVER_DELAY_PAN159_H