1
0
mirror of git://projects.qi-hardware.com/ben-blinkenlights.git synced 2024-11-04 22:53:08 +02:00

lpc111x-isp/lpc111x.c (start_isp): check for swuart_open failure

This commit is contained in:
Werner Almesberger 2012-12-31 19:29:35 -03:00
parent 0b81ffabd1
commit 6dfaeddd15

View File

@ -548,7 +548,10 @@ static void start_isp(int power)
CLR(TGT_nISP);
OUT(TGT_nISP);
swuart_open(HOST_TX, HOST_RX, BPS);
if (swuart_open(HOST_TX, HOST_RX, BPS) < 0) {
perror("swuart_open");
exit(1);
}
if (!autobaud()) {
fprintf(stderr, "target is not responding\n");