31#ifndef _IOT_TSENSOR_H_
32#define _IOT_TSENSOR_H_
44#define IOT_TSENSOR_SUCCESS ( 0 )
45#define IOT_TSENSOR_INVALID_VALUE ( 1 )
46#define IOT_TSENSOR_DISABLED ( 2 )
47#define IOT_TSENSOR_CLOSED ( 3 )
48#define IOT_TSENSOR_GET_TEMP_FAILED ( 4 )
49#define IOT_TSENSOR_SET_FAILED ( 5 )
50#define IOT_TSENSOR_NOT_SUPPORTED ( 6 )
76struct IotTsensorDescriptor;
92 void * pvUserContext );
128 void * pvUserContext );
201 void *
const pvBuffer );
int32_t iot_tsensor_enable(IotTsensorHandle_t const xTsensorHandle)
iot_tsensor_enable is used to enable the temperature sensor to start reading the temperature and trig...
int32_t iot_tsensor_close(IotTsensorHandle_t const xTsensorHandle)
iot_tsensor_close is used to de-initialize Tsensor.
IotTsensorStatus_t
tsensor threshold reached status
Definition: iot_tsensor.h:56
void iot_tsensor_set_callback(IotTsensorHandle_t const xTsensorHandle, IotTsensorCallback_t xCallback, void *pvUserContext)
Set the callback to be called when a threshold is reached on the sensor. The caller must set the thre...
int32_t iot_tsensor_disable(IotTsensorHandle_t const xTsensorHandle)
iot_tsensor_disable is used to disable the temperature sensor which stops monitoring the temperature.
struct IotTsensorDescriptor * IotTsensorHandle_t
IotTsensorHandle_t type is the tsensor handle returned by calling iot_tsensor_open() this is initiali...
Definition: iot_tsensor.h:83
void(* IotTsensorCallback_t)(IotTsensorStatus_t xStatus, void *pvUserContext)
The callback function for completion of Tsensor operation.
Definition: iot_tsensor.h:91
int32_t iot_tsensor_get_temp(IotTsensorHandle_t const xTsensorHandle, int32_t *plTemp)
iot_tsensor_get_temp is used to get the current temperature read from the sensor.
IotTsensorIoctlRequest_t
Ioctl request types.
Definition: iot_tsensor.h:65
int32_t iot_tsensor_ioctl(IotTsensorHandle_t const xTsensorHandle, IotTsensorIoctlRequest_t xRequest, void *const pvBuffer)
iot_tsensor_ioctl is used to set tsensor configuration and tsensor properties like minimum threshold,...
IotTsensorHandle_t iot_tsensor_open(int32_t lTsensorInstance)
iot_tsensor_open is used to initialize the temperature sensor. It sets up the clocks and power etc,...
@ eTsensorMaxThresholdReached
Definition: iot_tsensor.h:58
@ eTsensorMinThresholdReached
Definition: iot_tsensor.h:57
@ eTsensorSetMinThreshold
Definition: iot_tsensor.h:66
@ eTsensorSetMaxThreshold
Definition: iot_tsensor.h:67
@ eTsensorGetMinThreshold
Definition: iot_tsensor.h:68
@ eTsensorPerformCalibration
Definition: iot_tsensor.h:70
@ eTsensorGetMaxThreshold
Definition: iot_tsensor.h:69