@@ -218,9 +218,11 @@ def clear_interrupt(self, operation: int) -> None:
218
218
219
219
def enable_interrupt (self , interrupts : int ) -> None :
220
220
"""Enable interrupts on device. ENABLE_NPIEN will turn on No Persist interrupts, these
221
- bypass the persist filter and assert immediately. ENABLE_AIEN will assert after their
222
- threshold values have exceeded the persist filter cycle constraints. The device powers
223
- on with thresholds at 0, meaning enabling interrupts may cause an immediate assertion.
221
+ bypass the persist filter and assert immediately when values are detected above the high
222
+ threshold or below the low threshold. Similarly, ENABLE_AIEN will assert at the respective
223
+ ALS thresholds, but only after the values persist longer than the persist filter cycle
224
+ duration. The device powers on with thresholds at 0, meaning enabling interrupts may
225
+ cause an immediate assertion.
224
226
Can be a value of:
225
227
- ``ENABLE_NPIEN``
226
228
- ``ENABLE_AIEN``
@@ -293,8 +295,8 @@ def integration_time(self, val: int) -> None:
293
295
294
296
@property
295
297
def threshold_low (self ) -> int :
296
- """Get and set the ALS interrupt low threshold bytes. If the detected value exceeds
297
- threshold for the number of persist cycles an interrupt will be triggered.
298
+ """Get and set the ALS interrupt low threshold bytes. If the detected value is below
299
+ the low threshold for the number of persist filter cycles an interrupt will be triggered.
298
300
Can be 16-bit value."""
299
301
th_low = self ._read_u16LE (_TSL2591_AILTL )
300
302
return th_low
@@ -308,8 +310,8 @@ def threshold_low(self, value: int) -> None:
308
310
309
311
@property
310
312
def threshold_high (self ) -> int :
311
- """Get and set the ALS interrupt high threshold bytes. If the detected value exceeds
312
- threshold for the number of persist cycles an interrupt will be triggered.
313
+ """Get and set the ALS interrupt high threshold bytes. If the detected value is above
314
+ the high threshold for the number of persist filter cycles an interrupt will be triggered.
313
315
Can be 16-bit value."""
314
316
th_high = self ._read_u16LE (_TSL2591_AIHTL )
315
317
return th_high
@@ -324,7 +326,8 @@ def threshold_high(self, value: int) -> None:
324
326
@property
325
327
def nopersist_threshold_low (self ) -> int :
326
328
"""Get and set the No Persist ALS low threshold bytes. An interrupt will be triggered
327
- immediately once threshold is exceeded. Can be 16-bit value."""
329
+ immediately once the detected value is below the low threshold. Can be 16-bit value.
330
+ """
328
331
np_th_low = self ._read_u16LE (_TSL2591_NPAILTL )
329
332
return np_th_low
330
333
@@ -338,7 +341,8 @@ def nopersist_threshold_low(self, value: int) -> None:
338
341
@property
339
342
def nopersist_threshold_high (self ) -> int :
340
343
"""Get and set the No Persist ALS high threshold bytes. An interrupt will be triggered
341
- immediately once theshold is exceeded. Can be 16-bit value."""
344
+ immediately once the detected value is above the high threshold. Can be 16-bit value.
345
+ """
342
346
np_th_high = self ._read_u16LE (_TSL2591_NPAIHTL )
343
347
return np_th_high
344
348
@@ -351,7 +355,7 @@ def nopersist_threshold_high(self, value: int) -> None:
351
355
352
356
@property
353
357
def persist (self ) -> int :
354
- """Get and set the interrupt persistence filter - the number of consecutive out-of-range
358
+ """Get and set the interrupt persist filter - the number of consecutive out-of-range
355
359
ALS cycles necessary to generate an interrupt."""
356
360
persist = self ._read_u8 (_TSL2591_PERSIST_FILTER )
357
361
return persist & 0x0F
0 commit comments