mirror of
https://github.com/OpenAMP/open-amp.git
synced 2026-10-02 18:23:21 +08:00
An application at device side might need to know if a buffer has been marked as device-writable by the driver. An example is the virtio SPI protocol, in which the direction of an half-duplex communication can be determined by the device only by checking if the buffer containing the data is writable or not. Add a simple helper to test if a buffer is device-writable, that is, if the VRING_DESC_F_WRITE flag is present on it. Signed-off-by: Francesco Valla <francesco@valla.it>