summaryrefslogtreecommitdiff
path: root/ao-tools/lib/ao-selfload.h
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2016-08-14 15:57:39 -0700
committerKeith Packard <keithp@keithp.com>2016-08-14 15:57:39 -0700
commit462039c769f2db9328b04759807c30691f2b96c2 (patch)
tree95abe520de391e20143baf8e31283de5c6e13fe5 /ao-tools/lib/ao-selfload.h
parentc62816a00b9aa40879a2ea98da2d10667e09b704 (diff)
ao-usbload: Check target device name to avoid mis-flashing
Instead of blindly loading firmware, go get the old device's name and make sure it matches the new firmware. Add --force option to allow this to be overridden. Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'ao-tools/lib/ao-selfload.h')
-rw-r--r--ao-tools/lib/ao-selfload.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/ao-tools/lib/ao-selfload.h b/ao-tools/lib/ao-selfload.h
index 71529d1e..4aac5848 100644
--- a/ao-tools/lib/ao-selfload.h
+++ b/ao-tools/lib/ao-selfload.h
@@ -22,6 +22,7 @@
#include <stdbool.h>
#include "ao-hex.h"
#include "cc-usb.h"
+#include "ao-editaltos.h"
struct ao_hex_image *
ao_self_read(struct cc_usb *cc, uint32_t address, uint32_t length);
@@ -35,4 +36,13 @@ ao_self_get_uint16(struct cc_usb *cc, uint32_t addr);
uint32_t
ao_self_get_uint32(struct cc_usb *cc, uint32_t addr);
+bool
+ao_self_get_usb_id(struct cc_usb *cc, struct ao_usb_id *id);
+
+uint16_t *
+ao_self_get_usb_product(struct cc_usb *cc);
+
+uint16_t *
+ao_self_get_usb_product(struct cc_usb *cc);
+
#endif /* _AO_SELFLOAD_H_ */