Skip to content

Commit

Permalink
Merge pull request #20 from bsodmike/wip/next_release_rebase
Browse files Browse the repository at this point in the history
New public API (v4.0.0)
  • Loading branch information
bsodmike authored Oct 6, 2024
2 parents 44c283c + b0b16a6 commit 9e12601
Show file tree
Hide file tree
Showing 24 changed files with 1,476 additions and 514 deletions.
1 change: 1 addition & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
github: bsodmike
15 changes: 12 additions & 3 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,18 @@ updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"

interval: "weekly"
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "weekly"
groups:
npm-dependencies:
patterns: ["*"]
- package-ecosystem: "cargo"
directory: "/"
schedule:
interval: "daily"
interval: "weekly"
groups:
cargo-dependencies:
patterns: ["*"]
82 changes: 73 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
name: CI

on:
push:
branches:
- master
tags:
- 'v*'
pull_request:

name: CI
branches:
- master
schedule:
- cron: "0 0 * * 0"

jobs:
build:
Expand All @@ -20,16 +22,16 @@ jobs:
- "thumbv6m-none-eabi"
- "thumbv7em-none-eabi"
toolchain:
- "stable"
- "nightly"
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.toolchain }}
target: ${{ matrix.target }}
- run: rustup target add ${{ matrix.target }}
- run: cargo build --target ${{ matrix.target }}
- run: cargo build --target ${{ matrix.target }} --features linux_embedded_hal
if: ${{ matrix.target == 'x86_64-unknown-linux-gnu' }}

test:
name: Unit Tests
Expand All @@ -38,7 +40,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
- run: cargo test --all-features
- run: cargo test

clippy:
name: Clippy
Expand All @@ -48,7 +50,7 @@ jobs:
- uses: dtolnay/rust-toolchain@nightly
with:
components: clippy
- run: cargo clippy --all-features --all-targets -- --deny warnings
- run: cargo clippy -- -D warnings

format:
name: Format
Expand All @@ -60,14 +62,75 @@ jobs:
components: rustfmt
- run: cargo +nightly fmt -- --check

deny:
name: Deny
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v4

- name: Run cargo-deny
uses: EmbarkStudios/cargo-deny-action@v2
with:
command: check all

links:
name: Links
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v4

- name: Run lychee
uses: lycheeverse/lychee-action@v1
with:
args: -v *.md
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

typos:
name: Typos
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v4

- name: Check typos
uses: crate-ci/typos@master

msrv:
name: MSRV
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v4

- name: Install cargo-binstall
uses: taiki-e/install-action@cargo-binstall

- name: Install cargo-msrv
run: cargo binstall -y --force cargo-msrv

- name: Run cargo-msrv
run: cargo msrv --output-format json verify | tail -n 1 | jq --exit-status '.success'

doc:
name: doc
runs-on: ubuntu-latest
env: {"RUSTDOCFLAGS": "-D warnings --cfg docsrs"}
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
- run: cargo +nightly rustdoc --all-features
- run: cargo +nightly rustdoc

examples:
name: Examples
runs-on: ubuntu-latest
env: {"RUSTFLAGS": "-D warnings"}
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
- run: cargo build --examples

crates_io_publish:
name: Publish (crates.io)
Expand All @@ -77,6 +140,7 @@ jobs:
- test
- clippy
- format
- examples
- doc
runs-on: ubuntu-latest
timeout-minutes: 25
Expand Down
31 changes: 29 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,41 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [0.4.4] - 2024-03-01
## [4.0.0] - 06 October 2024

### Changed
- __Breaking Change__: New public API.

This release has been tested on:
- Raspberry Pi Pico (RP2040)
- RAKwireless RAK3172 (STM32wle5cc)

## [3.0.0] - 15 Sept 2024 - Yanked

### Changed
- __Breaking Change__: Underlying driver is protected from the public API.

## [2.0.0] - 14 Sept 2024 - Yanked

### Changed
- __Breaking Change__: `RTClock::new()` accepts a shared reference to the shared bus; this allows communicating with multiple rtc chips at different addresses.

## [1.0.0] - 14 Sept 2024 - Yanked

### Changed
- __Breaking Change__: Removed alloc as a default requirement
- __Breaking Change__: Brand new public API via `RTCClock`, refer to docs for details.
- Tested (compilation/clippy) with Embassy and `defmt`.
- TODO: Testing on actual hardware.

## [0.4.4] - 1 March 2024 - Yanked

### Changed
- __Breaking Change__: Fully revised module organisation
- __Breaking Change__: Revised error API
- Renamed `Rv8803<_>::from_i2c0` to `Rv8803<_>::from_i2c`.

## [0.1.0] - 2022-01-01
## [0.1.0] - 1 January 2022 - Yanked
- Initial release


26 changes: 9 additions & 17 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,31 +1,23 @@
[package]
name = "rv8803"
version = "0.4.4"
authors = ["Michael de Silva <[email protected]>"]
edition = "2021"
version = "4.0.0"
authors = ["Michael de Silva <[email protected]>"]
repository = "https://github.com/bsodmike/rv8803-rs"
license = "MIT"
description = "RV8803 driver with support for I2C"
license = "MIT OR Apache-2.0"
description = "RTC clock driver for the rv8803 chip via I2C"
readme = "README.md"
keywords = ["i2c", "driver", "embedded-hal-driver", "rv8803"]
categories = ["embedded", "hardware-support", "no-std"]
edition = "2021"
rust-version = "1.81.0"

[features]
default = ["alloc"]
alloc = []
async = ["embedded-hal-async"]
linux_embedded_hal = ["linux-embedded-hal"]
default = []

[dependencies]
log = "0.4"
defmt = { version = "^0.3" }
embedded-hal = { package = "embedded-hal", version = "^1.0" }
embedded-hal-0-2 = { package = "embedded-hal", version = "0.2.7", features = ["unproven"] }
serde = { version = "1", features = ["derive"], default-features = false, optional = true }
embedded-hal-async = { package = "embedded-hal-async", version = "^1.0", optional = true }
linux-embedded-hal = { version = "^0.3", optional = true }

[dev-dependencies]
i2cdev = "0.5.1"
embedded-hal-async = "1.0.0"

[package.metadata.docs.rs]
all-features = true
Expand Down
21 changes: 0 additions & 21 deletions LICENSE

This file was deleted.

Loading

0 comments on commit 9e12601

Please sign in to comment.