diff --git a/lpc111x-isp/lpc111x.c b/lpc111x-isp/lpc111x.c index c0269c5..5e82852 100644 --- a/lpc111x-isp/lpc111x.c +++ b/lpc111x-isp/lpc111x.c @@ -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");