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
27/*******************************************************************************
28 * Definitions
29 ******************************************************************************/
30
34#define FSL_TEMPMON_DRIVER_VERSION (MAKE_VERSION(2, 1, 1))
45
53
54/*******************************************************************************
55 * API
56 ******************************************************************************/
57
58#if defined(__cplusplus)
59extern "C" {
60#endif
61
68void TEMPMON_Init(TEMPMON_Type *base, const tempmon_config_t *config);
69
75void TEMPMON_Deinit(TEMPMON_Type *base);
76
90
96static inline void TEMPMON_StartMeasure(TEMPMON_Type *base)
97{
98 base->TEMPSENSE0 |= TEMPMON_TEMPSENSE0_MEASURE_TEMP_MASK;
99}
100
106static inline void TEMPMON_StopMeasure(TEMPMON_Type *base)
107{
108 base->TEMPSENSE0 &= ~TEMPMON_TEMPSENSE0_MEASURE_TEMP_MASK;
109}
110
117float TEMPMON_GetCurrentTemperature(TEMPMON_Type *base);
118
126void TEMPMON_SetTempAlarm(TEMPMON_Type *base, int8_t tempVal, tempmon_alarm_mode alarmMode);
127
128#if defined(__cplusplus)
129}
130#endif
131
136#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:48
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:51
@ kTEMPMON_PanicAlarmMode
Definition fsl_tempmon.h:50
@ kTEMPMON_HighAlarmMode
Definition fsl_tempmon.h:49
TEMPMON temperature structure.
Definition fsl_tempmon.h:39
int8_t lowAlarmTemp
Definition fsl_tempmon.h:43
int8_t panicAlarmTemp
Definition fsl_tempmon.h:42
uint16_t frequency
Definition fsl_tempmon.h:40
int8_t highAlarmTemp
Definition fsl_tempmon.h:41