Enum blinkt::GPIOError [] [src]

pub enum GPIOError {
    InvalidPin(u8),
    UnknownMode(u8),
    UnknownSoC,
    DevGPIOMemNotFound,
    DevGPIOMemPermissionDenied,
    DevGPIOMemIOError(Error),
    DevGPIOMemMapFailed,
    DevMemNotFound,
    DevMemPermissionDenied,
    DevMemIOError(Error),
    DevMemMapFailed,
    PermissionDenied,
    NotInitialized,
}

Errors that can occur when accessing the GPIO peripheral.

Variants

Invalid GPIO pin number.

The GPIO pin number is not accessible on this Raspberry Pi model.

Unknown GPIO pin mode.

The GPIO pin is set to an unknown mode.

Unknown SoC.

Based on the output of /proc/cpuinfo, it wasn't possible to identify the Raspberry Pi's SoC.

Unable to find /dev/gpiomem in the filesystem.

Try upgrading to a more recent version of Raspbian (or equivalent) that implements /dev/gpiomem.

Permission denied when opening /dev/gpiomem for read/write access.

Make sure the user has read and write access to /dev/gpiomem. Common causes are either incorrect file permissions on /dev/gpiomem, or the user isn't part of the gpio group.

/dev/gpiomem IO error.

Unable to memory-map /dev/gpiomem.

Unable to find /dev/mem in the filesystem.

Permission denied when opening /dev/mem for read/write access.

Getting read and write access to /dev/mem is typically accomplished by executing the program as a privileged user through sudo. A better solution that doesn't require sudo would be to upgrade to a version of Raspbian that implements /dev/gpiomem.

/dev/mem IO error.

Unable to memory-map /dev/mem.

Permission denied when opening both /dev/gpiomem and /dev/mem for read/write access.

Make sure the user has read and write access to /dev/gpiomem. Common causes are either incorrect file permissions on /dev/gpiomem, or the user isn't part of the gpio group.

Getting read and write access to /dev/mem is typically accomplished by executing the program as a privileged user through sudo. A better solution that doesn't require sudo would be to upgrade to a version of Raspbian that implements /dev/gpiomem.

GPIO isn't initialized.

You should normally only see this error when you call a method after running cleanup().

Trait Implementations

impl Display for Error
[src]

Formats the value using the given formatter. Read more

impl Error for Error
[src]

A short description of the error. Read more

The lower-level cause of this error, if any. Read more

impl Debug for Error
[src]

Formats the value using the given formatter.