Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 1b15db2

Browse files
committedJun 7, 2024·
fix(misc): Use 64 bit return value for micros()
1 parent e3fedc5 commit 1b15db2

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed
 

‎cores/esp32/esp32-hal-misc.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,8 +191,8 @@ BaseType_t xTaskCreateUniversal(
191191
#endif
192192
}
193193

194-
unsigned long ARDUINO_ISR_ATTR micros() {
195-
return (unsigned long)(esp_timer_get_time());
194+
unsigned long long ARDUINO_ISR_ATTR micros() {
195+
return (unsigned long long)(esp_timer_get_time());
196196
}
197197

198198
unsigned long ARDUINO_ISR_ATTR millis() {

‎cores/esp32/esp32-hal.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ BaseType_t xTaskCreateUniversal(
121121
TaskHandle_t *const pxCreatedTask, const BaseType_t xCoreID
122122
);
123123

124-
unsigned long micros();
124+
unsigned long long micros();
125125
unsigned long millis();
126126
void delay(uint32_t);
127127
void delayMicroseconds(uint32_t us);

0 commit comments

Comments
 (0)
Please sign in to comment.