1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

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:
Benjamin Valentin 2020-06-30 23:02:01 +02:00
parent 028c0d4b3c
commit 33ef4f2902
3 changed files with 10 additions and 4 deletions

View File

@ -48,6 +48,11 @@ int usb_board_reset_coding_cb(usbus_cdcacm_device_t *cdcacm,
*/
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
}
#endif

View File

@ -22,6 +22,11 @@
#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)
{
(void) argc;
@ -33,8 +38,6 @@ int _reboot_handler(int argc, char **argv)
}
#ifdef MODULE_USB_BOARD_RESET
void usb_board_reset_in_bootloader(void);
int _bootloader_handler(int argc, char **argv)
{
(void) argc;

View File

@ -32,8 +32,6 @@
#define RESET_IN_APPLICATION_TRIGGER_BAUDRATE (600U)
#endif
void usb_board_reset_in_bootloader(void);
int usb_board_reset_coding_cb(usbus_cdcacm_device_t *cdcacm,
uint32_t baud, uint8_t bits,
uint8_t parity, uint8_t stop)