forked from M-Labs/nix-scripts
pounder patch: rebase, fix USB setting access
This commit is contained in:
parent
a75d445b9e
commit
c486ea6288
@ -216,7 +216,7 @@ index 025f7d4f..59578cce 100644
|
|||||||
fn add_write(&mut self, register: Register, value: &[u8]) {
|
fn add_write(&mut self, register: Register, value: &[u8]) {
|
||||||
let data = &mut self.data[self.index..];
|
let data = &mut self.data[self.index..];
|
||||||
diff --git a/src/bin/dual-iir.rs b/src/bin/dual-iir.rs
|
diff --git a/src/bin/dual-iir.rs b/src/bin/dual-iir.rs
|
||||||
index d4146cc2..0c72054d 100644
|
index d4146cc2..b9bc99d9 100644
|
||||||
--- a/src/bin/dual-iir.rs
|
--- a/src/bin/dual-iir.rs
|
||||||
+++ b/src/bin/dual-iir.rs
|
+++ b/src/bin/dual-iir.rs
|
||||||
@@ -28,7 +28,7 @@
|
@@ -28,7 +28,7 @@
|
||||||
@ -268,7 +268,7 @@ index d4146cc2..0c72054d 100644
|
|||||||
struct Shared {
|
struct Shared {
|
||||||
usb: UsbDevice,
|
usb: UsbDevice,
|
||||||
- network: NetworkUsers<DualIir, 3>,
|
- network: NetworkUsers<DualIir, 3>,
|
||||||
+ network: NetworkUsers<DualIir, 5>,
|
+ network: NetworkUsers<DualIir, 6>,
|
||||||
settings: Settings,
|
settings: Settings,
|
||||||
active_settings: DualIir,
|
active_settings: DualIir,
|
||||||
telemetry: TelemetryBuffer,
|
telemetry: TelemetryBuffer,
|
||||||
@ -279,7 +279,7 @@ index d4146cc2..0c72054d 100644
|
|||||||
#[local]
|
#[local]
|
||||||
struct Local {
|
struct Local {
|
||||||
- usb_terminal: SerialTerminal<Settings, 4>,
|
- usb_terminal: SerialTerminal<Settings, 4>,
|
||||||
+ usb_terminal: SerialTerminal<Settings, 5>,
|
+ usb_terminal: SerialTerminal<Settings, 6>,
|
||||||
sampling_timer: SamplingTimer,
|
sampling_timer: SamplingTimer,
|
||||||
digital_inputs: (DigitalInput0, DigitalInput1),
|
digital_inputs: (DigitalInput0, DigitalInput1),
|
||||||
afes: (AFE0, AFE1),
|
afes: (AFE0, AFE1),
|
||||||
@ -295,7 +295,7 @@ index d4146cc2..0c72054d 100644
|
|||||||
|
|
||||||
// Configure the microcontroller
|
// Configure the microcontroller
|
||||||
- let (stabilizer, _pounder) = hardware::setup::setup::<Settings, 4>(
|
- let (stabilizer, _pounder) = hardware::setup::setup::<Settings, 4>(
|
||||||
+ let (mut stabilizer, pounder) = hardware::setup::setup::<Settings, 5>(
|
+ let (mut stabilizer, pounder) = hardware::setup::setup::<Settings, 6>(
|
||||||
c.core,
|
c.core,
|
||||||
c.device,
|
c.device,
|
||||||
clock,
|
clock,
|
||||||
@ -392,7 +392,7 @@ index d4146cc2..0c72054d 100644
|
|||||||
});
|
});
|
||||||
|
|
||||||
diff --git a/src/bin/lockin.rs b/src/bin/lockin.rs
|
diff --git a/src/bin/lockin.rs b/src/bin/lockin.rs
|
||||||
index d8d193dd..aa941db7 100644
|
index d8d193dd..4e5abb28 100644
|
||||||
--- a/src/bin/lockin.rs
|
--- a/src/bin/lockin.rs
|
||||||
+++ b/src/bin/lockin.rs
|
+++ b/src/bin/lockin.rs
|
||||||
@@ -29,7 +29,7 @@
|
@@ -29,7 +29,7 @@
|
||||||
@ -409,10 +409,28 @@ index d8d193dd..aa941db7 100644
|
|||||||
struct Shared {
|
struct Shared {
|
||||||
usb: UsbDevice,
|
usb: UsbDevice,
|
||||||
- network: NetworkUsers<Lockin, 2>,
|
- network: NetworkUsers<Lockin, 2>,
|
||||||
+ network: NetworkUsers<Lockin, 5>,
|
+ network: NetworkUsers<Lockin, 6>,
|
||||||
settings: Settings,
|
settings: Settings,
|
||||||
active_settings: Lockin,
|
active_settings: Lockin,
|
||||||
telemetry: TelemetryBuffer,
|
telemetry: TelemetryBuffer,
|
||||||
|
@@ -256,7 +256,7 @@ mod app {
|
||||||
|
|
||||||
|
#[local]
|
||||||
|
struct Local {
|
||||||
|
- usb_terminal: SerialTerminal<Settings, 3>,
|
||||||
|
+ usb_terminal: SerialTerminal<Settings, 6>,
|
||||||
|
sampling_timer: SamplingTimer,
|
||||||
|
digital_inputs: (DigitalInput0, DigitalInput1),
|
||||||
|
timestamper: InputStamper,
|
||||||
|
@@ -275,7 +275,7 @@ mod app {
|
||||||
|
let clock = SystemTimer::new(|| Systick::now().ticks());
|
||||||
|
|
||||||
|
// Configure the microcontroller
|
||||||
|
- let (mut stabilizer, _pounder) = hardware::setup::setup::<Settings, 3>(
|
||||||
|
+ let (mut stabilizer, _pounder) = hardware::setup::setup::<Settings, 6>(
|
||||||
|
c.core,
|
||||||
|
c.device,
|
||||||
|
clock,
|
||||||
@@ -543,6 +543,7 @@ mod app {
|
@@ -543,6 +543,7 @@ mod app {
|
||||||
*gains[0],
|
*gains[0],
|
||||||
*gains[1],
|
*gains[1],
|
||||||
@ -422,7 +440,7 @@ index d8d193dd..aa941db7 100644
|
|||||||
});
|
});
|
||||||
|
|
||||||
diff --git a/src/bin/urukul.rs b/src/bin/urukul.rs
|
diff --git a/src/bin/urukul.rs b/src/bin/urukul.rs
|
||||||
index fc7faf40..1ebb8e6c 100644
|
index fc7faf40..10ff9016 100644
|
||||||
--- a/src/bin/urukul.rs
|
--- a/src/bin/urukul.rs
|
||||||
+++ b/src/bin/urukul.rs
|
+++ b/src/bin/urukul.rs
|
||||||
@@ -104,21 +104,21 @@ mod app {
|
@@ -104,21 +104,21 @@ mod app {
|
||||||
@ -430,7 +448,7 @@ index fc7faf40..1ebb8e6c 100644
|
|||||||
struct Shared {
|
struct Shared {
|
||||||
usb: UsbDevice,
|
usb: UsbDevice,
|
||||||
- network: NetworkUsers<App, 3>,
|
- network: NetworkUsers<App, 3>,
|
||||||
+ network: NetworkUsers<App, 5>,
|
+ network: NetworkUsers<App, 6>,
|
||||||
settings: Settings,
|
settings: Settings,
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -438,7 +456,7 @@ index fc7faf40..1ebb8e6c 100644
|
|||||||
struct Local {
|
struct Local {
|
||||||
urukul: Urukul,
|
urukul: Urukul,
|
||||||
- usb_terminal: SerialTerminal<Settings, 4>,
|
- usb_terminal: SerialTerminal<Settings, 4>,
|
||||||
+ usb_terminal: SerialTerminal<Settings, 5>,
|
+ usb_terminal: SerialTerminal<Settings, 6>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[init]
|
#[init]
|
||||||
@ -446,7 +464,7 @@ index fc7faf40..1ebb8e6c 100644
|
|||||||
let clock = SystemTimer::new(|| Systick::now().ticks());
|
let clock = SystemTimer::new(|| Systick::now().ticks());
|
||||||
|
|
||||||
- let (stabilizer, _pounder) = hardware::setup::setup::<Settings, 4>(
|
- let (stabilizer, _pounder) = hardware::setup::setup::<Settings, 4>(
|
||||||
+ let (stabilizer, _pounder) = hardware::setup::setup::<Settings, 5>(
|
+ let (stabilizer, _pounder) = hardware::setup::setup::<Settings, 6>(
|
||||||
c.core,
|
c.core,
|
||||||
c.device,
|
c.device,
|
||||||
clock,
|
clock,
|
||||||
@ -479,7 +497,7 @@ index cfd08b7f..2570f506 100644
|
|||||||
Ok(attenuation_code as f32 / 2.0)
|
Ok(attenuation_code as f32 / 2.0)
|
||||||
}
|
}
|
||||||
diff --git a/src/hardware/pounder/dds_output.rs b/src/hardware/pounder/dds_output.rs
|
diff --git a/src/hardware/pounder/dds_output.rs b/src/hardware/pounder/dds_output.rs
|
||||||
index 3ae1ce90..cd978b01 100644
|
index 5527a8e1..23435e2e 100644
|
||||||
--- a/src/hardware/pounder/dds_output.rs
|
--- a/src/hardware/pounder/dds_output.rs
|
||||||
+++ b/src/hardware/pounder/dds_output.rs
|
+++ b/src/hardware/pounder/dds_output.rs
|
||||||
@@ -55,7 +55,7 @@
|
@@ -55,7 +55,7 @@
|
||||||
@ -491,7 +509,7 @@ index 3ae1ce90..cd978b01 100644
|
|||||||
use ad9959::{Channel, Mode, ProfileSerializer};
|
use ad9959::{Channel, Mode, ProfileSerializer};
|
||||||
|
|
||||||
/// The DDS profile update stream.
|
/// The DDS profile update stream.
|
||||||
@@ -157,6 +157,46 @@ impl<'a> ProfileBuilder<'a> {
|
@@ -157,6 +157,46 @@ impl ProfileBuilder<'_> {
|
||||||
self
|
self
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user