1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#[doc = "Reader of register TWCR"]
pub type R = crate::R<u8, super::TWCR>;
#[doc = "Reader of field `TWIE`"]
pub type TWIE_R = crate::R<bool, bool>;
#[doc = "Reader of field `TWEN`"]
pub type TWEN_R = crate::R<bool, bool>;
#[doc = "Reader of field `TWWC`"]
pub type TWWC_R = crate::R<bool, bool>;
#[doc = "Reader of field `TWSTO`"]
pub type TWSTO_R = crate::R<bool, bool>;
#[doc = "Reader of field `TWSTA`"]
pub type TWSTA_R = crate::R<bool, bool>;
#[doc = "Reader of field `TWEA`"]
pub type TWEA_R = crate::R<bool, bool>;
#[doc = "Reader of field `TWINT`"]
pub type TWINT_R = crate::R<bool, bool>;
impl R {
    #[doc = "Bit 0 - TWI Interrupt Enable"]
    #[inline(always)]
    pub fn twie(&self) -> TWIE_R {
        TWIE_R::new((self.bits & 0x01) != 0)
    }
    #[doc = "Bit 2 - TWI Enable Bit"]
    #[inline(always)]
    pub fn twen(&self) -> TWEN_R {
        TWEN_R::new(((self.bits >> 2) & 0x01) != 0)
    }
    #[doc = "Bit 3 - TWI Write Collition Flag"]
    #[inline(always)]
    pub fn twwc(&self) -> TWWC_R {
        TWWC_R::new(((self.bits >> 3) & 0x01) != 0)
    }
    #[doc = "Bit 4 - TWI Stop Condition Bit"]
    #[inline(always)]
    pub fn twsto(&self) -> TWSTO_R {
        TWSTO_R::new(((self.bits >> 4) & 0x01) != 0)
    }
    #[doc = "Bit 5 - TWI Start Condition Bit"]
    #[inline(always)]
    pub fn twsta(&self) -> TWSTA_R {
        TWSTA_R::new(((self.bits >> 5) & 0x01) != 0)
    }
    #[doc = "Bit 6 - TWI Enable Acknowledge Bit"]
    #[inline(always)]
    pub fn twea(&self) -> TWEA_R {
        TWEA_R::new(((self.bits >> 6) & 0x01) != 0)
    }
    #[doc = "Bit 7 - TWI Interrupt Flag"]
    #[inline(always)]
    pub fn twint(&self) -> TWINT_R {
        TWINT_R::new(((self.bits >> 7) & 0x01) != 0)
    }
}