summaryrefslogtreecommitdiff
path: root/nuttx
diff options
context:
space:
mode:
Diffstat (limited to 'nuttx')
-rw-r--r--nuttx/ChangeLog5
-rw-r--r--nuttx/Documentation/NuttShell.html2
-rw-r--r--nuttx/arch/arm/src/stm32/stm32_i2c.c2
-rw-r--r--nuttx/drivers/pm/pm_checkstate.c2
-rw-r--r--nuttx/include/nuttx/pm.h17
5 files changed, 25 insertions, 3 deletions
diff --git a/nuttx/ChangeLog b/nuttx/ChangeLog
index a5743d55e..32522415b 100644
--- a/nuttx/ChangeLog
+++ b/nuttx/ChangeLog
@@ -2052,3 +2052,8 @@
* lib/time/lib_gmtimer.c: Correct several calculations that could lead
to errors in dates.
* drivers/pm: Add the beginnings of a NuttX power management sub-system.
+ * arch/arm/src/stm32/stm32_irq.c: Fix a error introduced in 6.8.
+ Timeout calculation uses clock_settime() instead of clock_gettime().
+ Pretty gross error, but actually it works with the side effect of setting
+ a bad time.
+
diff --git a/nuttx/Documentation/NuttShell.html b/nuttx/Documentation/NuttShell.html
index 693105166..73bb1bf65 100644
--- a/nuttx/Documentation/NuttShell.html
+++ b/nuttx/Documentation/NuttShell.html
@@ -1497,7 +1497,7 @@ ping [-c <count>] [-i <interval>] <ip-address>
Test the network communication with a remote peer. Example,
</p>
<ul><pre>
-nsh&gt; 10.0.0.1
+nsh&gt; ping 10.0.0.1
PING 10.0.0.1 56 bytes of data
56 bytes from 10.0.0.1: icmp_seq=1 time=0 ms
56 bytes from 10.0.0.1: icmp_seq=2 time=0 ms
diff --git a/nuttx/arch/arm/src/stm32/stm32_i2c.c b/nuttx/arch/arm/src/stm32/stm32_i2c.c
index 605719246..09f61c05c 100644
--- a/nuttx/arch/arm/src/stm32/stm32_i2c.c
+++ b/nuttx/arch/arm/src/stm32/stm32_i2c.c
@@ -200,7 +200,7 @@ int inline stm32_i2c_sem_waitisr(FAR struct i2c_dev_s *dev)
flags = irqsave();
do
{
- (void)clock_settime(CLOCK_REALTIME, &abstime);
+ (void)clock_gettime(CLOCK_REALTIME, &abstime);
abstime.tv_nsec += CONFIG_STM32_I2CTIMEOMS * 1000 * 1000;
if (abstime.tv_nsec > 1000 * 1000 * 1000)
{
diff --git a/nuttx/drivers/pm/pm_checkstate.c b/nuttx/drivers/pm/pm_checkstate.c
index 93f19a502..9ecff862e 100644
--- a/nuttx/drivers/pm/pm_checkstate.c
+++ b/nuttx/drivers/pm/pm_checkstate.c
@@ -129,7 +129,7 @@ enum pm_state_e pm_checkstate(void)
now = clock_systimer();
if (now - g_pmglobals.stime >= TIME_SLICE_TICKS)
{
- int16_t accum;
+ int16_t accum;
/* Sample the count, reset the time and count, and assess the PM
* state. This is an atomic operation because interrupts are
diff --git a/nuttx/include/nuttx/pm.h b/nuttx/include/nuttx/pm.h
index 898a82b88..520348ca6 100644
--- a/nuttx/include/nuttx/pm.h
+++ b/nuttx/include/nuttx/pm.h
@@ -458,5 +458,22 @@ EXTERN int pm_changestate(enum pm_state_e newstate);
#endif
#endif /* __ASSEMBLY__ */
+
+/****************************************************************************
+ * Stubs
+ ****************************************************************************/
+
+#else /* CONFIG_PM */
+
+/* Stubbed out versions of all of PM interface functions that may be used to
+ * avoid so much conditional compilation in driver code when PM is disabled:
+ */
+
+# define pm_initialize()
+# define pm_register(cb) (0)
+# define pm_activity(prio)
+# define pm_checkstate() (0)
+# define pm_changestate(state)
+
#endif /* CONFIG_PM */
#endif /* __INCLUDE_NUTTX_PM_H */