X-Git-Url: https://git.ao2.it/libam7xxx.git/blobdiff_plain/8aadc7ab6f9d1aa5b180bc95f509fd54c1cf0d94..ad32c9df36e8ec1c5b336bdad10ae771298b4d39:/src/picoproj.c?ds=sidebyside diff --git a/src/picoproj.c b/src/picoproj.c index 0b9e45c..7485f71 100644 --- a/src/picoproj.c +++ b/src/picoproj.c @@ -89,6 +89,10 @@ int main(int argc, char *argv[]) exit(EXIT_FAILURE); } break; + case 'h': + usage(argv[0]); + exit(EXIT_SUCCESS); + break; default: /* '?' */ usage(argv[0]); exit(EXIT_FAILURE); @@ -126,6 +130,13 @@ int main(int argc, char *argv[]) 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");