Skip to content

Commit

Permalink
small docs update
Browse files Browse the repository at this point in the history
  • Loading branch information
gfwilliams committed Aug 7, 2024
1 parent 7eddf32 commit 93378fd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/jswrap_io.c
Original file line number Diff line number Diff line change
Expand Up @@ -721,7 +721,7 @@ information (all optional):
// setting irq:true will call that function in the interrupt itself
irq : false(default)
// Advanced: If specified, the given pin will be read whenever the watch is called
// and the state will be included as a 'data' field in the callback
// and the state will be included as a 'data' field in the callback (`debounce:0` is required)
data : pin
// Advanced: On Nordic devices, a watch may be 'high' or 'low' accuracy. By default low
// accuracy is used (which is better for power consumption), but this means that
Expand All @@ -740,7 +740,7 @@ The `function` callback is called with an argument, which is an object of type
When using `edge:'rising'` or `edge:'falling'`, this is not the same as when
the function was last called.
* `data` is included if `data:pin` was specified in the options, and can be
used for reading in clocked data
used for reading in clocked data. It will only work if `debounce:0` is used
For instance, if you want to measure the length of a positive pulse you could
use `setWatch(function(e) { console.log(e.time-e.lastTime); }, BTN, {
Expand Down

0 comments on commit 93378fd

Please sign in to comment.