#[doc = r"Value to write to the register"]
pub struct W {
bits: u32,
}
impl super::BSRR {
#[doc = r"Writes to the register"]
#[inline(always)]
pub fn write<F>(&self, f: F)
where
F: FnOnce(&mut W) -> &mut W,
{
self.register.set(
f(&mut W {
bits: Self::reset_value(),
})
.bits,
);
}
#[doc = r"Reset value of the register"]
#[inline(always)]
pub const fn reset_value() -> u32 {
0
}
#[doc = r"Writes the reset value to the register"]
#[inline(always)]
pub fn reset(&self) {
self.register.set(Self::reset_value())
}
}
#[doc = "Values that can be written to the field `BS0`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum BS0W {
#[doc = "Sets the corresponding ODRx bit"]
SET,
}
impl BS0W {
#[allow(missing_docs)]
#[doc(hidden)]
#[inline(always)]
pub fn _bits(&self) -> bool {
match *self {
BS0W::SET => true,
}
}
}
#[doc = r"Proxy"]
pub struct _BS0W<'a> {
w: &'a mut W,
}
impl<'a> _BS0W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: BS0W) -> &'a mut W {
{
self.bit(variant._bits())
}
}
#[doc = "Sets the corresponding ODRx bit"]
#[inline(always)]
pub fn set(self) -> &'a mut W {
self.variant(BS0W::SET)
}
#[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 &= !(0x01 << 0);
self.w.bits |= ((value as u32) & 0x01) << 0;
self.w
}
}
#[doc = "Values that can be written to the field `BS1`"]
pub type BS1W = BS0W;
#[doc = r"Proxy"]
pub struct _BS1W<'a> {
w: &'a mut W,
}
impl<'a> _BS1W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: BS1W) -> &'a mut W {
{
self.bit(variant._bits())
}
}
#[doc = "Sets the corresponding ODRx bit"]
#[inline(always)]
pub fn set(self) -> &'a mut W {
self.variant(BS0W::SET)
}
#[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 &= !(0x01 << 1);
self.w.bits |= ((value as u32) & 0x01) << 1;
self.w
}
}
#[doc = "Values that can be written to the field `BS2`"]
pub type BS2W = BS0W;
#[doc = r"Proxy"]
pub struct _BS2W<'a> {
w: &'a mut W,
}
impl<'a> _BS2W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: BS2W) -> &'a mut W {
{
self.bit(variant._bits())
}
}
#[doc = "Sets the corresponding ODRx bit"]
#[inline(always)]
pub fn set(self) -> &'a mut W {
self.variant(BS0W::SET)
}
#[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 &= !(0x01 << 2);
self.w.bits |= ((value as u32) & 0x01) << 2;
self.w
}
}
#[doc = "Values that can be written to the field `BS3`"]
pub type BS3W = BS0W;
#[doc = r"Proxy"]
pub struct _BS3W<'a> {
w: &'a mut W,
}
impl<'a> _BS3W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: BS3W) -> &'a mut W {
{
self.bit(variant._bits())
}
}
#[doc = "Sets the corresponding ODRx bit"]
#[inline(always)]
pub fn set(self) -> &'a mut W {
self.variant(BS0W::SET)
}
#[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 &= !(0x01 << 3);
self.w.bits |= ((value as u32) & 0x01) << 3;
self.w
}
}
#[doc = "Values that can be written to the field `BS4`"]
pub type BS4W = BS0W;
#[doc = r"Proxy"]
pub struct _BS4W<'a> {
w: &'a mut W,
}
impl<'a> _BS4W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: BS4W) -> &'a mut W {
{
self.bit(variant._bits())
}
}
#[doc = "Sets the corresponding ODRx bit"]
#[inline(always)]
pub fn set(self) -> &'a mut W {
self.variant(BS0W::SET)
}
#[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 &= !(0x01 << 4);
self.w.bits |= ((value as u32) & 0x01) << 4;
self.w
}
}
#[doc = "Values that can be written to the field `BS5`"]
pub type BS5W = BS0W;
#[doc = r"Proxy"]
pub struct _BS5W<'a> {
w: &'a mut W,
}
impl<'a> _BS5W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: BS5W) -> &'a mut W {
{
self.bit(variant._bits())
}
}
#[doc = "Sets the corresponding ODRx bit"]
#[inline(always)]
pub fn set(self) -> &'a mut W {
self.variant(BS0W::SET)
}
#[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 &= !(0x01 << 5);
self.w.bits |= ((value as u32) & 0x01) << 5;
self.w
}
}
#[doc = "Values that can be written to the field `BS6`"]
pub type BS6W = BS0W;
#[doc = r"Proxy"]
pub struct _BS6W<'a> {
w: &'a mut W,
}
impl<'a> _BS6W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: BS6W) -> &'a mut W {
{
self.bit(variant._bits())
}
}
#[doc = "Sets the corresponding ODRx bit"]
#[inline(always)]
pub fn set(self) -> &'a mut W {
self.variant(BS0W::SET)
}
#[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 &= !(0x01 << 6);
self.w.bits |= ((value as u32) & 0x01) << 6;
self.w
}
}
#[doc = "Values that can be written to the field `BS7`"]
pub type BS7W = BS0W;
#[doc = r"Proxy"]
pub struct _BS7W<'a> {
w: &'a mut W,
}
impl<'a> _BS7W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: BS7W) -> &'a mut W {
{
self.bit(variant._bits())
}
}
#[doc = "Sets the corresponding ODRx bit"]
#[inline(always)]
pub fn set(self) -> &'a mut W {
self.variant(BS0W::SET)
}
#[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 &= !(0x01 << 7);
self.w.bits |= ((value as u32) & 0x01) << 7;
self.w
}
}
#[doc = "Values that can be written to the field `BS8`"]
pub type BS8W = BS0W;
#[doc = r"Proxy"]
pub struct _BS8W<'a> {
w: &'a mut W,
}
impl<'a> _BS8W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: BS8W) -> &'a mut W {
{
self.bit(variant._bits())
}
}
#[doc = "Sets the corresponding ODRx bit"]
#[inline(always)]
pub fn set(self) -> &'a mut W {
self.variant(BS0W::SET)
}
#[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 &= !(0x01 << 8);
self.w.bits |= ((value as u32) & 0x01) << 8;
self.w
}
}
#[doc = "Values that can be written to the field `BS9`"]
pub type BS9W = BS0W;
#[doc = r"Proxy"]
pub struct _BS9W<'a> {
w: &'a mut W,
}
impl<'a> _BS9W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: BS9W) -> &'a mut W {
{
self.bit(variant._bits())
}
}
#[doc = "Sets the corresponding ODRx bit"]
#[inline(always)]
pub fn set(self) -> &'a mut W {
self.variant(BS0W::SET)
}
#[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 &= !(0x01 << 9);
self.w.bits |= ((value as u32) & 0x01) << 9;
self.w
}
}
#[doc = "Values that can be written to the field `BS10`"]
pub type BS10W = BS0W;
#[doc = r"Proxy"]
pub struct _BS10W<'a> {
w: &'a mut W,
}
impl<'a> _BS10W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: BS10W) -> &'a mut W {
{
self.bit(variant._bits())
}
}
#[doc = "Sets the corresponding ODRx bit"]
#[inline(always)]
pub fn set(self) -> &'a mut W {
self.variant(BS0W::SET)
}
#[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 &= !(0x01 << 10);
self.w.bits |= ((value as u32) & 0x01) << 10;
self.w
}
}
#[doc = "Values that can be written to the field `BS11`"]
pub type BS11W = BS0W;
#[doc = r"Proxy"]
pub struct _BS11W<'a> {
w: &'a mut W,
}
impl<'a> _BS11W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: BS11W) -> &'a mut W {
{
self.bit(variant._bits())
}
}
#[doc = "Sets the corresponding ODRx bit"]
#[inline(always)]
pub fn set(self) -> &'a mut W {
self.variant(BS0W::SET)
}
#[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 &= !(0x01 << 11);
self.w.bits |= ((value as u32) & 0x01) << 11;
self.w
}
}
#[doc = "Values that can be written to the field `BS12`"]
pub type BS12W = BS0W;
#[doc = r"Proxy"]
pub struct _BS12W<'a> {
w: &'a mut W,
}
impl<'a> _BS12W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: BS12W) -> &'a mut W {
{
self.bit(variant._bits())
}
}
#[doc = "Sets the corresponding ODRx bit"]
#[inline(always)]
pub fn set(self) -> &'a mut W {
self.variant(BS0W::SET)
}
#[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 &= !(0x01 << 12);
self.w.bits |= ((value as u32) & 0x01) << 12;
self.w
}
}
#[doc = "Values that can be written to the field `BS13`"]
pub type BS13W = BS0W;
#[doc = r"Proxy"]
pub struct _BS13W<'a> {
w: &'a mut W,
}
impl<'a> _BS13W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: BS13W) -> &'a mut W {
{
self.bit(variant._bits())
}
}
#[doc = "Sets the corresponding ODRx bit"]
#[inline(always)]
pub fn set(self) -> &'a mut W {
self.variant(BS0W::SET)
}
#[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 &= !(0x01 << 13);
self.w.bits |= ((value as u32) & 0x01) << 13;
self.w
}
}
#[doc = "Values that can be written to the field `BS14`"]
pub type BS14W = BS0W;
#[doc = r"Proxy"]
pub struct _BS14W<'a> {
w: &'a mut W,
}
impl<'a> _BS14W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: BS14W) -> &'a mut W {
{
self.bit(variant._bits())
}
}
#[doc = "Sets the corresponding ODRx bit"]
#[inline(always)]
pub fn set(self) -> &'a mut W {
self.variant(BS0W::SET)
}
#[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 &= !(0x01 << 14);
self.w.bits |= ((value as u32) & 0x01) << 14;
self.w
}
}
#[doc = "Values that can be written to the field `BS15`"]
pub type BS15W = BS0W;
#[doc = r"Proxy"]
pub struct _BS15W<'a> {
w: &'a mut W,
}
impl<'a> _BS15W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: BS15W) -> &'a mut W {
{
self.bit(variant._bits())
}
}
#[doc = "Sets the corresponding ODRx bit"]
#[inline(always)]
pub fn set(self) -> &'a mut W {
self.variant(BS0W::SET)
}
#[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 &= !(0x01 << 15);
self.w.bits |= ((value as u32) & 0x01) << 15;
self.w
}
}
#[doc = "Values that can be written to the field `BR0`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum BR0W {
#[doc = "Resets the corresponding ODRx bit"]
RESET,
}
impl BR0W {
#[allow(missing_docs)]
#[doc(hidden)]
#[inline(always)]
pub fn _bits(&self) -> bool {
match *self {
BR0W::RESET => true,
}
}
}
#[doc = r"Proxy"]
pub struct _BR0W<'a> {
w: &'a mut W,
}
impl<'a> _BR0W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: BR0W) -> &'a mut W {
{
self.bit(variant._bits())
}
}
#[doc = "Resets the corresponding ODRx bit"]
#[inline(always)]
pub fn reset(self) -> &'a mut W {
self.variant(BR0W::RESET)
}
#[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 &= !(0x01 << 16);
self.w.bits |= ((value as u32) & 0x01) << 16;
self.w
}
}
#[doc = "Values that can be written to the field `BR1`"]
pub type BR1W = BR0W;
#[doc = r"Proxy"]
pub struct _BR1W<'a> {
w: &'a mut W,
}
impl<'a> _BR1W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: BR1W) -> &'a mut W {
{
self.bit(variant._bits())
}
}
#[doc = "Resets the corresponding ODRx bit"]
#[inline(always)]
pub fn reset(self) -> &'a mut W {
self.variant(BR0W::RESET)
}
#[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 &= !(0x01 << 17);
self.w.bits |= ((value as u32) & 0x01) << 17;
self.w
}
}
#[doc = "Values that can be written to the field `BR2`"]
pub type BR2W = BR0W;
#[doc = r"Proxy"]
pub struct _BR2W<'a> {
w: &'a mut W,
}
impl<'a> _BR2W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: BR2W) -> &'a mut W {
{
self.bit(variant._bits())
}
}
#[doc = "Resets the corresponding ODRx bit"]
#[inline(always)]
pub fn reset(self) -> &'a mut W {
self.variant(BR0W::RESET)
}
#[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 &= !(0x01 << 18);
self.w.bits |= ((value as u32) & 0x01) << 18;
self.w
}
}
#[doc = "Values that can be written to the field `BR3`"]
pub type BR3W = BR0W;
#[doc = r"Proxy"]
pub struct _BR3W<'a> {
w: &'a mut W,
}
impl<'a> _BR3W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: BR3W) -> &'a mut W {
{
self.bit(variant._bits())
}
}
#[doc = "Resets the corresponding ODRx bit"]
#[inline(always)]
pub fn reset(self) -> &'a mut W {
self.variant(BR0W::RESET)
}
#[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 &= !(0x01 << 19);
self.w.bits |= ((value as u32) & 0x01) << 19;
self.w
}
}
#[doc = "Values that can be written to the field `BR4`"]
pub type BR4W = BR0W;
#[doc = r"Proxy"]
pub struct _BR4W<'a> {
w: &'a mut W,
}
impl<'a> _BR4W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: BR4W) -> &'a mut W {
{
self.bit(variant._bits())
}
}
#[doc = "Resets the corresponding ODRx bit"]
#[inline(always)]
pub fn reset(self) -> &'a mut W {
self.variant(BR0W::RESET)
}
#[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 &= !(0x01 << 20);
self.w.bits |= ((value as u32) & 0x01) << 20;
self.w
}
}
#[doc = "Values that can be written to the field `BR5`"]
pub type BR5W = BR0W;
#[doc = r"Proxy"]
pub struct _BR5W<'a> {
w: &'a mut W,
}
impl<'a> _BR5W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: BR5W) -> &'a mut W {
{
self.bit(variant._bits())
}
}
#[doc = "Resets the corresponding ODRx bit"]
#[inline(always)]
pub fn reset(self) -> &'a mut W {
self.variant(BR0W::RESET)
}
#[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 &= !(0x01 << 21);
self.w.bits |= ((value as u32) & 0x01) << 21;
self.w
}
}
#[doc = "Values that can be written to the field `BR6`"]
pub type BR6W = BR0W;
#[doc = r"Proxy"]
pub struct _BR6W<'a> {
w: &'a mut W,
}
impl<'a> _BR6W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: BR6W) -> &'a mut W {
{
self.bit(variant._bits())
}
}
#[doc = "Resets the corresponding ODRx bit"]
#[inline(always)]
pub fn reset(self) -> &'a mut W {
self.variant(BR0W::RESET)
}
#[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 &= !(0x01 << 22);
self.w.bits |= ((value as u32) & 0x01) << 22;
self.w
}
}
#[doc = "Values that can be written to the field `BR7`"]
pub type BR7W = BR0W;
#[doc = r"Proxy"]
pub struct _BR7W<'a> {
w: &'a mut W,
}
impl<'a> _BR7W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: BR7W) -> &'a mut W {
{
self.bit(variant._bits())
}
}
#[doc = "Resets the corresponding ODRx bit"]
#[inline(always)]
pub fn reset(self) -> &'a mut W {
self.variant(BR0W::RESET)
}
#[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 &= !(0x01 << 23);
self.w.bits |= ((value as u32) & 0x01) << 23;
self.w
}
}
#[doc = "Values that can be written to the field `BR8`"]
pub type BR8W = BR0W;
#[doc = r"Proxy"]
pub struct _BR8W<'a> {
w: &'a mut W,
}
impl<'a> _BR8W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: BR8W) -> &'a mut W {
{
self.bit(variant._bits())
}
}
#[doc = "Resets the corresponding ODRx bit"]
#[inline(always)]
pub fn reset(self) -> &'a mut W {
self.variant(BR0W::RESET)
}
#[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 &= !(0x01 << 24);
self.w.bits |= ((value as u32) & 0x01) << 24;
self.w
}
}
#[doc = "Values that can be written to the field `BR9`"]
pub type BR9W = BR0W;
#[doc = r"Proxy"]
pub struct _BR9W<'a> {
w: &'a mut W,
}
impl<'a> _BR9W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: BR9W) -> &'a mut W {
{
self.bit(variant._bits())
}
}
#[doc = "Resets the corresponding ODRx bit"]
#[inline(always)]
pub fn reset(self) -> &'a mut W {
self.variant(BR0W::RESET)
}
#[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 &= !(0x01 << 25);
self.w.bits |= ((value as u32) & 0x01) << 25;
self.w
}
}
#[doc = "Values that can be written to the field `BR10`"]
pub type BR10W = BR0W;
#[doc = r"Proxy"]
pub struct _BR10W<'a> {
w: &'a mut W,
}
impl<'a> _BR10W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: BR10W) -> &'a mut W {
{
self.bit(variant._bits())
}
}
#[doc = "Resets the corresponding ODRx bit"]
#[inline(always)]
pub fn reset(self) -> &'a mut W {
self.variant(BR0W::RESET)
}
#[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 &= !(0x01 << 26);
self.w.bits |= ((value as u32) & 0x01) << 26;
self.w
}
}
#[doc = "Values that can be written to the field `BR11`"]
pub type BR11W = BR0W;
#[doc = r"Proxy"]
pub struct _BR11W<'a> {
w: &'a mut W,
}
impl<'a> _BR11W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: BR11W) -> &'a mut W {
{
self.bit(variant._bits())
}
}
#[doc = "Resets the corresponding ODRx bit"]
#[inline(always)]
pub fn reset(self) -> &'a mut W {
self.variant(BR0W::RESET)
}
#[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 &= !(0x01 << 27);
self.w.bits |= ((value as u32) & 0x01) << 27;
self.w
}
}
#[doc = "Values that can be written to the field `BR12`"]
pub type BR12W = BR0W;
#[doc = r"Proxy"]
pub struct _BR12W<'a> {
w: &'a mut W,
}
impl<'a> _BR12W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: BR12W) -> &'a mut W {
{
self.bit(variant._bits())
}
}
#[doc = "Resets the corresponding ODRx bit"]
#[inline(always)]
pub fn reset(self) -> &'a mut W {
self.variant(BR0W::RESET)
}
#[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 &= !(0x01 << 28);
self.w.bits |= ((value as u32) & 0x01) << 28;
self.w
}
}
#[doc = "Values that can be written to the field `BR13`"]
pub type BR13W = BR0W;
#[doc = r"Proxy"]
pub struct _BR13W<'a> {
w: &'a mut W,
}
impl<'a> _BR13W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: BR13W) -> &'a mut W {
{
self.bit(variant._bits())
}
}
#[doc = "Resets the corresponding ODRx bit"]
#[inline(always)]
pub fn reset(self) -> &'a mut W {
self.variant(BR0W::RESET)
}
#[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 &= !(0x01 << 29);
self.w.bits |= ((value as u32) & 0x01) << 29;
self.w
}
}
#[doc = "Values that can be written to the field `BR14`"]
pub type BR14W = BR0W;
#[doc = r"Proxy"]
pub struct _BR14W<'a> {
w: &'a mut W,
}
impl<'a> _BR14W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: BR14W) -> &'a mut W {
{
self.bit(variant._bits())
}
}
#[doc = "Resets the corresponding ODRx bit"]
#[inline(always)]
pub fn reset(self) -> &'a mut W {
self.variant(BR0W::RESET)
}
#[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 &= !(0x01 << 30);
self.w.bits |= ((value as u32) & 0x01) << 30;
self.w
}
}
#[doc = "Values that can be written to the field `BR15`"]
pub type BR15W = BR0W;
#[doc = r"Proxy"]
pub struct _BR15W<'a> {
w: &'a mut W,
}
impl<'a> _BR15W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: BR15W) -> &'a mut W {
{
self.bit(variant._bits())
}
}
#[doc = "Resets the corresponding ODRx bit"]
#[inline(always)]
pub fn reset(self) -> &'a mut W {
self.variant(BR0W::RESET)
}
#[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 &= !(0x01 << 31);
self.w.bits |= ((value as u32) & 0x01) << 31;
self.w
}
}
impl W {
#[doc = r"Writes raw bits to the register"]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.bits = bits;
self
}
#[doc = "Bit 0 - Port x set bit y (y= 0..15) These bits are write-only. A read to these bits returns the value 0x0000."]
#[inline(always)]
pub fn bs0(&mut self) -> _BS0W {
_BS0W { w: self }
}
#[doc = "Bit 1 - Port x set bit y (y= 0..15) These bits are write-only. A read to these bits returns the value 0x0000."]
#[inline(always)]
pub fn bs1(&mut self) -> _BS1W {
_BS1W { w: self }
}
#[doc = "Bit 2 - Port x set bit y (y= 0..15) These bits are write-only. A read to these bits returns the value 0x0000."]
#[inline(always)]
pub fn bs2(&mut self) -> _BS2W {
_BS2W { w: self }
}
#[doc = "Bit 3 - Port x set bit y (y= 0..15) These bits are write-only. A read to these bits returns the value 0x0000."]
#[inline(always)]
pub fn bs3(&mut self) -> _BS3W {
_BS3W { w: self }
}
#[doc = "Bit 4 - Port x set bit y (y= 0..15) These bits are write-only. A read to these bits returns the value 0x0000."]
#[inline(always)]
pub fn bs4(&mut self) -> _BS4W {
_BS4W { w: self }
}
#[doc = "Bit 5 - Port x set bit y (y= 0..15) These bits are write-only. A read to these bits returns the value 0x0000."]
#[inline(always)]
pub fn bs5(&mut self) -> _BS5W {
_BS5W { w: self }
}
#[doc = "Bit 6 - Port x set bit y (y= 0..15) These bits are write-only. A read to these bits returns the value 0x0000."]
#[inline(always)]
pub fn bs6(&mut self) -> _BS6W {
_BS6W { w: self }
}
#[doc = "Bit 7 - Port x set bit y (y= 0..15) These bits are write-only. A read to these bits returns the value 0x0000."]
#[inline(always)]
pub fn bs7(&mut self) -> _BS7W {
_BS7W { w: self }
}
#[doc = "Bit 8 - Port x set bit y (y= 0..15) These bits are write-only. A read to these bits returns the value 0x0000."]
#[inline(always)]
pub fn bs8(&mut self) -> _BS8W {
_BS8W { w: self }
}
#[doc = "Bit 9 - Port x set bit y (y= 0..15) These bits are write-only. A read to these bits returns the value 0x0000."]
#[inline(always)]
pub fn bs9(&mut self) -> _BS9W {
_BS9W { w: self }
}
#[doc = "Bit 10 - Port x set bit y (y= 0..15) These bits are write-only. A read to these bits returns the value 0x0000."]
#[inline(always)]
pub fn bs10(&mut self) -> _BS10W {
_BS10W { w: self }
}
#[doc = "Bit 11 - Port x set bit y (y= 0..15) These bits are write-only. A read to these bits returns the value 0x0000."]
#[inline(always)]
pub fn bs11(&mut self) -> _BS11W {
_BS11W { w: self }
}
#[doc = "Bit 12 - Port x set bit y (y= 0..15) These bits are write-only. A read to these bits returns the value 0x0000."]
#[inline(always)]
pub fn bs12(&mut self) -> _BS12W {
_BS12W { w: self }
}
#[doc = "Bit 13 - Port x set bit y (y= 0..15) These bits are write-only. A read to these bits returns the value 0x0000."]
#[inline(always)]
pub fn bs13(&mut self) -> _BS13W {
_BS13W { w: self }
}
#[doc = "Bit 14 - Port x set bit y (y= 0..15) These bits are write-only. A read to these bits returns the value 0x0000."]
#[inline(always)]
pub fn bs14(&mut self) -> _BS14W {
_BS14W { w: self }
}
#[doc = "Bit 15 - Port x set bit y (y= 0..15) These bits are write-only. A read to these bits returns the value 0x0000."]
#[inline(always)]
pub fn bs15(&mut self) -> _BS15W {
_BS15W { w: self }
}
#[doc = "Bit 16 - Port x reset bit y (y = 0..15) These bits are write-only. A read to these bits returns the value 0x0000. Note: If both BSx and BRx are set, BSx has priority."]
#[inline(always)]
pub fn br0(&mut self) -> _BR0W {
_BR0W { w: self }
}
#[doc = "Bit 17 - Port x reset bit y (y = 0..15) These bits are write-only. A read to these bits returns the value 0x0000. Note: If both BSx and BRx are set, BSx has priority."]
#[inline(always)]
pub fn br1(&mut self) -> _BR1W {
_BR1W { w: self }
}
#[doc = "Bit 18 - Port x reset bit y (y = 0..15) These bits are write-only. A read to these bits returns the value 0x0000. Note: If both BSx and BRx are set, BSx has priority."]
#[inline(always)]
pub fn br2(&mut self) -> _BR2W {
_BR2W { w: self }
}
#[doc = "Bit 19 - Port x reset bit y (y = 0..15) These bits are write-only. A read to these bits returns the value 0x0000. Note: If both BSx and BRx are set, BSx has priority."]
#[inline(always)]
pub fn br3(&mut self) -> _BR3W {
_BR3W { w: self }
}
#[doc = "Bit 20 - Port x reset bit y (y = 0..15) These bits are write-only. A read to these bits returns the value 0x0000. Note: If both BSx and BRx are set, BSx has priority."]
#[inline(always)]
pub fn br4(&mut self) -> _BR4W {
_BR4W { w: self }
}
#[doc = "Bit 21 - Port x reset bit y (y = 0..15) These bits are write-only. A read to these bits returns the value 0x0000. Note: If both BSx and BRx are set, BSx has priority."]
#[inline(always)]
pub fn br5(&mut self) -> _BR5W {
_BR5W { w: self }
}
#[doc = "Bit 22 - Port x reset bit y (y = 0..15) These bits are write-only. A read to these bits returns the value 0x0000. Note: If both BSx and BRx are set, BSx has priority."]
#[inline(always)]
pub fn br6(&mut self) -> _BR6W {
_BR6W { w: self }
}
#[doc = "Bit 23 - Port x reset bit y (y = 0..15) These bits are write-only. A read to these bits returns the value 0x0000. Note: If both BSx and BRx are set, BSx has priority."]
#[inline(always)]
pub fn br7(&mut self) -> _BR7W {
_BR7W { w: self }
}
#[doc = "Bit 24 - Port x reset bit y (y = 0..15) These bits are write-only. A read to these bits returns the value 0x0000. Note: If both BSx and BRx are set, BSx has priority."]
#[inline(always)]
pub fn br8(&mut self) -> _BR8W {
_BR8W { w: self }
}
#[doc = "Bit 25 - Port x reset bit y (y = 0..15) These bits are write-only. A read to these bits returns the value 0x0000. Note: If both BSx and BRx are set, BSx has priority."]
#[inline(always)]
pub fn br9(&mut self) -> _BR9W {
_BR9W { w: self }
}
#[doc = "Bit 26 - Port x reset bit y (y = 0..15) These bits are write-only. A read to these bits returns the value 0x0000. Note: If both BSx and BRx are set, BSx has priority."]
#[inline(always)]
pub fn br10(&mut self) -> _BR10W {
_BR10W { w: self }
}
#[doc = "Bit 27 - Port x reset bit y (y = 0..15) These bits are write-only. A read to these bits returns the value 0x0000. Note: If both BSx and BRx are set, BSx has priority."]
#[inline(always)]
pub fn br11(&mut self) -> _BR11W {
_BR11W { w: self }
}
#[doc = "Bit 28 - Port x reset bit y (y = 0..15) These bits are write-only. A read to these bits returns the value 0x0000. Note: If both BSx and BRx are set, BSx has priority."]
#[inline(always)]
pub fn br12(&mut self) -> _BR12W {
_BR12W { w: self }
}
#[doc = "Bit 29 - Port x reset bit y (y = 0..15) These bits are write-only. A read to these bits returns the value 0x0000. Note: If both BSx and BRx are set, BSx has priority."]
#[inline(always)]
pub fn br13(&mut self) -> _BR13W {
_BR13W { w: self }
}
#[doc = "Bit 30 - Port x reset bit y (y = 0..15) These bits are write-only. A read to these bits returns the value 0x0000. Note: If both BSx and BRx are set, BSx has priority."]
#[inline(always)]
pub fn br14(&mut self) -> _BR14W {
_BR14W { w: self }
}
#[doc = "Bit 31 - Port x reset bit y (y = 0..15) These bits are write-only. A read to these bits returns the value 0x0000. Note: If both BSx and BRx are set, BSx has priority."]
#[inline(always)]
pub fn br15(&mut self) -> _BR15W {
_BR15W { w: self }
}
}