atcwdt_get_timeout_params(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… atcwdt_get_timeout_params β€” Kernel API Manual (the atcwdt_get_timeout_params(9) girlies know)

okay so bestie, gather round, because this one is literally the Watchdog Timer's personal matchmaker πŸ’– It's from the atcwdt_get_timeout_params(9) family and it's here to find the perfect parameter combo. no cap.


✨ NAME ✨

atcwdt_get_timeout_params β€” Calculate optimal parameters for Watchdog Timer 🐢⏰


🫢 SYNOPSIS 🫢

void atcwdt_get_timeout_params (struct atcwdt_drv *drv_data , unsigned
int timeout , unsigned char *int_timer_params , unsigned char
*rst_timer_params );

πŸŽ€ ARGUMENTS πŸŽ€

  • drv_data β€” the plug πŸ’… Pointer to the Watchdog driver data structure. Give it the driver's data struct, she needs the context.
  • timeout β€” the vibe check πŸ•°οΈ Your desired timeout value, in seconds. This is the target we're aiming at.
  • int_timer_params β€” the drop spot ✨ Pointer to store the calculated interrupt timer parameter index. The answer goes here, so make sure it's somewhere real to write to.
  • rst_timer_params β€” the other drop spot 🌸 Pointer to store the calculated reset timer parameter index. Second answer, second pointer.

🌈 DESCRIPTION 🌈

So what does she actually do? She calculates the optimal parameter combination for the interrupt timer and the reset timer of the Watchdog Timer, to achieve a timeout value closest to, but not less than the specified timeout. Closest to, but never under β€” she does not undershoot, and that is the whole point bestie πŸ‘‘

The algorithm, in order, because we love a numbered list:

  1. The parameters for both the interrupt timer and reset timer are predefined as a series of options represented as powers of 2. Iconic. Powers of 2 supremacy 🧚
  2. The function first determines the interrupt timer's parameter index that provides a time closest to and not exceeding the desired timeout.
  3. Based on the selected interrupt timer, it calculates the required reset timer parameter to ensure the total timeout matches the target. Teamwork fr fr 🫢
Heads up: the parameters are predefined as powers of 2 β€” she's picking from a menu, not inventing new values out of thin air, iykyk.

πŸ‘‘ RETURN πŸ‘‘

Nothing comes back out of the function itself β€” the calculated parameter indices are stored in the provided pointers. So you read your results from int_timer_params and rst_timer_params. Main character energy: she doesn't hand you the answer, she places it. πŸ’…


πŸ”₯ SEE ALSO πŸ”₯


and that's the whole page, bestie πŸ¦‹ it lives over in ./drivers/watchdog and it's dated October 2026 β€” so yeah, she's from the future and she still knows her powers of 2. periodt. β­πŸ’œ

πŸ“¦ where this page comes from