nrf9160-dk: add timer support

This commit is contained in:
raiden00pl 2023-07-08 12:22:15 +02:00 committed by Alan Carvalho de Assis
parent 848f5cef21
commit 98784e83f7
1 changed files with 18 additions and 0 deletions

View File

@ -50,12 +50,18 @@
# include "nrf91_progmem.h"
#endif
#ifdef CONFIG_TIMER
# include "nrf91_timer.h"
#endif
#include "nrf9160-dk.h"
/****************************************************************************
* Pre-processor Definitions
****************************************************************************/
#define NRF91_TIMER (0)
/****************************************************************************
* Private Functions
****************************************************************************/
@ -113,6 +119,18 @@ int nrf91_bringup(void)
}
#endif
#if defined(CONFIG_TIMER) && defined(CONFIG_NRF91_TIMER)
/* Configure TIMER driver */
ret = nrf91_timer_driver_setup("/dev/timer0", NRF91_TIMER);
if (ret < 0)
{
syslog(LOG_ERR,
"ERROR: Failed to initialize timer driver: %d\n",
ret);
}
#endif
#ifdef CONFIG_NRF91_MODEM
/* Initialize modem */