Skip to content

Commit

Permalink
fix: add correct i2c address to examples
Browse files Browse the repository at this point in the history
fixes #6
  • Loading branch information
markus-k committed Jan 28, 2025
1 parent 67875bb commit abc4d00
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ let config = ConfigBuilder::new_lp5864()
.maximum_current(lp586x::CurrentSettingNonT::Max40mA)
.data_mode_8bit(false); // disable vsync for simplicity

let mut led_driver = Lp586x::new_with_i2c(&config, i2c_bus, 0x00, &mut delay).unwrap();
let mut led_driver = Lp586x::new_with_i2c(&config, i2c_bus, 0x40, &mut delay).unwrap();
let mut framebuffer = [0u8; 72];
framebuffer[0] = u8::MAX;

Expand Down
4 changes: 2 additions & 2 deletions examples/simple.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ fn main() {
// placeholders, replace with instances from your HAL
let i2c_bus = embedded_hal_mock::eh1::i2c::Mock::new(&[]);
let mut delay = embedded_hal_mock::eh1::delay::NoopDelay::new();
let mut vsync_pin = embedded_hal_mock::eh1::pin::Mock::new(&[]);
let mut vsync_pin = embedded_hal_mock::eh1::digital::Mock::new(&[]);

let config = ConfigBuilder::new_lp5864()
.pwm_frequency(lp586x::PwmFrequency::Pwm62_5kHz)
.maximum_current(lp586x::CurrentSettingNonT::Max40mA)
.data_mode_16bit();
let mut led_driver = Lp586x::new_with_i2c(&config, i2c_bus, 0x00, &mut delay).unwrap();
let mut led_driver = Lp586x::new_with_i2c(&config, i2c_bus, 0x40, &mut delay).unwrap();
let mut framebuffer = [0u16; 72];
framebuffer[0] = u16::MAX;

Expand Down

0 comments on commit abc4d00

Please sign in to comment.