mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-24 16:55:36 +03:00
Made MSC initialisation pin configurable. (#5535)
This commit is contained in:
parent
605962d9a5
commit
83e614c139
13 changed files with 99 additions and 69 deletions
|
@ -456,13 +456,13 @@ void init(void)
|
|||
#ifdef USE_USB_MSC
|
||||
/* MSC mode will start after init, but will not allow scheduler to run,
|
||||
* so there is no bottleneck in reading and writing data */
|
||||
mscButtonInit();
|
||||
if (*((uint32_t *)0x2001FFF0) == 0xDDDD1010 || mscButton()) {
|
||||
if (startMsc() == 0) {
|
||||
mscCheck();
|
||||
} else {
|
||||
NVIC_SystemReset();
|
||||
}
|
||||
mscInit();
|
||||
if (*((uint32_t *)0x2001FFF0) == 0xDDDD1010 || mscCheckButton()) {
|
||||
if (mscStart() == 0) {
|
||||
mscWaitForButton();
|
||||
} else {
|
||||
NVIC_SystemReset();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue