GenDelay.h 775 Bytes
Newer Older
时昊's avatar
时昊 committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
#ifndef Delay_LIB_H_
#define Delay_LIB_H_

/* #define Platform_16Bit
 #define Platform_32Bit*/
#ifdef Platform_16Bit
    #define Delaylib_uint8_t  unsigned char
    #define Delaylib_uint16_t unsigned int
    #define Delaylib_uint32_t unsigned long

#else
    #define Delaylib_uint8_t  unsigned char
    #define Delaylib_uint16_t unsigned short
    #define Delaylib_uint32_t unsigned int
    #define Delaylib_uint64_t unsigned long long
#endif

typedef void (*FeedDog)(void);
extern void              GenDelay_Init(FeedDog pfunction);
extern void              GenDelay_Tick(void);
extern void              Gen_TimeDelay(const Delaylib_uint32_t delay, const Delaylib_uint32_t TickBase);
extern Delaylib_uint32_t OSIF_GetMilliseconds(const Delaylib_uint32_t TickBase);

#endif