Add watchdog parameter-validation, and fix up misleading comments #1567

Merged
lurch merged 1 commit from watchdog_delay_fixups into develop 2023-12-15 07:48:02 -06:00
lurch commented 2023-12-02 08:27:06 -06:00 (Migrated from github.com)

Fixes #1238 and #1550 (and #1241 #1409 #1505 which are duplicates of #1238)

Fixes #1238 and #1550 (and #1241 #1409 #1505 which are duplicates of #1238)
JamesH65 (Migrated from github.com) reviewed 2023-12-02 09:01:29 -06:00
JamesH65 (Migrated from github.com) left a comment

Only tiny nits.

Only tiny nits.
@ -43,3 +48,3 @@
* \param delay_ms Initial load value. Maximum value 0x7fffff, approximately 8.3s.
* \param delay_ms Initial load value. Maximum value 8388, approximately 8.3s.
*/
void watchdog_reboot(uint32_t pc, uint32_t sp, uint32_t delay_ms);
JamesH65 (Migrated from github.com) commented 2023-12-02 09:01:19 -06:00

8.3 IIF the source clock is default?

8.3 IIF the source clock is default?
JamesH65 (Migrated from github.com) commented 2023-12-02 09:01:05 -06:00

8.3 IIF the source clock is default?

8.3 IIF the source clock is default?
JamesH65 (Migrated from github.com) commented 2023-12-02 08:59:47 -06:00

Magic number, although it is commented. Move to a define? Only a nit though.

Magic number, although it is commented. Move to a define? Only a nit though.
lurch (Migrated from github.com) reviewed 2023-12-02 11:50:39 -06:00
@ -43,3 +48,3 @@
* \param delay_ms Initial load value. Maximum value 0x7fffff, approximately 8.3s.
* \param delay_ms Initial load value. Maximum value 8388, approximately 8.3s.
*/
void watchdog_reboot(uint32_t pc, uint32_t sp, uint32_t delay_ms);
lurch (Migrated from github.com) commented 2023-12-02 11:50:38 -06:00

Well, you could argue that the \note If \ref watchdog_start_tick value does not give a 1MHz clock to the watchdog system, then the \p delay_ms parameter will not be in milliseconds. See the datasheet for more details. already covers that ? 🤷‍♂️

Well, you could argue that the `\note If \ref watchdog_start_tick value does not give a 1MHz clock to the watchdog system, then the \p delay_ms parameter will not be in milliseconds. See the datasheet for more details.` already covers that ? :man_shrugging:
lurch (Migrated from github.com) reviewed 2023-12-02 11:51:56 -06:00
lurch (Migrated from github.com) commented 2023-12-02 11:51:55 -06:00

Could do, but I'm not sure if it's worth it when it only appears once in a debug-level assert?

_Could_ do, but I'm not sure if it's worth it when it only appears once in a debug-level assert?
kilograham (Migrated from github.com) approved these changes 2023-12-15 07:47:54 -06:00
Sign in to join this conversation.
No reviewers
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!1567
No description provided.