Closed back2100 closed 1 year ago
I have already know how to send data to port
int sample_pd_send_func(void *data, uint8_t *buf, int len)
{
(void)(data);
(void)(buf);
write(fd, buf, len);
return len;
}
int sample_pd_recv_func(void *data, uint8_t *buf, int len)
{
(void)(data);
(void)(buf);
(void)(len);
read(fd, buf, len);
return 0;
}
question
I now have a project on the rv1109 platform, based on libosdp, to interact with osdp ControlPanel。 But I am wondering, after I opened the 485 serial port and get the file descriptor(Of course, I know that through the function write, data is sent to the 485 serial port), how to use libosdp?
sample code
question is,I don't know where to receive data(read function) and where to send it(write function)