NetBurner 3.5.6
PDF Version
fsl_tempmon.h
Go to the documentation of this file.
1/*
2 * Copyright 2018-2021 NXP
3 * All rights reserved.
4 *
5 *
6 * SPDX-License-Identifier: BSD-3-Clause
7 */
8#ifndef FSL_TEMPMON_H_
9#define FSL_TEMPMON_H_
10
11#include "fsl_common.h"
12
13/*
14 * @addtogroup groupNBAPI-Temperature
15 * APi for temperature sensors
16 * @{
17 */
18
28/*******************************************************************************
29 * Definitions
30 ******************************************************************************/
31
35#define FSL_TEMPMON_DRIVER_VERSION (MAKE_VERSION(2, 1, 1))
46
54
55/*******************************************************************************
56 * API
57 ******************************************************************************/
58
59#if defined(__cplusplus)
60extern "C" {
61#endif
62
69void TEMPMON_Init(TEMPMON_Type *base, const tempmon_config_t *config);
70
76void TEMPMON_Deinit(TEMPMON_Type *base);
77
91
97static inline void TEMPMON_StartMeasure(TEMPMON_Type *base)
98{
99 base->TEMPSENSE0 |= TEMPMON_TEMPSENSE0_MEASURE_TEMP_MASK;
100}
101
107static inline void TEMPMON_StopMeasure(TEMPMON_Type *base)
108{
109 base->TEMPSENSE0 &= ~TEMPMON_TEMPSENSE0_MEASURE_TEMP_MASK;
110}
111
118float TEMPMON_GetCurrentTemperature(TEMPMON_Type *base);
119
127void TEMPMON_SetTempAlarm(TEMPMON_Type *base, int8_t tempVal, tempmon_alarm_mode alarmMode);
128
129#if defined(__cplusplus)
130}
131#endif
132
133 // groupSOMRT1061-tempmon
134
135/* @} groupNBAPI-Temperature */
136
137#endif /* FSL_TEMPMON_H_ */
struct _tempmon_config tempmon_config_t
TEMPMON temperature structure.
void TEMPMON_Deinit(TEMPMON_Type *base)
Deinitializes the TEMPMON module.
enum _tempmon_alarm_mode tempmon_alarm_mode
TEMPMON alarm mode.
_tempmon_alarm_mode
TEMPMON alarm mode.
Definition fsl_tempmon.h:49
void TEMPMON_SetTempAlarm(TEMPMON_Type *base, int8_t tempVal, tempmon_alarm_mode alarmMode)
Set the temperature count (raw sensor output) that will generate an alarm interrupt.
void TEMPMON_GetDefaultConfig(tempmon_config_t *config)
Gets the default configuration structure.
void TEMPMON_Init(TEMPMON_Type *base, const tempmon_config_t *config)
Initializes the TEMPMON module.
float TEMPMON_GetCurrentTemperature(TEMPMON_Type *base)
Get current temperature with the fused temperature calibration data.
@ kTEMPMON_LowAlarmMode
Definition fsl_tempmon.h:52
@ kTEMPMON_PanicAlarmMode
Definition fsl_tempmon.h:51
@ kTEMPMON_HighAlarmMode
Definition fsl_tempmon.h:50
TEMPMON temperature structure.
Definition fsl_tempmon.h:40
int8_t lowAlarmTemp
Definition fsl_tempmon.h:44
int8_t panicAlarmTemp
Definition fsl_tempmon.h:43
uint16_t frequency
Definition fsl_tempmon.h:41
int8_t highAlarmTemp
Definition fsl_tempmon.h:42