mirror of
https://github.com/apache/nuttx.git
synced 2026-06-04 23:03:27 +08:00
nrf9160-dk: add timer support
This commit is contained in:
committed by
Alan Carvalho de Assis
parent
848f5cef21
commit
98784e83f7
@@ -50,12 +50,18 @@
|
|||||||
# include "nrf91_progmem.h"
|
# include "nrf91_progmem.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef CONFIG_TIMER
|
||||||
|
# include "nrf91_timer.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "nrf9160-dk.h"
|
#include "nrf9160-dk.h"
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Pre-processor Definitions
|
* Pre-processor Definitions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
|
#define NRF91_TIMER (0)
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Private Functions
|
* Private Functions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
@@ -113,6 +119,18 @@ int nrf91_bringup(void)
|
|||||||
}
|
}
|
||||||
#endif
|
#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
|
#ifdef CONFIG_NRF91_MODEM
|
||||||
/* Initialize modem */
|
/* Initialize modem */
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user