With this API, user can get the rx buffer size, and use this buffer safer in endpoint callback function.
Follow shows an example:
static int rpmsgfs_ept_cb(FAR struct rpmsg_endpoint *ept,
FAR void *data, size_t len, uint32_t src,
FAR void *priv)
{
/* No need extra stack variable or malloced buffer, user can fill the response data in the data directly,
* And to avoid the data overflow, user can call rpmsg_virtio_get_rx_buffer_size() to get the limitation
* of input data.
*/
/* Call rpmsg_send(ept, data, data_len) to send the response data */
rpmsg_send(ept, data, len);
}
With this API, user can get the rx buffer size, and use this buffer safer in endpoint callback function. Follow shows an example: