123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111 |
- #ifndef NRF_DRV_WDT_H__
- #define NRF_DRV_WDT_H__
- #include <nrfx_wdt.h>
- #ifdef __cplusplus
- extern "C" {
- #endif
- typedef nrfx_wdt_config_t nrf_drv_wdt_config_t;
- #define NRF_DRV_WDT_DEAFULT_CONFIG NRFX_WDT_DEAFULT_CONFIG
- #define nrf_wdt_event_handler_t nrfx_wdt_event_handler_t
- #define nrf_drv_wdt_channel_id nrfx_wdt_channel_id
- #define nrf_drv_wdt_channel_alloc nrfx_wdt_channel_alloc
- #define nrf_drv_wdt_enable nrfx_wdt_enable
- #define nrf_drv_wdt_feed nrfx_wdt_feed
- #define nrf_drv_wdt_channel_feed nrfx_wdt_channel_feed
- #define nrf_drv_wdt_ppi_task_addr nrfx_wdt_ppi_task_addr
- #define nrf_drv_wdt_ppi_event_addr nrfx_wdt_ppi_event_addr
- __STATIC_INLINE ret_code_t nrf_drv_wdt_init(nrf_drv_wdt_config_t const * p_config,
- nrf_wdt_event_handler_t wdt_event_handler)
- {
- if (p_config == NULL)
- {
- static const nrfx_wdt_config_t default_config = NRFX_WDT_DEAFULT_CONFIG;
- p_config = &default_config;
- }
- return nrfx_wdt_init(p_config, wdt_event_handler);
- }
- #ifdef __cplusplus
- }
- #endif
- #endif
|