Explorar o código

Changed behaviour of the ISP line
Hold the ISP-enabling line for entire connection time, so it can be used also for driving Rx/Tx buffers.

k4be %!s(int64=12) %!d(string=hai) anos
pai
achega
b8f33eac32
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      lpc.c

+ 1 - 1
lpc.c

@@ -365,11 +365,11 @@ void lpc_reset(struct lpc_device *dev, int isp) {
   serial_setline(dev->port, SERIAL_DTR, 0);
   if(isp) {
     sprog_sleep(50);
-    lpc_ispmode(dev, 0);
   }
 }
 
 void lpc_close(struct lpc_device *dev) {
+  lpc_ispmode(dev, 0);
   lpc_reset(dev, 0);
   serial_close(dev->port);
   free(dev);