Merge branch 'master' of https://github.com/dsiroky/mspdebug into dsiroky-master

This commit is contained in:
Daniel Beer 2016-07-19 08:38:25 +12:00
commit c0f3d2f259
1 changed files with 13 additions and 3 deletions

View File

@ -597,9 +597,19 @@ static device_t flash_bsl_open(const struct device_args *args)
dev->long_password = args->flags & DEVICE_FLAG_LONG_PW; dev->long_password = args->flags & DEVICE_FLAG_LONG_PW;
/* enter bootloader */ /* enter bootloader */
if (bsllib_seq_do(dev->serial_fd, dev->seq) < 0) { if ( args->bsl_gpio_used )
printc_err("BSL entry sequence failed\n"); {
goto fail; if (bsllib_seq_do_gpio(args->bsl_gpio_rts, args->bsl_gpio_dtr, dev->seq) < 0) {
printc_err("BSL entry sequence failed\n");
goto fail;
}
}
else
{
if (bsllib_seq_do(dev->serial_fd, dev->seq) < 0) {
printc_err("BSL entry sequence failed\n");
goto fail;
}
} }
delay_ms(500); delay_ms(500);