LTlib LaurTec Library
4.0.3
Open Source C Library for Microchip Microcontrollers based on XC8 Compiler
Main Page
Data Structures
Files
File List
Globals
All
Data Structures
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
LTlib_delay.h
Go to the documentation of this file.
1
/*******************************************************************************
2
3
Author : Mauro Laurenti
4
Version : 1.4
5
6
Created on Date : 04/09/2006
7
Last update : 15/12/2014
8
9
CopyRight 2006-2014 all rights are reserved
10
11
********************************************************
12
SOFTWARE LICENSE AGREEMENT
13
********************************************************
14
15
The usage of the supplied software imply the acceptance of the following license.
16
17
The software supplied herewith by Mauro Laurenti (the Author) is intended for
18
use solely and exclusively on Microchip PIC Microcontroller (registered mark).
19
The software is owned by the Author, and is protected under applicable
20
copyright laws. All rights are reserved.
21
Any use in violation of the foregoing restrictions may subject the
22
user to criminal sanctions under applicable laws, as well as to civil liability
23
for the breach of the terms and conditions of this license.
24
Commercial use is forbidden without a written acknowledgement with the Author.
25
Personal or educational use is allowed if the application containing the
26
following software doesn't aim to commercial use or monetary earning of any kind.
27
28
THIS SOFTWARE IS PROVIDED IN AN "AS IS" CONDITION. NO WARRANTIES,
29
WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING, BUT NOT LIMITED
30
TO, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
31
PARTICULAR PURPOSE APPLY TO THIS SOFTWARE. THE AUTHOR SHALL NOT,
32
IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL OR
33
CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER.
34
35
36
********************************************************
37
PURPOSES
38
********************************************************
39
40
41
This library allows to execute long delay independently from the used clock.
42
The clock can be set at run time (no compiling time).
43
44
*******************************************************************************/
45
46
47
48
#ifndef LTLIB_DELAY_H
49
#define LTLIB_DELAY_H
50
51
#ifdef __XC8
52
#include <xc.h>
53
#endif
54
55
#ifndef __XC8
56
#include <delays.h>
57
#endif
58
59
//*****************************************
60
// Library Test
61
//*****************************************
62
#include "
LTlib.h
"
63
64
65
// Remove the comment from the DELAY_INTERRUPT_BLOCKING definition if the delay
66
// should lock the interrupt.
67
// This feature make the delay function "almost" thread safe, in case they are
68
// used within the main function and within the ISR at the same time.
69
70
//#define DELAY_INTERRUPT_BLOCKING
71
84
void
delay_ms
(
unsigned
int
value_ms);
85
86
98
void
delay_s
(
unsigned
char
value_s);
99
100
112
void
delay_set_quartz
(
unsigned
char
frequency);
113
#define setQuartz delay_set_quartz
114
115
#endif
LTlib_v_4.0.3
inc
LTlib_delay.h
Generated on Wed Aug 3 2016 19:57:31 for LTlib LaurTec Library by
1.8.3.1