Skip to content

Commit fa932ad

Browse files
committed
Set RPMSG header size
1 parent 88f42e6 commit fa932ad

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

cores/arduino/VirtIOSerial.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ int VirtIOSerial::availableForWrite()
9292
{
9393
// Just return max length of VIRT_UART_Transmit() can transmit.
9494
// See VIRT_UART_Transmit().
95-
return RPMSG_BUFFER_SIZE - 16;
95+
return RPMSG_BUFFER_SIZE - RPMSG_VRING_HEADER_SIZE;
9696
}
9797

9898
int VirtIOSerial::peek(void)

cores/arduino/stm32/OpenAMP/virtio_config.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,7 @@
77
#define RPMSG_BUFFER_SIZE (512)
88
#endif
99

10+
// Size of the vqueue message in the buffer
11+
#define RPMSG_VRING_HEADER_SIZE 16
12+
1013
#endif // __VIRTIO_CONFIG_H

0 commit comments

Comments
 (0)