diff --git a/CHANGELOG.md b/CHANGELOG.md index 68f9df3..a9c9bea 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # Changelog -## 0.20.0 (TBD) +## 0.20.0 (November 30, 2024) * Add support for Raspberry Pi Compute Module 5. * **Gpio**: Add `set_bias` to `InputPin` (contributed by @KronsyC). diff --git a/src/pwm.rs b/src/pwm.rs index 26c32de..900dc67 100644 --- a/src/pwm.rs +++ b/src/pwm.rs @@ -20,36 +20,13 @@ //! use with other peripherals. Be careful not to enable two peripherals on the same pin //! at the same time. //! -//! ## Using PWM without superuser privileges (`sudo`) -//! -//! As of kernel version 4.14.34, released on April 16 2018, it's possible to -//! configure your Raspberry Pi to allow non-root access to PWM. 4.14.34 includes -//! a [patch] that allows `udev` to change file permissions when a -//! PWM channel is exported. This will let any user that's a member of the `gpio` -//! group configure PWM without having to use `sudo`. -//! -//! The `udev` rules needed to make this work haven't been patched in yet as of -//! June 2018, but you can easily add them yourself. Make sure you're running -//! 4.14.34 or later, and append the following snippet to -//! `/etc/udev/rules.d/99-com.rules`. Reboot the Raspberry Pi afterwards. -//! -//! ```text -//! SUBSYSTEM=="pwm*", PROGRAM="/bin/sh -c '\ -//! chown -R root:gpio /sys/class/pwm && chmod -R 770 /sys/class/pwm;\ -//! chown -R root:gpio /sys/devices/platform/soc/*.pwm/pwm/pwmchip* &&\ -//! chmod -R 770 /sys/devices/platform/soc/*.pwm/pwm/pwmchip*\ -//! '" -//! ``` -//! //! ## Troubleshooting //! //! ### Permission denied //! -//! If [`new`] returns an `io::ErrorKind::PermissionDenied` -//! error, make sure `/sys/class/pwm` and all of its subdirectories -//! are owned by `root:gpio`, the current user is a member of the `gpio` group -//! and `udev` is properly configured as mentioned above. Alternatively, you can -//! launch your application using `sudo`. +//! If [`new`] returns an `io::ErrorKind::PermissionDenied` error, make sure +//! `/sys/class/pwm` and its subdirectories has the appropriate permissions for the current user. +//! Alternatively, you can launch your application using `sudo`. //! //! ### Not found //! @@ -57,7 +34,6 @@ //! forgotten to enable the selected PWM channel. The configuration options //! to enable either of the two PWM channels are listed above. //! -//! [patch]: https://github.com/raspberrypi/linux/issues/1983 //! [`new`]: struct.Pwm.html#method.new use std::error;