WS63 SDK 文档 7021f4f@fbb_ws63
ws63 和 ws63e 解决方案的 SDK 文档
载入中...
搜索中...
未找到
tsensor.c 文件参考
#include "common_def.h"
#include "hal_tsensor.h"
#include "tsensor.h"
tsensor.c 的引用(Include)关系图:

宏定义

#define TSENSOR_TEMP_THRESHOLD_L_MAX   (HAL_TSENSOR_TEMP_THRESHOLD_L_MAX)
 
#define TSENSOR_TEMP_THRESHOLD_H_MAX   (HAL_TSENSOR_TEMP_THRESHOLD_H_MAX)
 

类型定义

typedef enum tsensor_work_mode tsensor_work_mode_t
 Tsensor工作模式定义。
 

枚举

enum  tsensor_work_mode { TSENSOR_WORK_MODE_INQUIRE , TSENSOR_WORK_MODE_INTERRUPT , TSENSOR_WORK_MODE_MAX_NUM , TSENSOR_WORK_MODE_NONE = TSENSOR_WORK_MODE_MAX_NUM }
 Tsensor工作模式定义。 更多...
 

函数

errcode_t uapi_tsensor_init (void)
 初始化Tsensor。
 
errcode_t uapi_tsensor_deinit (void)
 去初始化Tsensor。
 
errcode_t uapi_tsensor_start_inquire_mode (tsensor_samp_mode_t mode, uint32_t period)
 配置Tsensor的采样模式。
 
errcode_t uapi_tsensor_get_current_temp (int8_t *temp)
 获取当前温度值。
 
errcode_t uapi_tsensor_enable_outtemp_interrupt (hal_tsensor_callback_t callback, int8_t temp_threshold_low, int8_t temp_threshold_high)
 启用tsensor,当温度超出阈值时触发中断。
 
errcode_t uapi_tsensor_enable_overtemp_interrupt (hal_tsensor_callback_t callback, int8_t overtemp)
 启用Tsensor,当温度过温时触发中断。
 
errcode_t uapi_tsensor_enable_done_interrupt (hal_tsensor_callback_t callback)
 启用Tsensor,当温度采集完毕时触发中断。
 
void uapi_tsensor_set_calibration_single_point (tsensor_calibration_point_t *point)
 设置单点校准参数。
 
void uapi_tsensor_set_calibration_two_points (const tsensor_calibration_point_t *point_first, const tsensor_calibration_point_t *point_second)
 设置两点校准参数。
 
errcode_t uapi_tsensor_set_multilevel_threshold_value (tsensor_multilevel_value_t level, int16_t temp)
 设置多步温度阈值的阈值。
 
errcode_t uapi_tsensor_set_multilevel_threshold_en (tsensor_multilevel_en_t level, hal_tsensor_callback_t callback)
 设置两点校准参数。
 

宏定义说明

◆ TSENSOR_TEMP_THRESHOLD_H_MAX

#define TSENSOR_TEMP_THRESHOLD_H_MAX   (HAL_TSENSOR_TEMP_THRESHOLD_H_MAX)

◆ TSENSOR_TEMP_THRESHOLD_L_MAX

#define TSENSOR_TEMP_THRESHOLD_L_MAX   (HAL_TSENSOR_TEMP_THRESHOLD_L_MAX)

类型定义说明

◆ tsensor_work_mode_t

Tsensor工作模式定义。

Copyright (c) HiSilicon (Shanghai) Technologies Co., Ltd. 2022-2022. All rights reserved.

Description: Provides tsensor driver source
History:
2022-09-16, Create file.

枚举类型说明

◆ tsensor_work_mode

Tsensor工作模式定义。

Copyright (c) HiSilicon (Shanghai) Technologies Co., Ltd. 2022-2022. All rights reserved.

Description: Provides tsensor driver source
History:
2022-09-16, Create file.

枚举值
TSENSOR_WORK_MODE_INQUIRE 

Tsensor模式:查询模式。

TSENSOR_WORK_MODE_INTERRUPT 

Tsensor模式:中断模式。

TSENSOR_WORK_MODE_MAX_NUM 
TSENSOR_WORK_MODE_NONE