drivers: watchdog: align sample and test to new DT

Sample application and test are aligned to new DT naming convention.

Signed-off-by: Karol Lasończyk <karol.lasonczyk@nordicsemi.no>
This commit is contained in:
Karol Lasończyk 2019-01-14 14:17:06 +01:00 committed by Maureen Helm
commit c0a5739bda
2 changed files with 11 additions and 1 deletions

View file

@ -10,9 +10,15 @@
#include <watchdog.h>
#include <misc/printk.h>
#define WDT_DEV_NAME CONFIG_WDT_0_NAME
#define WDT_FEED_TRIES 5
#ifdef CONFIG_WDT_0_NAME
#define WDT_DEV_NAME CONFIG_WDT_0_NAME
#else
#define WDT_DEV_NAME DT_WDT_0_NAME
#endif
static void wdt_callback(struct device *wdt_dev, int channel_id)
{
ARG_UNUSED(wdt_dev);

View file

@ -62,7 +62,11 @@
#include <ztest.h>
#include "test_wdt.h"
#ifdef CONFIG_WDT_0_NAME
#define WDT_DEV_NAME CONFIG_WDT_0_NAME
#else
#define WDT_DEV_NAME DT_WDT_0_NAME
#endif
#define WDT_TEST_STATE_IDLE 0
#define WDT_TEST_STATE_CHECK_RESET 1