diff --git a/README.md b/README.md index 5c93f5b5..dfa53082 100644 --- a/README.md +++ b/README.md @@ -71,7 +71,7 @@ let spi = Spi::new(Bus::Spi0, SlaveSelect::Ss0, 16_000_000, Mode::Mode0)?; let uart = Uart::new(115_200, Parity::None, 8, 1)?; ``` -Access to some peripherals may need to be enabled first through `sudo raspi-config` or by editing `/boot/config.txt`. Refer to the relevant module's documentation for any required steps. +Access to some peripherals may need to be enabled first through `sudo raspi-config` or by editing `/boot/firmware/config.txt`. Refer to the relevant module's documentation for any required steps. ## Examples diff --git a/src/i2c.rs b/src/i2c.rs index 36acc93f..99066960 100644 --- a/src/i2c.rs +++ b/src/i2c.rs @@ -21,7 +21,7 @@ //! //! The I2C bus connected to these pins is disabled by //! default. You can enable it through `sudo raspi-config`, or by manually -//! adding `dtparam=i2c_arm=on` to `/boot/config.txt`. Remember to reboot +//! adding `dtparam=i2c_arm=on` to `/boot/firmware/config.txt`. Remember to reboot //! the Raspberry Pi afterwards. //! //! * SDA: BCM GPIO 2 (physical pin 3) @@ -29,28 +29,28 @@ //! //! ### I2C3 //! -//! I2C3 can be enabled by adding `dtoverlay=i2c3` to `/boot/config.txt`. +//! I2C3 can be enabled by adding `dtoverlay=i2c3` to `/boot/firmware/config.txt`. //! //! * SDA: BCM GPIO 4 (physical pin 7) //! * SCL: BCM GPIO 5 (physical pin 29) //! //! ### I2C4 //! -//! I2C4 can be enabled by adding `dtoverlay=i2c4` to `/boot/config.txt`. +//! I2C4 can be enabled by adding `dtoverlay=i2c4` to `/boot/firmware/config.txt`. //! //! * SDA: BCM GPIO 8 (physical pin 24) //! * SCL: BCM GPIO 9 (physical pin 21) //! //! ### I2C5 //! -//! I2C5 can be enabled by adding `dtoverlay=i2c5` to `/boot/config.txt`. +//! I2C5 can be enabled by adding `dtoverlay=i2c5` to `/boot/firmware/config.txt`. //! //! * SDA: BCM GPIO 12 (physical pin 32) //! * SCL: BCM GPIO 13 (physical pin 33) //! //! ### I2C6 //! -//! I2C6 can be enabled by adding `dtoverlay=i2c6` to `/boot/config.txt`. +//! I2C6 can be enabled by adding `dtoverlay=i2c6` to `/boot/firmware/config.txt`. //! //! * SDA: BCM GPIO 22 (physical pin 15) //! * SCL: BCM GPIO 23 (physical pin 16) @@ -75,7 +75,7 @@ //! By default, the I2C bus clock speed is set to 100 kHz. Transferring //! 1 bit takes 1 clock cycle. You can change the //! transfer rate by adding `dtparam=i2c_arm_baudrate=X` to -//! `/boot/config.txt`, where `X` should be replaced with the +//! `/boot/firmware/config.txt`, where `X` should be replaced with the //! clock frequency in hertz (Hz). Remember to reboot //! the Raspberry Pi afterwards. //! diff --git a/src/pwm.rs b/src/pwm.rs index 0f851b1c..26c32de2 100644 --- a/src/pwm.rs +++ b/src/pwm.rs @@ -7,7 +7,7 @@ //! //! The BCM283x SoC supports two hardware PWM channels. By default, both channels //! are disabled. To enable only PWM0 on its default pin (BCM GPIO 18, physical pin 12), -//! add `dtoverlay=pwm` to `/boot/config.txt` on Raspberry Pi OS or `boot/firmware/usercfg.txt` on +//! add `dtoverlay=pwm` to `/boot/firmware/config.txt` on Raspberry Pi OS or `/boot/firmware/usercfg.txt` on //! Ubuntu. If you need both PWM channels, replace `pwm` with `pwm-2chan`, which enables PWM0 on BCM //! GPIO 18 (physical pin 12), and PWM1 on BCM GPIO 19 (physical pin 35). More details on enabling //! and configuring PWM on other GPIO pins than the default ones can be found in diff --git a/src/spi.rs b/src/spi.rs index 776286ef..b50cc94a 100644 --- a/src/spi.rs +++ b/src/spi.rs @@ -16,7 +16,7 @@ //! //! SPI0 is disabled by default. You can enable it by running //! `sudo raspi-config`, or by manually adding `dtparam=spi=on` to -//! `/boot/config.txt`. The associated pins are listed below. +//! `/boot/firmware/config.txt`. The associated pins are listed below. //! //! * MISO: BCM GPIO 9 (physical pin 21) //! * MOSI: BCM GPIO 10 (physical pin 19) @@ -29,7 +29,7 @@ //! to the BCM2835 documentation, using higher clock speeds on SPI1 requires //! additional CPU time compared to SPI0, caused by smaller FIFOs and no DMA //! support. It doesn't support [`Mode1`] or [`Mode3`]. SPI1 can be enabled by -//! adding `dtoverlay=spi1-1cs` to `/boot/config.txt`. Replace `1cs` with +//! adding `dtoverlay=spi1-1cs` to `/boot/firmware/config.txt`. Replace `1cs` with //! either `2cs` or `3cs` if you require 2 or 3 Slave Select pins. //! The associated pins are listed below. //! @@ -41,7 +41,7 @@ //! ### SPI2 //! //! SPI2 shares the same characteristics and limitations as SPI1. It can be -//! enabled by adding `dtoverlay=spi2-1cs` to `/boot/config.txt`. Replace +//! enabled by adding `dtoverlay=spi2-1cs` to `/boot/firmware/config.txt`. Replace //! `1cs` with either `2cs` or `3cs` if you require 2 or 3 Slave Select //! pins. The associated pins are listed below. //! @@ -52,7 +52,7 @@ //! //! ### SPI3 //! -//! SPI3 can be enabled by adding `dtoverlay=spi3-1cs` to `/boot/config.txt`. Replace +//! SPI3 can be enabled by adding `dtoverlay=spi3-1cs` to `/boot/firmware/config.txt`. Replace //! `1cs` with `2cs` if you require 2 Slave Select pins. The associated pins are listed below. //! //! * MISO: BCM GPIO 1 (physical pin 28) @@ -62,7 +62,7 @@ //! //! ### SPI4 //! -//! SPI4 can be enabled by adding `dtoverlay=spi4-1cs` to `/boot/config.txt`. Replace +//! SPI4 can be enabled by adding `dtoverlay=spi4-1cs` to `/boot/firmware/config.txt`. Replace //! `1cs` with `2cs` if you require 2 Slave Select pins. The associated pins are listed below. //! //! * MISO: BCM GPIO 5 (physical pin 29) @@ -72,7 +72,7 @@ //! //! ### SPI5 //! -//! SPI5 can be enabled by adding `dtoverlay=spi5-1cs` to `/boot/config.txt`. Replace +//! SPI5 can be enabled by adding `dtoverlay=spi5-1cs` to `/boot/firmware/config.txt`. Replace //! `1cs` with `2cs` if you require 2 Slave Select pins. The associated pins are listed below. //! //! * MISO: BCM GPIO 13 (physical pin 33) @@ -82,7 +82,7 @@ //! //! ### SPI6 //! -//! SPI6 can be enabled by adding `dtoverlay=spi6-1cs` to `/boot/config.txt`. Replace +//! SPI6 can be enabled by adding `dtoverlay=spi6-1cs` to `/boot/firmware/config.txt`. Replace //! `1cs` with `2cs` if you require 2 Slave Select pins. The associated pins are listed below. //! //! * MISO: BCM GPIO 19 (physical pin 35) @@ -103,7 +103,7 @@ //! //! By default, `spidev` can handle up to 4096 bytes in a single transfer. You //! can increase this limit to a maximum of 65536 bytes by appending -//! `spidev.bufsiz=65536` to the single line of parameters in `/boot/cmdline.txt`. +//! `spidev.bufsiz=65536` to the single line of parameters in `/boot/firmware/cmdline.txt`. //! Remember to reboot the Raspberry Pi afterwards. The current value of bufsiz //! can be checked with `cat /sys/module/spidev/parameters/bufsiz`. //! @@ -235,7 +235,7 @@ pub fn reverse_bits(buffer: &mut [u8]) { /// SPI buses. /// /// The Raspberry Pi exposes up to five SPI buses, depending on the model and -/// your `/boot/config.txt` configuration. More information can be found [here]. +/// your `/boot/firmware/config.txt` configuration. More information can be found [here]. /// /// [here]: index.html #[derive(Debug, PartialEq, Eq, Copy, Clone)] @@ -273,7 +273,7 @@ impl fmt::Display for Bus { /// to `Ss0`, `Ss1`, and `Ss2`. /// /// The number of available Slave Select pins for the selected SPI bus depends -/// on your `/boot/config.txt` configuration. More information can be found +/// on your `/boot/firmware/config.txt` configuration. More information can be found /// [here]. /// /// [here]: index.html diff --git a/src/uart.rs b/src/uart.rs index 78cfad0f..aa511873 100644 --- a/src/uart.rs +++ b/src/uart.rs @@ -31,22 +31,22 @@ //! //! Disable the Linux serial console by either deactivating it through //! `sudo raspi-config`, or manually removing the parameter -//! `console=serial0,115200` from `/boot/cmdline.txt`. +//! `console=serial0,115200` from `/boot/firmware/cmdline.txt`. //! //! Remove any lines containing `enable_uart=0` or `enable_uart=1` from -//! `/boot/config.txt`. +//! `/boot/firmware/config.txt`. //! //! On Raspberry Pi models with a Bluetooth module, an extra step is required //! to either disable Bluetooth or move it to `/dev/ttyS0`, so `/dev/ttyAMA0` //! becomes available for serial communication. //! -//! To disable Bluetooth, add `dtoverlay=pi3-disable-bt` to `/boot/config.txt`. +//! To disable Bluetooth, add `dtoverlay=pi3-disable-bt` to `/boot/firmware/config.txt`. //! You'll also need to disable the service that initializes Bluetooth with //! `sudo systemctl disable hciuart`. //! //! To move the Bluetooth module to `/dev/ttyS0`, instead of disabling it with //! the above-mentioned steps, add `dtoverlay=pi3-miniuart-bt` and -//! `core_freq=250` to `/boot/config.txt`. +//! `core_freq=250` to `/boot/firmware/config.txt`. //! //! Remember to reboot the Raspberry Pi after making any changes. //! @@ -57,9 +57,9 @@ //! //! Disable the Linux serial console by either deactivating it through //! `sudo raspi-config`, or manually removing the parameter -//! `console=serial0,115200` from `/boot/cmdline.txt`. +//! `console=serial0,115200` from `/boot/firmware/cmdline.txt`. //! -//! Add the line `enable_uart=1` to `/boot/config.txt` to enable serial +//! Add the line `enable_uart=1` to `/boot/firmware/config.txt` to enable serial //! communication on `/dev/ttyS0`, which also sets a fixed core frequency. //! //! Remember to reboot the Raspberry Pi after making any changes.