At least you will be certain that you can read and write to a fileDescriptor as expected. To verify the operations on fileDescriptors, you can ditch the serial port and open a file as a test. So make sure you are actually using the correct port name. To sum it up, this should be a MWE: fd=open("/t圜o/0",2)Īs a side note, t圜o/0 is often the serial port that is used for the vxWorks shell communication. For this purpose, a paperclip is used to short pin 2 to pin 3 (the receive and transmit pins). It utilizes a terminal emulator application to send characters, with flow control set to off, to the serial port and receive the same back. But having done the exact thing you are trying to do, this is how it is supposed to look like. A simple serial interface loopback test, called paperclip test, is sometimes used to identify serial ports of a computer and verify operation. No need to take the address of it (and I am not sure if VxWorks shell handles address referencing of its variables)Īs a disclaimer, currently I do not have a system to test these steps below. So you do not have to spawn a task for it, can be just called from the command line (and if it blocks due to lack of input you can break the call and restart the command line task by sending CTRL-C via a terminal)Īnother point is, W is a pointer, that points to the allocated memory. Read call is blocking as you suggest, but only blocks if there is nothing to read.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |