Format, clean
This commit is contained in:
parent
62e56052cf
commit
bbd50619a4
21 changed files with 1942 additions and 2121 deletions
|
|
@ -1,32 +1,30 @@
|
|||
use crate::bus::Bus;
|
||||
use crate::host::Host;
|
||||
use crate::MacAddress;
|
||||
use crate::{bus::Bus, host::Host, MacAddress};
|
||||
|
||||
#[derive(Debug)]
|
||||
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
|
||||
pub struct Dhcp {
|
||||
// settings: HostConfig,
|
||||
// current: HostConfig,
|
||||
// settings: HostConfig,
|
||||
// current: HostConfig,
|
||||
}
|
||||
|
||||
impl Dhcp {
|
||||
pub fn new(_mac: MacAddress) -> Self {
|
||||
// let settings = HostConfig {
|
||||
// mac,
|
||||
// ..HostConfig::default()
|
||||
// };
|
||||
Self {
|
||||
// settings,
|
||||
// current: HostConfig::default(),
|
||||
}
|
||||
}
|
||||
pub fn new(_mac: MacAddress) -> Self {
|
||||
// let settings = HostConfig {
|
||||
// mac,
|
||||
// ..HostConfig::default()
|
||||
// };
|
||||
Self {
|
||||
// settings,
|
||||
// current: HostConfig::default(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl Host for Dhcp {
|
||||
/// Gets (if necessary) and sets the host settings on the chip
|
||||
fn refresh<SpiBus: Bus>(&mut self, _bus: &mut SpiBus) -> Result<(), SpiBus::Error> {
|
||||
// TODO actually negotiate settings from DHCP
|
||||
// TODO figure out how should receive socket for DHCP negotiations
|
||||
Ok(())
|
||||
}
|
||||
/// Gets (if necessary) and sets the host settings on the chip
|
||||
fn refresh<SpiBus: Bus>(&mut self, _bus: &mut SpiBus) -> Result<(), SpiBus::Error> {
|
||||
// TODO actually negotiate settings from DHCP
|
||||
// TODO figure out how should receive socket for DHCP negotiations
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue