Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions embassy-net-adin1110/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
<!-- next-header -->
## Unreleased - ReleaseDate

- Added OPEN Alliance TC6 SPI protocol support

## 0.3.1 - 2025-08-26

- First release with changelog.
24 changes: 21 additions & 3 deletions embassy-net-adin1110/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,20 @@
name = "embassy-net-adin1110"
version = "0.3.1"
description = "embassy-net driver for the ADIN1110 ethernet chip"
keywords = ["embedded", "ADIN1110", "embassy-net", "embedded-hal-async", "ethernet"]
categories = ["embedded", "hardware-support", "no-std", "network-programming", "asynchronous"]
keywords = [
"embedded",
"ADIN1110",
"embassy-net",
"embedded-hal-async",
"ethernet",
]
categories = [
"embedded",
"hardware-support",
"no-std",
"network-programming",
"asynchronous",
]
license = "MIT OR Apache-2.0"
edition = "2024"
repository = "https://github.com/embassy-rs/embassy"
Expand All @@ -22,15 +34,21 @@ embassy-futures = { version = "0.1.2", path = "../embassy-futures" }
bitfield = "0.14.0"

[dev-dependencies]
embedded-hal-mock = { version = "0.10.0", features = ["embedded-hal-async", "eh1"] }
embedded-hal-mock = { version = "0.10.0", features = [
"embedded-hal-async",
"eh1",
] }
crc = "3.0.1"
env_logger = "0.10"
critical-section = { version = "1.1.2", features = ["std"] }
futures-test = "0.3.28"

[features]
default = ["generic-spi"]
defmt = ["dep:defmt", "embedded-hal-1/defmt-03"]
log = ["dep:log"]
generic-spi = []
tc6 = []

[package.metadata.embassy_docs]
src_base = "https://github.com/embassy-rs/embassy/blob/embassy-net-adin1110-v$VERSION/embassy-net-adin1110/src/"
Expand Down
8 changes: 4 additions & 4 deletions embassy-net-adin1110/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ In the industry SPE is also called [`APL (Advanced Physical Layer)`](https://www

APL can be used in [`intrinsic safety applications/explosion hazardous areas`](https://en.wikipedia.org/wiki/Electrical_equipment_in_hazardous_areas) which has its own name and standard called [`2-WISE (2-wire intrinsically safe ethernet) IEC TS 60079-47:2021`](https://webstore.iec.ch/publication/64292).

`10 BASE-T1L` and `ADIN1110` are designed to support intrinsic safety applications. The power supply energy is fixed and PDoL is not supported.
`10BASE-T1L` and `ADIN1110` are designed to support intrinsic safety applications. The power supply energy is fixed and `PoDL` is not supported.

## Supported SPI modes

`ADIN1110` supports two SPI modes. `Generic` and [`OPEN Alliance 10BASE-T1x MAC-PHY serial interface`](https://opensig.org/wp-content/uploads/2023/12/OPEN_Alliance_10BASET1x_MAC-PHY_Serial_Interface_V1.1.pdf)
`ADIN1110` supports two SPI modes. `Generic` and [`OPEN Alliance 10BASE-T1x MAC-PHY serial interface (TC6)`](https://opensig.org/wp-content/uploads/2023/12/OPEN_Alliance_10BASET1x_MAC-PHY_Serial_Interface_V1.1.pdf)

Both modes support with and without additional CRC.
Currently only `Generic` SPI with or without CRC is supported.
- **Generic SPI**: Traditional SPI protocol with optional CRC (feature flag: `generic-spi`, enabled by default)
- **TC6 Protocol**: OPEN Alliance TC6 chunk-based protocol (feature flag: `tc6`)

*NOTE:* SPI Mode is selected by the hardware pins `SPI_CFG0` and `SPI_CFG1`. Software can't detect nor change the mode.

Expand Down
8 changes: 4 additions & 4 deletions embassy-net-adin1110/src/fmt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -244,26 +244,26 @@ impl<T, E> Try for Result<T, E> {

pub(crate) struct Bytes<'a>(pub &'a [u8]);

impl<'a> Debug for Bytes<'a> {
impl Debug for Bytes<'_> {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
write!(f, "{:#02x?}", self.0)
}
}

impl<'a> Display for Bytes<'a> {
impl Display for Bytes<'_> {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
write!(f, "{:#02x?}", self.0)
}
}

impl<'a> LowerHex for Bytes<'a> {
impl LowerHex for Bytes<'_> {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
write!(f, "{:#02x?}", self.0)
}
}

#[cfg(feature = "defmt")]
impl<'a> defmt::Format for Bytes<'a> {
impl defmt::Format for Bytes<'_> {
fn format(&self, fmt: defmt::Formatter) {
defmt::write!(fmt, "{:02x}", self.0)
}
Expand Down
Loading