mirror of
https://github.com/ArduPilot/ardupilot.git
synced 2026-11-09 16:41:21 +08:00
AP_Bootloader: support uarts and usb for bootloading
This commit is contained in:
1 parent
369ac5edd0
commit
fe4aa4bbc7
4 files changed
+132
-49
No files matched your search
@@ -35,15 +35,13 @@ extern "C" {
|
||||
|
||||
struct boardinfo board_info;
|
||||
|
||||
#ifndef BOOTLOADER_BAUDRATE
|
||||
#define BOOTLOADER_BAUDRATE 115200
|
||||
#endif
|
||||
|
||||
int main(void)
|
||||
{
|
||||
sduObjectInit(&SDU1);
|
||||
sduStart(&SDU1, &serusbcfg);
|
||||
|
||||
usbDisconnectBus(serusbcfg.usbp);
|
||||
chThdSleepMilliseconds(1000);
|
||||
usbStart(serusbcfg.usbp, &usbcfg);
|
||||
usbConnectBus(serusbcfg.usbp);
|
||||
init_uarts();
|
||||
|
||||
board_info.board_type = APJ_BOARD_ID;
|
||||
board_info.board_rev = 0;
|
||||
|
||||
Reference in new issue
Block a user