mirror of
https://github.com/skot/ESP-Miner.git
synced 2025-03-17 21:32:52 +01:00
prepare i2c with I2C0 from BitaxeMax v2.2
This commit is contained in:
parent
a2854654b2
commit
97a1e6c056
11
src/main.rs
11
src/main.rs
@ -18,6 +18,7 @@ use esp32s3_hal::{
|
||||
clock::{ClockControl, CpuClock},
|
||||
embassy,
|
||||
gpio::IO,
|
||||
i2c::I2C,
|
||||
peripherals::Peripherals,
|
||||
prelude::*,
|
||||
timer::TimerGroup,
|
||||
@ -143,6 +144,16 @@ fn main() -> ! {
|
||||
&mut system.peripheral_clock_control,
|
||||
);
|
||||
|
||||
// will be used to control emc2101/ina260/ds44232u
|
||||
let _i2c = I2C::new(
|
||||
peripherals.I2C0,
|
||||
io.pins.gpio46,
|
||||
io.pins.gpio45,
|
||||
400u32.kHz(),
|
||||
&mut system.peripheral_clock_control,
|
||||
&clocks,
|
||||
);
|
||||
|
||||
let wifi_config = Config::Dhcp(Default::default());
|
||||
let wifi_seed = 1234; // very random, very secure seed
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user