Update 'pins' ref pages (#1733)
* Update 'pins' ref pages * Some jsdoc touchups
This commit is contained in:
committed by
Peli de Halleux
parent
7856c046f4
commit
079cd67c38
@ -1,4 +1,4 @@
|
||||
# Set Events
|
||||
# set Events
|
||||
|
||||
Configure the type of events emitted by a given pin.
|
||||
|
||||
@ -6,6 +6,12 @@ Configure the type of events emitted by a given pin.
|
||||
pins.setEvents(DigitalPin.P0, PinEventType.Edge);
|
||||
```
|
||||
|
||||
### ~ hint
|
||||
|
||||
**Simulator**: This function needs real hardware to work with. It's not supported in the simulator.
|
||||
|
||||
### ~
|
||||
|
||||
## Parameters
|
||||
|
||||
* ``name``: The @boardname@ hardware pin to configure (``P0`` through ``P20``)
|
||||
@ -13,8 +19,7 @@ pins.setEvents(DigitalPin.P0, PinEventType.Edge);
|
||||
|
||||
## Example
|
||||
|
||||
The following example configures pin ``P0`` and then
|
||||
subscribes to the rise and fall events.
|
||||
The following example configures pin ``P0`` and then subscribes to the rise and fall events.
|
||||
|
||||
```blocks
|
||||
control.onEvent(control.eventSourceId(EventBusSource.MICROBIT_ID_IO_P0), control.eventValueId(EventBusValue.MICROBIT_PIN_EVT_RISE), () => {
|
||||
|
Reference in New Issue
Block a user