Talk as presented plus example source for MSP432 blinky light demo

This commit is contained in:
Levi Pearson
2019-03-18 11:18:16 -06:00
parent a7eedbbf68
commit 4499e75a92
605 changed files with 218085 additions and 13 deletions

View File

@@ -0,0 +1,62 @@
#[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 }
}
}