RTEMS 6.1-rc4
Loading...
Searching...
No Matches
Files | Data Structures | Enumerator | Variables
Tempsensor

Files

file  fsl_tempsensor.h
 

Data Structures

struct  _tmpsns_config
 TMPSNS temperature structure. More...
 

Variables

tmpsns_measure_mode_t _tmpsns_config::measureMode
 
uint16_t _tmpsns_config::frequency
 
int32_t _tmpsns_config::highAlarmTemp
 
int32_t _tmpsns_config::panicAlarmTemp
 
int32_t _tmpsns_config::lowAlarmTemp
 

Driver version

enum  { kTEMPSENSOR_HighTempInterruptStatusEnable , kTEMPSENSOR_LowTempInterruptStatusEnable , kTEMPSENSOR_PanicTempInterruptStatusEnable , kTEMPSENSOR_FinishInterruptStatusEnable = TMPSNS_CTRL1_FINISH_IE_MASK }
 TMPSNS interrupt status enable type, tmpsns_interrupt_status_enable_t. More...
 
enum  { kTEMPSENSOR_HighTempInterruptStatus = TMPSNS_STATUS0_HIGH_TEMP_MASK , kTEMPSENSOR_LowTempInterruptStatus = TMPSNS_STATUS0_LOW_TEMP_MASK , kTEMPSENSOR_PanicTempInterruptStatus = TMPSNS_STATUS0_PANIC_TEMP_MASK }
 TMPSNS interrupt status type, tmpsns_interrupt_status_t. More...
 
enum  tmpsns_measure_mode_t { kTEMPSENSOR_SingleMode = 0U , kTEMPSENSOR_ContinuousMode = 1U }
 TMPSNS measure mode, tempsensor_measure_mode. More...
 
enum  _tmpsns_alarm_mode { kTEMPMON_HighAlarmMode = 0U , kTEMPMON_PanicAlarmMode = 1U , kTEMPMON_LowAlarmMode = 2U }
 TMPSNS alarm mode. More...
 
typedef struct _tmpsns_config tmpsns_config_t
 TMPSNS temperature structure.
 
typedef enum _tmpsns_alarm_mode tmpsns_alarm_mode_t
 TMPSNS alarm mode.
 
void TMPSNS_Init (TMPSNS_Type *base, const tmpsns_config_t *config)
 Initializes the TMPSNS module.
 
void TMPSNS_Deinit (TMPSNS_Type *base)
 Deinitializes the TMPSNS module.
 
void TMPSNS_GetDefaultConfig (tmpsns_config_t *config)
 Gets the default configuration structure.
 
void TMPSNS_StartMeasure (TMPSNS_Type *base)
 start the temperature measurement process.
 
void TMPSNS_StopMeasure (TMPSNS_Type *base)
 stop the measurement process.
 
float TMPSNS_GetCurrentTemperature (TMPSNS_Type *base)
 Get current temperature with the fused temperature calibration data.
 
void TMPSNS_SetTempAlarm (TMPSNS_Type *base, int32_t tempVal, tmpsns_alarm_mode_t alarmMode)
 Set the temperature count (raw sensor output) that will generate an alarm interrupt.
 
void TMPSNS_EnableInterrupt (TMPSNS_Type *base, uint32_t mask)
 Enable interrupt status.
 
void TMPSNS_DisableInterrupt (TMPSNS_Type *base, uint32_t mask)
 Disable interrupt status.
 
#define FSL_TMPSNS_DRIVER_VERSION   (MAKE_VERSION(2, 1, 0))
 

Detailed Description

Enumeration Type Documentation

◆ anonymous enum

anonymous enum

TMPSNS interrupt status enable type, tmpsns_interrupt_status_enable_t.

Enumerator
kTEMPSENSOR_HighTempInterruptStatusEnable 

High temperature interrupt status enable.

kTEMPSENSOR_LowTempInterruptStatusEnable 

Low temperature interrupt status enable.

kTEMPSENSOR_PanicTempInterruptStatusEnable 

Panic temperature interrupt status enable.

kTEMPSENSOR_FinishInterruptStatusEnable 

Finish interrupt enable.

◆ anonymous enum

anonymous enum

TMPSNS interrupt status type, tmpsns_interrupt_status_t.

Enumerator
kTEMPSENSOR_HighTempInterruptStatus 

High temperature interrupt status.

kTEMPSENSOR_LowTempInterruptStatus 

Low temperature interrupt status.

kTEMPSENSOR_PanicTempInterruptStatus 

Panic temperature interrupt status.

◆ _tmpsns_alarm_mode

TMPSNS alarm mode.

Enumerator
kTEMPMON_HighAlarmMode 

The high alarm temperature interrupt mode.

kTEMPMON_PanicAlarmMode 

The panic alarm temperature interrupt mode.

kTEMPMON_LowAlarmMode 

The low alarm temperature interrupt mode.

◆ tmpsns_measure_mode_t

TMPSNS measure mode, tempsensor_measure_mode.

Enumerator
kTEMPSENSOR_SingleMode 

Single measurement mode.

kTEMPSENSOR_ContinuousMode 

Continuous measurement mode.

Function Documentation

◆ TMPSNS_Deinit()

void TMPSNS_Deinit ( TMPSNS_Type base)

Deinitializes the TMPSNS module.

Parameters
baseTMPSNS base pointer

brief Deinitializes the TMPSNS module.

param base TMPSNS base pointer

◆ TMPSNS_DisableInterrupt()

void TMPSNS_DisableInterrupt ( TMPSNS_Type base,
uint32_t  mask 
)

Disable interrupt status.

Parameters
baseTMPSNS base pointer
maskThe interrupts to disable from tmpsns_interrupt_status_enable_t.

brief Disable interrupt status.

param base TMPSNS base pointer param mask The interrupts to disable from tmpsns_interrupt_status_enable_t.

◆ TMPSNS_EnableInterrupt()

void TMPSNS_EnableInterrupt ( TMPSNS_Type base,
uint32_t  mask 
)

Enable interrupt status.

Parameters
baseTMPSNS base pointer
maskThe interrupts to enable from tmpsns_interrupt_status_enable_t.

brief Enable interrupt status.

param base TMPSNS base pointer param mask The interrupts to enable from tmpsns_interrupt_status_enable_t.

◆ TMPSNS_GetCurrentTemperature()

float TMPSNS_GetCurrentTemperature ( TMPSNS_Type base)

Get current temperature with the fused temperature calibration data.

Parameters
baseTMPSNS base pointer
Returns
current temperature with degrees Celsius.

brief Get current temperature with the fused temperature calibration data.

param base TMPSNS base pointer return current temperature with degrees Celsius.

◆ TMPSNS_GetDefaultConfig()

void TMPSNS_GetDefaultConfig ( tmpsns_config_t config)

Gets the default configuration structure.

This function initializes the TMPSNS configuration structure to a default value. The default values are: tempmonConfig->frequency = 0x02U; tempmonConfig->highAlarmTemp = 44U; tempmonConfig->panicAlarmTemp = 90U; tempmonConfig->lowAlarmTemp = 39U;

Parameters
configPointer to a configuration structure.

brief Gets the default configuration structure.

This function initializes the TMPSNS configuration structure to a default value. The default values are: tempmonConfig->frequency = 0x00U; tempmonConfig->highAlarmTemp = 25U; tempmonConfig->panicAlarmTemp = 80U; tempmonConfig->lowAlarmTemp = 20U;

param config Pointer to a configuration structure.

◆ TMPSNS_Init()

void TMPSNS_Init ( TMPSNS_Type base,
const tmpsns_config_t config 
)

Initializes the TMPSNS module.

Parameters
baseTMPSNS base pointer
configPointer to configuration structure.

brief Initializes the TMPSNS module.

param base TMPSNS base pointer param config Pointer to configuration structure.

◆ TMPSNS_SetTempAlarm()

void TMPSNS_SetTempAlarm ( TMPSNS_Type base,
int32_t  tempVal,
tmpsns_alarm_mode_t  alarmMode 
)

Set the temperature count (raw sensor output) that will generate an alarm interrupt.

Parameters
baseTMPSNS base pointer
tempValThe alarm temperature with degrees Celsius
alarmModeThe alarm mode.

brief Set the temperature count (raw sensor output) that will generate an alarm interrupt.

param base TMPSNS base pointer param tempVal The alarm temperature with degrees Celsius param alarmMode The alarm mode.

◆ TMPSNS_StartMeasure()

void TMPSNS_StartMeasure ( TMPSNS_Type base)

start the temperature measurement process.

Parameters
baseTMPSNS base pointer.
Parameters
baseTMPSNS base pointer.

◆ TMPSNS_StopMeasure()

void TMPSNS_StopMeasure ( TMPSNS_Type base)

stop the measurement process.

Parameters
baseTMPSNS base pointer
Parameters
baseTMPSNS base pointer

Variable Documentation

◆ frequency

uint16_t _tmpsns_config::frequency

The temperature measure frequency.

◆ highAlarmTemp

int32_t _tmpsns_config::highAlarmTemp

The high alarm temperature.

◆ lowAlarmTemp

int32_t _tmpsns_config::lowAlarmTemp

The low alarm temperature.

◆ measureMode

tmpsns_measure_mode_t _tmpsns_config::measureMode

The temperature measure mode.

◆ panicAlarmTemp

int32_t _tmpsns_config::panicAlarmTemp

The panic alarm temperature.