From: Nathael Pajani Date: Thu, 21 Sep 2023 22:18:05 +0000 (+0200) Subject: Adding comment for future RTOS/multitasking integration X-Git-Url: http://git.techno-innov.fr/?a=commitdiff_plain;h=e0c000d0425b1498c9f13fd99eb3a07f3969711f;p=soft%2Flpc122x%2Fcore Adding comment for future RTOS/multitasking integration --- diff --git a/drivers/serial.c b/drivers/serial.c index c11fd40..dfa3a1c 100644 --- a/drivers/serial.c +++ b/drivers/serial.c @@ -18,6 +18,18 @@ * *************************************************************************** */ +/* + * Note for multitasking and/or real-time OS design : + * Some functions in this driver may spend some time waiting for external + * events or other tasks. + * The concerned functions are serial_write() and serial_flush(). + * These functions should call the scheduler at some point to avoid using more + * time than required or even hang the system. + * Also note that when an uart receives a character this driver will call the + * handler registered by the application (if any). This handler should be kept + * as short as possible, and must not call any OS related function as it will + * be executed within interrupt context. + */ /***************************************************************************** */