Fix magic number
This commit is contained in:
parent
5c0c975a86
commit
a065dfefe2
|
@ -22,6 +22,12 @@ use bsp::hal::{
|
||||||
watchdog::Watchdog,
|
watchdog::Watchdog,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/// I2C address of this slave
|
||||||
|
/// WARNING: Do not set this to 52 as there seems
|
||||||
|
/// to be a device on the bus with that address. In
|
||||||
|
/// that range, it might be an EEPROM!!!
|
||||||
|
const I2C_ADDR: u8 = 25;
|
||||||
|
|
||||||
/// Size of the i2c receive FIFO in bytes
|
/// Size of the i2c receive FIFO in bytes
|
||||||
const I2C_RECV_FIFO_SIZE: usize = 16;
|
const I2C_RECV_FIFO_SIZE: usize = 16;
|
||||||
|
|
||||||
|
@ -71,7 +77,7 @@ fn main() -> ! {
|
||||||
pins.gpio18.into_mode(),
|
pins.gpio18.into_mode(),
|
||||||
pins.gpio19.into_mode(),
|
pins.gpio19.into_mode(),
|
||||||
&mut pac.RESETS,
|
&mut pac.RESETS,
|
||||||
25,
|
I2C_ADDR.into(),
|
||||||
);
|
);
|
||||||
|
|
||||||
let pwm_slices = Slices::new(pac.PWM, &mut pac.RESETS);
|
let pwm_slices = Slices::new(pac.PWM, &mut pac.RESETS);
|
||||||
|
|
Loading…
Reference in a new issue