52#include "lib/sensors.h"
54#define TEMPERATURE_SENSOR "Temperature"
58#include "hal/nrf_temp.h"
60#define TEMP_ARCH_WAIT_US 4
61#define TEMP_ARCH_TRIES 10
75 nrf_temp_event_clear(NRF_TEMP, NRF_TEMP_EVENT_DATARDY);
76 nrf_temp_task_trigger(NRF_TEMP, NRF_TEMP_TASK_START);
78 tries = TEMP_ARCH_TRIES;
80 if(nrf_temp_event_check(NRF_TEMP, NRF_TEMP_EVENT_DATARDY)) {
83 NRFX_DELAY_US(TEMP_ARCH_WAIT_US);
86 nrf_temp_event_clear(NRF_TEMP, NRF_TEMP_EVENT_DATARDY);
87 nrf_temp_task_trigger(NRF_TEMP, NRF_TEMP_TASK_STOP);
89 return nrf_temp_result_get(NRF_TEMP);
static int configure(int type, int c)
Configures temperature sensor.
static int value(int type)
Returns device temperature.
static int status(int type)
Return temperature sensor status.