Skip to content

Commit

Permalink
Merge branch 'main' into cleanup-macos-enumeration
Browse files Browse the repository at this point in the history
  • Loading branch information
sirhcel authored Oct 14, 2024
2 parents 031e95d + 2ab058c commit f03e12d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ project adheres to [Semantic Versioning](https://semver.org/).

## [Unreleased]
### Added

* Add recommendation on how to interpret `UsbPortInfo::interface_number`.
[#219](https://github.com/serialport/serialport-rs/pull/219)

### Changed

* Switched from core-foundation-sys to core-foundation for more conveniently
Expand All @@ -15,6 +19,9 @@ project adheres to [Semantic Versioning](https://semver.org/).

### Fixed

* Fix enumeration USB reported as PCI devices which do not have a (short)
serial number.
[#160](https://github.com/serialport/serialport-rs/pull/160)
* Fix ignoring the status of several function calls into Core Foundation on mac
OS.
[#218](https://github.com/serialport/serialport-rs/pull/218)
Expand Down
4 changes: 3 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -787,7 +787,9 @@ pub struct UsbPortInfo {
pub manufacturer: Option<String>,
/// Product name (arbitrary string)
pub product: Option<String>,
/// Interface (id number for multiplexed devices)
/// The interface index of the USB serial port. This can be either the interface number of
/// the communication interface (as is the case on Windows and Linux) or the data
/// interface (as is the case on macOS), so you should recognize both interface numbers.
#[cfg(feature = "usbportinfo-interface")]
pub interface: Option<u8>,
}
Expand Down
3 changes: 0 additions & 3 deletions src/posix/enumerate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -142,9 +142,6 @@ fn port_type(d: &libudev::Device) -> Result<SerialPortType> {
let usb_properties = vec![
d.property_value("ID_USB_VENDOR_ID"),
d.property_value("ID_USB_MODEL_ID"),
d.property_value("ID_USB_VENDOR"),
d.property_value("ID_USB_MODEL"),
d.property_value("ID_USB_SERIAL_SHORT"),
]
.into_iter()
.collect::<Option<Vec<_>>>();
Expand Down

0 comments on commit f03e12d

Please sign in to comment.