Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: rust-embedded/rust-i2cdev
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 0.6.0
Choose a base ref
...
head repository: rust-embedded/rust-i2cdev
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
  • 20 commits
  • 10 files changed
  • 7 contributors

Commits on Jan 17, 2024

  1. Don't panic when writing with a mock at offset 0x0

    Noah Pederson committed Jan 17, 2024
    Configuration menu
    Copy the full SHA
    cdda7b4 View commit details
    Browse the repository at this point in the history
  2. Test that we can read from mock device at offset 0x0

    Noah Pederson committed Jan 17, 2024
    Configuration menu
    Copy the full SHA
    6ebeffa View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    3b200f6 View commit details
    Browse the repository at this point in the history

Commits on Jan 18, 2024

  1. Bump MSRV to 1.65.0

    Noah Pederson committed Jan 18, 2024
    Configuration menu
    Copy the full SHA
    8447d41 View commit details
    Browse the repository at this point in the history
  2. Merge pull request #83 from chiefnoah/master

    Prevent underflow when using a MockI2CDevice with a RegisterMap.offset = 0x0
    eldruin authored Jan 18, 2024
    Configuration menu
    Copy the full SHA
    bd5f200 View commit details
    Browse the repository at this point in the history

Commits on May 3, 2024

  1. Configuration menu
    Copy the full SHA
    4f02678 View commit details
    Browse the repository at this point in the history

Commits on May 7, 2024

  1. Configuration menu
    Copy the full SHA
    65feddc View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    57bd54c View commit details
    Browse the repository at this point in the history
  3. fixed support MSRV for 1.65.0

    Co-authored-by: Nick Stevens <nickastevens83@gmail.com>
    ohunter and nastevens authored May 7, 2024
    Configuration menu
    Copy the full SHA
    636d056 View commit details
    Browse the repository at this point in the history

Commits on May 8, 2024

  1. fixed formatting issues

    ohunter committed May 8, 2024
    Configuration menu
    Copy the full SHA
    1f39149 View commit details
    Browse the repository at this point in the history
  2. Merge pull request #85 from ohunter/impl_no_start

    Fulfillment of the I2c trait contract
    nastevens authored May 8, 2024
    Configuration menu
    Copy the full SHA
    a7a4dce View commit details
    Browse the repository at this point in the history

Commits on May 9, 2024

  1. Prepare 0.6.1 release

    nastevens committed May 9, 2024
    Configuration menu
    Copy the full SHA
    d44de85 View commit details
    Browse the repository at this point in the history

Commits on Jun 12, 2024

  1. Merge pull request #86 from rust-embedded/prep-0.6.1

    Prepare 0.6.1 release
    eldruin authored Jun 12, 2024
    Configuration menu
    Copy the full SHA
    499e902 View commit details
    Browse the repository at this point in the history

Commits on Dec 20, 2024

  1. ci: Update to macOS runners from macos-11 to macos-14

    macOS 11 runners have been deprecated! Need this for CI to pass.
    peterdelevoryas committed Dec 20, 2024
    Configuration menu
    Copy the full SHA
    c88553a View commit details
    Browse the repository at this point in the history
  2. core: Relax lifetime constraint on msgs in I2CTransfer::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.
    peterdelevoryas committed Dec 20, 2024
    Configuration menu
    Copy the full SHA
    e6fbc13 View commit details
    Browse the repository at this point in the history
  3. Merge pull request #89 from peterdelevoryas/master

    core: Relax lifetime constraint on `msgs` in `I2CTransfer::transfer()`
    eldruin authored Dec 20, 2024
    Configuration menu
    Copy the full SHA
    69121a8 View commit details
    Browse the repository at this point in the history

Commits on Feb 7, 2025

  1. Configuration menu
    Copy the full SHA
    8fa63ac View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    5470d8f View commit details
    Browse the repository at this point in the history

Commits on Mar 4, 2025

  1. Elide unnecessary lifetime

    eldruin committed Mar 4, 2025
    Configuration menu
    Copy the full SHA
    6613901 View commit details
    Browse the repository at this point in the history
  2. Merge pull request #90 from eldruin/common-traits

    Derive common traits for public types + warnings fixes
    eldruin authored Mar 4, 2025
    Configuration menu
    Copy the full SHA
    73404a5 View commit details
    Browse the repository at this point in the history
Loading
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy