ChipTest/PAN159/PAN159-Template/Library/StdDriver/driver/lib_driver_delay_pan159.h

33 lines
980 B
C
Raw Normal View History

2021-09-26 09:18:47 +00:00
/*******************************************************************************
* @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