summaryrefslogtreecommitdiff
path: root/examples/nrf/src/bin/pwm.rs
diff options
context:
space:
mode:
Diffstat (limited to 'examples/nrf/src/bin/pwm.rs')
-rw-r--r--examples/nrf/src/bin/pwm.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/examples/nrf/src/bin/pwm.rs b/examples/nrf/src/bin/pwm.rs
index 68402ce2..7939e79e 100644
--- a/examples/nrf/src/bin/pwm.rs
+++ b/examples/nrf/src/bin/pwm.rs
@@ -2,14 +2,15 @@
#![no_main]
#![feature(type_alias_impl_trait)]
-#[path = "../example_common.rs"]
-mod example_common;
use defmt::*;
use embassy::executor::Spawner;
use embassy::time::{Duration, Timer};
use embassy_nrf::pwm::{Prescaler, SimplePwm};
use embassy_nrf::Peripherals;
+use defmt_rtt as _; // global logger
+use panic_probe as _;
+
// for i in range(1024): print(int((math.sin(i/512*math.pi)*0.4+0.5)**2*32767), ', ', end='')
static DUTY: [u16; 1024] = [
8191, 8272, 8353, 8434, 8516, 8598, 8681, 8764, 8847, 8931, 9015, 9099, 9184, 9269, 9354, 9440,