changeset 390:bb4814eb51e4

target-utils abb[rw] commands: call abb_init() to avoid dead hang
author Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
date Wed, 11 Jun 2014 07:11:16 +0000
parents e60aecf23970
children 8bbdf5221b24
files target-utils/libcommon/abbcmd.c
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/target-utils/libcommon/abbcmd.c	Wed Jun 11 06:50:46 2014 +0000
+++ b/target-utils/libcommon/abbcmd.c	Wed Jun 11 07:11:16 2014 +0000
@@ -25,6 +25,7 @@
 		printf("ERROR: argument(s) out of range\n");
 		return;
 	}
+	abb_init();
 	val = abb_reg_read(PAGE(pg) | reg);
 	printf("%03X\n", val);
 }
@@ -45,5 +46,6 @@
 		printf("ERROR: argument(s) out of range\n");
 		return;
 	}
+	abb_init();
 	abb_reg_write(PAGE(pg) | reg, val);
 }