Intel® Makers
Intel® Edison, Intel® Joule™, Intel® Curie™, Intel® Galileo
Announcements
Welcome - This is a Peer-to-Peer Forum only. Intel has discontinued these products but you may find support from other customers on this Forum
9880 Discussions

How to clear UART buffer before reading ?

mgolu
New Contributor II
1,357 Views

As in subject I just wondering if there is possibility to clear UART buffer before we will start to use it (read from it)?

1 Solution
Pedro_M_Intel
Employee
203 Views

Hello mark_kram,

I believe what you would like to do is flush of the buffer, right? If that's the case, then, as you can see in the D2000 documentation (found in C:\IntelSWTools\ISSM_2016.0.027\firmware\bsp\1.0\doc\html) specifically in group__groupUART.html, there's no flush function.

However, you could implement your own routine which changes all of the ports signal (including control signals) to a default value.

-Peter.

View solution in original post

2 Replies
Pedro_M_Intel
Employee
204 Views

Hello mark_kram,

I believe what you would like to do is flush of the buffer, right? If that's the case, then, as you can see in the D2000 documentation (found in C:\IntelSWTools\ISSM_2016.0.027\firmware\bsp\1.0\doc\html) specifically in group__groupUART.html, there's no flush function.

However, you could implement your own routine which changes all of the ports signal (including control signals) to a default value.

-Peter.

mgolu
New Contributor II
203 Views

Hi Intel_Peter,

thank you for your respone. Now everything is clear.

Reply