mirror of
https://github.com/apache/nuttx.git
synced 2025-12-11 12:57:57 +08:00
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:
committed by
Alin Jerpelea
parent
f70ec7384b
commit
5c113f79b7
@@ -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
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user