Created
October 3, 2013 17:56
-
-
Save jerivas/6814108 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef __DELAYS_H | |
#define __DELAYS_H | |
#if defined (__18CXX) || defined(_PLIB) | |
/* C18 cycle-count delay routines. */ | |
/* Delay of exactly 1 Tcy */ | |
#define Delay1TCY() _delay(1) | |
/* Delay of exactly 10 Tcy */ | |
#define Delay10TCY() _delay(10) | |
/* Delay10TCYx | |
* Delay multiples of 10 Tcy | |
* Passing 0 (zero) results in a delay of 2560 cycles. | |
*/ | |
void Delay10TCYx(unsigned char); | |
/* Delay100TCYx | |
* Delay multiples of 100 Tcy | |
* Passing 0 (zero) results in a delay of 25,600 cycles. | |
*/ | |
void Delay100TCYx(unsigned char); | |
/* Delay1KTCYx | |
* Delay multiples of 1000 Tcy | |
* Passing 0 (zero) results in a delay of 256,000 cycles. | |
*/ | |
void Delay1KTCYx(unsigned char); | |
/* Delay10KTCYx | |
* Delay multiples of 10,000 Tcy | |
* Passing 0 (zero) results in a delay of 2,560,000 cycles. | |
*/ | |
void Delay10KTCYx(unsigned char); | |
#endif | |
#endif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment