You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by ac...@apache.org on 2020/08/12 11:29:30 UTC

[incubator-nuttx] 02/02: Changed Watchdog API.

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

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

commit 0585a8b327ac7be7d409d292fbe1e963e9bbc5d7
Author: Johannes Schock <jo...@nivus.com>
AuthorDate: Wed Aug 12 08:14:45 2020 +0200

    Changed Watchdog API.
---
 boards/arm/kinetis/freedom-k28f/src/k28_usbhshost.c | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/boards/arm/kinetis/freedom-k28f/src/k28_usbhshost.c b/boards/arm/kinetis/freedom-k28f/src/k28_usbhshost.c
index f72cff7..3425c62 100644
--- a/boards/arm/kinetis/freedom-k28f/src/k28_usbhshost.c
+++ b/boards/arm/kinetis/freedom-k28f/src/k28_usbhshost.c
@@ -274,7 +274,7 @@ static void usb_msc_connect(FAR void *arg)
 
   DEBUGASSERT(index >= 0 && index < CONFIG_FRDMK28F_USB_AUTOMOUNT_NUM_BLKDEV);
 
-  wd_cancel(g_umount_tmr[index]);
+  wd_cancel(&g_umount_tmr[index]);
 
   /* Resetup the event. */
 
@@ -320,7 +320,7 @@ static void usb_msc_connect(FAR void *arg)
  *
  *****************************************************************************/
 
-static void unmount_retry_timeout(int argc, uint32_t arg1, ...)
+static void unmount_retry_timeout(int argc, wdparm_t arg1, ...)
 {
   int  index  = (int)arg1;
   char sdchar = 'a' + index;
@@ -352,7 +352,7 @@ static void usb_msc_disconnect(FAR void *arg)
 
   DEBUGASSERT(index >= 0 && index < CONFIG_FRDMK28F_USB_AUTOMOUNT_NUM_BLKDEV);
 
-  wd_cancel(g_umount_tmr[index]);
+  wd_cancel(&g_umount_tmr[index]);
 
   /* Resetup the event. */
 
@@ -381,7 +381,7 @@ static void usb_msc_disconnect(FAR void *arg)
 
           /* Start a timer to retry the umount2 after a delay */
 
-          ret = wd_start(g_umount_tmr[index],
+          ret = wd_start(&g_umount_tmr[index],
                           MSEC2TICK(CONFIG_FRDMK28F_USB_AUTOMOUNT_UDELAY),
                           unmount_retry_timeout, 1, (uint32_t)index);
           if (ret < 0)
@@ -447,8 +447,6 @@ int k28_usbhost_initialize(void)
     {
       char sdchar = 'a' + index;
 
-      g_umount_tmr[index] = wd_create();
-
       usbhost_msc_notifier_setup(usb_msc_connect,
           WORK_USB_MSC_CONNECT, sdchar, (FAR void *)(intptr_t)index);
       usbhost_msc_notifier_setup(usb_msc_disconnect,