This is an automated email from the ASF dual-hosted git repository.

xiaoxiang781216 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git

commit cea17a9f7a1769d5cea9c59d4c40c3875b4f36d2
Author: likun17 <[email protected]>
AuthorDate: Mon Jul 14 12:53:37 2025 +0800

    drivers/sensors/sensor_rpmsg: Sync wakeup to a restarted advertiser.
    
    When the core that advertises a topic restarts, it broadcasts ADVERTISE
    again and the subscriber cores create a new proxy for it. They forward
    their interval and batch latency to the restarted core, but not the
    wakeup setting, so a wakeup subscriber no longer wakes up when new data
    is published.
    
    Also send SNIOC_SET_WAKEUP from sensor_rpmsg_update_config() when the
    local state has wakeup enabled.
    
    Signed-off-by: likun17 <[email protected]>
---
 drivers/sensors/sensor_rpmsg.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/sensors/sensor_rpmsg.c b/drivers/sensors/sensor_rpmsg.c
index e78ad1469e7..8e13f28be8d 100644
--- a/drivers/sensors/sensor_rpmsg.c
+++ b/drivers/sensors/sensor_rpmsg.c
@@ -1201,6 +1201,11 @@ static void sensor_rpmsg_update_config(FAR struct 
sensor_rpmsg_dev_s *dev,
     {
       sensor_rpmsg_ioctl(dev, SNIOC_BATCH, state->min_latency, 0, false);
     }
+
+  if (state->wakeup)
+    {
+      sensor_rpmsg_ioctl(dev, SNIOC_SET_WAKEUP, state->wakeup, 0, false);
+    }
 }
 
 static int sensor_rpmsg_adv_handler(FAR struct rpmsg_endpoint *ept,

Reply via email to