From eb359e1456e84b1ffc6de318e71eddfd96334cf5 Mon Sep 17 00:00:00 2001 From: Rene van der Meer Date: Sat, 14 Oct 2023 16:58:07 +0200 Subject: [PATCH] Update documentation --- CHANGELOG.md | 5 ++++- README.md | 2 +- src/gpio/gpiomem/rp1.rs | 8 ++++---- src/lib.rs | 2 +- 4 files changed, 10 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5bbf0330..57de472a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,8 +2,11 @@ ## 0.15.0 (TBD) +* Add support for Raspberry Pi 5 (thanks @ukscone for all the testing!). * **Gpio**: (Breaking change) Rename `PullUpDown` enum to `Bias`, and `set_pullupdown` to `set_bias`. -* **Gpio**: (Breaking change) Add support for new modes `Alt6`, `Alt7` and `Alt8`. +* **Gpio**: Add support for new modes `Alt6`, `Alt7` and `Alt8`. +* **I2c**: Implement I2C transactions for `embedded-hal` (contributed by @CBJamo). + ## 0.14.1 (November 25, 2022) diff --git a/README.md b/README.md index b7fbe1e7..77c3dbb1 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ RPPAL provides access to the Raspberry Pi's GPIO, I2C, PWM, SPI and UART periphe The library can be used in conjunction with a variety of platform-agnostic drivers through its `embedded-hal` trait implementations. Both `embedded-hal` v0.2.7 and v1.0.0-alpha.9 are supported. -RPPAL requires Raspberry Pi OS or any similar, recent, Linux distribution. Both `gnu` and `musl` libc targets are supported. RPPAL is compatible with the Raspberry Pi A, A+, B, B+, 2B, 3A+, 3B, 3B+, 4B, CM, CM 3, CM 3+, CM 4, 400, Zero, Zero W and Zero 2 W. Backwards compatibility for minor revisions isn't guaranteed until v1.0.0. +RPPAL requires Raspberry Pi OS or any similar, recent, Linux distribution. Both `gnu` and `musl` libc targets are supported. RPPAL is compatible with the Raspberry Pi A, A+, B, B+, 2B, 3A+, 3B, 3B+, 4B, 5, CM, CM 3, CM 3+, CM 4, 400, Zero, Zero W and Zero 2 W. Backwards compatibility for minor revisions isn't guaranteed until v1.0.0. This library is under development on the [master branch](https://github.com/golemparts/rppal/tree/master) of the repository on GitHub. If you're looking for the `README.md` or the `examples` directory for the latest release or any of the earlier releases, visit [crates.io](https://crates.io/crates/rppal), download an archived release from the GitHub [releases](https://github.com/golemparts/rppal/releases) page, or clone and checkout the relevant release tag. diff --git a/src/gpio/gpiomem/rp1.rs b/src/gpio/gpiomem/rp1.rs index 6e132356..5d63bd6a 100644 --- a/src/gpio/gpiomem/rp1.rs +++ b/src/gpio/gpiomem/rp1.rs @@ -18,7 +18,7 @@ const PATH_DEV_GPIOMEM: &str = "/dev/gpiomem0"; // Each register contains 32 bits const REG_SIZE: usize = std::mem::size_of::(); -// rp1-gpiomem contains IO_BANK0-2, SYS_RIO0-2, PADS_BANK0-2, PADS_ETH +// gpiomem contains IO_BANK0-2, SYS_RIO0-2, PADS_BANK0-2, PADS_ETH const MEM_SIZE: usize = 0x30000; // We're only accessing the first 28 GPIOs. The rest is currently marked @@ -109,8 +109,8 @@ impl GpioMem { } fn map_devgpiomem() -> Result<*mut u32> { - // Open /dev/rp1-gpiomem with read/write/sync flags. This might fail if - // /dev/rp1-gpiomem doesn't exist (< Raspbian Jessie), or /dev/rp1-gpiomem + // Open gpiomem with read/write/sync flags. This might fail if the + // gpiomem cdev doesn't exist (< Raspbian Jessie), or gpiomem // doesn't have the appropriate permissions, or the current user is // not a member of the gpio group. let gpiomem_file = OpenOptions::new() @@ -119,7 +119,7 @@ impl GpioMem { .custom_flags(O_SYNC) .open(PATH_DEV_GPIOMEM)?; - // Memory-map /dev/rp1-gpiomem at offset 0 + // Memory-map gpiomem at offset 0 let gpiomem_ptr = unsafe { libc::mmap( ptr::null_mut(), diff --git a/src/lib.rs b/src/lib.rs index 2eb1e968..076613b2 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -8,7 +8,7 @@ //! //! RPPAL requires Raspberry Pi OS or any similar, recent, Linux distribution. //! Both `gnu` and `musl` libc targets are supported. RPPAL is compatible with the -//! Raspberry Pi A, A+, B, B+, 2B, 3A+, 3B, 3B+, 4B, CM, CM 3, CM 3+, CM 4, 400, +//! Raspberry Pi A, A+, B, B+, 2B, 3A+, 3B, 3B+, 4B, 5, CM, CM 3, CM 3+, CM 4, 400, //! Zero, Zero W and Zero 2 W. Backwards compatibility for minor revisions isn't //! guaranteed until v1.0.0.