Separate tasks for serial port transmit and receive

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Separate tasks for serial port transmit and receive

1,453 次查看
getuptime
Contributor I

Does anyone know how to set up separate tasks for serial transmit and receive or if it's necessary? Can you assign different file pointers for tx and rx? Or do you have to use a semaphore to make sure that your transmit and receive  tasks don't access the port simultaneously?

Thanks.

0 项奖励
回复
1 回复

657 次查看
CarlFST60L
Senior Contributor II

You can run two comm ports, you can run them seperately with their own threads (tasks), you can assume that all MQX RToS functions are thread safe and re entry safe unless otherwise specified.

 

 Looks like you probably need to do some research on programming multithreaded systems. Maybe start by reading the MQXUG.pdf

0 项奖励
回复