sys/usb_board_reset: add usb_board_reset_in_bootloader definition
Move the definition of usb_board_reset_in_bootloader() to a common location.
This commit is contained in:
parent
028c0d4b3c
commit
33ef4f2902
@ -48,6 +48,11 @@ int usb_board_reset_coding_cb(usbus_cdcacm_device_t *cdcacm,
|
|||||||
*/
|
*/
|
||||||
void usb_board_reset_in_application(void);
|
void usb_board_reset_in_application(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Trigger a bootloader reset, start the bootloader after reset
|
||||||
|
*/
|
||||||
|
void usb_board_reset_in_bootloader(void);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@ -22,6 +22,11 @@
|
|||||||
|
|
||||||
#include "periph/pm.h"
|
#include "periph/pm.h"
|
||||||
|
|
||||||
|
#ifdef MODULE_USB_BOARD_RESET
|
||||||
|
#define USB_H_USER_IS_RIOT_INTERNAL
|
||||||
|
#include "usb_board_reset.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
int _reboot_handler(int argc, char **argv)
|
int _reboot_handler(int argc, char **argv)
|
||||||
{
|
{
|
||||||
(void) argc;
|
(void) argc;
|
||||||
@ -33,8 +38,6 @@ int _reboot_handler(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef MODULE_USB_BOARD_RESET
|
#ifdef MODULE_USB_BOARD_RESET
|
||||||
void usb_board_reset_in_bootloader(void);
|
|
||||||
|
|
||||||
int _bootloader_handler(int argc, char **argv)
|
int _bootloader_handler(int argc, char **argv)
|
||||||
{
|
{
|
||||||
(void) argc;
|
(void) argc;
|
||||||
|
|||||||
@ -32,8 +32,6 @@
|
|||||||
#define RESET_IN_APPLICATION_TRIGGER_BAUDRATE (600U)
|
#define RESET_IN_APPLICATION_TRIGGER_BAUDRATE (600U)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void usb_board_reset_in_bootloader(void);
|
|
||||||
|
|
||||||
int usb_board_reset_coding_cb(usbus_cdcacm_device_t *cdcacm,
|
int usb_board_reset_coding_cb(usbus_cdcacm_device_t *cdcacm,
|
||||||
uint32_t baud, uint8_t bits,
|
uint32_t baud, uint8_t bits,
|
||||||
uint8_t parity, uint8_t stop)
|
uint8_t parity, uint8_t stop)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user