|
@@ -61,7 +61,7 @@ struct lpc_device *lpc_setup(struct serial_device *port) {
|
|
dev = malloc(sizeof(struct lpc_device));
|
|
dev = malloc(sizeof(struct lpc_device));
|
|
dev->port = port;
|
|
dev->port = port;
|
|
dev->part = NULL;
|
|
dev->part = NULL;
|
|
- dev->reply_time = 500;
|
|
|
|
|
|
+ dev->reply_time = 5000;
|
|
lpc_reset(dev, 1);
|
|
lpc_reset(dev, 1);
|
|
return dev;
|
|
return dev;
|
|
}
|
|
}
|
|
@@ -345,6 +345,7 @@ void lpc_reset(struct lpc_device *dev, int isp) {
|
|
}
|
|
}
|
|
|
|
|
|
void lpc_close(struct lpc_device *dev) {
|
|
void lpc_close(struct lpc_device *dev) {
|
|
|
|
+ lpc_reset(dev, 0);
|
|
serial_close(dev->port);
|
|
serial_close(dev->port);
|
|
free(dev);
|
|
free(dev);
|
|
}
|
|
}
|