File tree 2 files changed +7
-7
lines changed
2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -30,11 +30,11 @@ void yield()
30
30
31
31
portMUX_TYPE microsMux = portMUX_INITIALIZER_UNLOCKED ;
32
32
33
- uint32_t IRAM_ATTR micros ()
33
+ unsigned long IRAM_ATTR micros ()
34
34
{
35
- static uint32_t lccount = 0 ;
36
- static uint32_t overflow = 0 ;
37
- uint32_t ccount ;
35
+ static unsigned long lccount = 0 ;
36
+ static unsigned long overflow = 0 ;
37
+ unsigned long ccount ;
38
38
portENTER_CRITICAL_ISR (& microsMux );
39
39
__asm__ __volatile__ ( "rsr %0, ccount" : "=a" (ccount ) );
40
40
if (ccount < lccount ){
@@ -45,7 +45,7 @@ uint32_t IRAM_ATTR micros()
45
45
return overflow + (ccount / CONFIG_ESP32_DEFAULT_CPU_FREQ_MHZ );
46
46
}
47
47
48
- uint32_t IRAM_ATTR millis ()
48
+ unsigned long IRAM_ATTR millis ()
49
49
{
50
50
return xTaskGetTickCount () * portTICK_PERIOD_MS ;
51
51
}
Original file line number Diff line number Diff line change @@ -61,8 +61,8 @@ void yield(void);
61
61
#include "esp32-hal-bt.h"
62
62
#include "esp_system.h"
63
63
64
- uint32_t micros ();
65
- uint32_t millis ();
64
+ unsigned long micros ();
65
+ unsigned long millis ();
66
66
void delay (uint32_t );
67
67
void delayMicroseconds (uint32_t us );
68
68
You can’t perform that action at this time.
0 commit comments