/[H9]/trunk/Embedded/delay.c
ViewVC logotype

Annotation of /trunk/Embedded/delay.c

Parent Directory Parent Directory | Revision Log Revision Log


Revision 148 - (hide annotations) (download)
Tue Dec 4 17:23:27 2007 UTC (16 years, 6 months ago) by hedin
File MIME type: text/plain
File size: 440 byte(s)
critical stat, have been done, the pic sends a sms every 10 min, when there is one or more critical states. phone number, sms counter and update interval is saved in ther EEPROM.
Added a lots of comments.
1 hedin 82 /*
2     * Delay functions
3     * See delay.h for details
4     *
5     * Make sure this code is compiled with full optimization!!!
6     */
7    
8     #include "delay.h"
9    
10     void
11     DelayMs(unsigned char cnt)
12     {
13     unsigned char i;
14     while (cnt--) {
15     i=4;
16     while(i--) {
17     DelayUs(uS_CNT); /* Adjust for error */
18     } ;
19     } ;
20     }
21    
22 hedin 139 void DelaySek(unsigned char cnt)
23     {
24     while (cnt--)
25     {
26     DelayMs(250);
27     DelayMs(250);
28     DelayMs(250);
29     DelayMs(250);
30     }
31 hedin 148 }

  ViewVC Help
Powered by ViewVC 1.1.20