mirror of
https://github.com/apache/nuttx.git
synced 2026-06-05 15:58:59 +08:00
Add support for a BOARDIOC_RESET boardctl() command
This commit is contained in:
+19
-5
@@ -1328,21 +1328,26 @@ config NSH_MMCSDMINOR
|
|||||||
default 0
|
default 0
|
||||||
depends on NSH_LIBRARY && MMCSD
|
depends on NSH_LIBRARY && MMCSD
|
||||||
---help---
|
---help---
|
||||||
If board-specific NSH start-up logic needs to mount an MMC/SD device, then the setting should be provided to identify the MMC/SD minor device number (i.e., the N in /dev/mmcsdN). Default 0
|
If board-specific NSH start-up logic needs to mount an MMC/SD device, then the
|
||||||
|
setting should be provided to identify the MMC/SD minor device number (i.e., the N ini
|
||||||
|
/dev/mmcsdN). Default 0
|
||||||
|
|
||||||
config NSH_MMCSDSLOTNO
|
config NSH_MMCSDSLOTNO
|
||||||
int "MMC/SD slot number"
|
int "MMC/SD slot number"
|
||||||
default 0
|
default 0
|
||||||
depends on NSH_LIBRARY && MMCSD
|
depends on NSH_LIBRARY && MMCSD
|
||||||
---help---
|
---help---
|
||||||
If board-specific NSH start-up supports more than one MMC/SD slot, then this setting should be provided to indicate which slot should be used. Default: 0.
|
If board-specific NSH start-up supports more than one MMC/SD slot, then this setting
|
||||||
|
should be provided to indicate which slot should be used. Default: 0.
|
||||||
|
|
||||||
config NSH_MMCSDSPIPORTNO
|
config NSH_MMCSDSPIPORTNO
|
||||||
int "MMC/SD SPI device number"
|
int "MMC/SD SPI device number"
|
||||||
default 0
|
default 0
|
||||||
depends on NSH_LIBRARY && MMCSD && MMCSD_SPI
|
depends on NSH_LIBRARY && MMCSD && MMCSD_SPI
|
||||||
---help---
|
---help---
|
||||||
If board-specif NSH start-up logic will mount an SPI-based MMC/SD volume, then this setting may be needed to tell the board logic which SPI bus to use. Default: 0 (meaning is board-specific).
|
If board-specif NSH start-up logic will mount an SPI-based MMC/SD volume, then this
|
||||||
|
setting may be needed to tell the board logic which SPI bus to use. Default: 0
|
||||||
|
(meaning is board-specific).
|
||||||
|
|
||||||
comment "Board-Specific Options"
|
comment "Board-Specific Options"
|
||||||
|
|
||||||
@@ -1672,12 +1677,21 @@ config LIB_BOARDCTL
|
|||||||
if LIB_BOARDCTL
|
if LIB_BOARDCTL
|
||||||
|
|
||||||
config BOARDCTL_POWEROFF
|
config BOARDCTL_POWEROFF
|
||||||
bool "Enable power off command"
|
bool "Enable power off interfaces"
|
||||||
default n
|
default n
|
||||||
depends on ARCH_HAVE_POWEROFF
|
depends on ARCH_HAVE_POWEROFF
|
||||||
---help---
|
---help---
|
||||||
Enables support for the BOARDIOC_POWEROFF boardctl() command.
|
Enables support for the BOARDIOC_POWEROFF boardctl() command.
|
||||||
Architecture specific logic must provide board_power_off()
|
Architecture specific logic must provide the board_power_off()
|
||||||
|
interface.
|
||||||
|
|
||||||
|
config BOARDCTL_RESET
|
||||||
|
bool "Enable reset interfaces"
|
||||||
|
default n
|
||||||
|
depends on ARCH_HAVE_RESET
|
||||||
|
---help---
|
||||||
|
Enables support for the BOARDIOC_RESET boardctl() command.
|
||||||
|
Architecture specific logic must provide the board_reset()
|
||||||
interface.
|
interface.
|
||||||
|
|
||||||
config BOARDCTL_TSCTEST
|
config BOARDCTL_TSCTEST
|
||||||
|
|||||||
@@ -114,6 +114,21 @@ int boardctl(unsigned int cmd, uintptr_t arg)
|
|||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef CONFIG_BOARDCTL_RESET
|
||||||
|
/* CMD: BOARDIOC_RESET
|
||||||
|
* DESCRIPTION: Reset the board
|
||||||
|
* ARG: Integer value providing power off status information
|
||||||
|
* CONFIGURATION: CONFIG_BOARDCTL_RESET
|
||||||
|
* DEPENDENCIES: Board logic must provide board_reset
|
||||||
|
*/
|
||||||
|
|
||||||
|
case BOARDIOC_RESET:
|
||||||
|
{
|
||||||
|
ret = board_reset((int)arg);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_BOARDCTL_TSCTEST
|
#ifdef CONFIG_BOARDCTL_TSCTEST
|
||||||
/* CMD: BOARDIOC_TSCTEST_SETUP
|
/* CMD: BOARDIOC_TSCTEST_SETUP
|
||||||
* DESCRIPTION: Touchscreen controller test configuration
|
* DESCRIPTION: Touchscreen controller test configuration
|
||||||
|
|||||||
Reference in New Issue
Block a user