-
Notifications
You must be signed in to change notification settings - Fork 56
Comparing changes
Open a pull request
base repository: rust-embedded/rust-i2cdev
base: 0.6.0
head repository: rust-embedded/rust-i2cdev
compare: master
- 20 commits
- 10 files changed
- 7 contributors
Commits on Jan 17, 2024
-
Don't panic when writing with a mock at offset 0x0
Noah Pederson committedJan 17, 2024 Configuration menu - View commit details
-
Copy full SHA for cdda7b4 - Browse repository at this point
Copy the full SHA cdda7b4View commit details -
Test that we can read from mock device at offset 0x0
Noah Pederson committedJan 17, 2024 Configuration menu - View commit details
-
Copy full SHA for 6ebeffa - Browse repository at this point
Copy the full SHA 6ebeffaView commit details -
More safe handling of usize -> isize conversion with sane failure mode
Noah Pederson committedJan 17, 2024 Configuration menu - View commit details
-
Copy full SHA for 3b200f6 - Browse repository at this point
Copy the full SHA 3b200f6View commit details
Commits on Jan 18, 2024
-
Noah Pederson committed
Jan 18, 2024 Configuration menu - View commit details
-
Copy full SHA for 8447d41 - Browse repository at this point
Copy the full SHA 8447d41View commit details -
Merge pull request #83 from chiefnoah/master
Prevent underflow when using a MockI2CDevice with a RegisterMap.offset = 0x0
Configuration menu - View commit details
-
Copy full SHA for bd5f200 - Browse repository at this point
Copy the full SHA bd5f200View commit details
Commits on May 3, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 4f02678 - Browse repository at this point
Copy the full SHA 4f02678View commit details
Commits on May 7, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 65feddc - Browse repository at this point
Copy the full SHA 65feddcView commit details -
Configuration menu - View commit details
-
Copy full SHA for 57bd54c - Browse repository at this point
Copy the full SHA 57bd54cView commit details -
Co-authored-by: Nick Stevens <nickastevens83@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 636d056 - Browse repository at this point
Copy the full SHA 636d056View commit details
Commits on May 8, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 1f39149 - Browse repository at this point
Copy the full SHA 1f39149View commit details -
Merge pull request #85 from ohunter/impl_no_start
Fulfillment of the I2c trait contract
Configuration menu - View commit details
-
Copy full SHA for a7a4dce - Browse repository at this point
Copy the full SHA a7a4dceView commit details
Commits on May 9, 2024
-
Configuration menu - View commit details
-
Copy full SHA for d44de85 - Browse repository at this point
Copy the full SHA d44de85View commit details
Commits on Jun 12, 2024
-
Merge pull request #86 from rust-embedded/prep-0.6.1
Prepare 0.6.1 release
Configuration menu - View commit details
-
Copy full SHA for 499e902 - Browse repository at this point
Copy the full SHA 499e902View commit details
Commits on Dec 20, 2024
-
ci: Update to macOS runners from macos-11 to macos-14
macOS 11 runners have been deprecated! Need this for CI to pass.
Configuration menu - View commit details
-
Copy full SHA for c88553a - Browse repository at this point
Copy the full SHA c88553aView commit details -
core: Relax lifetime constraint on
msgs
inI2CTransfer::transfer()
This change enables users of `i2cdev` to create generic functions on `T: I2CTransfer` that have output buffers constructed separately from the `I2CMessage` array, like the following: ```rust fn smbus_read_post_box<T>(i2c: &mut T, offset: u16, out: &mut [u8]) where for<'a> T: I2CTransfer<'a>, { let addr = offset.to_be_bytes(); let mut messages = [ T::Message::write(addr), T::Message::read(out), ]; i2c.transfer(&mut messages).expect("uh oh"); } ``` Before this, `messages` would not satisfy the constraints of `.transfer()`, because `messages` does not live as long as one of the output buffers `out`: ``` error[E0597]: `messages` does not live long enough --> src/smbpbisensor.rs:69:19 | 63 | let mut messages = [ | ------------ binding `messages` declared here ... 69 | .transfer(&mut messages) | ^^^^^^^^^^^^^ borrowed value does not live long enough ... 78 | } | - | | | `messages` dropped here while still borrowed | borrow might be used here, when `messages` is dropped and runs the destructor for type `[<T as I2CTransfer<'_>>::Message; 2]` ``` The error message is a little confusing, but basically `&'a mut [Self::Message]` is forcing the array of `I2CMessage`s to match the lifetime of the buffers in the messages, which is not strictly necessary: the array of messages can have a different lifetime than the buffers. After this change, the above example compiles successfully.
Configuration menu - View commit details
-
Copy full SHA for e6fbc13 - Browse repository at this point
Copy the full SHA e6fbc13View commit details -
Merge pull request #89 from peterdelevoryas/master
core: Relax lifetime constraint on `msgs` in `I2CTransfer::transfer()`
Configuration menu - View commit details
-
Copy full SHA for 69121a8 - Browse repository at this point
Copy the full SHA 69121a8View commit details
Commits on Feb 7, 2025
-
Configuration menu - View commit details
-
Copy full SHA for 8fa63ac - Browse repository at this point
Copy the full SHA 8fa63acView commit details -
Configuration menu - View commit details
-
Copy full SHA for 5470d8f - Browse repository at this point
Copy the full SHA 5470d8fView commit details
Commits on Mar 4, 2025
-
Configuration menu - View commit details
-
Copy full SHA for 6613901 - Browse repository at this point
Copy the full SHA 6613901View commit details -
Merge pull request #90 from eldruin/common-traits
Derive common traits for public types + warnings fixes
Configuration menu - View commit details
-
Copy full SHA for 73404a5 - Browse repository at this point
Copy the full SHA 73404a5View commit details
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff 0.6.0...master