getInstance static method
Gets the global instance of ProxyGpiod.
If none exists, one will be constructed.
Implementation
static ProxyGpiod getInstance() {
if (_instance == null) {
final List<GpioChip> chips = List.unmodifiable(
List.generate(_ProxyGpiodPlatformSide.getNumChips(),
(i) => GpioChip._fromIndex(i)));
final bias = _ProxyGpiodPlatformSide.supportsBias();
final reconfig = _ProxyGpiodPlatformSide.supportsLineReconfiguration();
_instance = ProxyGpiod._internal(chips, bias, reconfig);
}
return _instance as ProxyGpiod;
}