This is an automated email from the ASF dual-hosted git repository. acassis pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit 723850e8845a045bcda42841adde0f8570bda56d Author: Bowen Wang <[email protected]> AuthorDate: Fri Aug 22 22:13:02 2025 +0800 drivers/rpmsg: move struct rpmsg_s and rpmsg_ops_s to the private header Only the rpmsg transports in drivers/rpmsg use struct rpmsg_s and struct rpmsg_ops_s. Move them from include/nuttx/rpmsg/rpmsg.h to drivers/rpmsg/rpmsg.h so they are no longer part of the public API. Signed-off-by: Bowen Wang <[email protected]> --- drivers/rpmsg/rpmsg.h | 36 ++++++++++++++++++++++++++++++++++++ include/nuttx/rpmsg/rpmsg.h | 36 ------------------------------------ 2 files changed, 36 insertions(+), 36 deletions(-) diff --git a/drivers/rpmsg/rpmsg.h b/drivers/rpmsg/rpmsg.h index 78a2f7414e6..a93f5255526 100644 --- a/drivers/rpmsg/rpmsg.h +++ b/drivers/rpmsg/rpmsg.h @@ -35,6 +35,42 @@ * Public Types ****************************************************************************/ +struct rpmsg_s +{ + bool init; + struct metal_list bind; + rmutex_t lock; + struct metal_list node; + char local_cpuname[RPMSG_NAME_SIZE]; + char cpuname[RPMSG_NAME_SIZE]; + FAR const struct rpmsg_ops_s *ops; +#ifdef CONFIG_RPMSG_PING + struct rpmsg_endpoint ping; +#endif +#ifdef CONFIG_RPMSG_TEST + struct rpmsg_endpoint test; +#endif + atomic_t signals; +}; + +/** + * struct rpmsg_ops_s - Rpmsg device operations + * wait: wait sem. + * post: post sem. + * get_cpuname: get cpu name. + */ + +struct rpmsg_ops_s +{ + CODE int (*wait)(FAR struct rpmsg_s *rpmsg, FAR sem_t *sem); + CODE int (*post)(FAR struct rpmsg_s *rpmsg, FAR sem_t *sem); + CODE int (*ioctl)(FAR struct rpmsg_s *rpmsg, int cmd, unsigned long arg); + CODE void (*panic)(FAR struct rpmsg_s *rpmsg); + CODE void (*dump)(FAR struct rpmsg_s *rpmsg); + CODE int (*get_timestamp)(FAR struct rpmsg_s *rpmsg, FAR const void *data, + FAR struct rpmsg_timestamp_s *ts); +}; + CODE typedef int (*rpmsg_foreach_t)(FAR struct rpmsg_s *rpmsg, FAR void *args); diff --git a/include/nuttx/rpmsg/rpmsg.h b/include/nuttx/rpmsg/rpmsg.h index ffce5eed40b..abe198467d4 100644 --- a/include/nuttx/rpmsg/rpmsg.h +++ b/include/nuttx/rpmsg/rpmsg.h @@ -61,48 +61,12 @@ struct rpmsg_ping_s int sleep; /* unit: ms */ }; -struct rpmsg_s -{ - bool init; - struct metal_list bind; - rmutex_t lock; - struct metal_list node; - char local_cpuname[RPMSG_NAME_SIZE]; - char cpuname[RPMSG_NAME_SIZE]; - FAR const struct rpmsg_ops_s *ops; -#ifdef CONFIG_RPMSG_PING - struct rpmsg_endpoint ping; -#endif -#ifdef CONFIG_RPMSG_TEST - struct rpmsg_endpoint test; -#endif - atomic_t signals; -}; - struct rpmsg_timestamp_s { uint64_t tx_nsec; uint64_t rx_nsec; }; -/** - * struct rpmsg_ops_s - Rpmsg device operations - * wait: wait sem. - * post: post sem. - * get_cpuname: get cpu name. - */ - -struct rpmsg_ops_s -{ - CODE int (*wait)(FAR struct rpmsg_s *rpmsg, FAR sem_t *sem); - CODE int (*post)(FAR struct rpmsg_s *rpmsg, FAR sem_t *sem); - CODE int (*ioctl)(FAR struct rpmsg_s *rpmsg, int cmd, unsigned long arg); - CODE void (*panic)(FAR struct rpmsg_s *rpmsg); - CODE void (*dump)(FAR struct rpmsg_s *rpmsg); - CODE int (*get_timestamp)(FAR struct rpmsg_s *rpmsg, FAR const void *data, - FAR struct rpmsg_timestamp_s *ts); -}; - CODE typedef void (*rpmsg_dev_cb_t)(FAR struct rpmsg_device *rdev, FAR void *priv); CODE typedef bool (*rpmsg_match_cb_t)(FAR struct rpmsg_device *rdev,
