32 #ifndef BSPACM_DEVICE_NRF51_INTERNAL_PERIPH_DIETEMP_H
33 #define BSPACM_DEVICE_NRF51_INTERNAL_PERIPH_DIETEMP_H
56 #if (BSPACM_NRF_USE_SD - 0)
62 iBSPACMdietemp_cCel ()
65 #if (BSPACM_NRF_USE_SD - 0)
66 sd_temp_get(&temp_qCel);
68 NRF_TEMP->EVENTS_DATARDY = 0;
70 NRF_TEMP->TASKS_START = 1;
71 while (! NRF_TEMP->EVENTS_DATARDY) {
73 NRF_TEMP->EVENTS_DATARDY = 0;
76 uint32_t temp_raw = NRF_TEMP->TEMP;
80 NRF_TEMP->TASKS_STOP = 1;
87 const uint32_t sign_bit = 0x0200;
88 if (temp_raw & sign_bit) {
89 temp_raw |= ~(sign_bit - 1);
91 temp_qCel = (int32_t)temp_raw;
94 return 25 * (int)temp_qCel;
Common header included by all BSPACM leaf headers.
bool bBSPACMdietempInitialize()