Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

setup: power up EEM also with 802.3af #1004

Merged
merged 1 commit into from
Jan 31, 2025
Merged
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
4 changes: 3 additions & 1 deletion src/hardware/setup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -669,7 +669,7 @@
(ref_clk, mdio, mdc, crs_dv, rxd0, rxd1, tx_en, txd0, txd1)
};

let ring = unsafe { DES_RING.write(ethernet::DesRing::new()) };

Check warning on line 672 in src/hardware/setup.rs

View workflow job for this annotation

GitHub Actions / clippy

creating a mutable reference to mutable static is discouraged

warning: creating a mutable reference to mutable static is discouraged --> src/hardware/setup.rs:672:29 | 672 | let ring = unsafe { DES_RING.write(ethernet::DesRing::new()) }; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ mutable reference to mutable static | = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/static-mut-references.html> = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives

// Configure the ethernet controller
let (mut eth_dma, eth_mac) = ethernet::new(
Expand Down Expand Up @@ -1106,7 +1106,9 @@
})
} else {
log::info!("EEM population variant: Output detected");
assert!(poe != PoePower::Low);
if poe != PoePower::Low {
log::warn!("No 802.3at PoE. Powering up EEM anyway.");
}
force_eem_source.set_high();
delay.delay_ms(200u8);

Expand Down
Loading