What is the correct way to determine the dst parameter for pru_rpmsg_send()? The echo example uses the value in the message it receives from the host. My app is only sending messages. For src, I use CHAN_PORT (31). As a hack I used the value 0x400 for dst, found here, and it works:
cat /sys/bus/virtio/drivers/virtio_rpmsg_bus/virtio0/rpmsg16/src
But there must be a programmatic way for the PRU application to determine this. I expected it to be returned from pru_rpmsg_channel(), but it is not. If necessary, my host app can send a dummy message to the PRU, where I'll capture the src parameter. Is it guaranteed that address will remain constant for the lifetime of the PRU app?
[ 2730.844514] virtio_rpmsg_bus virtio0: creating channel rpmsg-pru addr 0x1f
[ 2730.911727] rpmsg_pru rpmsg0: new rpmsg_pru device: /dev/rpmsg_pru31
Thanks,
Brian