Searching for solution for vals::Omask not found. Is found locally, but not on build server
This commit is contained in:
parent
26e37c673d
commit
a03407d08c
@ -1,6 +1,6 @@
|
|||||||
#![macro_use]
|
#![macro_use]
|
||||||
|
|
||||||
use stm32_metapac::i2c::vals;
|
use stm32_metapac::i2c::vals::Oamsk;
|
||||||
|
|
||||||
use crate::interrupt;
|
use crate::interrupt;
|
||||||
|
|
||||||
@ -45,35 +45,25 @@ pub enum Address2Mask {
|
|||||||
}
|
}
|
||||||
impl Address2Mask {
|
impl Address2Mask {
|
||||||
#[inline(always)]
|
#[inline(always)]
|
||||||
pub const fn to_vals_impl(self) -> vals::Oamsk {
|
pub const fn to_vals_impl(self) -> Oamsk {
|
||||||
match self {
|
match self {
|
||||||
Address2Mask::NOMASK => vals::Oamsk::NOMASK,
|
Address2Mask::NOMASK => Oamsk::NOMASK,
|
||||||
Address2Mask::MASK1 => vals::Oamsk::MASK1,
|
Address2Mask::MASK1 => Oamsk::MASK1,
|
||||||
Address2Mask::MASK2 => vals::Oamsk::MASK2,
|
Address2Mask::MASK2 => Oamsk::MASK2,
|
||||||
Address2Mask::MASK3 => vals::Oamsk::MASK3,
|
Address2Mask::MASK3 => Oamsk::MASK3,
|
||||||
Address2Mask::MASK4 => vals::Oamsk::MASK4,
|
Address2Mask::MASK4 => Oamsk::MASK4,
|
||||||
Address2Mask::MASK5 => vals::Oamsk::MASK5,
|
Address2Mask::MASK5 => Oamsk::MASK5,
|
||||||
Address2Mask::MASK6 => vals::Oamsk::MASK6,
|
Address2Mask::MASK6 => Oamsk::MASK6,
|
||||||
Address2Mask::MASK7 => vals::Oamsk::MASK7,
|
Address2Mask::MASK7 => Oamsk::MASK7,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[repr(u8)]
|
|
||||||
#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
|
#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
|
||||||
pub enum Dir {
|
pub enum Dir {
|
||||||
WRITE,
|
WRITE,
|
||||||
READ,
|
READ,
|
||||||
}
|
}
|
||||||
impl Dir {
|
|
||||||
#[inline(always)]
|
|
||||||
pub const fn to_vals_impl(self) -> vals::Dir {
|
|
||||||
match self {
|
|
||||||
Dir::READ => vals::Dir::READ,
|
|
||||||
Dir::WRITE => vals::Dir::WRITE,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
pub(crate) mod sealed {
|
pub(crate) mod sealed {
|
||||||
use super::*;
|
use super::*;
|
||||||
|
@ -1527,6 +1527,7 @@ mod eh1 {
|
|||||||
Self::Crc => embedded_hal_1::i2c::ErrorKind::Other,
|
Self::Crc => embedded_hal_1::i2c::ErrorKind::Other,
|
||||||
Self::Overrun => embedded_hal_1::i2c::ErrorKind::Overrun,
|
Self::Overrun => embedded_hal_1::i2c::ErrorKind::Overrun,
|
||||||
Self::ZeroLengthTransfer => embedded_hal_1::i2c::ErrorKind::Other,
|
Self::ZeroLengthTransfer => embedded_hal_1::i2c::ErrorKind::Other,
|
||||||
|
Self::BufferSize => embedded_hal_1::i2c::ErrorKind::Other,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -115,7 +115,6 @@ async fn main(spawner: Spawner) {
|
|||||||
let mut buf_20 = [0; 20]; // buffer is shorter than master will send: wait for STOP condition
|
let mut buf_20 = [0; 20]; // buffer is shorter than master will send: wait for STOP condition
|
||||||
let mut buf_20a = [0; 20];
|
let mut buf_20a = [0; 20];
|
||||||
let mut buf_2 = [0; 2];
|
let mut buf_2 = [0; 2];
|
||||||
let mut buf_1 = [0; 1];
|
|
||||||
let mut errors = 0;
|
let mut errors = 0;
|
||||||
let mut address = 0;
|
let mut address = 0;
|
||||||
let mut dir = Dir::READ;
|
let mut dir = Dir::READ;
|
||||||
|
Loading…
Reference in New Issue
Block a user