#[doc = r"Value read from the register"]
pub struct R {
bits: u32,
}
#[doc = r"Value to write to the register"]
pub struct W {
bits: u32,
}
impl super::ODR {
#[doc = r"Modifies the contents of the register"]
#[inline(always)]
pub fn modify<F>(&self, f: F)
where
for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W,
{
let bits = self.register.get();
self.register.set(f(&R { bits }, &mut W { bits }).bits);
}
#[doc = r"Reads the contents of the register"]
#[inline(always)]
pub fn read(&self) -> R {
R {
bits: self.register.get(),
}
}
#[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 = "Possible values of the field `ODR0`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum ODR0R {
#[doc = "Set output to logic high"]
HIGH,
#[doc = "Set output to logic low"]
LOW,
}
impl ODR0R {
#[doc = r"Returns `true` if the bit is clear (0)"]
#[inline(always)]
pub fn bit_is_clear(&self) -> bool {
!self.bit()
}
#[doc = r"Returns `true` if the bit is set (1)"]
#[inline(always)]
pub fn bit_is_set(&self) -> bool {
self.bit()
}
#[doc = r"Value of the field as raw bits"]
#[inline(always)]
pub fn bit(&self) -> bool {
match *self {
ODR0R::HIGH => true,
ODR0R::LOW => false,
}
}
#[allow(missing_docs)]
#[doc(hidden)]
#[inline(always)]
pub fn _from(value: bool) -> ODR0R {
match value {
true => ODR0R::HIGH,
false => ODR0R::LOW,
}
}
#[doc = "Checks if the value of the field is `HIGH`"]
#[inline(always)]
pub fn is_high(&self) -> bool {
*self == ODR0R::HIGH
}
#[doc = "Checks if the value of the field is `LOW`"]
#[inline(always)]
pub fn is_low(&self) -> bool {
*self == ODR0R::LOW
}
}
#[doc = "Values that can be written to the field `ODR0`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum ODR0W {
#[doc = "Set output to logic high"]
HIGH,
#[doc = "Set output to logic low"]
LOW,
}
impl ODR0W {
#[allow(missing_docs)]
#[doc(hidden)]
#[inline(always)]
pub fn _bits(&self) -> bool {
match *self {
ODR0W::HIGH => true,
ODR0W::LOW => false,
}
}
}
#[doc = r"Proxy"]
pub struct _ODR0W<'a> {
w: &'a mut W,
}
impl<'a> _ODR0W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: ODR0W) -> &'a mut W {
{
self.bit(variant._bits())
}
}
#[doc = "Set output to logic high"]
#[inline(always)]
pub fn high(self) -> &'a mut W {
self.variant(ODR0W::HIGH)
}
#[doc = "Set output to logic low"]
#[inline(always)]
pub fn low(self) -> &'a mut W {
self.variant(ODR0W::LOW)
}
#[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 = "Possible values of the field `ODR1`"]
pub type ODR1R = ODR0R;
#[doc = "Values that can be written to the field `ODR1`"]
pub type ODR1W = ODR0W;
#[doc = r"Proxy"]
pub struct _ODR1W<'a> {
w: &'a mut W,
}
impl<'a> _ODR1W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: ODR1W) -> &'a mut W {
{
self.bit(variant._bits())
}
}
#[doc = "Set output to logic high"]
#[inline(always)]
pub fn high(self) -> &'a mut W {
self.variant(ODR0W::HIGH)
}
#[doc = "Set output to logic low"]
#[inline(always)]
pub fn low(self) -> &'a mut W {
self.variant(ODR0W::LOW)
}
#[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 = "Possible values of the field `ODR2`"]
pub type ODR2R = ODR0R;
#[doc = "Values that can be written to the field `ODR2`"]
pub type ODR2W = ODR0W;
#[doc = r"Proxy"]
pub struct _ODR2W<'a> {
w: &'a mut W,
}
impl<'a> _ODR2W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: ODR2W) -> &'a mut W {
{
self.bit(variant._bits())
}
}
#[doc = "Set output to logic high"]
#[inline(always)]
pub fn high(self) -> &'a mut W {
self.variant(ODR0W::HIGH)
}
#[doc = "Set output to logic low"]
#[inline(always)]
pub fn low(self) -> &'a mut W {
self.variant(ODR0W::LOW)
}
#[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 = "Possible values of the field `ODR3`"]
pub type ODR3R = ODR0R;
#[doc = "Values that can be written to the field `ODR3`"]
pub type ODR3W = ODR0W;
#[doc = r"Proxy"]
pub struct _ODR3W<'a> {
w: &'a mut W,
}
impl<'a> _ODR3W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: ODR3W) -> &'a mut W {
{
self.bit(variant._bits())
}
}
#[doc = "Set output to logic high"]
#[inline(always)]
pub fn high(self) -> &'a mut W {
self.variant(ODR0W::HIGH)
}
#[doc = "Set output to logic low"]
#[inline(always)]
pub fn low(self) -> &'a mut W {
self.variant(ODR0W::LOW)
}
#[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 = "Possible values of the field `ODR4`"]
pub type ODR4R = ODR0R;
#[doc = "Values that can be written to the field `ODR4`"]
pub type ODR4W = ODR0W;
#[doc = r"Proxy"]
pub struct _ODR4W<'a> {
w: &'a mut W,
}
impl<'a> _ODR4W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: ODR4W) -> &'a mut W {
{
self.bit(variant._bits())
}
}
#[doc = "Set output to logic high"]
#[inline(always)]
pub fn high(self) -> &'a mut W {
self.variant(ODR0W::HIGH)
}
#[doc = "Set output to logic low"]
#[inline(always)]
pub fn low(self) -> &'a mut W {
self.variant(ODR0W::LOW)
}
#[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 = "Possible values of the field `ODR5`"]
pub type ODR5R = ODR0R;
#[doc = "Values that can be written to the field `ODR5`"]
pub type ODR5W = ODR0W;
#[doc = r"Proxy"]
pub struct _ODR5W<'a> {
w: &'a mut W,
}
impl<'a> _ODR5W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: ODR5W) -> &'a mut W {
{
self.bit(variant._bits())
}
}
#[doc = "Set output to logic high"]
#[inline(always)]
pub fn high(self) -> &'a mut W {
self.variant(ODR0W::HIGH)
}
#[doc = "Set output to logic low"]
#[inline(always)]
pub fn low(self) -> &'a mut W {
self.variant(ODR0W::LOW)
}
#[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 = "Possible values of the field `ODR6`"]
pub type ODR6R = ODR0R;
#[doc = "Values that can be written to the field `ODR6`"]
pub type ODR6W = ODR0W;
#[doc = r"Proxy"]
pub struct _ODR6W<'a> {
w: &'a mut W,
}
impl<'a> _ODR6W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: ODR6W) -> &'a mut W {
{
self.bit(variant._bits())
}
}
#[doc = "Set output to logic high"]
#[inline(always)]
pub fn high(self) -> &'a mut W {
self.variant(ODR0W::HIGH)
}
#[doc = "Set output to logic low"]
#[inline(always)]
pub fn low(self) -> &'a mut W {
self.variant(ODR0W::LOW)
}
#[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 = "Possible values of the field `ODR7`"]
pub type ODR7R = ODR0R;
#[doc = "Values that can be written to the field `ODR7`"]
pub type ODR7W = ODR0W;
#[doc = r"Proxy"]
pub struct _ODR7W<'a> {
w: &'a mut W,
}
impl<'a> _ODR7W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: ODR7W) -> &'a mut W {
{
self.bit(variant._bits())
}
}
#[doc = "Set output to logic high"]
#[inline(always)]
pub fn high(self) -> &'a mut W {
self.variant(ODR0W::HIGH)
}
#[doc = "Set output to logic low"]
#[inline(always)]
pub fn low(self) -> &'a mut W {
self.variant(ODR0W::LOW)
}
#[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 = "Possible values of the field `ODR8`"]
pub type ODR8R = ODR0R;
#[doc = "Values that can be written to the field `ODR8`"]
pub type ODR8W = ODR0W;
#[doc = r"Proxy"]
pub struct _ODR8W<'a> {
w: &'a mut W,
}
impl<'a> _ODR8W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: ODR8W) -> &'a mut W {
{
self.bit(variant._bits())
}
}
#[doc = "Set output to logic high"]
#[inline(always)]
pub fn high(self) -> &'a mut W {
self.variant(ODR0W::HIGH)
}
#[doc = "Set output to logic low"]
#[inline(always)]
pub fn low(self) -> &'a mut W {
self.variant(ODR0W::LOW)
}
#[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 = "Possible values of the field `ODR9`"]
pub type ODR9R = ODR0R;
#[doc = "Values that can be written to the field `ODR9`"]
pub type ODR9W = ODR0W;
#[doc = r"Proxy"]
pub struct _ODR9W<'a> {
w: &'a mut W,
}
impl<'a> _ODR9W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: ODR9W) -> &'a mut W {
{
self.bit(variant._bits())
}
}
#[doc = "Set output to logic high"]
#[inline(always)]
pub fn high(self) -> &'a mut W {
self.variant(ODR0W::HIGH)
}
#[doc = "Set output to logic low"]
#[inline(always)]
pub fn low(self) -> &'a mut W {
self.variant(ODR0W::LOW)
}
#[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 = "Possible values of the field `ODR10`"]
pub type ODR10R = ODR0R;
#[doc = "Values that can be written to the field `ODR10`"]
pub type ODR10W = ODR0W;
#[doc = r"Proxy"]
pub struct _ODR10W<'a> {
w: &'a mut W,
}
impl<'a> _ODR10W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: ODR10W) -> &'a mut W {
{
self.bit(variant._bits())
}
}
#[doc = "Set output to logic high"]
#[inline(always)]
pub fn high(self) -> &'a mut W {
self.variant(ODR0W::HIGH)
}
#[doc = "Set output to logic low"]
#[inline(always)]
pub fn low(self) -> &'a mut W {
self.variant(ODR0W::LOW)
}
#[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 = "Possible values of the field `ODR11`"]
pub type ODR11R = ODR0R;
#[doc = "Values that can be written to the field `ODR11`"]
pub type ODR11W = ODR0W;
#[doc = r"Proxy"]
pub struct _ODR11W<'a> {
w: &'a mut W,
}
impl<'a> _ODR11W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: ODR11W) -> &'a mut W {
{
self.bit(variant._bits())
}
}
#[doc = "Set output to logic high"]
#[inline(always)]
pub fn high(self) -> &'a mut W {
self.variant(ODR0W::HIGH)
}
#[doc = "Set output to logic low"]
#[inline(always)]
pub fn low(self) -> &'a mut W {
self.variant(ODR0W::LOW)
}
#[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 = "Possible values of the field `ODR12`"]
pub type ODR12R = ODR0R;
#[doc = "Values that can be written to the field `ODR12`"]
pub type ODR12W = ODR0W;
#[doc = r"Proxy"]
pub struct _ODR12W<'a> {
w: &'a mut W,
}
impl<'a> _ODR12W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: ODR12W) -> &'a mut W {
{
self.bit(variant._bits())
}
}
#[doc = "Set output to logic high"]
#[inline(always)]
pub fn high(self) -> &'a mut W {
self.variant(ODR0W::HIGH)
}
#[doc = "Set output to logic low"]
#[inline(always)]
pub fn low(self) -> &'a mut W {
self.variant(ODR0W::LOW)
}
#[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 = "Possible values of the field `ODR13`"]
pub type ODR13R = ODR0R;
#[doc = "Values that can be written to the field `ODR13`"]
pub type ODR13W = ODR0W;
#[doc = r"Proxy"]
pub struct _ODR13W<'a> {
w: &'a mut W,
}
impl<'a> _ODR13W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: ODR13W) -> &'a mut W {
{
self.bit(variant._bits())
}
}
#[doc = "Set output to logic high"]
#[inline(always)]
pub fn high(self) -> &'a mut W {
self.variant(ODR0W::HIGH)
}
#[doc = "Set output to logic low"]
#[inline(always)]
pub fn low(self) -> &'a mut W {
self.variant(ODR0W::LOW)
}
#[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 = "Possible values of the field `ODR14`"]
pub type ODR14R = ODR0R;
#[doc = "Values that can be written to the field `ODR14`"]
pub type ODR14W = ODR0W;
#[doc = r"Proxy"]
pub struct _ODR14W<'a> {
w: &'a mut W,
}
impl<'a> _ODR14W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: ODR14W) -> &'a mut W {
{
self.bit(variant._bits())
}
}
#[doc = "Set output to logic high"]
#[inline(always)]
pub fn high(self) -> &'a mut W {
self.variant(ODR0W::HIGH)
}
#[doc = "Set output to logic low"]
#[inline(always)]
pub fn low(self) -> &'a mut W {
self.variant(ODR0W::LOW)
}
#[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 = "Possible values of the field `ODR15`"]
pub type ODR15R = ODR0R;
#[doc = "Values that can be written to the field `ODR15`"]
pub type ODR15W = ODR0W;
#[doc = r"Proxy"]
pub struct _ODR15W<'a> {
w: &'a mut W,
}
impl<'a> _ODR15W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: ODR15W) -> &'a mut W {
{
self.bit(variant._bits())
}
}
#[doc = "Set output to logic high"]
#[inline(always)]
pub fn high(self) -> &'a mut W {
self.variant(ODR0W::HIGH)
}
#[doc = "Set output to logic low"]
#[inline(always)]
pub fn low(self) -> &'a mut W {
self.variant(ODR0W::LOW)
}
#[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
}
}
impl R {
#[doc = r"Value of the register as raw bits"]
#[inline(always)]
pub fn bits(&self) -> u32 {
self.bits
}
#[doc = "Bit 0 - Port output data bit These bits can be read and written by software. Note: For atomic bit set/reset, the OD bits can be individually set and/or reset by writing to the GPIOx_BSRR or GPIOx_BRR registers (x = A..F)."]
#[inline(always)]
pub fn odr0(&self) -> ODR0R {
ODR0R::_from(((self.bits >> 0) & 0x01) != 0)
}
#[doc = "Bit 1 - Port output data bit These bits can be read and written by software. Note: For atomic bit set/reset, the OD bits can be individually set and/or reset by writing to the GPIOx_BSRR or GPIOx_BRR registers (x = A..F)."]
#[inline(always)]
pub fn odr1(&self) -> ODR1R {
ODR1R::_from(((self.bits >> 1) & 0x01) != 0)
}
#[doc = "Bit 2 - Port output data bit These bits can be read and written by software. Note: For atomic bit set/reset, the OD bits can be individually set and/or reset by writing to the GPIOx_BSRR or GPIOx_BRR registers (x = A..F)."]
#[inline(always)]
pub fn odr2(&self) -> ODR2R {
ODR2R::_from(((self.bits >> 2) & 0x01) != 0)
}
#[doc = "Bit 3 - Port output data bit These bits can be read and written by software. Note: For atomic bit set/reset, the OD bits can be individually set and/or reset by writing to the GPIOx_BSRR or GPIOx_BRR registers (x = A..F)."]
#[inline(always)]
pub fn odr3(&self) -> ODR3R {
ODR3R::_from(((self.bits >> 3) & 0x01) != 0)
}
#[doc = "Bit 4 - Port output data bit These bits can be read and written by software. Note: For atomic bit set/reset, the OD bits can be individually set and/or reset by writing to the GPIOx_BSRR or GPIOx_BRR registers (x = A..F)."]
#[inline(always)]
pub fn odr4(&self) -> ODR4R {
ODR4R::_from(((self.bits >> 4) & 0x01) != 0)
}
#[doc = "Bit 5 - Port output data bit These bits can be read and written by software. Note: For atomic bit set/reset, the OD bits can be individually set and/or reset by writing to the GPIOx_BSRR or GPIOx_BRR registers (x = A..F)."]
#[inline(always)]
pub fn odr5(&self) -> ODR5R {
ODR5R::_from(((self.bits >> 5) & 0x01) != 0)
}
#[doc = "Bit 6 - Port output data bit These bits can be read and written by software. Note: For atomic bit set/reset, the OD bits can be individually set and/or reset by writing to the GPIOx_BSRR or GPIOx_BRR registers (x = A..F)."]
#[inline(always)]
pub fn odr6(&self) -> ODR6R {
ODR6R::_from(((self.bits >> 6) & 0x01) != 0)
}
#[doc = "Bit 7 - Port output data bit These bits can be read and written by software. Note: For atomic bit set/reset, the OD bits can be individually set and/or reset by writing to the GPIOx_BSRR or GPIOx_BRR registers (x = A..F)."]
#[inline(always)]
pub fn odr7(&self) -> ODR7R {
ODR7R::_from(((self.bits >> 7) & 0x01) != 0)
}
#[doc = "Bit 8 - Port output data bit These bits can be read and written by software. Note: For atomic bit set/reset, the OD bits can be individually set and/or reset by writing to the GPIOx_BSRR or GPIOx_BRR registers (x = A..F)."]
#[inline(always)]
pub fn odr8(&self) -> ODR8R {
ODR8R::_from(((self.bits >> 8) & 0x01) != 0)
}
#[doc = "Bit 9 - Port output data bit These bits can be read and written by software. Note: For atomic bit set/reset, the OD bits can be individually set and/or reset by writing to the GPIOx_BSRR or GPIOx_BRR registers (x = A..F)."]
#[inline(always)]
pub fn odr9(&self) -> ODR9R {
ODR9R::_from(((self.bits >> 9) & 0x01) != 0)
}
#[doc = "Bit 10 - Port output data bit These bits can be read and written by software. Note: For atomic bit set/reset, the OD bits can be individually set and/or reset by writing to the GPIOx_BSRR or GPIOx_BRR registers (x = A..F)."]
#[inline(always)]
pub fn odr10(&self) -> ODR10R {
ODR10R::_from(((self.bits >> 10) & 0x01) != 0)
}
#[doc = "Bit 11 - Port output data bit These bits can be read and written by software. Note: For atomic bit set/reset, the OD bits can be individually set and/or reset by writing to the GPIOx_BSRR or GPIOx_BRR registers (x = A..F)."]
#[inline(always)]
pub fn odr11(&self) -> ODR11R {
ODR11R::_from(((self.bits >> 11) & 0x01) != 0)
}
#[doc = "Bit 12 - Port output data bit These bits can be read and written by software. Note: For atomic bit set/reset, the OD bits can be individually set and/or reset by writing to the GPIOx_BSRR or GPIOx_BRR registers (x = A..F)."]
#[inline(always)]
pub fn odr12(&self) -> ODR12R {
ODR12R::_from(((self.bits >> 12) & 0x01) != 0)
}
#[doc = "Bit 13 - Port output data bit These bits can be read and written by software. Note: For atomic bit set/reset, the OD bits can be individually set and/or reset by writing to the GPIOx_BSRR or GPIOx_BRR registers (x = A..F)."]
#[inline(always)]
pub fn odr13(&self) -> ODR13R {
ODR13R::_from(((self.bits >> 13) & 0x01) != 0)
}
#[doc = "Bit 14 - Port output data bit These bits can be read and written by software. Note: For atomic bit set/reset, the OD bits can be individually set and/or reset by writing to the GPIOx_BSRR or GPIOx_BRR registers (x = A..F)."]
#[inline(always)]
pub fn odr14(&self) -> ODR14R {
ODR14R::_from(((self.bits >> 14) & 0x01) != 0)
}
#[doc = "Bit 15 - Port output data bit These bits can be read and written by software. Note: For atomic bit set/reset, the OD bits can be individually set and/or reset by writing to the GPIOx_BSRR or GPIOx_BRR registers (x = A..F)."]
#[inline(always)]
pub fn odr15(&self) -> ODR15R {
ODR15R::_from(((self.bits >> 15) & 0x01) != 0)
}
}
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 output data bit These bits can be read and written by software. Note: For atomic bit set/reset, the OD bits can be individually set and/or reset by writing to the GPIOx_BSRR or GPIOx_BRR registers (x = A..F)."]
#[inline(always)]
pub fn odr0(&mut self) -> _ODR0W {
_ODR0W { w: self }
}
#[doc = "Bit 1 - Port output data bit These bits can be read and written by software. Note: For atomic bit set/reset, the OD bits can be individually set and/or reset by writing to the GPIOx_BSRR or GPIOx_BRR registers (x = A..F)."]
#[inline(always)]
pub fn odr1(&mut self) -> _ODR1W {
_ODR1W { w: self }
}
#[doc = "Bit 2 - Port output data bit These bits can be read and written by software. Note: For atomic bit set/reset, the OD bits can be individually set and/or reset by writing to the GPIOx_BSRR or GPIOx_BRR registers (x = A..F)."]
#[inline(always)]
pub fn odr2(&mut self) -> _ODR2W {
_ODR2W { w: self }
}
#[doc = "Bit 3 - Port output data bit These bits can be read and written by software. Note: For atomic bit set/reset, the OD bits can be individually set and/or reset by writing to the GPIOx_BSRR or GPIOx_BRR registers (x = A..F)."]
#[inline(always)]
pub fn odr3(&mut self) -> _ODR3W {
_ODR3W { w: self }
}
#[doc = "Bit 4 - Port output data bit These bits can be read and written by software. Note: For atomic bit set/reset, the OD bits can be individually set and/or reset by writing to the GPIOx_BSRR or GPIOx_BRR registers (x = A..F)."]
#[inline(always)]
pub fn odr4(&mut self) -> _ODR4W {
_ODR4W { w: self }
}
#[doc = "Bit 5 - Port output data bit These bits can be read and written by software. Note: For atomic bit set/reset, the OD bits can be individually set and/or reset by writing to the GPIOx_BSRR or GPIOx_BRR registers (x = A..F)."]
#[inline(always)]
pub fn odr5(&mut self) -> _ODR5W {
_ODR5W { w: self }
}
#[doc = "Bit 6 - Port output data bit These bits can be read and written by software. Note: For atomic bit set/reset, the OD bits can be individually set and/or reset by writing to the GPIOx_BSRR or GPIOx_BRR registers (x = A..F)."]
#[inline(always)]
pub fn odr6(&mut self) -> _ODR6W {
_ODR6W { w: self }
}
#[doc = "Bit 7 - Port output data bit These bits can be read and written by software. Note: For atomic bit set/reset, the OD bits can be individually set and/or reset by writing to the GPIOx_BSRR or GPIOx_BRR registers (x = A..F)."]
#[inline(always)]
pub fn odr7(&mut self) -> _ODR7W {
_ODR7W { w: self }
}
#[doc = "Bit 8 - Port output data bit These bits can be read and written by software. Note: For atomic bit set/reset, the OD bits can be individually set and/or reset by writing to the GPIOx_BSRR or GPIOx_BRR registers (x = A..F)."]
#[inline(always)]
pub fn odr8(&mut self) -> _ODR8W {
_ODR8W { w: self }
}
#[doc = "Bit 9 - Port output data bit These bits can be read and written by software. Note: For atomic bit set/reset, the OD bits can be individually set and/or reset by writing to the GPIOx_BSRR or GPIOx_BRR registers (x = A..F)."]
#[inline(always)]
pub fn odr9(&mut self) -> _ODR9W {
_ODR9W { w: self }
}
#[doc = "Bit 10 - Port output data bit These bits can be read and written by software. Note: For atomic bit set/reset, the OD bits can be individually set and/or reset by writing to the GPIOx_BSRR or GPIOx_BRR registers (x = A..F)."]
#[inline(always)]
pub fn odr10(&mut self) -> _ODR10W {
_ODR10W { w: self }
}
#[doc = "Bit 11 - Port output data bit These bits can be read and written by software. Note: For atomic bit set/reset, the OD bits can be individually set and/or reset by writing to the GPIOx_BSRR or GPIOx_BRR registers (x = A..F)."]
#[inline(always)]
pub fn odr11(&mut self) -> _ODR11W {
_ODR11W { w: self }
}
#[doc = "Bit 12 - Port output data bit These bits can be read and written by software. Note: For atomic bit set/reset, the OD bits can be individually set and/or reset by writing to the GPIOx_BSRR or GPIOx_BRR registers (x = A..F)."]
#[inline(always)]
pub fn odr12(&mut self) -> _ODR12W {
_ODR12W { w: self }
}
#[doc = "Bit 13 - Port output data bit These bits can be read and written by software. Note: For atomic bit set/reset, the OD bits can be individually set and/or reset by writing to the GPIOx_BSRR or GPIOx_BRR registers (x = A..F)."]
#[inline(always)]
pub fn odr13(&mut self) -> _ODR13W {
_ODR13W { w: self }
}
#[doc = "Bit 14 - Port output data bit These bits can be read and written by software. Note: For atomic bit set/reset, the OD bits can be individually set and/or reset by writing to the GPIOx_BSRR or GPIOx_BRR registers (x = A..F)."]
#[inline(always)]
pub fn odr14(&mut self) -> _ODR14W {
_ODR14W { w: self }
}
#[doc = "Bit 15 - Port output data bit These bits can be read and written by software. Note: For atomic bit set/reset, the OD bits can be individually set and/or reset by writing to the GPIOx_BSRR or GPIOx_BRR registers (x = A..F)."]
#[inline(always)]
pub fn odr15(&mut self) -> _ODR15W {
_ODR15W { w: self }
}
}