#[doc = "Register `PORTCR` reader"]
pub struct R(crate::R<PORTCR_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<PORTCR_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::convert::From<crate::R<PORTCR_SPEC>> for R {
fn from(reader: crate::R<PORTCR_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `PORTCR` writer"]
pub struct W(crate::W<PORTCR_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<PORTCR_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl core::convert::From<crate::W<PORTCR_SPEC>> for W {
fn from(writer: crate::W<PORTCR_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `PUDA` reader - <TBD>"]
pub struct PUDA_R(crate::FieldReader<bool, bool>);
impl PUDA_R {
pub(crate) fn new(bits: bool) -> Self {
PUDA_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for PUDA_R {
type Target = crate::FieldReader<bool, bool>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `PUDA` writer - <TBD>"]
pub struct PUDA_W<'a> {
w: &'a mut W,
}
impl<'a> PUDA_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !0x01) | ((value as u8) & 0x01);
self.w
}
}
#[doc = "Field `PUDB` reader - <TBD>"]
pub struct PUDB_R(crate::FieldReader<bool, bool>);
impl PUDB_R {
pub(crate) fn new(bits: bool) -> Self {
PUDB_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for PUDB_R {
type Target = crate::FieldReader<bool, bool>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `PUDB` writer - <TBD>"]
pub struct PUDB_W<'a> {
w: &'a mut W,
}
impl<'a> PUDB_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u8) & 0x01) << 1);
self.w
}
}
#[doc = "Field `PUDC` reader - <TBD>"]
pub struct PUDC_R(crate::FieldReader<bool, bool>);
impl PUDC_R {
pub(crate) fn new(bits: bool) -> Self {
PUDC_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for PUDC_R {
type Target = crate::FieldReader<bool, bool>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `PUDC` writer - <TBD>"]
pub struct PUDC_W<'a> {
w: &'a mut W,
}
impl<'a> PUDC_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u8) & 0x01) << 2);
self.w
}
}
#[doc = "Field `PUDD` reader - <TBD>"]
pub struct PUDD_R(crate::FieldReader<bool, bool>);
impl PUDD_R {
pub(crate) fn new(bits: bool) -> Self {
PUDD_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for PUDD_R {
type Target = crate::FieldReader<bool, bool>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `PUDD` writer - <TBD>"]
pub struct PUDD_W<'a> {
w: &'a mut W,
}
impl<'a> PUDD_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u8) & 0x01) << 3);
self.w
}
}
#[doc = "Field `BBMA` reader - <TBD>"]
pub struct BBMA_R(crate::FieldReader<bool, bool>);
impl BBMA_R {
pub(crate) fn new(bits: bool) -> Self {
BBMA_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for BBMA_R {
type Target = crate::FieldReader<bool, bool>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `BBMA` writer - <TBD>"]
pub struct BBMA_W<'a> {
w: &'a mut W,
}
impl<'a> BBMA_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u8) & 0x01) << 4);
self.w
}
}
#[doc = "Field `BBMB` reader - <TBD>"]
pub struct BBMB_R(crate::FieldReader<bool, bool>);
impl BBMB_R {
pub(crate) fn new(bits: bool) -> Self {
BBMB_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for BBMB_R {
type Target = crate::FieldReader<bool, bool>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `BBMB` writer - <TBD>"]
pub struct BBMB_W<'a> {
w: &'a mut W,
}
impl<'a> BBMB_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u8) & 0x01) << 5);
self.w
}
}
#[doc = "Field `BBMC` reader - <TBD>"]
pub struct BBMC_R(crate::FieldReader<bool, bool>);
impl BBMC_R {
pub(crate) fn new(bits: bool) -> Self {
BBMC_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for BBMC_R {
type Target = crate::FieldReader<bool, bool>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `BBMC` writer - <TBD>"]
pub struct BBMC_W<'a> {
w: &'a mut W,
}
impl<'a> BBMC_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u8) & 0x01) << 6);
self.w
}
}
#[doc = "Field `BBMD` reader - <TBD>"]
pub struct BBMD_R(crate::FieldReader<bool, bool>);
impl BBMD_R {
pub(crate) fn new(bits: bool) -> Self {
BBMD_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for BBMD_R {
type Target = crate::FieldReader<bool, bool>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `BBMD` writer - <TBD>"]
pub struct BBMD_W<'a> {
w: &'a mut W,
}
impl<'a> BBMD_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u8) & 0x01) << 7);
self.w
}
}
impl R {
#[doc = "Bit 0 - <TBD>"]
#[inline(always)]
pub fn puda(&self) -> PUDA_R {
PUDA_R::new((self.bits & 0x01) != 0)
}
#[doc = "Bit 1 - <TBD>"]
#[inline(always)]
pub fn pudb(&self) -> PUDB_R {
PUDB_R::new(((self.bits >> 1) & 0x01) != 0)
}
#[doc = "Bit 2 - <TBD>"]
#[inline(always)]
pub fn pudc(&self) -> PUDC_R {
PUDC_R::new(((self.bits >> 2) & 0x01) != 0)
}
#[doc = "Bit 3 - <TBD>"]
#[inline(always)]
pub fn pudd(&self) -> PUDD_R {
PUDD_R::new(((self.bits >> 3) & 0x01) != 0)
}
#[doc = "Bit 4 - <TBD>"]
#[inline(always)]
pub fn bbma(&self) -> BBMA_R {
BBMA_R::new(((self.bits >> 4) & 0x01) != 0)
}
#[doc = "Bit 5 - <TBD>"]
#[inline(always)]
pub fn bbmb(&self) -> BBMB_R {
BBMB_R::new(((self.bits >> 5) & 0x01) != 0)
}
#[doc = "Bit 6 - <TBD>"]
#[inline(always)]
pub fn bbmc(&self) -> BBMC_R {
BBMC_R::new(((self.bits >> 6) & 0x01) != 0)
}
#[doc = "Bit 7 - <TBD>"]
#[inline(always)]
pub fn bbmd(&self) -> BBMD_R {
BBMD_R::new(((self.bits >> 7) & 0x01) != 0)
}
}
impl W {
#[doc = "Bit 0 - <TBD>"]
#[inline(always)]
pub fn puda(&mut self) -> PUDA_W {
PUDA_W { w: self }
}
#[doc = "Bit 1 - <TBD>"]
#[inline(always)]
pub fn pudb(&mut self) -> PUDB_W {
PUDB_W { w: self }
}
#[doc = "Bit 2 - <TBD>"]
#[inline(always)]
pub fn pudc(&mut self) -> PUDC_W {
PUDC_W { w: self }
}
#[doc = "Bit 3 - <TBD>"]
#[inline(always)]
pub fn pudd(&mut self) -> PUDD_W {
PUDD_W { w: self }
}
#[doc = "Bit 4 - <TBD>"]
#[inline(always)]
pub fn bbma(&mut self) -> BBMA_W {
BBMA_W { w: self }
}
#[doc = "Bit 5 - <TBD>"]
#[inline(always)]
pub fn bbmb(&mut self) -> BBMB_W {
BBMB_W { w: self }
}
#[doc = "Bit 6 - <TBD>"]
#[inline(always)]
pub fn bbmc(&mut self) -> BBMC_W {
BBMC_W { w: self }
}
#[doc = "Bit 7 - <TBD>"]
#[inline(always)]
pub fn bbmd(&mut self) -> BBMD_W {
BBMD_W { w: self }
}
#[doc = "Writes raw bits to the register."]
pub unsafe fn bits(&mut self, bits: u8) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "Port Configuration Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [portcr](index.html) module"]
pub struct PORTCR_SPEC;
impl crate::RegisterSpec for PORTCR_SPEC {
type Ux = u8;
}
#[doc = "`read()` method returns [portcr::R](R) reader structure"]
impl crate::Readable for PORTCR_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [portcr::W](W) writer structure"]
impl crate::Writable for PORTCR_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets PORTCR to value 0"]
impl crate::Resettable for PORTCR_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}