Tool/software:
HI
When I am using M-core and A-core for IPC communication, I want to create multiple threads to operate on IPC. Can I create multiple IPC nodes to communicate with M-core, so that read and write operations can be separated. Do I need to initialize rpmsgchar_init once and input a different remote_dedpt for rpmsgchar_open?
int ipc_init( rpmsg_char_dev_t **rcdev){
int ret;
char eptdev_name[32] = {0};
int flags = 0;
int remote_endpt = REMOTE_ENDPT;
char* dev_name = NULL;
ret = rpmsg_char_init(NULL);
if (ret) {
printf("rpmsg_char_init failed, ret = %d\n", ret);
return ret;
}
sprintf(eptdev_name, "rpmsg-char-%d-%d", RPROC_ID, getpid());
*rcdev = (rpmsg_char_dev_t*)malloc(sizeof(rpmsg_char_dev_t));
*rcdev = rpmsg_char_open(RPROC_ID, dev_name, remote_endpt,
eptdev_name, flags);
if (*rcdev == NULL) {
perror("Memory allocation failed");
return -ENOMEM;
}
return 0;
}