Class GpioConfiguration
- Namespace
- nanoFramework.Hardware.GiantGecko
- Assembly
- nanoFramework.Hardware.GiantGecko.dll
Class exposing various configurations for GPIO pins.
public static class GpioConfiguration
- Inheritance
-
GpioConfiguration
- Inherited Members
Methods
SetDriveStrenght(int, DriveStrenght)
Set drive strength setting for the GPIO port that a GPIO pin belongs to.
public static void SetDriveStrenght(int pin, GpioConfiguration.DriveStrenght driveStrenght)
Parameters
pinintPin number of the general-purpose I/O (GPIO) pin
driveStrenghtGpioConfiguration.DriveStrenghtDrive strenght setting.
Exceptions
- InvalidOperationException
If the GPIO
pinhasn't been opened before with the appropriate GPIO API.
SetDriveStrenghtAlternate(int, DriveStrenght)
Set drive strength setting for alternate modes of GPIO port that a GPIO pin belongs to.
public static void SetDriveStrenghtAlternate(int pin, GpioConfiguration.DriveStrenght driveStrenght)
Parameters
pinintPin number of the general-purpose I/O (GPIO) pin
driveStrenghtGpioConfiguration.DriveStrenghtDrive strenght setting.
Remarks
No checking will be performed if the GPIO pin is being used in an alternate funcion. That will be up to the caller.
SetSlewRate(int, byte)
Set slewrate limit for the GPIO port that a GPIO pin belongs to. Higher values represent faster slewrates.
public static void SetSlewRate(int pin, byte slewRateLimit)
Parameters
pinintPin number of the general-purpose I/O (GPIO) pin.
slewRateLimitbyteValue of slewrate limit. Value has to be between 0 and 7.
Exceptions
- InvalidOperationException
If the GPIO
pinhasn't been opened before with the appropriate GPIO API.- ArgumentException
If the
slewRateLimitis < 0 or > 7.
SetSlewRateAlternate(int, byte)
Set slewrate limit for alternate modes of a GPIO port that a GPIO pin belongs to. Higher values represent faster slewrates.
public static void SetSlewRateAlternate(int pin, byte slewRateLimit)
Parameters
pinintPin number of the general-purpose I/O (GPIO) pin
slewRateLimitbyteValue of slewrate limit. Value has to be between 0 and 7.
Remarks
No checking will be performed if the GPIO pin is being used in an alternate funcion. That will be up to the caller.
Exceptions
- ArgumentException
If the
slewRateLimitis < 0 or > 7.