cc2538: uart: Fix crippled output occurring upon lpm_enter()

lpm_enter() must not enter PM1+ if the UART TX FIFO is not empty. Otherwise, the
UART clock gets disabled, and its TX is broken.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
This commit is contained in:
Benoît Thébaudeau 2013-11-15 17:24:26 +01:00
parent 0692ee251d
commit b8b54a033c
3 changed files with 14 additions and 2 deletions

View file

@ -102,7 +102,7 @@ static uint8_t max_pm;
#ifdef LPM_CONF_PERIPH_PERMIT_PM1_FUNCS_MAX
#define LPM_PERIPH_PERMIT_PM1_FUNCS_MAX LPM_CONF_PERIPH_PERMIT_PM1_FUNCS_MAX
#else
#define LPM_PERIPH_PERMIT_PM1_FUNCS_MAX 1
#define LPM_PERIPH_PERMIT_PM1_FUNCS_MAX 2
#endif
lpm_periph_permit_pm1_func_t