Removed the active/inactive concept, and changed bus to use blocking traits to allow users to use shared-bus

This commit is contained in:
Jonah Dahlquist 2021-02-15 20:52:26 -08:00
commit ca8268ab31
13 changed files with 127 additions and 239 deletions

View file

@ -1,4 +1,4 @@
use crate::bus::ActiveBus;
use crate::bus::Bus;
use crate::host::Host;
use crate::MacAddress;
@ -22,7 +22,7 @@ impl Dhcp {
impl Host for Dhcp {
/// Gets (if necessary) and sets the host settings on the chip
fn refresh<SpiBus: ActiveBus>(&mut self, _bus: &mut SpiBus) -> Result<(), SpiBus::Error> {
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(())