You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by ag...@apache.org on 2020/06/25 10:04:22 UTC

[incubator-nuttx] branch master updated (edd3dd3 -> b332741)

This is an automated email from the ASF dual-hosted git repository.

aguettouche pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git.


    from edd3dd3  libs: rv64: Fix _calc_imm() in arch_elf.c
     new 3c37d68  stm32l4 oneshot: assert period > 0, otherwise the timer never fires
     new 10a9464  tone: start playing tune immediately without delay
     new 1115f01  stm32l4 oneshot: style fix
     new b332741  tone: stop tone using 0 duty, not stop()

The 4 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 arch/arm/src/stm32l4/stm32l4_oneshot.c |  4 +++-
 drivers/audio/tone.c                   | 18 ++++++++++++------
 2 files changed, 15 insertions(+), 7 deletions(-)


[incubator-nuttx] 04/04: tone: stop tone using 0 duty, not stop()

Posted by ag...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

aguettouche pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit b3327419d348a468e48694dae736b5201c6f8d12
Author: Matias Nitsche <mn...@dc.uba.ar>
AuthorDate: Sun Jun 21 11:48:07 2020 -0300

    tone: stop tone using 0 duty, not stop()
---
 drivers/audio/tone.c | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/drivers/audio/tone.c b/drivers/audio/tone.c
index 85411cd..7cc315f 100644
--- a/drivers/audio/tone.c
+++ b/drivers/audio/tone.c
@@ -328,7 +328,16 @@ static void stop_note(FAR struct tone_upperhalf_s *upper)
 {
   FAR struct pwm_lowerhalf_s *tone = upper->devtone;
 
-  tone->ops->stop(tone);
+#ifdef CONFIG_PWM_MULTICHAN
+  upper->tone.channels[0].channel = upper->channel;
+  upper->tone.channels[0].duty    = 0;
+#else
+  upper->tone.duty                = 0;
+#endif
+
+  /* REVISIT: Should check the return value */
+
+  tone->ops->start(tone, &upper->tone);
 }
 
 /****************************************************************************


[incubator-nuttx] 02/04: tone: start playing tune immediately without delay

Posted by ag...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

aguettouche pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit 10a9464bcf699a1ef1ae21e9312c988ef6428ef1
Author: Matias Nitsche <mn...@dc.uba.ar>
AuthorDate: Sun Jun 21 11:23:33 2020 -0300

    tone: start playing tune immediately without delay
---
 drivers/audio/tone.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/drivers/audio/tone.c b/drivers/audio/tone.c
index 843aec6..85411cd 100644
--- a/drivers/audio/tone.c
+++ b/drivers/audio/tone.c
@@ -361,12 +361,9 @@ static void start_tune(FAR struct tone_upperhalf_s *upper, const char *tune)
   g_silence_length = 0;
   g_repeat         = false;
 
-  /* Schedule a callback to start playing */
+  /* Start playing tune */
 
-  ts.tv_sec        = 1;
-  ts.tv_nsec       = 0;
-
-  ONESHOT_START(upper->oneshot, oneshot_callback, upper, &ts);
+  next_note(upper);
 }
 
 /****************************************************************************


[incubator-nuttx] 03/04: stm32l4 oneshot: style fix

Posted by ag...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

aguettouche pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit 1115f0104bd404454b72e9e02f4583febb0fe162
Author: Matias Nitsche <mn...@dc.uba.ar>
AuthorDate: Sun Jun 21 11:27:13 2020 -0300

    stm32l4 oneshot: style fix
---
 arch/arm/src/stm32l4/stm32l4_oneshot.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/arm/src/stm32l4/stm32l4_oneshot.c b/arch/arm/src/stm32l4/stm32l4_oneshot.c
index 58e5bd4..5bd7e3a 100644
--- a/arch/arm/src/stm32l4/stm32l4_oneshot.c
+++ b/arch/arm/src/stm32l4/stm32l4_oneshot.c
@@ -277,7 +277,8 @@ int stm32l4_oneshot_start(FAR struct stm32l4_oneshot_s *oneshot,
   irqstate_t flags;
 
   tmrinfo("handler=%p arg=%p, ts=(%lu, %lu)\n",
-         handler, arg, (unsigned long)ts->tv_sec, (unsigned long)ts->tv_nsec);
+         handler, arg, (unsigned long)ts->tv_sec,
+          (unsigned long)ts->tv_nsec);
   DEBUGASSERT(oneshot && handler && ts);
   DEBUGASSERT(oneshot->tch);
 


[incubator-nuttx] 01/04: stm32l4 oneshot: assert period > 0, otherwise the timer never fires

Posted by ag...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

aguettouche pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit 3c37d6873541782112786098f6aaa9834019020d
Author: Matias Nitsche <mn...@dc.uba.ar>
AuthorDate: Sun Jun 21 10:52:06 2020 -0300

    stm32l4 oneshot: assert period > 0, otherwise the timer never fires
---
 arch/arm/src/stm32l4/stm32l4_oneshot.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/src/stm32l4/stm32l4_oneshot.c b/arch/arm/src/stm32l4/stm32l4_oneshot.c
index f247eae..58e5bd4 100644
--- a/arch/arm/src/stm32l4/stm32l4_oneshot.c
+++ b/arch/arm/src/stm32l4/stm32l4_oneshot.c
@@ -313,6 +313,7 @@ int stm32l4_oneshot_start(FAR struct stm32l4_oneshot_s *oneshot,
   period = (usec * (uint64_t)oneshot->frequency) / USEC_PER_SEC;
 
   tmrinfo("usec=%llu period=%08llx\n", usec, period);
+  DEBUGASSERT(period > 0);
   DEBUGASSERT(period <= UINT32_MAX);
 
   /* Set up to receive the callback when the interrupt occurs */