uart_read_bytes() concurrent behavior

DurandA
Posts: 17
Joined: Thu Nov 26, 2015 11:51 pm

uart_read_bytes() concurrent behavior

Postby DurandA » Sun Sep 08, 2019 10:53 pm

Does uart_read_bytes() yield so other tasks can run before the timeout? If not, what is the best strategy to prevent starvation?

My goal is to read GPS data as soon as available (as done here: https://github.com/nkolban/esp32-snippe ... main/gps.c) without blocking other tasks.

WiFive
Posts: 3529
Joined: Tue Dec 01, 2015 7:35 am

Re: uart_read_bytes() concurrent behavior

Postby WiFive » Mon Sep 09, 2019 2:00 am

Yes

DurandA
Posts: 17
Joined: Thu Nov 26, 2015 11:51 pm

Re: uart_read_bytes() concurrent behavior

Postby DurandA » Mon Sep 09, 2019 9:25 am

Thanks!

Who is online

Users browsing this forum: No registered users and 94 guests