CC23x0R5DriverLibrary
tempdiode.c File Reference
#include <stdint.h>
#include "adc.h"
#include "hapi.h"
#include "tempdiode.h"
#include "interrupt.h"
#include "../inc/hw_clkctl.h"
#include "../inc/hw_fcfg.h"
#include "../inc/hw_memmap.h"
#include "../inc/hw_pmud.h"
#include "../inc/hw_sys0.h"
#include "../inc/hw_types.h"
Include dependency graph for tempdiode.c:

Macros

#define MIN2(a, b)   ((a) < (b) ? (a) : (b))
 
#define MIN3(a, b, c)   MIN2(MIN2((a), (b)), (c))
 

Functions

int32_t voltageToTempHardcoded (uint32_t microVolts)
 
static void enableADC (void)
 
static int32_t voltageToTemp (uint32_t microVolts)
 
static uint64_t isqrt (uint64_t n)
 
int32_t __attribute__ ((weak))
 
int32_t TempDiodeGetTemp (void)
 Reads temperature from high accuracy temperature diode. More...
 

Macro Definition Documentation

§ MIN2

#define MIN2 (   a,
 
)    ((a) < (b) ? (a) : (b))

§ MIN3

#define MIN3 (   a,
  b,
 
)    MIN2(MIN2((a), (b)), (c))

Referenced by voltageToTemp().

Function Documentation

§ voltageToTempHardcoded()

int32_t voltageToTempHardcoded ( uint32_t  microVolts)

Referenced by voltageToTemp().

§ enableADC()

§ voltageToTemp()

static int32_t voltageToTemp ( uint32_t  microVolts)
static

References isqrt(), MIN3, and voltageToTempHardcoded().

Referenced by TempDiodeGetTemp().

§ isqrt()

static uint64_t isqrt ( uint64_t  n)
static

Referenced by __attribute__(), and voltageToTemp().

§ __attribute__()

int32_t __attribute__ ( (weak)  )

References isqrt().