requestOutput method
void
requestOutput({
- String consumer = '',
- OutputMode outputMode = OutputMode.pushPull,
- Bias bias = Bias.unknown,
- ActiveState activeState = ActiveState.high,
- @required bool initialValue = false,
Implementation
void requestOutput(
{String consumer = '',
OutputMode outputMode = OutputMode.pushPull,
Bias bias = Bias.unknown,
ActiveState activeState = ActiveState.high,
@required bool initialValue = false}) {
ArgumentError.checkNotNull(outputMode, "outputMode");
ArgumentError.checkNotNull(activeState, "activeState");
ArgumentError.checkNotNull(initialValue, "initialValue");
_checkSupportsBiasValue(bias);
// we need to lock both info and ownership.
//return _synchronizedWrite(() async {
// if (_requested) {
// throw StateError("Can't request line because it is already requested.");
// }
_ProxyGpiodPlatformSide.requestLine(
lineHandle: _lineHandle,
consumer: consumer,
direction: LineDirection.output,
outputMode: outputMode,
bias: bias,
activeState: activeState,
initialValue: initialValue);
_info = _ProxyGpiodPlatformSide.getLineInfo(_lineHandle);
_value = initialValue;
// _requested = true;
// });
}