Skip to content
This repository has been archived by the owner on Jun 23, 2024. It is now read-only.

Commit

Permalink
Merge #21
Browse files Browse the repository at this point in the history
21: First I2C implementation r=robamu a=robamu

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

Co-authored-by: Robin Mueller <[email protected]>
  • Loading branch information
bors[bot] and robamu authored Dec 2, 2021
2 parents 70d9f12 + 3886e2f commit 44cc075
Show file tree
Hide file tree
Showing 7 changed files with 937 additions and 7 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,13 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

## [unreleased]

## [0.2.2]

### Added

- DelayUs and DelayMs trait implementations for timer
- SPI implementation for blocking API, supports blockmode as well
- Basic I2C implementation for blocking API

### Changed

Expand Down
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "va108xx-hal"
version = "0.2.1"
version = "0.2.2"
authors = ["Robin Mueller <[email protected]>"]
edition = "2021"
description = "HAL for the Vorago VA108xx family of microcontrollers"
Expand All @@ -21,7 +21,7 @@ once_cell = { version = "1.8.0", default-features = false }
libm = "0.2.1"

[dependencies.va108xx]
version = "0.1"
version = "0.1.3"

[features]
rt = ["va108xx/rt"]
Expand Down
2 changes: 1 addition & 1 deletion examples/spi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};

Expand Down
2 changes: 1 addition & 1 deletion examples/timer-ticks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 => {
Expand Down
Loading

0 comments on commit 44cc075

Please sign in to comment.