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
26
27
28
29
30
31
32
| #include "delay.h"
| #include <stdint.h>
| #include "stm32f0xx_hal.h"
|
| void Delay_Us (uint32_t delay)
| {
| uint8_t i=0;
| uint32_t j=0;
| for(i=0;i<delay;i++)
| {
| for(j=0;j<8;j++);
| }
| }
|
|
| void Delay_Ms(uint32_t delay )
| {
| uint32_t i=0;
| uint32_t j=0;
|
| for(i=0;i<delay;i++)
| {
| for(j=0;j<4540;j++);
| }
| }
|
| void HAL_Delay_nMS( uint32_t Delay )
| {
| HAL_Delay(Delay);
|
| }
|
|
|