Skip to content

Commit

Permalink
fixup!
Browse files Browse the repository at this point in the history
Co-authored-by: ROMemories <[email protected]>
  • Loading branch information
chrysn and ROMemories authored Dec 11, 2024
1 parent f025678 commit 215470e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/ariel-os-embassy-common/src/identity.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ pub trait DeviceId: Sized {
/// The device identifier in serialized bytes format.
fn bytes(&self) -> Self::Bytes;

/// Generates an EUI-48 identifier ("6 byte MAC address") based on the device identity.
/// Generates an EUI-48 identifier ("6-byte MAC address") based on the device identity.
///
/// See `ariel_os::identity::interface_eu48` for details.
fn interface_eui48(&self, if_index: u32) -> [u8; 6] {
Expand Down
2 changes: 0 additions & 2 deletions src/ariel-os-embassy/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -233,8 +233,6 @@ async fn init_task(mut peripherals: hal::OptionalPeripherals) {
use embassy_usb::class::cdc_ncm::{
embassy_net::State as NetState, CdcNcmClass, State as CdcNcmState,
};
// Not going through the ariel_os::identity / ariel_os_identity convenience wrappers
// because that would be a circular dependency.
use ariel_os_embassy_common::identity::DeviceId;

// Host's MAC addr. This is the MAC the host "thinks" its USB-to-ethernet adapter has.
Expand Down
4 changes: 2 additions & 2 deletions src/ariel-os-identity/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ pub fn device_id_bytes() -> Result<impl AsRef<[u8]>, impl core::error::Error> {
ariel_os_embassy::hal::identity::DeviceId::get().map(|d| d.bytes())
}

/// Generates an EUI-48 identifier ("6 byte MAC address") based on the device identity.
/// Generates an EUI-48 identifier ("6-byte MAC address") based on the device identity.
///
/// The argument `if_index` allows the system to generate addresses for consecutive interfaces.
///
Expand All @@ -54,7 +54,7 @@ pub fn device_id_bytes() -> Result<impl AsRef<[u8]>, impl core::error::Error> {
/// Assigned Identifier) quadrant. The randomly generated identifiers aim to appear random, but can
/// be traced back to the device ID it is calculated from.
///
/// On devices that have access to globally unique EUI-48 identifiers, that those are returned
/// On devices that have access to globally unique EUI-48 identifiers, those are returned
/// for interface indices up to the number of available identifiers.
pub fn interface_eui48(if_index: u32) -> Result<[u8; 6], impl core::error::Error> {
use ariel_os_embassy_common::identity::DeviceId;
Expand Down

0 comments on commit 215470e

Please sign in to comment.