mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-18 02:43:33 +08:00
reboot: Add reboot to ISP option
This commit is contained in:
committed by
Daniel Agar
parent
8ba18a78af
commit
84093a07a2
@@ -70,6 +70,12 @@ __EXPORT int px4_register_shutdown_hook(shutdown_hook_t hook);
|
||||
*/
|
||||
__EXPORT int px4_unregister_shutdown_hook(shutdown_hook_t hook);
|
||||
|
||||
/** Types of reboot requests for PX4 */
|
||||
typedef enum {
|
||||
REBOOT_REQUEST = 0, ///< Normal reboot
|
||||
REBOOT_TO_BOOTLOADER = 1, ///< Reboot to PX4 bootloader
|
||||
REBOOT_TO_ISP = 2, ///< Reboot to ISP bootloader
|
||||
} reboot_request_t;
|
||||
|
||||
/**
|
||||
* Request the system to reboot.
|
||||
@@ -83,7 +89,7 @@ __EXPORT int px4_unregister_shutdown_hook(shutdown_hook_t hook);
|
||||
* @return 0 on success, <0 on error
|
||||
*/
|
||||
#if defined(CONFIG_BOARDCTL_RESET)
|
||||
__EXPORT int px4_reboot_request(bool to_bootloader = false, uint32_t delay_us = 0);
|
||||
__EXPORT int px4_reboot_request(reboot_request_t request = REBOOT_REQUEST, uint32_t delay_us = 0);
|
||||
#endif // CONFIG_BOARDCTL_RESET
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user