atcwdt_get_timeout_params(9)
π
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:
- 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 π§
- The function first determines the interrupt timer's parameter index that provides a time closest to and not exceeding the desired timeout.
- 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 π₯
- Kernel file
./drivers/watchdog/atcwdt200_wdt.c enum timer_type(9)struct atcwdt_drv(9)atcwdt_get_index(9)atcwdt_get_clock_period(9)atcwdt_get_int_timer_type(9)
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
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms