File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed
Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -30,11 +30,11 @@ void yield()
3030
3131portMUX_TYPE microsMux = portMUX_INITIALIZER_UNLOCKED ;
3232
33- uint32_t IRAM_ATTR micros ()
33+ unsigned long IRAM_ATTR micros ()
3434{
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 ;
3838portENTER_CRITICAL_ISR (& microsMux );
3939 __asm__ __volatile__ ( "rsr %0, ccount" : "=a" (ccount ) );
4040if (ccount < lccount ){
@@ -45,7 +45,7 @@ uint32_t IRAM_ATTR micros()
4545return overflow + (ccount / CONFIG_ESP32_DEFAULT_CPU_FREQ_MHZ );
4646}
4747
48- uint32_t IRAM_ATTR millis ()
48+ unsigned long IRAM_ATTR millis ()
4949{
5050return xTaskGetTickCount () * portTICK_PERIOD_MS ;
5151}
Original file line number Diff line number Diff line change @@ -61,8 +61,8 @@ void yield(void);
6161#include "esp32-hal-bt.h"
6262#include "esp_system.h"
6363
64- uint32_t micros ();
65- uint32_t millis ();
64+ unsigned long micros ();
65+ unsigned long millis ();
6666void delay (uint32_t );
6767void delayMicroseconds (uint32_t us );
6868
You can’t perform that action at this time.
0 commit comments