File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed
System/Device/Gpio/Drivers/Libgpiod Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -209,7 +209,7 @@ static LibgpiodV1()
209209 /// </summary>
210210 /// <returns>GPIO chip pointer handle or NULL if an error occurred.</returns>
211211 [ DllImport ( LibgpiodLibrary , SetLastError = true ) ]
212- internal static extern SafeChipHandle gpiod_chip_open_by_number ( int number ) ;
212+ internal static extern IntPtr gpiod_chip_open_by_number ( int number ) ;
213213
214214 /// <summary>
215215 /// Get the API version of the library as a human-readable string.
Original file line number Diff line number Diff line change @@ -78,7 +78,7 @@ public LibGpiodDriver(int gpioChip = 0)
7878 {
7979 _pinNumberLock = new object ( ) ;
8080 _chipNumber = gpioChip ;
81- _chip = LibgpiodV1 . gpiod_chip_open_by_number ( gpioChip ) ;
81+ _chip = new SafeChipHandle ( LibgpiodV1 . gpiod_chip_open_by_number ( gpioChip ) ) ;
8282 if ( _chip == null || _chip . IsInvalid || _chip . IsClosed )
8383 {
8484 throw ExceptionHelper . GetIOException ( ExceptionResource . NoChipFound , Marshal . GetLastWin32Error ( ) ) ;
You can’t perform that action at this time.
0 commit comments