watchdog_reboot() has misleading parameter name delay_ms, should be delay_us as the units are microseconds not milliseconds #1409

Closed
opened 2023-06-01 08:24:55 -05:00 by smcameron · 2 comments
smcameron commented 2023-06-01 08:24:55 -05:00 (Migrated from github.com)

github.com/raspberrypi/pico-sdk@f396d05f82/src/rp2_common/hardware_watchdog/include/hardware/watchdog.h (L45)

ms or msec is the abbreviation for milliseconds. However, the delay_ms parameter is actually in microseconds. The abbreviation for microseconds uses the greek letter Mu, however, it is commonly written as "us" in C-code. The "delay_ms" parameter to watchdog_reboot should be named "delay_us", or "delay_microsecs"

https://github.com/raspberrypi/pico-sdk/blob/f396d05f8252d4670d4ea05c8b7ac938ef0cd381/src/rp2_common/hardware_watchdog/include/hardware/watchdog.h#L45 ms or msec is the abbreviation for milliseconds. However, the delay_ms parameter is actually in microseconds. The abbreviation for microseconds uses the greek letter Mu, however, it is commonly written as "us" in C-code. The "delay_ms" parameter to watchdog_reboot should be named "delay_us", or "delay_microsecs"
lurch commented 2023-06-01 08:38:02 -05:00 (Migrated from github.com)

Very similar to #1238 and #1241 ?

Very similar to #1238 and #1241 ?
smcameron commented 2023-06-01 08:44:47 -05:00 (Migrated from github.com)

Fair enough.

Fair enough.
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
gh-raspberrypi/pico-sdk#1409
No description provided.