machine: clarify caller's responsibility in SetInterrupt
Этот коммит содержится в:
родитель
db27541b1a
коммит
7c4e83f5c0
4 изменённых файлов: 8 добавлений и 4 удалений
|
@ -165,7 +165,8 @@ func findPinPadMapping(sercom uint8, pin Pin) (pinMode PinMode, pad uint32, ok b
|
||||||
}
|
}
|
||||||
|
|
||||||
// SetInterrupt sets an interrupt to be executed when a particular pin changes
|
// SetInterrupt sets an interrupt to be executed when a particular pin changes
|
||||||
// state.
|
// state. The pin should already be configured as an input, including a pull up
|
||||||
|
// or down if no external pull is provided.
|
||||||
//
|
//
|
||||||
// This call will replace a previously set callback on this pin. You can pass a
|
// This call will replace a previously set callback on this pin. You can pass a
|
||||||
// nil func to unset the pin change interrupt. If you do so, the change
|
// nil func to unset the pin change interrupt. If you do so, the change
|
||||||
|
|
|
@ -353,7 +353,8 @@ func findPinPadMapping(sercom uint8, pin Pin) (pinMode PinMode, pad uint32, ok b
|
||||||
}
|
}
|
||||||
|
|
||||||
// SetInterrupt sets an interrupt to be executed when a particular pin changes
|
// SetInterrupt sets an interrupt to be executed when a particular pin changes
|
||||||
// state.
|
// state. The pin should already be configured as an input, including a pull up
|
||||||
|
// or down if no external pull is provided.
|
||||||
//
|
//
|
||||||
// This call will replace a previously set callback on this pin. You can pass a
|
// This call will replace a previously set callback on this pin. You can pass a
|
||||||
// nil func to unset the pin change interrupt. If you do so, the change
|
// nil func to unset the pin change interrupt. If you do so, the change
|
||||||
|
|
|
@ -172,7 +172,8 @@ func (p Pin) Get() bool {
|
||||||
var pinCallbacks [32]func(Pin)
|
var pinCallbacks [32]func(Pin)
|
||||||
|
|
||||||
// SetInterrupt sets an interrupt to be executed when a particular pin changes
|
// SetInterrupt sets an interrupt to be executed when a particular pin changes
|
||||||
// state.
|
// state. The pin should already be configured as an input, including a pull up
|
||||||
|
// or down if no external pull is provided.
|
||||||
//
|
//
|
||||||
// You can pass a nil func to unset the pin change interrupt. If you do so,
|
// You can pass a nil func to unset the pin change interrupt. If you do so,
|
||||||
// the change parameter is ignored and can be set to any value (such as 0).
|
// the change parameter is ignored and can be set to any value (such as 0).
|
||||||
|
|
|
@ -72,7 +72,8 @@ func (p Pin) Get() bool {
|
||||||
}
|
}
|
||||||
|
|
||||||
// SetInterrupt sets an interrupt to be executed when a particular pin changes
|
// SetInterrupt sets an interrupt to be executed when a particular pin changes
|
||||||
// state.
|
// state. The pin should already be configured as an input, including a pull up
|
||||||
|
// or down if no external pull is provided.
|
||||||
//
|
//
|
||||||
// This call will replace a previously set callback on this pin. You can pass a
|
// This call will replace a previously set callback on this pin. You can pass a
|
||||||
// nil func to unset the pin change interrupt. If you do so, the change
|
// nil func to unset the pin change interrupt. If you do so, the change
|
||||||
|
|
Загрузка…
Создание таблицы
Сослаться в новой задаче