From 1906bff17c1dc6e01c6e7d36391efb0cffa223b9 Mon Sep 17 00:00:00 2001 From: Marcus Linderoth Date: Wed, 28 Oct 2015 11:06:26 +0100 Subject: [PATCH] allow lpm_shutdown without a wake-up pin set --- cpu/cc26xx-cc13xx/lpm.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cpu/cc26xx-cc13xx/lpm.c b/cpu/cc26xx-cc13xx/lpm.c index 3484b74bf..67544bd0b 100644 --- a/cpu/cc26xx-cc13xx/lpm.c +++ b/cpu/cc26xx-cc13xx/lpm.c @@ -130,8 +130,10 @@ lpm_shutdown(uint32_t wakeup_pin, uint32_t io_pull, uint32_t wake_on) } /* Configure the wakeup trigger */ - ti_lib_gpio_dir_mode_set((1 << wakeup_pin), GPIO_DIR_MODE_IN); - ti_lib_ioc_port_configure_set(wakeup_pin, IOC_PORT_GPIO, io_cfg); + if(wakeup_pin != IOID_UNUSED) { + ti_lib_gpio_dir_mode_set((1 << wakeup_pin), GPIO_DIR_MODE_IN); + ti_lib_ioc_port_configure_set(wakeup_pin, IOC_PORT_GPIO, io_cfg); + } /* Freeze I/O latches in AON */ ti_lib_aon_ioc_freeze_enable();