63 lines
1.3 KiB
Rust
63 lines
1.3 KiB
Rust
#[doc = r" Value read from the register"]
|
|
pub struct R {
|
|
bits: u16,
|
|
}
|
|
impl super::PCIN {
|
|
#[doc = r" Reads the contents of the register"]
|
|
#[inline]
|
|
pub fn read(&self) -> R {
|
|
R {
|
|
bits: self.register.get(),
|
|
}
|
|
}
|
|
}
|
|
#[doc = r" Value of the field"]
|
|
pub struct P5INR {
|
|
bits: u8,
|
|
}
|
|
impl P5INR {
|
|
#[doc = r" Value of the field as raw bits"]
|
|
#[inline]
|
|
pub fn bits(&self) -> u8 {
|
|
self.bits
|
|
}
|
|
}
|
|
#[doc = r" Value of the field"]
|
|
pub struct P6INR {
|
|
bits: u8,
|
|
}
|
|
impl P6INR {
|
|
#[doc = r" Value of the field as raw bits"]
|
|
#[inline]
|
|
pub fn bits(&self) -> u8 {
|
|
self.bits
|
|
}
|
|
}
|
|
impl R {
|
|
#[doc = r" Value of the register as raw bits"]
|
|
#[inline]
|
|
pub fn bits(&self) -> u16 {
|
|
self.bits
|
|
}
|
|
#[doc = "Bits 0:7 - Port 5 Input"]
|
|
#[inline]
|
|
pub fn p5in(&self) -> P5INR {
|
|
let bits = {
|
|
const MASK: u8 = 255;
|
|
const OFFSET: u8 = 0;
|
|
((self.bits >> OFFSET) & MASK as u16) as u8
|
|
};
|
|
P5INR { bits }
|
|
}
|
|
#[doc = "Bits 8:15 - Port 6 Input"]
|
|
#[inline]
|
|
pub fn p6in(&self) -> P6INR {
|
|
let bits = {
|
|
const MASK: u8 = 255;
|
|
const OFFSET: u8 = 8;
|
|
((self.bits >> OFFSET) & MASK as u16) as u8
|
|
};
|
|
P6INR { bits }
|
|
}
|
|
}
|