From c3290fdabd75493efd1cc89abcb30f437c928a1d Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Thu, 2 Jul 2015 17:09:54 -0600 Subject: [PATCH] Modify board_power_off() so that is is called only via boardctl() --- arch/arm/src/calypso/calypso_power.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/arch/arm/src/calypso/calypso_power.c b/arch/arm/src/calypso/calypso_power.c index 721d8969d4..cb97d6cfff 100644 --- a/arch/arm/src/calypso/calypso_power.c +++ b/arch/arm/src/calypso/calypso_power.c @@ -2,6 +2,8 @@ * Included Files ****************************************************************************/ +#include + #include #include @@ -17,14 +19,17 @@ * board due to some other constraints. * * Input Parameters: - * None + * status - Status information provided with the power off event. * * Returned Value: - * None + * If this function returns, then it was not possible to power-off the + * board due to some constraints. The return value int this case is a + * board-specific reason for the failure to shutdown. * ****************************************************************************/ -void board_power_off(void) +#ifdef CONFIG_BOARDCTL_POWEROFF +void board_power_off(int status) { uint16_t tx; struct spi_dev_s *spi = up_spiinitialize(0); @@ -36,4 +41,8 @@ void board_power_off(void) tx = (1 << 6) | (30 << 1); SPI_SNDBLOCK(spi, &tx, 1); + + return 0; } +#endif +