projects
/
fw
/
altos
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
doc: Fix typo in TeleBT v3 flash-force instructions
[fw/altos]
/
ao-tools
/
ao-usbload
/
ao-usbload.c
diff --git
a/ao-tools/ao-usbload/ao-usbload.c
b/ao-tools/ao-usbload/ao-usbload.c
index d0579de1c4a5d4229f0aab1f9ce71370aec0a4e2..6da57bace36b6b53ad6ff51bf0b078373311ebf9 100644
(file)
--- a/
ao-tools/ao-usbload/ao-usbload.c
+++ b/
ao-tools/ao-usbload/ao-usbload.c
@@
-96,7
+96,7
@@
static void usage(char *program)
exit(1);
}
exit(1);
}
-void
+
static
void
done(struct cc_usb *cc, int code)
{
/* cc_usb_printf(cc, "a\n"); */
done(struct cc_usb *cc, int code)
{
/* cc_usb_printf(cc, "a\n"); */
@@
-124,7
+124,7
@@
ucs2len(uint16_t *ucs2)
return len;
}
return len;
}
-int
+
static
int
putucs4(uint32_t c, FILE *file)
{
char d;
putucs4(uint32_t c, FILE *file)
{
char d;
@@
-162,23
+162,14
@@
main (int argc, char **argv)
{
char *device = NULL;
char *filename;
{
char *device = NULL;
char *filename;
- Elf *e;
int raw = 0;
char *serial_end;
unsigned int serial = 0;
int raw = 0;
char *serial_end;
unsigned int serial = 0;
- char *serial_ucs2;
- int serial_ucs2_len;
- char serial_int[2];
- unsigned int s;
- int i;
- int string_num;
uint32_t cal = 0;
uint32_t cal = 0;
- char cal_int[4];
char *cal_end;
int c;
int was_flashed = 0;
struct ao_hex_image *load;
char *cal_end;
int c;
int was_flashed = 0;
struct ao_hex_image *load;
- int tries;
struct cc_usb *cc = NULL;
char *tty = NULL;
int success;
struct cc_usb *cc = NULL;
char *tty = NULL;
int success;
@@
-189,7
+180,7
@@
main (int argc, char **argv)
int has_flash_size = 0;
int force = 0;
int has_flash_size = 0;
int force = 0;
- while ((c = getopt_long(argc, argv, "wrT:D:c:s:v:", options, NULL)) != -1) {
+ while ((c = getopt_long(argc, argv, "wr
f
T:D:c:s:v:", options, NULL)) != -1) {
switch (c) {
case 'T':
tty = optarg;
switch (c) {
case 'T':
tty = optarg;
@@
-400,11
+391,11
@@
main (int argc, char **argv)
}
new_len = ucs2len(new_product);
old_len = ucs2len(old_product);
}
new_len = ucs2len(new_product);
old_len = ucs2len(old_product);
- if (
1 ||
new_len != old_len || memcmp(new_product, old_product, new_len * 2) != 0) {
+ if (new_len != old_len || memcmp(new_product, old_product, new_len * 2) != 0) {
fprintf(stderr, "USB product mismatch (device is ");
fprintf(stderr, "USB product mismatch (device is ");
- putucs2str(new_product, stderr);
- fprintf(stderr, ", image is ");
putucs2str(old_product, stderr);
putucs2str(old_product, stderr);
+ fprintf(stderr, ", image is ");
+ putucs2str(new_product, stderr);
fprintf(stderr, ")\n");
done(cc, 1);
}
fprintf(stderr, ")\n");
done(cc, 1);
}
@@
-413,7
+404,6
@@
main (int argc, char **argv)
if (!ao_editaltos(load, serial, cal))
done(cc, 1);
}
if (!ao_editaltos(load, serial, cal))
done(cc, 1);
}
- done(cc, 0);
/* And flash the resulting image to the device
*/
/* And flash the resulting image to the device
*/