Skip to content

Commit

Permalink
Merge #67
Browse files Browse the repository at this point in the history
67: Prepare 0.4.0-alpha.1 release r=ryankurte a=eldruin

Closes #62 

Co-authored-by: Diego Barrios Romero <eldruin@gmail.com>
  • Loading branch information
bors[bot] and eldruin authored Sep 27, 2021
2 parents e177ef2 + bdc2668 commit ee0e6af
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 14 deletions.
16 changes: 12 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,19 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased]

## [v0.4.0-alpha.1] - 2021-09-27

### Changed

- Modified `OutputPin` behavior for active-low pins to match `InputPin` behavior.
- Set default features to build both sysfs and cdev pin types.
- Removed `Pin` export, use `CdevPin` or `SysfsPin`.
- Increased the Minimum Supported Rust Version to `1.46.0` due to an update of `bitflags`.
- Adapted to `embedded-hal` `1.0.0-alpha.5` release.
- Increased the Minimum Supported Rust Version to `1.46.0` due to an update of `bitflags`.
- Updated `spidev` to version `0.5`.
- Updated `i2cdev` to version `0.5`.
- Updated `gpio-cdev` to version `0.5`.
- Updated `sysfs_gpio` to version `0.6`.
- Updated `nb` to version `1`.

## [v0.3.0] - 2019-11-25
Expand Down Expand Up @@ -66,8 +72,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

Initial release

[Unreleased]: https://github.com/japaric/linux-embedded-hal/compare/v0.2.1...HEAD
[v0.2.2]: https://github.com/japaric/linux-embedded-hal/compare/v0.2.1...v0.2.2
[Unreleased]: https://github.com/rust-embedded/linux-embedded-hal/compare/v0.4.0-alpha.1...HEAD
[v0.4.0-alpha.1]: https://github.com/rust-embedded/linux-embedded-hal/compare/v0.3.0...v0.4.0-alpha.1
[v0.3.0]: https://github.com/rust-embedded/linux-embedded-hal/compare/v0.2.2...v0.3.0
[v0.2.2]: https://github.com/rust-embedded/linux-embedded-hal/compare/v0.2.1...v0.2.2
[v0.2.1]: https://github.com/rust-embedded/linux-embedded-hal/compare/v0.2.0...v0.2.1
[v0.2.0]: https://github.com/rust-embedded/linux-embedded-hal/compare/v0.1.1...v0.2.0
[v0.1.1]: https://github.com/japaric/linux-embedded-hal/compare/v0.1.0...v0.1.1
[v0.1.1]: https://github.com/rust-embedded/linux-embedded-hal/compare/v0.1.0...v0.1.1
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ keywords = ["Linux", "hal"]
license = "MIT OR Apache-2.0"
name = "linux-embedded-hal"
repository = "https://github.com/rust-embedded/linux-embedded-hal"
version = "0.4.0-alpha.0"
version = "0.4.0-alpha.1"
edition = "2018"

[features]
Expand Down
4 changes: 2 additions & 2 deletions src/cdev_pin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
/// Newtype around [`gpio_cdev::LineHandle`] that implements the `embedded-hal` traits
///
/// [`gpio_cdev::LineHandle`]: https://docs.rs/gpio-cdev/0.2.0/gpio_cdev/struct.LineHandle.html
/// [`gpio_cdev::LineHandle`]: https://docs.rs/gpio-cdev/0.5.0/gpio_cdev/struct.LineHandle.html
pub struct CdevPin(pub gpio_cdev::LineHandle, bool);

impl CdevPin {
/// See [`gpio_cdev::Line::request`][0] for details.
///
/// [0]: https://docs.rs/gpio-cdev/0.2.0/gpio_cdev/struct.Line.html#method.request
/// [0]: https://docs.rs/gpio-cdev/0.5.0/gpio_cdev/struct.Line.html#method.request
pub fn new(handle: gpio_cdev::LineHandle) -> Result<Self, gpio_cdev::errors::Error> {
let info = handle.line().info()?;
Ok(CdevPin(handle, info.is_active_low()))
Expand Down
4 changes: 2 additions & 2 deletions src/i2c.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use std::path::{Path, PathBuf};

/// Newtype around [`i2cdev::linux::LinuxI2CDevice`] that implements the `embedded-hal` traits
///
/// [`i2cdev::linux::LinuxI2CDevice`]: https://docs.rs/i2cdev/0.3.1/i2cdev/linux/struct.LinuxI2CDevice.html
/// [`i2cdev::linux::LinuxI2CDevice`]: https://docs.rs/i2cdev/0.5.0/i2cdev/linux/struct.LinuxI2CDevice.html
pub struct I2cdev {
inner: i2cdev::linux::LinuxI2CDevice,
path: PathBuf,
Expand All @@ -17,7 +17,7 @@ pub struct I2cdev {
impl I2cdev {
/// See [`i2cdev::linux::LinuxI2CDevice::new`][0] for details.
///
/// [0]: https://docs.rs/i2cdev/0.3.1/i2cdev/linux/struct.LinuxI2CDevice.html#method.new
/// [0]: https://docs.rs/i2cdev/0.5.0/i2cdev/linux/struct.LinuxI2CDevice.html#method.new
pub fn new<P>(path: P) -> Result<Self, i2cdev::linux::LinuxI2CError>
where
P: AsRef<Path>,
Expand Down
4 changes: 2 additions & 2 deletions src/spi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ use std::path::Path;

/// Newtype around [`spidev::Spidev`] that implements the `embedded-hal` traits
///
/// [`spidev::Spidev`]: https://docs.rs/spidev/0.4.0/spidev/struct.Spidev.html
/// [`spidev::Spidev`]: https://docs.rs/spidev/0.5.0/spidev/struct.Spidev.html
pub struct Spidev(pub spidev::Spidev);

impl Spidev {
/// See [`spidev::Spidev::open`][0] for details.
///
/// [0]: https://docs.rs/spidev/0.4.0/spidev/struct.Spidev.html#method.open
/// [0]: https://docs.rs/spidev/0.5.0/spidev/struct.Spidev.html#method.open
pub fn open<P>(path: P) -> io::Result<Self>
where
P: AsRef<Path>,
Expand Down
6 changes: 3 additions & 3 deletions src/sysfs_pin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,20 @@ use std::path::Path;

/// Newtype around [`sysfs_gpio::Pin`] that implements the `embedded-hal` traits
///
/// [`sysfs_gpio::Pin`]: https://docs.rs/sysfs_gpio/0.5.1/sysfs_gpio/struct.Pin.html
/// [`sysfs_gpio::Pin`]: https://docs.rs/sysfs_gpio/0.6.0/sysfs_gpio/struct.Pin.html
pub struct SysfsPin(pub sysfs_gpio::Pin);

impl SysfsPin {
/// See [`sysfs_gpio::Pin::new`][0] for details.
///
/// [0]: https://docs.rs/sysfs_gpio/0.5.1/sysfs_gpio/struct.Pin.html#method.new
/// [0]: https://docs.rs/sysfs_gpio/0.6.0/sysfs_gpio/struct.Pin.html#method.new
pub fn new(pin_num: u64) -> Self {
SysfsPin(sysfs_gpio::Pin::new(pin_num))
}

/// See [`sysfs_gpio::Pin::from_path`][0] for details.
///
/// [0]: https://docs.rs/sysfs_gpio/0.5.1/sysfs_gpio/struct.Pin.html#method.from_path
/// [0]: https://docs.rs/sysfs_gpio/0.6.0/sysfs_gpio/struct.Pin.html#method.from_path
pub fn from_path<P>(path: P) -> sysfs_gpio::Result<Self>
where
P: AsRef<Path>,
Expand Down

0 comments on commit ee0e6af

Please sign in to comment.