First I2C implementation

Initial I2C HAL implementation.
Only the I2cMaster was tested so far, I2cSlave will be tested next.

Master side was tested with a temerature sensor example application
in the vorago-reb1 crate
This commit is contained in:
2021-12-02 12:03:46 +01:00
parent 70d9f123ef
commit 3886e2f11f
7 changed files with 937 additions and 7 deletions

View File

@ -12,7 +12,7 @@ use va108xx_hal::{
gpio::{PinsA, PinsB},
pac::{self, SPIA, SPIB},
prelude::*,
spi::{self, NoneT, Spi, SpiBase, TransferConfig},
spi::{self, Spi, SpiBase, TransferConfig},
timer::CountDownTimer,
};

View File

@ -29,7 +29,7 @@ fn main() -> ! {
let mut dp = pac::Peripherals::take().unwrap();
let mut last_ms = 0;
rprintln!("-- Vorago system ticks using timers --");
set_sys_clock(50.mhz().into());
set_sys_clock(50.mhz());
let lib_type = LibType::Hal;
match lib_type {
LibType::Pac => {