Compare commits

..

No commits in common. "26dabd4dc04214cb9f44ce098fcaf99c7174f36d" and "2ca717c94f971dd95809cd2a3e9430268b85a7a9" have entirely different histories.

2 changed files with 1 additions and 6 deletions

View File

@ -16,7 +16,7 @@ pub mod tx;
pub mod smoltcp_phy;
/// Max raw frame array size
pub const RAW_FRAME_LENGTH_MAX: usize = 1518;
pub const RAW_FRAME_LENGTH_MAX: usize = 0x1000;
pub trait EthController {
fn init_dev(&mut self, delay: &mut impl DelayUs<u16>) -> Result<(), EthControllerError>;
@ -29,7 +29,6 @@ pub trait EthController {
}
/// TODO: Improve these error types
#[derive(Debug)]
pub enum EthControllerError {
SpiPortError,
GeneralError,

View File

@ -131,17 +131,13 @@ impl <SPI: Transfer<u8>,
match self.spi.transfer(&mut buf) {
Ok(_) => {
// Disable chip select
cortex_m::asm::delay(10_u32);
self.nss.set_high();
cortex_m::asm::delay(5_u32);
Ok(buf[2])
},
// TODO: Maybe too naive?
Err(_) => {
// Disable chip select
cortex_m::asm::delay(10_u32);
self.nss.set_high();
cortex_m::asm::delay(5_u32);
Err(SpiPortError::TransferError)
}
}