STC15W408AS library
0.13.1
Loading...
Searching...
No Matches
include
delay.h
Go to the documentation of this file.
1
#ifndef STC15_DELAYH
2
#define STC15_DELAYH
3
12
#include <stdint.h>
13
#include <
frequency.h
>
14
20
#define TICKS_DELAY_1MS() \
21
do { \
22
volatile uint8_t i, j; \
23
i = 5; \
24
j = 79; \
25
do \
26
{ \
27
while (--j); \
28
} while (--i); \
29
} while(0)
30
39
#define delay_ms(ms) \
40
do { \
41
volatile uint16_t ms_div = ms >> get_frequency_divider_scale(); \
42
do { \
43
TICKS_DELAY_1MS(); \
44
} while(--ms_div); \
45
} while(0) \
46
47
#endif
frequency.h
Generated by
1.9.8