aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorDario Nieuwenhuis <[email protected]>2025-04-18 11:09:00 +0000
committerGitHub <[email protected]>2025-04-18 11:09:00 +0000
commit667400111a4d4e0118135ef314ae3e4443b24202 (patch)
tree647fbe99fe907c92fcad985de9fc9356578e7d33 /examples
parent7a620661da85c0a4b550abbde7df7e248fe0f155 (diff)
parentbbfebf968e31815a78ba9f19e7a6b2e26bad7456 (diff)
Merge pull request #4089 from IvanLi-CN/g4-opamp
feat(embassy-stm32/opamp): Add some STM32G4 opamp usage
Diffstat (limited to 'examples')
-rw-r--r--examples/stm32f334/src/bin/opamp.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/stm32f334/src/bin/opamp.rs b/examples/stm32f334/src/bin/opamp.rs
index b30445ead..c344935d7 100644
--- a/examples/stm32f334/src/bin/opamp.rs
+++ b/examples/stm32f334/src/bin/opamp.rs
@@ -4,7 +4,7 @@
4use defmt::info; 4use defmt::info;
5use embassy_executor::Spawner; 5use embassy_executor::Spawner;
6use embassy_stm32::adc::{Adc, SampleTime}; 6use embassy_stm32::adc::{Adc, SampleTime};
7use embassy_stm32::opamp::{OpAmp, OpAmpGain}; 7use embassy_stm32::opamp::OpAmp;
8use embassy_stm32::peripherals::ADC2; 8use embassy_stm32::peripherals::ADC2;
9use embassy_stm32::time::mhz; 9use embassy_stm32::time::mhz;
10use embassy_stm32::{adc, bind_interrupts, Config}; 10use embassy_stm32::{adc, bind_interrupts, Config};
@@ -48,7 +48,7 @@ async fn main(_spawner: Spawner) -> ! {
48 48
49 let mut vrefint = adc.enable_vref(); 49 let mut vrefint = adc.enable_vref();
50 let mut temperature = adc.enable_temperature(); 50 let mut temperature = adc.enable_temperature();
51 let mut buffer = opamp.buffer_ext(p.PA7.reborrow(), p.PA6.reborrow(), OpAmpGain::Mul1); 51 let mut buffer = opamp.buffer_ext(p.PA7.reborrow(), p.PA6.reborrow());
52 52
53 loop { 53 loop {
54 let vref = adc.read(&mut vrefint).await; 54 let vref = adc.read(&mut vrefint).await;