From 5665d2f88a6c8795415600e936567371362b60b4 Mon Sep 17 00:00:00 2001 From: Jukka Laitinen Date: Tue, 7 Feb 2023 16:02:43 +0400 Subject: [PATCH] Fix HRT for protected/kernel builds The HRT driver was not storing the callback function or argument Signed-off-by: Jukka Laitinen --- platforms/nuttx/src/px4/common/hrt_ioctl.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/platforms/nuttx/src/px4/common/hrt_ioctl.c b/platforms/nuttx/src/px4/common/hrt_ioctl.c index 7c17e84272ee..5ffc5f5b9bae 100644 --- a/platforms/nuttx/src/px4/common/hrt_ioctl.c +++ b/platforms/nuttx/src/px4/common/hrt_ioctl.c @@ -128,6 +128,11 @@ static struct usr_hrt_call *dup_entry(const px4_hrt_handle_t handle, struct hrt_ } if (e) { + + /* Store the user side callout function and argument to the user's handle */ + entry->callout = callout; + entry->arg = arg; + /* Store reference to the kernel side entry to the user side struct and * references to the semaphore and user side entry to the kernel side item */