Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

v0.4.0 is missing embedded_hal_0_2::blocking::i2c traits?

オープン
#113 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
42/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
linux, rust
領域
embedded-iot

調査の方向性

まず v0.3.2 と v0.4.0-alpha.1 の embedded-hal 実装を比較し、次に examples/basic.rs とコンシューマーコードで報告されている trait bounds を確認します。I2cdev 型が必要な embedded_hal_0_2 blocking I2C traits を満たすか、互換性の変更が明確に文書化されていれば完了です。

索引モデルが issue の本文から書いたものです。

説明

This breaks when moving from 0.3.2 to [0.4.0-alpha.1](https://github.com/rust-embedded/linux-embedded-hal/compare/v0.3.0...v0.4.0-alpha.1) -- but the changelog does not mention this?

error[E0277]: the trait bound `I2cdev: _embedded_hal_blocking_i2c_Write` is not satisfied
  --> examples/basic.rs:12:26
   |
12 |         Rv8803::from_i2c(i2c, rv8803::bus::Address::Default).expect("Failed to initialize RV8803");
   |         ---------------- ^^^ the trait `_embedded_hal_blocking_i2c_Write` is not implemented for `I2cdev`
   |         |
   |         required by a bound introduced by this call
   |
note: required by a bound in `rv8803::<impl Rv8803<Bus<'a, I2C>>>::from_i2c`
  --> /home/mike/esp/rv8803/src/lib.rs:29:11
   |
29 |         + embedded_hal_0_2::blocking::i2c::Write<Error = E>,
   |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `rv8803::<impl Rv8803<Bus<'a, I2C>>>::from_i2c`
...
39 |     pub fn from_i2c(i2c: I2C, address: crate::bus::Address) -> Result<Self, E> {
   |            -------- required by a bound in this associated function

error[E0277]: the trait bound `I2cdev: WriteRead` is not satisfied
  --> examples/basic.rs:12:26
   |
12 |         Rv8803::from_i2c(i2c, rv8803::bus::Address::Default).expect("Failed to initialize RV8803");
   |         ---------------- ^^^ the trait `WriteRead` is not implemented for `I2cdev`
   |         |
   |         required by a bound introduced by this call
   |
note: required by a bound in `rv8803::<impl Rv8803<Bus<'a, I2C>>>::from_i2c`
  --> /home/mike/esp/rv8803/src/lib.rs:28:10
   |
28 |     I2C: embedded_hal_0_2::blocking::i2c::WriteRead<Error = E>
   |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `rv8803::<impl Rv8803<Bus<'a, I2C>>>::from_i2c`
...
39 |     pub fn from_i2c(i2c: I2C, address: crate::bus::Address) -> Result<Self, E> {
   |            -------- required by a bound in this associated function
主要言語
Rust
スター
323
フォーク
60
PR マージ指標
30日以内にマージされた PR はありません

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

rust-embedded/linux-embedded-hal のほかの issue

rust-embedded/linux-embedded-hal の issue をすべて見る

似ている issue

Rust の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。