From c9eaf0beaafac20f56ec48968998d45aa2781d49 Mon Sep 17 00:00:00 2001 From: Alin Jerpelea Date: Tue, 21 Apr 2020 17:37:52 +0200 Subject: [PATCH] examples: i2sloop: nxstyle fixes nxstyle fixes for i2sloop exaple Signed-off-by: Alin Jerpelea --- examples/i2sloop/i2sloop_main.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/examples/i2sloop/i2sloop_main.c b/examples/i2sloop/i2sloop_main.c index 861d76d8c..d0c8470dc 100644 --- a/examples/i2sloop/i2sloop_main.c +++ b/examples/i2sloop/i2sloop_main.c @@ -88,7 +88,7 @@ int main(int argc, FAR char *argv[]) freq = 16000; while ((opt = getopt(argc, argv, "c:f:")) != -1) - { + { switch (opt) { case 'c': @@ -99,7 +99,7 @@ int main(int argc, FAR char *argv[]) freq = atoi(optarg); break; } - } + } /* Open the I2S character device */ @@ -120,7 +120,7 @@ int main(int argc, FAR char *argv[]) /* Allocate an audio buffer */ desc.numbytes = 1024; - desc.u.ppBuffer = &apb; + desc.u.pbuffer = &apb; ret = apb_alloc(&desc); DEBUGASSERT(ret == sizeof(desc)); @@ -139,7 +139,6 @@ int main(int argc, FAR char *argv[]) bufsize = sizeof(struct ap_buffer_s) + apb->nbytes; ret = write(fd, apb, bufsize); } - } apb_free(apb);