diff options
| -rw-r--r-- | embassy-nrf/src/lib.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/embassy-nrf/src/lib.rs b/embassy-nrf/src/lib.rs index faef44d1b..9a9485f04 100644 --- a/embassy-nrf/src/lib.rs +++ b/embassy-nrf/src/lib.rs | |||
| @@ -314,14 +314,14 @@ pub mod config { | |||
| 314 | #[cfg(feature = "nrf52840")] | 314 | #[cfg(feature = "nrf52840")] |
| 315 | pub reg0: bool, | 315 | pub reg0: bool, |
| 316 | /// Configure the voltage of the first stage DCDC. It is stored in non-volatile memory (UICR.REGOUT0 register); pass None to not touch it. | 316 | /// Configure the voltage of the first stage DCDC. It is stored in non-volatile memory (UICR.REGOUT0 register); pass None to not touch it. |
| 317 | #[cfg(feature = "nrf52840")] | 317 | #[cfg(any(feature = "nrf52840", feature = "nrf52833"))] |
| 318 | pub reg0_voltage: Option<Reg0Voltage>, | 318 | pub reg0_voltage: Option<Reg0Voltage>, |
| 319 | /// Config for the second stage DCDC (VDD -> DEC4), if disabled LDO will be used. | 319 | /// Config for the second stage DCDC (VDD -> DEC4), if disabled LDO will be used. |
| 320 | pub reg1: bool, | 320 | pub reg1: bool, |
| 321 | } | 321 | } |
| 322 | 322 | ||
| 323 | /// Output voltage setting for REG0 regulator stage. | 323 | /// Output voltage setting for REG0 regulator stage. |
| 324 | #[cfg(feature = "nrf52840")] | 324 | #[cfg(any(feature = "nrf52840", feature = "nrf52833"))] |
| 325 | pub enum Reg0Voltage { | 325 | pub enum Reg0Voltage { |
| 326 | /// 1.8 V | 326 | /// 1.8 V |
| 327 | _1V8 = 0, | 327 | _1V8 = 0, |
| @@ -388,7 +388,7 @@ pub mod config { | |||
| 388 | dcdc: DcdcConfig { | 388 | dcdc: DcdcConfig { |
| 389 | #[cfg(feature = "nrf52840")] | 389 | #[cfg(feature = "nrf52840")] |
| 390 | reg0: false, | 390 | reg0: false, |
| 391 | #[cfg(feature = "nrf52840")] | 391 | #[cfg(any(feature = "nrf52840", feature = "nrf52833"))] |
| 392 | reg0_voltage: None, | 392 | reg0_voltage: None, |
| 393 | reg1: false, | 393 | reg1: false, |
| 394 | }, | 394 | }, |
| @@ -664,7 +664,7 @@ pub fn init(config: config::Config) -> Peripherals { | |||
| 664 | } | 664 | } |
| 665 | } | 665 | } |
| 666 | 666 | ||
| 667 | #[cfg(feature = "nrf52840")] | 667 | #[cfg(any(feature = "nrf52840", feature = "nrf52833"))] |
| 668 | unsafe { | 668 | unsafe { |
| 669 | if let Some(value) = config.dcdc.reg0_voltage { | 669 | if let Some(value) = config.dcdc.reg0_voltage { |
| 670 | let value = value as u32; | 670 | let value = value as u32; |
