timers/oneshot: Remove all private callback.

This commit removed all private callback and handle it on the upperhalf
of oneshot.

Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
This commit is contained in:
ouyangxiangzhen
2025-09-10 15:33:27 +08:00
committed by Alin Jerpelea
parent f70ec7384b
commit 5c113f79b7
32 changed files with 144 additions and 606 deletions

View File

@@ -231,6 +231,9 @@ struct oneshot_lowerhalf_s
FAR const struct oneshot_operations_s *ops;
FAR oneshot_callback_t callback;
FAR void *arg;
/* Private lower half data may follow */
};
@@ -400,6 +403,15 @@ int oneshot_tick_current(FAR struct oneshot_lowerhalf_s *lower,
return ret;
}
static inline_function
void oneshot_process_callback(FAR struct oneshot_lowerhalf_s *lower)
{
if (lower->callback)
{
lower->callback(lower, lower->arg);
}
}
/****************************************************************************
* Name: oneshot_initialize
*