bsp/rv32m1_vega_hybrid/risc-v/sdk/multicore_2.3.1/rpmsg_lite/lib/rpmsg_lite/rpmsg_ns.c
/*!
 * @brief
 * Nameservice callback, called in interrupt context
 *
 * @param payload     Pointer to the buffer containing received data
 * @param payload_len Size of data received, in bytes
 * @param src         Pointer to address of the endpoint from which data is received
 * @param priv        Private data provided during endpoint creation
 *
 * @return  RL_RELEASE, message is always freed
 *
 */
@brief
Nameservice callback, called in interrupt context

@param payload     Pointer to the buffer containing received data
@param payload_len Size of data received, in bytes
@param src         Pointer to address of the endpoint from which data is received
@param priv        Private data provided during endpoint creation

@return  RL_RELEASE, message is always freed
@brief Nameservice callback called in interrupt context @param payload Pointer to the buffer containing received data @param payload_len Size of data received in bytes @param src Pointer to address of the endpoint from which data is received @param priv Private data provided during endpoint creation @return RL_RELEASE message is always freed
int rpmsg_ns_rx_cb(void *payload, int payload_len, unsigned long src, void *priv)
{
    struct rpmsg_ns_msg *ns_msg_ptr = payload;
    struct rpmsg_ns_callback_data *cb_ctxt = priv;
    RL_ASSERT(priv);
    RL_ASSERT(cb_ctxt->cb);
    if (payload_len == sizeof(struct rpmsg_ns_msg))
        cb_ctxt->cb(ns_msg_ptr->addr, ns_msg_ptr->name, ns_msg_ptr->flags, cb_ctxt->user_data);
    return RL_RELEASE;
}
int rpmsg_ns_rx_cb ( void * payload , int payload_len , unsigned long src , void * priv ) { struct rpmsg_ns_msg * ns_msg_ptr = payload ; struct rpmsg_ns_callback_data * cb_ctxt = priv ; RL_ASSERT ( priv ) ; RL_ASSERT ( cb_ctxt -> cb ) ; if ( payload_len == sizeof ( struct rpmsg_ns_msg ) ) cb_ctxt -> cb ( ns_msg_ptr -> addr , ns_msg_ptr -> name , ns_msg_ptr -> flags , cb_ctxt -> user_data ) ; return RL_RELEASE ; }
@brief
 Nameservice callback, called in interrupt context
@brief Nameservice callback called in interrupt context
/* Drop likely bad messages received at nameservice address */