Skip to content

Commit ef24463

Browse files
committed
[VirtIO] Disable support for dynamic creating endpoint
OpenAMP_Init accepts rpmsg_ns_bind_cb, however, this Arduino Core will not allow dynamic endpoint (VirtSerial) creation, but only support dynamic binding endpoints that are already created by VirIOSerial.begin(). Therefore just remove such parameters seems more appropriate. Reference: https://github.com/OpenAMP/open-amp/blob/7b32a1b72cdc8866eea0803f683c35af01814a56/docs/rpmsg-design.md Signed-off-by: Bumsik Kim <[email protected]>
1 parent 7b5857b commit ef24463

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

cores/arduino/VirtIOSerial.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ void VirtIOSerial::begin(void)
4343
if (initialized) {
4444
return;
4545
}
46-
OPENAMP_Init(NULL);
46+
OPENAMP_Init();
4747
if (VIRT_UART_Init(&huart) != VIRT_UART_OK) {
4848
// log_err("VIRT_UART_Init UART0 failed.\r\n");
4949
Error_Handler();

cores/arduino/stm32/virtio/openamp.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ static int OPENAMP_shmem_init(int RPMsgRole)
9898
return 0;
9999
}
100100

101-
int OPENAMP_Init(rpmsg_ns_bind_cb ns_bind_cb)
101+
int OPENAMP_Init()
102102
{
103103
struct fw_rsc_vdev_vring *vring_rsc;
104104
struct virtio_device *vdev;
@@ -136,7 +136,7 @@ int OPENAMP_Init(rpmsg_ns_bind_cb ns_bind_cb)
136136

137137
rpmsg_virtio_init_shm_pool(&shpool, (void *)VRING_BUFF_ADDRESS,
138138
(size_t)SHM_SIZE);
139-
rpmsg_init_vdev(&rvdev, vdev, ns_bind_cb, shm_io, &shpool);
139+
rpmsg_init_vdev(&rvdev, vdev, NULL, shm_io, &shpool);
140140

141141
return 0;
142142
}

cores/arduino/stm32/virtio/openamp.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ extern "C" {
3535
#define OPENAMP_destroy_ept rpmsg_destroy_ept
3636

3737
/* Initialize the openamp framework*/
38-
int OPENAMP_Init(rpmsg_ns_bind_cb ns_bind_cb);
38+
int OPENAMP_Init(void);
3939

4040
/* Deinitialize the openamp framework*/
4141
void OPENAMP_DeInit(void);

0 commit comments

Comments
 (0)