#[doc = "Register `BRR` writer"]
pub struct W(crate::W<BRR_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<BRR_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 From<crate::W<BRR_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<BRR_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `BR15` writer - Port x Reset bit y (y= 0 .. 15)"]
pub struct BR15_W<'a> {
w: &'a mut W,
}
impl<'a> BR15_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 << 15)) | ((value as u32 & 0x01) << 15);
self.w
}
}
#[doc = "Field `BR14` writer - Port x Reset bit y (y= 0 .. 15)"]
pub struct BR14_W<'a> {
w: &'a mut W,
}
impl<'a> BR14_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 << 14)) | ((value as u32 & 0x01) << 14);
self.w
}
}
#[doc = "Field `BR13` writer - Port x Reset bit y (y= 0 .. 15)"]
pub struct BR13_W<'a> {
w: &'a mut W,
}
impl<'a> BR13_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 << 13)) | ((value as u32 & 0x01) << 13);
self.w
}
}
#[doc = "Field `BR12` writer - Port x Reset bit y (y= 0 .. 15)"]
pub struct BR12_W<'a> {
w: &'a mut W,
}
impl<'a> BR12_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 << 12)) | ((value as u32 & 0x01) << 12);
self.w
}
}
#[doc = "Field `BR11` writer - Port x Reset bit y (y= 0 .. 15)"]
pub struct BR11_W<'a> {
w: &'a mut W,
}
impl<'a> BR11_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 << 11)) | ((value as u32 & 0x01) << 11);
self.w
}
}
#[doc = "Field `BR10` writer - Port x Reset bit y (y= 0 .. 15)"]
pub struct BR10_W<'a> {
w: &'a mut W,
}
impl<'a> BR10_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 << 10)) | ((value as u32 & 0x01) << 10);
self.w
}
}
#[doc = "Field `BR9` writer - Port x Reset bit y (y= 0 .. 15)"]
pub struct BR9_W<'a> {
w: &'a mut W,
}
impl<'a> BR9_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 << 9)) | ((value as u32 & 0x01) << 9);
self.w
}
}
#[doc = "Field `BR8` writer - Port x Reset bit y (y= 0 .. 15)"]
pub struct BR8_W<'a> {
w: &'a mut W,
}
impl<'a> BR8_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 << 8)) | ((value as u32 & 0x01) << 8);
self.w
}
}
#[doc = "Field `BR7` writer - Port x Reset bit y (y= 0 .. 15)"]
pub struct BR7_W<'a> {
w: &'a mut W,
}
impl<'a> BR7_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 u32 & 0x01) << 7);
self.w
}
}
#[doc = "Field `BR6` writer - Port x Reset bit y (y= 0 .. 15)"]
pub struct BR6_W<'a> {
w: &'a mut W,
}
impl<'a> BR6_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 u32 & 0x01) << 6);
self.w
}
}
#[doc = "Field `BR5` writer - Port x Reset bit y (y= 0 .. 15)"]
pub struct BR5_W<'a> {
w: &'a mut W,
}
impl<'a> BR5_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 u32 & 0x01) << 5);
self.w
}
}
#[doc = "Field `BR4` writer - Port x Reset bit y (y= 0 .. 15)"]
pub struct BR4_W<'a> {
w: &'a mut W,
}
impl<'a> BR4_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 u32 & 0x01) << 4);
self.w
}
}
#[doc = "Field `BR3` writer - Port x Reset bit y (y= 0 .. 15)"]
pub struct BR3_W<'a> {
w: &'a mut W,
}
impl<'a> BR3_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 u32 & 0x01) << 3);
self.w
}
}
#[doc = "Field `BR2` writer - Port x Reset bit y (y= 0 .. 15)"]
pub struct BR2_W<'a> {
w: &'a mut W,
}
impl<'a> BR2_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 u32 & 0x01) << 2);
self.w
}
}
#[doc = "Field `BR1` writer - Port x Reset bit y (y= 0 .. 15)"]
pub struct BR1_W<'a> {
w: &'a mut W,
}
impl<'a> BR1_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 u32 & 0x01) << 1);
self.w
}
}
#[doc = "Field `BR0` writer - Port x Reset bit y (y= 0 .. 15)"]
pub struct BR0_W<'a> {
w: &'a mut W,
}
impl<'a> BR0_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 u32 & 0x01);
self.w
}
}
impl W {
#[doc = "Bit 15 - Port x Reset bit y (y= 0 .. 15)"]
#[inline(always)]
pub fn br15(&mut self) -> BR15_W {
BR15_W { w: self }
}
#[doc = "Bit 14 - Port x Reset bit y (y= 0 .. 15)"]
#[inline(always)]
pub fn br14(&mut self) -> BR14_W {
BR14_W { w: self }
}
#[doc = "Bit 13 - Port x Reset bit y (y= 0 .. 15)"]
#[inline(always)]
pub fn br13(&mut self) -> BR13_W {
BR13_W { w: self }
}
#[doc = "Bit 12 - Port x Reset bit y (y= 0 .. 15)"]
#[inline(always)]
pub fn br12(&mut self) -> BR12_W {
BR12_W { w: self }
}
#[doc = "Bit 11 - Port x Reset bit y (y= 0 .. 15)"]
#[inline(always)]
pub fn br11(&mut self) -> BR11_W {
BR11_W { w: self }
}
#[doc = "Bit 10 - Port x Reset bit y (y= 0 .. 15)"]
#[inline(always)]
pub fn br10(&mut self) -> BR10_W {
BR10_W { w: self }
}
#[doc = "Bit 9 - Port x Reset bit y (y= 0 .. 15)"]
#[inline(always)]
pub fn br9(&mut self) -> BR9_W {
BR9_W { w: self }
}
#[doc = "Bit 8 - Port x Reset bit y (y= 0 .. 15)"]
#[inline(always)]
pub fn br8(&mut self) -> BR8_W {
BR8_W { w: self }
}
#[doc = "Bit 7 - Port x Reset bit y (y= 0 .. 15)"]
#[inline(always)]
pub fn br7(&mut self) -> BR7_W {
BR7_W { w: self }
}
#[doc = "Bit 6 - Port x Reset bit y (y= 0 .. 15)"]
#[inline(always)]
pub fn br6(&mut self) -> BR6_W {
BR6_W { w: self }
}
#[doc = "Bit 5 - Port x Reset bit y (y= 0 .. 15)"]
#[inline(always)]
pub fn br5(&mut self) -> BR5_W {
BR5_W { w: self }
}
#[doc = "Bit 4 - Port x Reset bit y (y= 0 .. 15)"]
#[inline(always)]
pub fn br4(&mut self) -> BR4_W {
BR4_W { w: self }
}
#[doc = "Bit 3 - Port x Reset bit y (y= 0 .. 15)"]
#[inline(always)]
pub fn br3(&mut self) -> BR3_W {
BR3_W { w: self }
}
#[doc = "Bit 2 - Port x Reset bit y (y= 0 .. 15)"]
#[inline(always)]
pub fn br2(&mut self) -> BR2_W {
BR2_W { w: self }
}
#[doc = "Bit 1 - Port x Reset bit y (y= 0 .. 15)"]
#[inline(always)]
pub fn br1(&mut self) -> BR1_W {
BR1_W { w: self }
}
#[doc = "Bit 0 - Port x Reset bit y (y= 0 .. 15)"]
#[inline(always)]
pub fn br0(&mut self) -> BR0_W {
BR0_W { w: self }
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "GPIO port bit reset register\n\nThis register you can [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [brr](index.html) module"]
pub struct BRR_SPEC;
impl crate::RegisterSpec for BRR_SPEC {
type Ux = u32;
}
#[doc = "`write(|w| ..)` method takes [brr::W](W) writer structure"]
impl crate::Writable for BRR_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets BRR to value 0"]
impl crate::Resettable for BRR_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}