yincheng.zhong
2024-03-03 cae9d270866f095318e8c31ea7c4a8fe741f465d
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
#include "delay.h"
#include <stdint.h>
#include "stm32l0xx_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 )
{
    Delay_Ms(Delay);
}