mirror of
https://github.com/oliverschmidt/contiki.git
synced 2025-01-18 03:30:31 +00:00
07272b7cd6
* Only enable TX by default. * Add some magic for RX handling. When an input handler is registered: * Automatically enable RX-related and interrupts * Automatically lock the SERIAL PD on under all power modes * Automatically enable the UART clock under sleep and deep sleep * Automatically undo all of the above when the input handler becomes NULL * As a result, modules / examples that need UART RX no longer need to clock the UART and manipulate the SERIAL PD. They simply have to specify an input handler * Don't automatically power on the UART whenever the CM3 is active * Before accessing the UART, make sure it is powered and clocked * Avoid falling edge glitches * Fix garbage characters / Explicitly wait for UART TX to complete