Apply clippy suggestions
This commit is contained in:
parent
099e682b9d
commit
4743976211
4 changed files with 10 additions and 10 deletions
|
|
@ -41,7 +41,7 @@ impl<SPI: SpiDevice> Bus for FourWire<SPI> {
|
|||
}
|
||||
|
||||
fn write_frame(&mut self, block: u8, address: u16, data: &[u8]) -> Result<(), SPI::Error> {
|
||||
let control_phase = block << 3 | WRITE_MODE_MASK;
|
||||
let control_phase = (block << 3) | WRITE_MODE_MASK;
|
||||
|
||||
let address_phase = address.to_be_bytes();
|
||||
self.spi.transaction(&mut [
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ impl<SPI: SpiBus> Bus for ThreeWire<SPI> {
|
|||
}
|
||||
|
||||
fn write_frame(&mut self, block: u8, mut address: u16, data: &[u8]) -> Result<(), Self::Error> {
|
||||
let mut control_phase = block << 3 | WRITE_MODE_MASK;
|
||||
let mut control_phase = (block << 3) | WRITE_MODE_MASK;
|
||||
|
||||
let mut data_phase = data;
|
||||
let mut last_length_written: u16;
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ impl<E> From<E> for ResetError<E> {
|
|||
mod private {
|
||||
pub trait Sealed {}
|
||||
|
||||
impl<'a, T: Sealed> Sealed for &'a mut T {}
|
||||
impl<T: Sealed> Sealed for &'_ mut T {}
|
||||
}
|
||||
|
||||
pub trait State: private::Sealed {
|
||||
|
|
@ -73,7 +73,7 @@ impl<HostImpl: Host> State for DeviceState<HostImpl> {
|
|||
}
|
||||
}
|
||||
|
||||
impl<'a, T: State> State for &'a mut T {
|
||||
impl<T: State> State for &'_ mut T {
|
||||
fn socket(&mut self) -> Option<Socket> {
|
||||
T::socket(self)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -418,14 +418,14 @@ pub mod socketn {
|
|||
/// > It should be read or to be updated like as follows.
|
||||
/// > 1. Read the starting address for saving the transmitting data.
|
||||
/// > 2. Save the transmitting data from the starting address of Socket n TX
|
||||
/// > buffer.
|
||||
/// > buffer.
|
||||
/// > 3. After saving the transmitting data, update Sn_TX_WR to the
|
||||
/// > increased value as many as transmitting data size. If the increment value
|
||||
/// > exceeds the maximum value 0xFFFF(greater than 0x10000 and the carry
|
||||
/// > bit occurs), then the carry bit is ignored and will automatically update
|
||||
/// > with the lower 16bits value.
|
||||
/// > increased value as many as transmitting data size. If the increment value
|
||||
/// > exceeds the maximum value 0xFFFF(greater than 0x10000 and the carry
|
||||
/// > bit occurs), then the carry bit is ignored and will automatically update
|
||||
/// > with the lower 16bits value.
|
||||
/// > 4. Transmit the saved data in Socket n TX Buffer by using SEND/SEND
|
||||
/// command
|
||||
/// > command
|
||||
pub const TX_DATA_WRITE_POINTER: u16 = 0x24;
|
||||
|
||||
/// Socket n Received Size Register
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue