Skip to content

Commit b35084a

Browse files
committed
ledmatrix: Disable SW9 in DVT2
It's good to disable disconnected SW pins. Otherwise it causes higher voltages spikes which can cause audible noise. Signed-off-by: Daniel Schaefer <[email protected]>
1 parent 01d86af commit b35084a

File tree

4 files changed

+18
-5
lines changed

4 files changed

+18
-5
lines changed

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ usbd-serial = "0.1.1"
3636
usbd-hid = "0.6.1"
3737
fugit = "0.3.7"
3838
# LED Matrix
39-
is31fl3741 = { git = "https://github.com/FrameworkComputer/is31fl3741-rs", branch = "main" }
39+
is31fl3741 = { git = "https://github.com/FrameworkComputer/is31fl3741-rs", branch = "sw-enablement" }
4040
# B1 Display
4141
st7306 = { git = "https://github.com/FrameworkComputer/st7306-rs", branch = "update-deps" }
4242
embedded-graphics = "0.8"

fl16-inputmodules/src/fl16.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
use core::convert::TryFrom;
44
#[allow(unused_imports)]
55
use embedded_hal::blocking::delay::DelayMs;
6-
#[allow(unused_imports)]
6+
use embedded_hal::blocking::i2c::Read;
77
use embedded_hal::blocking::i2c::Write;
88
#[allow(unused_imports)]
99
use is31fl3741::{Error, IS31FL3741};
@@ -650,6 +650,7 @@ pub struct LedMatrix<I2C> {
650650
impl<I2C, I2cError> LedMatrix<I2C>
651651
where
652652
I2C: Write<Error = I2cError>,
653+
I2C: Read<Error = I2cError>,
653654
{
654655
pub fn unwrap(self) -> I2C {
655656
self.device.i2c
@@ -673,7 +674,8 @@ where
673674
}
674675

675676
pub fn setup<DEL: DelayMs<u8>>(&mut self, delay: &mut DEL) -> Result<(), Error<I2cError>> {
676-
self.device.setup(delay)
677+
self.device.setup(delay)?;
678+
Ok(())
677679
}
678680

679681
pub fn fill_brightness(&mut self, brightness: u8) -> Result<(), Error<I2cError>> {

ledmatrix/src/main.rs

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,12 +238,23 @@ fn main() -> ! {
238238
state.grid = every_nth_col(2);
239239
};
240240

241-
let mut matrix = LedMatrix::new(i2c, DVT2_CALC_PIXEL);
242241
//let mut matrix = LedMatrix::new(i2c, EVT_CALC_PIXEL);
242+
let mut matrix = LedMatrix::new(i2c, DVT2_CALC_PIXEL);
243243
matrix
244244
.setup(&mut delay)
245245
.expect("failed to setup RGB controller");
246246

247+
// EVT
248+
// matrix
249+
// .device
250+
// .sw_enablement(is31fl3741::SwSetting::Sw1Sw9)
251+
// .unwrap();
252+
// DVT
253+
matrix
254+
.device
255+
.sw_enablement(is31fl3741::SwSetting::Sw1Sw8)
256+
.unwrap();
257+
247258
matrix
248259
.set_scaling(MAX_BRIGHTNESS)
249260
.expect("failed to set scaling");

0 commit comments

Comments
 (0)