mirror of
https://github.com/google/comprehensive-rust.git
synced 2024-12-02 11:03:18 +02:00
Initialise I2C bus.
This commit is contained in:
parent
026cdca2b7
commit
fb2a81186b
@ -18,11 +18,13 @@
|
||||
extern crate panic_halt as _;
|
||||
|
||||
use cortex_m_rt::entry;
|
||||
use microbit::Board;
|
||||
use microbit::{hal::twim::Twim, pac::twim0::frequency::FREQUENCY_A, Board};
|
||||
|
||||
#[entry]
|
||||
fn main() -> ! {
|
||||
let board = Board::take().unwrap();
|
||||
|
||||
let i2c = Twim::new(board.TWIM0, board.i2c_internal.into(), FREQUENCY_A::K100);
|
||||
|
||||
loop {}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user