File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -295,6 +295,16 @@ static int tmp108_attr_set(const struct device *dev,
295
295
mode );
296
296
break ;
297
297
298
+ case SENSOR_ATTR_USER_CALLBACK :
299
+ if (val -> val1 > 0 ) {
300
+ if (val -> val2 ) {
301
+ /* set application interrupt callback routine */
302
+ drv_data -> temp_alert_handler =
303
+ (sensor_trigger_handler_t )val -> val2 ;
304
+ }
305
+ }
306
+ break ;
307
+
298
308
default :
299
309
return - ENOTSUP ;
300
310
}
Original file line number Diff line number Diff line change @@ -318,6 +318,8 @@ enum sensor_attribute {
318
318
* to the new sampling frequency.
319
319
*/
320
320
SENSOR_ATTR_FF_DUR ,
321
+ /** user application interrupt callback */
322
+ SENSOR_ATTR_USER_CALLBACK ,
321
323
/**
322
324
* Number of all common sensor attributes.
323
325
*/
You can’t perform that action at this time.
0 commit comments