projects
/
libam7xxx.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Implement am7xxx_set_power_mode()
[libam7xxx.git]
/
src
/
picoproj.c
diff --git
a/src/picoproj.c
b/src/picoproj.c
index
0b9e45c
..
7485f71
100644
(file)
--- a/
src/picoproj.c
+++ b/
src/picoproj.c
@@
-89,6
+89,10
@@
int main(int argc, char *argv[])
exit(EXIT_FAILURE);
}
break;
exit(EXIT_FAILURE);
}
break;
+ case 'h':
+ usage(argv[0]);
+ exit(EXIT_SUCCESS);
+ break;
default: /* '?' */
usage(argv[0]);
exit(EXIT_FAILURE);
default: /* '?' */
usage(argv[0]);
exit(EXIT_FAILURE);
@@
-126,6
+130,13
@@
int main(int argc, char *argv[])
goto out_munmap;
}
goto out_munmap;
}
+ ret = am7xxx_set_power_mode(dev, AM7XXX_POWER_LOW);
+ if (ret < 0) {
+ perror("am7xxx_set_power_mode");
+ exit_code = EXIT_FAILURE;
+ goto cleanup;
+ }
+
ret = am7xxx_send_image(dev, format, width, height, image, size);
if (ret < 0) {
perror("am7xxx_send_image");
ret = am7xxx_send_image(dev, format, width, height, image, size);
if (ret < 0) {
perror("am7xxx_send_image");