- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
What's the difference between these functions and why would I want to use one over the other?
There's some information posted on this thread (Re: Peripheral UART: To FIFO, or not to FIFO) but the question isn't directly answered.
Solved! Go to Solution.
- Labels:
-
Peripherhal UART
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Andrew,
puart_print will only print a string - until a null character.
puart_write will only write a byte.
puart_synchrononusWrite - Keeps writing and might overflow and missing bytes - Not preferred.
Thanks
JT
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Not completely. Those posts are useful in that they discuss some of the "how" but not necessarily the "why" I would choose one over the other.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Andrew,
puart_print will only print a string - until a null character.
puart_write will only write a byte.
puart_synchrononusWrite - Keeps writing and might overflow and missing bytes - Not preferred.
Thanks
JT
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
puart_synchronousWrite - will essentially write a series of bytes, but unless you implement some form of flow control external, it will overflow the buffer and could cause bytes to be lost.
puart_write on the other hand will write one byte at a time, check the buffer, then write the next byte in a loop manner.
As JT mentions above, puart_write is almost always preferred over puart_synchronousWrite.