forked from renet/ENC424J600
Add Enc424j600::init() for complete initialisation
This commit is contained in:
parent
78e4d82660
commit
6d17703e6b
|
@ -61,6 +61,13 @@ impl <SPI: Transfer<u8>,
|
|||
}
|
||||
}
|
||||
|
||||
pub fn init(&mut self) -> Result<(), Error> {
|
||||
self.reset()?;
|
||||
self.init_rxbuf()?;
|
||||
self.init_txbuf()?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn reset(&mut self) -> Result<(), Error> {
|
||||
// Write 0x1234 to EUDAST
|
||||
self.spi_port.write_reg_16b(spi::addrs::EUDAST, 0x1234)?;
|
||||
|
|
Loading…
Reference in New Issue