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 ) 76 struct IotTsensorDescriptor_t;
127 void * pvUserContext);
200 void *
const pvBuffer);
Definition: iot_tsensor.h:57
int32_t iot_tsensor_close(IotTsensorHandle_t const xTsensorHandle)
iot_tsensor_close is used to de-initialize Tsensor.
IotTsensorIoctlRequest_t
Ioctl request types.
Definition: iot_tsensor.h:64
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...
Definition: iot_tsensor.h:70
Definition: iot_tsensor.h:66
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...
IotTsensorStatus_t
tsensor threshold reached status
Definition: iot_tsensor.h:55
Definition: iot_tsensor.h:69
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...
Definition: iot_tsensor.h:58
Definition: iot_tsensor.h:67
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_enable(IotTsensorHandle_t const xTsensorHandle)
iot_tsensor_enable is used to enable the temperature sensor to start reading the temperature and trig...
Definition: iot_tsensor.h:68
struct IotTsensorDescriptor_t * IotTsensorHandle_t
IotTsensorHandle_t type is the tsensor handle returned by calling iot_tsensor_open() this is initiali...
Definition: iot_tsensor.h:83
int32_t iot_tsensor_disable(IotTsensorHandle_t const xTsensorHandle)
iot_tsensor_disable is used to disable the temperature sensor which stops monitoring the temperature...
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. ...