File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -721,7 +721,7 @@ information (all optional):
721
721
// setting irq:true will call that function in the interrupt itself
722
722
irq : false(default)
723
723
// Advanced: If specified, the given pin will be read whenever the watch is called
724
- // and the state will be included as a 'data' field in the callback
724
+ // and the state will be included as a 'data' field in the callback (`debounce:0` is required)
725
725
data : pin
726
726
// Advanced: On Nordic devices, a watch may be 'high' or 'low' accuracy. By default low
727
727
// accuracy is used (which is better for power consumption), but this means that
@@ -740,7 +740,7 @@ The `function` callback is called with an argument, which is an object of type
740
740
When using `edge:'rising'` or `edge:'falling'`, this is not the same as when
741
741
the function was last called.
742
742
* `data` is included if `data:pin` was specified in the options, and can be
743
- used for reading in clocked data
743
+ used for reading in clocked data. It will only work if `debounce:0` is used
744
744
745
745
For instance, if you want to measure the length of a positive pulse you could
746
746
use `setWatch(function(e) { console.log(e.time-e.lastTime); }, BTN, {
You can’t perform that action at this time.
0 commit comments