[][src]Function apigpio::constants::PI_error_code_lookup

pub fn PI_error_code_lookup(val: i32) -> Option<(&'static str, &'static str)>

Provides string descriptions of a 32-bit pigpio error code.

val is the value from Error:Pi, or similar. It can be one of the PI_* values representing error codes.

The returned strings are

  • The PI_* abbreviation name.
  • The comment from pigpiod.h.

If the returned value is None, the error code was not recognised. Probably this means that you are using a newer pigpiod than this library.

(The error codes are negative. So you should pass a negative number to this function. Do not negate the error code to make it positive.)