File tree Expand file tree Collapse file tree 3 files changed +17
-0
lines changed
src/System.Device.Gpio/System/Device/Gpio/Drivers Expand file tree Collapse file tree 3 files changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -457,6 +457,9 @@ public override ComponentInformation QueryComponentInformation()
457457 IntPtr libgpiodVersionPtr = LibgpiodV1 . gpiod_version_string ( ) ;
458458 string libgpiodVersion = Marshal . PtrToStringAnsi ( libgpiodVersionPtr ) ?? string . Empty ;
459459 self . Properties [ "LibGpiodVersion" ] = libgpiodVersion ;
460+ #pragma warning disable SDGPIO0001
461+ self . Properties [ "ChipInfo" ] = GetChipInfo ( ) . ToString ( ) ;
462+ #pragma warning restore SDGPIO0001
460463 return self ;
461464 }
462465
Original file line number Diff line number Diff line change @@ -284,6 +284,9 @@ public override ComponentInformation QueryComponentInformation()
284284 {
285285 var ret = new ComponentInformation ( this , "Generic Raspberry Pi Wrapper driver" ) ;
286286 ret . AddSubComponent ( _internalDriver . QueryComponentInformation ( ) ) ;
287+ #pragma warning disable SDGPIO0001
288+ ret . Properties [ "ChipInfo" ] = _internalDriver . GetChipInfo ( ) . ToString ( ) ;
289+ #pragma warning restore SDGPIO0001
287290 return ret ;
288291 }
289292}
Original file line number Diff line number Diff line change 88using System . Linq ;
99using System . Runtime . InteropServices ;
1010using System . Threading ;
11+ using static Interop ;
1112
1213namespace System . Device . Gpio . Drivers ;
1314
@@ -895,4 +896,14 @@ protected internal override PinMode GetPinMode(int pinNumber)
895896 throw new InvalidOperationException ( "There was an attempt to get a mode to a pin that is not open." ) ;
896897 }
897898 }
899+
900+ /// <inheritdoc />
901+ public override ComponentInformation QueryComponentInformation ( )
902+ {
903+ var self = new ComponentInformation ( this , "SysFsDriver" ) ;
904+ #pragma warning disable SDGPIO0001
905+ self . Properties [ "ChipInfo" ] = GetChipInfo ( ) . ToString ( ) ;
906+ #pragma warning restore SDGPIO0001
907+ return self ;
908+ }
898909}
You can’t perform that action at this time.
0 commit comments