#[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::CFGR1 {
#[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 `MEM_MODE`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum MEM_MODER {
#[doc = "Main Flash memory mapped at 0x0000_0000"]
MAINFLASH,
#[doc = "System Flash memory mapped at 0x0000_0000"]
SYSTEMFLASH,
#[doc = "Main Flash memory mapped at 0x0000_0000"]
MAINFLASH2,
#[doc = "Embedded SRAM mapped at 0x0000_0000"]
SRAM,
}
impl MEM_MODER {
#[doc = r"Value of the field as raw bits"]
#[inline(always)]
pub fn bits(&self) -> u8 {
match *self {
MEM_MODER::MAINFLASH => 0,
MEM_MODER::SYSTEMFLASH => 0x01,
MEM_MODER::MAINFLASH2 => 0x02,
MEM_MODER::SRAM => 0x03,
}
}
#[allow(missing_docs)]
#[doc(hidden)]
#[inline(always)]
pub fn _from(value: u8) -> MEM_MODER {
match value {
0 => MEM_MODER::MAINFLASH,
1 => MEM_MODER::SYSTEMFLASH,
2 => MEM_MODER::MAINFLASH2,
3 => MEM_MODER::SRAM,
_ => unreachable!(),
}
}
#[doc = "Checks if the value of the field is `MAINFLASH`"]
#[inline(always)]
pub fn is_main_flash(&self) -> bool {
*self == MEM_MODER::MAINFLASH
}
#[doc = "Checks if the value of the field is `SYSTEMFLASH`"]
#[inline(always)]
pub fn is_system_flash(&self) -> bool {
*self == MEM_MODER::SYSTEMFLASH
}
#[doc = "Checks if the value of the field is `MAINFLASH2`"]
#[inline(always)]
pub fn is_main_flash2(&self) -> bool {
*self == MEM_MODER::MAINFLASH2
}
#[doc = "Checks if the value of the field is `SRAM`"]
#[inline(always)]
pub fn is_sram(&self) -> bool {
*self == MEM_MODER::SRAM
}
}
#[doc = "Values that can be written to the field `MEM_MODE`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum MEM_MODEW {
#[doc = "Main Flash memory mapped at 0x0000_0000"]
MAINFLASH,
#[doc = "System Flash memory mapped at 0x0000_0000"]
SYSTEMFLASH,
#[doc = "Main Flash memory mapped at 0x0000_0000"]
MAINFLASH2,
#[doc = "Embedded SRAM mapped at 0x0000_0000"]
SRAM,
}
impl MEM_MODEW {
#[allow(missing_docs)]
#[doc(hidden)]
#[inline(always)]
pub fn _bits(&self) -> u8 {
match *self {
MEM_MODEW::MAINFLASH => 0,
MEM_MODEW::SYSTEMFLASH => 1,
MEM_MODEW::MAINFLASH2 => 2,
MEM_MODEW::SRAM => 3,
}
}
}
#[doc = r"Proxy"]
pub struct _MEM_MODEW<'a> {
w: &'a mut W,
}
impl<'a> _MEM_MODEW<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: MEM_MODEW) -> &'a mut W {
{
self.bits(variant._bits())
}
}
#[doc = "Main Flash memory mapped at 0x0000_0000"]
#[inline(always)]
pub fn main_flash(self) -> &'a mut W {
self.variant(MEM_MODEW::MAINFLASH)
}
#[doc = "System Flash memory mapped at 0x0000_0000"]
#[inline(always)]
pub fn system_flash(self) -> &'a mut W {
self.variant(MEM_MODEW::SYSTEMFLASH)
}
#[doc = "Main Flash memory mapped at 0x0000_0000"]
#[inline(always)]
pub fn main_flash2(self) -> &'a mut W {
self.variant(MEM_MODEW::MAINFLASH2)
}
#[doc = "Embedded SRAM mapped at 0x0000_0000"]
#[inline(always)]
pub fn sram(self) -> &'a mut W {
self.variant(MEM_MODEW::SRAM)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bits(self, value: u8) -> &'a mut W {
self.w.bits &= !(0x03 << 0);
self.w.bits |= ((value as u32) & 0x03) << 0;
self.w
}
}
#[doc = "Possible values of the field `ADC_DMA_RMP`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum ADC_DMA_RMPR {
#[doc = "ADC DMA request mapped on DMA channel 1"]
NOTREMAPPED,
#[doc = "ADC DMA request mapped on DMA channel 2"]
REMAPPED,
}
impl ADC_DMA_RMPR {
#[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 {
ADC_DMA_RMPR::NOTREMAPPED => false,
ADC_DMA_RMPR::REMAPPED => true,
}
}
#[allow(missing_docs)]
#[doc(hidden)]
#[inline(always)]
pub fn _from(value: bool) -> ADC_DMA_RMPR {
match value {
false => ADC_DMA_RMPR::NOTREMAPPED,
true => ADC_DMA_RMPR::REMAPPED,
}
}
#[doc = "Checks if the value of the field is `NOTREMAPPED`"]
#[inline(always)]
pub fn is_not_remapped(&self) -> bool {
*self == ADC_DMA_RMPR::NOTREMAPPED
}
#[doc = "Checks if the value of the field is `REMAPPED`"]
#[inline(always)]
pub fn is_remapped(&self) -> bool {
*self == ADC_DMA_RMPR::REMAPPED
}
}
#[doc = "Values that can be written to the field `ADC_DMA_RMP`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum ADC_DMA_RMPW {
#[doc = "ADC DMA request mapped on DMA channel 1"]
NOTREMAPPED,
#[doc = "ADC DMA request mapped on DMA channel 2"]
REMAPPED,
}
impl ADC_DMA_RMPW {
#[allow(missing_docs)]
#[doc(hidden)]
#[inline(always)]
pub fn _bits(&self) -> bool {
match *self {
ADC_DMA_RMPW::NOTREMAPPED => false,
ADC_DMA_RMPW::REMAPPED => true,
}
}
}
#[doc = r"Proxy"]
pub struct _ADC_DMA_RMPW<'a> {
w: &'a mut W,
}
impl<'a> _ADC_DMA_RMPW<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: ADC_DMA_RMPW) -> &'a mut W {
{
self.bit(variant._bits())
}
}
#[doc = "ADC DMA request mapped on DMA channel 1"]
#[inline(always)]
pub fn not_remapped(self) -> &'a mut W {
self.variant(ADC_DMA_RMPW::NOTREMAPPED)
}
#[doc = "ADC DMA request mapped on DMA channel 2"]
#[inline(always)]
pub fn remapped(self) -> &'a mut W {
self.variant(ADC_DMA_RMPW::REMAPPED)
}
#[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 `USART1_TX_DMA_RMP`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum USART1_TX_DMA_RMPR {
#[doc = "USART1_TX DMA request mapped on DMA channel 2"]
NOTREMAPPED,
#[doc = "USART1_TX DMA request mapped on DMA channel 4"]
REMAPPED,
}
impl USART1_TX_DMA_RMPR {
#[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 {
USART1_TX_DMA_RMPR::NOTREMAPPED => false,
USART1_TX_DMA_RMPR::REMAPPED => true,
}
}
#[allow(missing_docs)]
#[doc(hidden)]
#[inline(always)]
pub fn _from(value: bool) -> USART1_TX_DMA_RMPR {
match value {
false => USART1_TX_DMA_RMPR::NOTREMAPPED,
true => USART1_TX_DMA_RMPR::REMAPPED,
}
}
#[doc = "Checks if the value of the field is `NOTREMAPPED`"]
#[inline(always)]
pub fn is_not_remapped(&self) -> bool {
*self == USART1_TX_DMA_RMPR::NOTREMAPPED
}
#[doc = "Checks if the value of the field is `REMAPPED`"]
#[inline(always)]
pub fn is_remapped(&self) -> bool {
*self == USART1_TX_DMA_RMPR::REMAPPED
}
}
#[doc = "Values that can be written to the field `USART1_TX_DMA_RMP`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum USART1_TX_DMA_RMPW {
#[doc = "USART1_TX DMA request mapped on DMA channel 2"]
NOTREMAPPED,
#[doc = "USART1_TX DMA request mapped on DMA channel 4"]
REMAPPED,
}
impl USART1_TX_DMA_RMPW {
#[allow(missing_docs)]
#[doc(hidden)]
#[inline(always)]
pub fn _bits(&self) -> bool {
match *self {
USART1_TX_DMA_RMPW::NOTREMAPPED => false,
USART1_TX_DMA_RMPW::REMAPPED => true,
}
}
}
#[doc = r"Proxy"]
pub struct _USART1_TX_DMA_RMPW<'a> {
w: &'a mut W,
}
impl<'a> _USART1_TX_DMA_RMPW<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: USART1_TX_DMA_RMPW) -> &'a mut W {
{
self.bit(variant._bits())
}
}
#[doc = "USART1_TX DMA request mapped on DMA channel 2"]
#[inline(always)]
pub fn not_remapped(self) -> &'a mut W {
self.variant(USART1_TX_DMA_RMPW::NOTREMAPPED)
}
#[doc = "USART1_TX DMA request mapped on DMA channel 4"]
#[inline(always)]
pub fn remapped(self) -> &'a mut W {
self.variant(USART1_TX_DMA_RMPW::REMAPPED)
}
#[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 `USART1_RX_DMA_RMP`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum USART1_RX_DMA_RMPR {
#[doc = "USART1_RX DMA request mapped on DMA channel 3"]
NOTREMAPPED,
#[doc = "USART1_RX DMA request mapped on DMA channel 5"]
REMAPPED,
}
impl USART1_RX_DMA_RMPR {
#[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 {
USART1_RX_DMA_RMPR::NOTREMAPPED => false,
USART1_RX_DMA_RMPR::REMAPPED => true,
}
}
#[allow(missing_docs)]
#[doc(hidden)]
#[inline(always)]
pub fn _from(value: bool) -> USART1_RX_DMA_RMPR {
match value {
false => USART1_RX_DMA_RMPR::NOTREMAPPED,
true => USART1_RX_DMA_RMPR::REMAPPED,
}
}
#[doc = "Checks if the value of the field is `NOTREMAPPED`"]
#[inline(always)]
pub fn is_not_remapped(&self) -> bool {
*self == USART1_RX_DMA_RMPR::NOTREMAPPED
}
#[doc = "Checks if the value of the field is `REMAPPED`"]
#[inline(always)]
pub fn is_remapped(&self) -> bool {
*self == USART1_RX_DMA_RMPR::REMAPPED
}
}
#[doc = "Values that can be written to the field `USART1_RX_DMA_RMP`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum USART1_RX_DMA_RMPW {
#[doc = "USART1_RX DMA request mapped on DMA channel 3"]
NOTREMAPPED,
#[doc = "USART1_RX DMA request mapped on DMA channel 5"]
REMAPPED,
}
impl USART1_RX_DMA_RMPW {
#[allow(missing_docs)]
#[doc(hidden)]
#[inline(always)]
pub fn _bits(&self) -> bool {
match *self {
USART1_RX_DMA_RMPW::NOTREMAPPED => false,
USART1_RX_DMA_RMPW::REMAPPED => true,
}
}
}
#[doc = r"Proxy"]
pub struct _USART1_RX_DMA_RMPW<'a> {
w: &'a mut W,
}
impl<'a> _USART1_RX_DMA_RMPW<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: USART1_RX_DMA_RMPW) -> &'a mut W {
{
self.bit(variant._bits())
}
}
#[doc = "USART1_RX DMA request mapped on DMA channel 3"]
#[inline(always)]
pub fn not_remapped(self) -> &'a mut W {
self.variant(USART1_RX_DMA_RMPW::NOTREMAPPED)
}
#[doc = "USART1_RX DMA request mapped on DMA channel 5"]
#[inline(always)]
pub fn remapped(self) -> &'a mut W {
self.variant(USART1_RX_DMA_RMPW::REMAPPED)
}
#[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 `TIM16_DMA_RMP`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum TIM16_DMA_RMPR {
#[doc = "TIM16_CH1 and TIM16_UP DMA request mapped on DMA channel 3"]
NOTREMAPPED,
#[doc = "TIM16_CH1 and TIM16_UP DMA request mapped on DMA channel 4"]
REMAPPED,
}
impl TIM16_DMA_RMPR {
#[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 {
TIM16_DMA_RMPR::NOTREMAPPED => false,
TIM16_DMA_RMPR::REMAPPED => true,
}
}
#[allow(missing_docs)]
#[doc(hidden)]
#[inline(always)]
pub fn _from(value: bool) -> TIM16_DMA_RMPR {
match value {
false => TIM16_DMA_RMPR::NOTREMAPPED,
true => TIM16_DMA_RMPR::REMAPPED,
}
}
#[doc = "Checks if the value of the field is `NOTREMAPPED`"]
#[inline(always)]
pub fn is_not_remapped(&self) -> bool {
*self == TIM16_DMA_RMPR::NOTREMAPPED
}
#[doc = "Checks if the value of the field is `REMAPPED`"]
#[inline(always)]
pub fn is_remapped(&self) -> bool {
*self == TIM16_DMA_RMPR::REMAPPED
}
}
#[doc = "Values that can be written to the field `TIM16_DMA_RMP`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum TIM16_DMA_RMPW {
#[doc = "TIM16_CH1 and TIM16_UP DMA request mapped on DMA channel 3"]
NOTREMAPPED,
#[doc = "TIM16_CH1 and TIM16_UP DMA request mapped on DMA channel 4"]
REMAPPED,
}
impl TIM16_DMA_RMPW {
#[allow(missing_docs)]
#[doc(hidden)]
#[inline(always)]
pub fn _bits(&self) -> bool {
match *self {
TIM16_DMA_RMPW::NOTREMAPPED => false,
TIM16_DMA_RMPW::REMAPPED => true,
}
}
}
#[doc = r"Proxy"]
pub struct _TIM16_DMA_RMPW<'a> {
w: &'a mut W,
}
impl<'a> _TIM16_DMA_RMPW<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: TIM16_DMA_RMPW) -> &'a mut W {
{
self.bit(variant._bits())
}
}
#[doc = "TIM16_CH1 and TIM16_UP DMA request mapped on DMA channel 3"]
#[inline(always)]
pub fn not_remapped(self) -> &'a mut W {
self.variant(TIM16_DMA_RMPW::NOTREMAPPED)
}
#[doc = "TIM16_CH1 and TIM16_UP DMA request mapped on DMA channel 4"]
#[inline(always)]
pub fn remapped(self) -> &'a mut W {
self.variant(TIM16_DMA_RMPW::REMAPPED)
}
#[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 `TIM17_DMA_RMP`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum TIM17_DMA_RMPR {
#[doc = "TIM17_CH1 and TIM17_UP DMA request mapped on DMA channel 1"]
NOTREMAPPED,
#[doc = "TIM17_CH1 and TIM17_UP DMA request mapped on DMA channel 2"]
REMAPPED,
}
impl TIM17_DMA_RMPR {
#[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 {
TIM17_DMA_RMPR::NOTREMAPPED => false,
TIM17_DMA_RMPR::REMAPPED => true,
}
}
#[allow(missing_docs)]
#[doc(hidden)]
#[inline(always)]
pub fn _from(value: bool) -> TIM17_DMA_RMPR {
match value {
false => TIM17_DMA_RMPR::NOTREMAPPED,
true => TIM17_DMA_RMPR::REMAPPED,
}
}
#[doc = "Checks if the value of the field is `NOTREMAPPED`"]
#[inline(always)]
pub fn is_not_remapped(&self) -> bool {
*self == TIM17_DMA_RMPR::NOTREMAPPED
}
#[doc = "Checks if the value of the field is `REMAPPED`"]
#[inline(always)]
pub fn is_remapped(&self) -> bool {
*self == TIM17_DMA_RMPR::REMAPPED
}
}
#[doc = "Values that can be written to the field `TIM17_DMA_RMP`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum TIM17_DMA_RMPW {
#[doc = "TIM17_CH1 and TIM17_UP DMA request mapped on DMA channel 1"]
NOTREMAPPED,
#[doc = "TIM17_CH1 and TIM17_UP DMA request mapped on DMA channel 2"]
REMAPPED,
}
impl TIM17_DMA_RMPW {
#[allow(missing_docs)]
#[doc(hidden)]
#[inline(always)]
pub fn _bits(&self) -> bool {
match *self {
TIM17_DMA_RMPW::NOTREMAPPED => false,
TIM17_DMA_RMPW::REMAPPED => true,
}
}
}
#[doc = r"Proxy"]
pub struct _TIM17_DMA_RMPW<'a> {
w: &'a mut W,
}
impl<'a> _TIM17_DMA_RMPW<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: TIM17_DMA_RMPW) -> &'a mut W {
{
self.bit(variant._bits())
}
}
#[doc = "TIM17_CH1 and TIM17_UP DMA request mapped on DMA channel 1"]
#[inline(always)]
pub fn not_remapped(self) -> &'a mut W {
self.variant(TIM17_DMA_RMPW::NOTREMAPPED)
}
#[doc = "TIM17_CH1 and TIM17_UP DMA request mapped on DMA channel 2"]
#[inline(always)]
pub fn remapped(self) -> &'a mut W {
self.variant(TIM17_DMA_RMPW::REMAPPED)
}
#[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 `I2C_PB6_FMP`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum I2C_PB6_FMPR {
#[doc = "PB6 pin operate in standard mode"]
STANDARD,
#[doc = "I2C FM+ mode enabled on PB6 and the Speed control is bypassed"]
FMP,
}
impl I2C_PB6_FMPR {
#[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 {
I2C_PB6_FMPR::STANDARD => false,
I2C_PB6_FMPR::FMP => true,
}
}
#[allow(missing_docs)]
#[doc(hidden)]
#[inline(always)]
pub fn _from(value: bool) -> I2C_PB6_FMPR {
match value {
false => I2C_PB6_FMPR::STANDARD,
true => I2C_PB6_FMPR::FMP,
}
}
#[doc = "Checks if the value of the field is `STANDARD`"]
#[inline(always)]
pub fn is_standard(&self) -> bool {
*self == I2C_PB6_FMPR::STANDARD
}
#[doc = "Checks if the value of the field is `FMP`"]
#[inline(always)]
pub fn is_fmp(&self) -> bool {
*self == I2C_PB6_FMPR::FMP
}
}
#[doc = "Values that can be written to the field `I2C_PB6_FMP`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum I2C_PB6_FMPW {
#[doc = "PB6 pin operate in standard mode"]
STANDARD,
#[doc = "I2C FM+ mode enabled on PB6 and the Speed control is bypassed"]
FMP,
}
impl I2C_PB6_FMPW {
#[allow(missing_docs)]
#[doc(hidden)]
#[inline(always)]
pub fn _bits(&self) -> bool {
match *self {
I2C_PB6_FMPW::STANDARD => false,
I2C_PB6_FMPW::FMP => true,
}
}
}
#[doc = r"Proxy"]
pub struct _I2C_PB6_FMPW<'a> {
w: &'a mut W,
}
impl<'a> _I2C_PB6_FMPW<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: I2C_PB6_FMPW) -> &'a mut W {
{
self.bit(variant._bits())
}
}
#[doc = "PB6 pin operate in standard mode"]
#[inline(always)]
pub fn standard(self) -> &'a mut W {
self.variant(I2C_PB6_FMPW::STANDARD)
}
#[doc = "I2C FM+ mode enabled on PB6 and the Speed control is bypassed"]
#[inline(always)]
pub fn fmp(self) -> &'a mut W {
self.variant(I2C_PB6_FMPW::FMP)
}
#[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 = "Possible values of the field `I2C_PB7_FMP`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum I2C_PB7_FMPR {
#[doc = "PB7 pin operate in standard mode"]
STANDARD,
#[doc = "I2C FM+ mode enabled on PB7 and the Speed control is bypassed"]
FMP,
}
impl I2C_PB7_FMPR {
#[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 {
I2C_PB7_FMPR::STANDARD => false,
I2C_PB7_FMPR::FMP => true,
}
}
#[allow(missing_docs)]
#[doc(hidden)]
#[inline(always)]
pub fn _from(value: bool) -> I2C_PB7_FMPR {
match value {
false => I2C_PB7_FMPR::STANDARD,
true => I2C_PB7_FMPR::FMP,
}
}
#[doc = "Checks if the value of the field is `STANDARD`"]
#[inline(always)]
pub fn is_standard(&self) -> bool {
*self == I2C_PB7_FMPR::STANDARD
}
#[doc = "Checks if the value of the field is `FMP`"]
#[inline(always)]
pub fn is_fmp(&self) -> bool {
*self == I2C_PB7_FMPR::FMP
}
}
#[doc = "Values that can be written to the field `I2C_PB7_FMP`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum I2C_PB7_FMPW {
#[doc = "PB7 pin operate in standard mode"]
STANDARD,
#[doc = "I2C FM+ mode enabled on PB7 and the Speed control is bypassed"]
FMP,
}
impl I2C_PB7_FMPW {
#[allow(missing_docs)]
#[doc(hidden)]
#[inline(always)]
pub fn _bits(&self) -> bool {
match *self {
I2C_PB7_FMPW::STANDARD => false,
I2C_PB7_FMPW::FMP => true,
}
}
}
#[doc = r"Proxy"]
pub struct _I2C_PB7_FMPW<'a> {
w: &'a mut W,
}
impl<'a> _I2C_PB7_FMPW<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: I2C_PB7_FMPW) -> &'a mut W {
{
self.bit(variant._bits())
}
}
#[doc = "PB7 pin operate in standard mode"]
#[inline(always)]
pub fn standard(self) -> &'a mut W {
self.variant(I2C_PB7_FMPW::STANDARD)
}
#[doc = "I2C FM+ mode enabled on PB7 and the Speed control is bypassed"]
#[inline(always)]
pub fn fmp(self) -> &'a mut W {
self.variant(I2C_PB7_FMPW::FMP)
}
#[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 = "Possible values of the field `I2C_PB8_FMP`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum I2C_PB8_FMPR {
#[doc = "PB8 pin operate in standard mode"]
STANDARD,
#[doc = "I2C FM+ mode enabled on PB8 and the Speed control is bypassed"]
FMP,
}
impl I2C_PB8_FMPR {
#[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 {
I2C_PB8_FMPR::STANDARD => false,
I2C_PB8_FMPR::FMP => true,
}
}
#[allow(missing_docs)]
#[doc(hidden)]
#[inline(always)]
pub fn _from(value: bool) -> I2C_PB8_FMPR {
match value {
false => I2C_PB8_FMPR::STANDARD,
true => I2C_PB8_FMPR::FMP,
}
}
#[doc = "Checks if the value of the field is `STANDARD`"]
#[inline(always)]
pub fn is_standard(&self) -> bool {
*self == I2C_PB8_FMPR::STANDARD
}
#[doc = "Checks if the value of the field is `FMP`"]
#[inline(always)]
pub fn is_fmp(&self) -> bool {
*self == I2C_PB8_FMPR::FMP
}
}
#[doc = "Values that can be written to the field `I2C_PB8_FMP`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum I2C_PB8_FMPW {
#[doc = "PB8 pin operate in standard mode"]
STANDARD,
#[doc = "I2C FM+ mode enabled on PB8 and the Speed control is bypassed"]
FMP,
}
impl I2C_PB8_FMPW {
#[allow(missing_docs)]
#[doc(hidden)]
#[inline(always)]
pub fn _bits(&self) -> bool {
match *self {
I2C_PB8_FMPW::STANDARD => false,
I2C_PB8_FMPW::FMP => true,
}
}
}
#[doc = r"Proxy"]
pub struct _I2C_PB8_FMPW<'a> {
w: &'a mut W,
}
impl<'a> _I2C_PB8_FMPW<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: I2C_PB8_FMPW) -> &'a mut W {
{
self.bit(variant._bits())
}
}
#[doc = "PB8 pin operate in standard mode"]
#[inline(always)]
pub fn standard(self) -> &'a mut W {
self.variant(I2C_PB8_FMPW::STANDARD)
}
#[doc = "I2C FM+ mode enabled on PB8 and the Speed control is bypassed"]
#[inline(always)]
pub fn fmp(self) -> &'a mut W {
self.variant(I2C_PB8_FMPW::FMP)
}
#[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 = "Possible values of the field `I2C_PB9_FMP`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum I2C_PB9_FMPR {
#[doc = "PB9 pin operate in standard mode"]
STANDARD,
#[doc = "I2C FM+ mode enabled on PB9 and the Speed control is bypassed"]
FMP,
}
impl I2C_PB9_FMPR {
#[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 {
I2C_PB9_FMPR::STANDARD => false,
I2C_PB9_FMPR::FMP => true,
}
}
#[allow(missing_docs)]
#[doc(hidden)]
#[inline(always)]
pub fn _from(value: bool) -> I2C_PB9_FMPR {
match value {
false => I2C_PB9_FMPR::STANDARD,
true => I2C_PB9_FMPR::FMP,
}
}
#[doc = "Checks if the value of the field is `STANDARD`"]
#[inline(always)]
pub fn is_standard(&self) -> bool {
*self == I2C_PB9_FMPR::STANDARD
}
#[doc = "Checks if the value of the field is `FMP`"]
#[inline(always)]
pub fn is_fmp(&self) -> bool {
*self == I2C_PB9_FMPR::FMP
}
}
#[doc = "Values that can be written to the field `I2C_PB9_FMP`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum I2C_PB9_FMPW {
#[doc = "PB9 pin operate in standard mode"]
STANDARD,
#[doc = "I2C FM+ mode enabled on PB9 and the Speed control is bypassed"]
FMP,
}
impl I2C_PB9_FMPW {
#[allow(missing_docs)]
#[doc(hidden)]
#[inline(always)]
pub fn _bits(&self) -> bool {
match *self {
I2C_PB9_FMPW::STANDARD => false,
I2C_PB9_FMPW::FMP => true,
}
}
}
#[doc = r"Proxy"]
pub struct _I2C_PB9_FMPW<'a> {
w: &'a mut W,
}
impl<'a> _I2C_PB9_FMPW<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: I2C_PB9_FMPW) -> &'a mut W {
{
self.bit(variant._bits())
}
}
#[doc = "PB9 pin operate in standard mode"]
#[inline(always)]
pub fn standard(self) -> &'a mut W {
self.variant(I2C_PB9_FMPW::STANDARD)
}
#[doc = "I2C FM+ mode enabled on PB9 and the Speed control is bypassed"]
#[inline(always)]
pub fn fmp(self) -> &'a mut W {
self.variant(I2C_PB9_FMPW::FMP)
}
#[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 = "Possible values of the field `I2C1_FMP`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum I2C1_FMPR {
#[doc = "FM+ mode is controlled by I2C_Pxx_FMP bits only"]
STANDARD,
#[doc = "FM+ mode is enabled on all I2C1 pins selected through selection bits in GPIOx_AFR registers"]
FMP,
}
impl I2C1_FMPR {
#[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 {
I2C1_FMPR::STANDARD => false,
I2C1_FMPR::FMP => true,
}
}
#[allow(missing_docs)]
#[doc(hidden)]
#[inline(always)]
pub fn _from(value: bool) -> I2C1_FMPR {
match value {
false => I2C1_FMPR::STANDARD,
true => I2C1_FMPR::FMP,
}
}
#[doc = "Checks if the value of the field is `STANDARD`"]
#[inline(always)]
pub fn is_standard(&self) -> bool {
*self == I2C1_FMPR::STANDARD
}
#[doc = "Checks if the value of the field is `FMP`"]
#[inline(always)]
pub fn is_fmp(&self) -> bool {
*self == I2C1_FMPR::FMP
}
}
#[doc = "Values that can be written to the field `I2C1_FMP`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum I2C1_FMPW {
#[doc = "FM+ mode is controlled by I2C_Pxx_FMP bits only"]
STANDARD,
#[doc = "FM+ mode is enabled on all I2C1 pins selected through selection bits in GPIOx_AFR registers"]
FMP,
}
impl I2C1_FMPW {
#[allow(missing_docs)]
#[doc(hidden)]
#[inline(always)]
pub fn _bits(&self) -> bool {
match *self {
I2C1_FMPW::STANDARD => false,
I2C1_FMPW::FMP => true,
}
}
}
#[doc = r"Proxy"]
pub struct _I2C1_FMPW<'a> {
w: &'a mut W,
}
impl<'a> _I2C1_FMPW<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: I2C1_FMPW) -> &'a mut W {
{
self.bit(variant._bits())
}
}
#[doc = "FM+ mode is controlled by I2C_Pxx_FMP bits only"]
#[inline(always)]
pub fn standard(self) -> &'a mut W {
self.variant(I2C1_FMPW::STANDARD)
}
#[doc = "FM+ mode is enabled on all I2C1 pins selected through selection bits in GPIOx_AFR registers"]
#[inline(always)]
pub fn fmp(self) -> &'a mut W {
self.variant(I2C1_FMPW::FMP)
}
#[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 = "Possible values of the field `I2C2_FMP`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum I2C2_FMPR {
#[doc = "FM+ mode is controlled by I2C_Pxx_FMP bits only"]
STANDARD,
#[doc = "FM+ mode is enabled on all I2C2 pins selected through selection bits in GPIOx_AFR registers"]
FMP,
}
impl I2C2_FMPR {
#[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 {
I2C2_FMPR::STANDARD => false,
I2C2_FMPR::FMP => true,
}
}
#[allow(missing_docs)]
#[doc(hidden)]
#[inline(always)]
pub fn _from(value: bool) -> I2C2_FMPR {
match value {
false => I2C2_FMPR::STANDARD,
true => I2C2_FMPR::FMP,
}
}
#[doc = "Checks if the value of the field is `STANDARD`"]
#[inline(always)]
pub fn is_standard(&self) -> bool {
*self == I2C2_FMPR::STANDARD
}
#[doc = "Checks if the value of the field is `FMP`"]
#[inline(always)]
pub fn is_fmp(&self) -> bool {
*self == I2C2_FMPR::FMP
}
}
#[doc = "Values that can be written to the field `I2C2_FMP`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum I2C2_FMPW {
#[doc = "FM+ mode is controlled by I2C_Pxx_FMP bits only"]
STANDARD,
#[doc = "FM+ mode is enabled on all I2C2 pins selected through selection bits in GPIOx_AFR registers"]
FMP,
}
impl I2C2_FMPW {
#[allow(missing_docs)]
#[doc(hidden)]
#[inline(always)]
pub fn _bits(&self) -> bool {
match *self {
I2C2_FMPW::STANDARD => false,
I2C2_FMPW::FMP => true,
}
}
}
#[doc = r"Proxy"]
pub struct _I2C2_FMPW<'a> {
w: &'a mut W,
}
impl<'a> _I2C2_FMPW<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: I2C2_FMPW) -> &'a mut W {
{
self.bit(variant._bits())
}
}
#[doc = "FM+ mode is controlled by I2C_Pxx_FMP bits only"]
#[inline(always)]
pub fn standard(self) -> &'a mut W {
self.variant(I2C2_FMPW::STANDARD)
}
#[doc = "FM+ mode is enabled on all I2C2 pins selected through selection bits in GPIOx_AFR registers"]
#[inline(always)]
pub fn fmp(self) -> &'a mut W {
self.variant(I2C2_FMPW::FMP)
}
#[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 = "Possible values of the field `SPI2_DMA_RMP`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum SPI2_DMA_RMPR {
#[doc = "SPI2_RX and SPI2_TX DMA requests mapped on DMA channel 4 and 5 respectively"]
NOTREMAPPED,
#[doc = "SPI2_RX and SPI2_TX DMA requests mapped on DMA channel 6 and 7 respectively"]
REMAPPED,
}
impl SPI2_DMA_RMPR {
#[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 {
SPI2_DMA_RMPR::NOTREMAPPED => false,
SPI2_DMA_RMPR::REMAPPED => true,
}
}
#[allow(missing_docs)]
#[doc(hidden)]
#[inline(always)]
pub fn _from(value: bool) -> SPI2_DMA_RMPR {
match value {
false => SPI2_DMA_RMPR::NOTREMAPPED,
true => SPI2_DMA_RMPR::REMAPPED,
}
}
#[doc = "Checks if the value of the field is `NOTREMAPPED`"]
#[inline(always)]
pub fn is_not_remapped(&self) -> bool {
*self == SPI2_DMA_RMPR::NOTREMAPPED
}
#[doc = "Checks if the value of the field is `REMAPPED`"]
#[inline(always)]
pub fn is_remapped(&self) -> bool {
*self == SPI2_DMA_RMPR::REMAPPED
}
}
#[doc = "Values that can be written to the field `SPI2_DMA_RMP`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum SPI2_DMA_RMPW {
#[doc = "SPI2_RX and SPI2_TX DMA requests mapped on DMA channel 4 and 5 respectively"]
NOTREMAPPED,
#[doc = "SPI2_RX and SPI2_TX DMA requests mapped on DMA channel 6 and 7 respectively"]
REMAPPED,
}
impl SPI2_DMA_RMPW {
#[allow(missing_docs)]
#[doc(hidden)]
#[inline(always)]
pub fn _bits(&self) -> bool {
match *self {
SPI2_DMA_RMPW::NOTREMAPPED => false,
SPI2_DMA_RMPW::REMAPPED => true,
}
}
}
#[doc = r"Proxy"]
pub struct _SPI2_DMA_RMPW<'a> {
w: &'a mut W,
}
impl<'a> _SPI2_DMA_RMPW<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: SPI2_DMA_RMPW) -> &'a mut W {
{
self.bit(variant._bits())
}
}
#[doc = "SPI2_RX and SPI2_TX DMA requests mapped on DMA channel 4 and 5 respectively"]
#[inline(always)]
pub fn not_remapped(self) -> &'a mut W {
self.variant(SPI2_DMA_RMPW::NOTREMAPPED)
}
#[doc = "SPI2_RX and SPI2_TX DMA requests mapped on DMA channel 6 and 7 respectively"]
#[inline(always)]
pub fn remapped(self) -> &'a mut W {
self.variant(SPI2_DMA_RMPW::REMAPPED)
}
#[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 = "Possible values of the field `USART2_DMA_RMP`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum USART2_DMA_RMPR {
#[doc = "USART2_RX and USART2_TX DMA requests mapped on DMA channel 5 and 4 respectively"]
NOTREMAPPED,
#[doc = "USART2_RX and USART2_TX DMA requests mapped on DMA channel 6 and 7 respectively"]
REMAPPED,
}
impl USART2_DMA_RMPR {
#[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 {
USART2_DMA_RMPR::NOTREMAPPED => false,
USART2_DMA_RMPR::REMAPPED => true,
}
}
#[allow(missing_docs)]
#[doc(hidden)]
#[inline(always)]
pub fn _from(value: bool) -> USART2_DMA_RMPR {
match value {
false => USART2_DMA_RMPR::NOTREMAPPED,
true => USART2_DMA_RMPR::REMAPPED,
}
}
#[doc = "Checks if the value of the field is `NOTREMAPPED`"]
#[inline(always)]
pub fn is_not_remapped(&self) -> bool {
*self == USART2_DMA_RMPR::NOTREMAPPED
}
#[doc = "Checks if the value of the field is `REMAPPED`"]
#[inline(always)]
pub fn is_remapped(&self) -> bool {
*self == USART2_DMA_RMPR::REMAPPED
}
}
#[doc = "Values that can be written to the field `USART2_DMA_RMP`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum USART2_DMA_RMPW {
#[doc = "USART2_RX and USART2_TX DMA requests mapped on DMA channel 5 and 4 respectively"]
NOTREMAPPED,
#[doc = "USART2_RX and USART2_TX DMA requests mapped on DMA channel 6 and 7 respectively"]
REMAPPED,
}
impl USART2_DMA_RMPW {
#[allow(missing_docs)]
#[doc(hidden)]
#[inline(always)]
pub fn _bits(&self) -> bool {
match *self {
USART2_DMA_RMPW::NOTREMAPPED => false,
USART2_DMA_RMPW::REMAPPED => true,
}
}
}
#[doc = r"Proxy"]
pub struct _USART2_DMA_RMPW<'a> {
w: &'a mut W,
}
impl<'a> _USART2_DMA_RMPW<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: USART2_DMA_RMPW) -> &'a mut W {
{
self.bit(variant._bits())
}
}
#[doc = "USART2_RX and USART2_TX DMA requests mapped on DMA channel 5 and 4 respectively"]
#[inline(always)]
pub fn not_remapped(self) -> &'a mut W {
self.variant(USART2_DMA_RMPW::NOTREMAPPED)
}
#[doc = "USART2_RX and USART2_TX DMA requests mapped on DMA channel 6 and 7 respectively"]
#[inline(always)]
pub fn remapped(self) -> &'a mut W {
self.variant(USART2_DMA_RMPW::REMAPPED)
}
#[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 = "Possible values of the field `USART3_DMA_RMP`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum USART3_DMA_RMPR {
#[doc = "USART3_RX and USART3_TX DMA requests mapped on DMA channel 6 and 7 respectively (or simply disabled on STM32F0x0)"]
NOTREMAPPED,
#[doc = "USART3_RX and USART3_TX DMA requests mapped on DMA channel 3 and 2 respectively"]
REMAPPED,
}
impl USART3_DMA_RMPR {
#[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 {
USART3_DMA_RMPR::NOTREMAPPED => false,
USART3_DMA_RMPR::REMAPPED => true,
}
}
#[allow(missing_docs)]
#[doc(hidden)]
#[inline(always)]
pub fn _from(value: bool) -> USART3_DMA_RMPR {
match value {
false => USART3_DMA_RMPR::NOTREMAPPED,
true => USART3_DMA_RMPR::REMAPPED,
}
}
#[doc = "Checks if the value of the field is `NOTREMAPPED`"]
#[inline(always)]
pub fn is_not_remapped(&self) -> bool {
*self == USART3_DMA_RMPR::NOTREMAPPED
}
#[doc = "Checks if the value of the field is `REMAPPED`"]
#[inline(always)]
pub fn is_remapped(&self) -> bool {
*self == USART3_DMA_RMPR::REMAPPED
}
}
#[doc = "Values that can be written to the field `USART3_DMA_RMP`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum USART3_DMA_RMPW {
#[doc = "USART3_RX and USART3_TX DMA requests mapped on DMA channel 6 and 7 respectively (or simply disabled on STM32F0x0)"]
NOTREMAPPED,
#[doc = "USART3_RX and USART3_TX DMA requests mapped on DMA channel 3 and 2 respectively"]
REMAPPED,
}
impl USART3_DMA_RMPW {
#[allow(missing_docs)]
#[doc(hidden)]
#[inline(always)]
pub fn _bits(&self) -> bool {
match *self {
USART3_DMA_RMPW::NOTREMAPPED => false,
USART3_DMA_RMPW::REMAPPED => true,
}
}
}
#[doc = r"Proxy"]
pub struct _USART3_DMA_RMPW<'a> {
w: &'a mut W,
}
impl<'a> _USART3_DMA_RMPW<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: USART3_DMA_RMPW) -> &'a mut W {
{
self.bit(variant._bits())
}
}
#[doc = "USART3_RX and USART3_TX DMA requests mapped on DMA channel 6 and 7 respectively (or simply disabled on STM32F0x0)"]
#[inline(always)]
pub fn not_remapped(self) -> &'a mut W {
self.variant(USART3_DMA_RMPW::NOTREMAPPED)
}
#[doc = "USART3_RX and USART3_TX DMA requests mapped on DMA channel 3 and 2 respectively"]
#[inline(always)]
pub fn remapped(self) -> &'a mut W {
self.variant(USART3_DMA_RMPW::REMAPPED)
}
#[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 = "Possible values of the field `I2C1_DMA_RMP`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum I2C1_DMA_RMPR {
#[doc = "I2C1_RX and I2C1_TX DMA requests mapped on DMA channel 3 and 2 respectively"]
NOTREMAPPED,
#[doc = "I2C1_RX and I2C1_TX DMA requests mapped on DMA channel 7 and 6 respectively"]
REMAPPED,
}
impl I2C1_DMA_RMPR {
#[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 {
I2C1_DMA_RMPR::NOTREMAPPED => false,
I2C1_DMA_RMPR::REMAPPED => true,
}
}
#[allow(missing_docs)]
#[doc(hidden)]
#[inline(always)]
pub fn _from(value: bool) -> I2C1_DMA_RMPR {
match value {
false => I2C1_DMA_RMPR::NOTREMAPPED,
true => I2C1_DMA_RMPR::REMAPPED,
}
}
#[doc = "Checks if the value of the field is `NOTREMAPPED`"]
#[inline(always)]
pub fn is_not_remapped(&self) -> bool {
*self == I2C1_DMA_RMPR::NOTREMAPPED
}
#[doc = "Checks if the value of the field is `REMAPPED`"]
#[inline(always)]
pub fn is_remapped(&self) -> bool {
*self == I2C1_DMA_RMPR::REMAPPED
}
}
#[doc = "Values that can be written to the field `I2C1_DMA_RMP`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum I2C1_DMA_RMPW {
#[doc = "I2C1_RX and I2C1_TX DMA requests mapped on DMA channel 3 and 2 respectively"]
NOTREMAPPED,
#[doc = "I2C1_RX and I2C1_TX DMA requests mapped on DMA channel 7 and 6 respectively"]
REMAPPED,
}
impl I2C1_DMA_RMPW {
#[allow(missing_docs)]
#[doc(hidden)]
#[inline(always)]
pub fn _bits(&self) -> bool {
match *self {
I2C1_DMA_RMPW::NOTREMAPPED => false,
I2C1_DMA_RMPW::REMAPPED => true,
}
}
}
#[doc = r"Proxy"]
pub struct _I2C1_DMA_RMPW<'a> {
w: &'a mut W,
}
impl<'a> _I2C1_DMA_RMPW<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: I2C1_DMA_RMPW) -> &'a mut W {
{
self.bit(variant._bits())
}
}
#[doc = "I2C1_RX and I2C1_TX DMA requests mapped on DMA channel 3 and 2 respectively"]
#[inline(always)]
pub fn not_remapped(self) -> &'a mut W {
self.variant(I2C1_DMA_RMPW::NOTREMAPPED)
}
#[doc = "I2C1_RX and I2C1_TX DMA requests mapped on DMA channel 7 and 6 respectively"]
#[inline(always)]
pub fn remapped(self) -> &'a mut W {
self.variant(I2C1_DMA_RMPW::REMAPPED)
}
#[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 = "Possible values of the field `TIM1_DMA_RMP`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum TIM1_DMA_RMPR {
#[doc = "TIM1_CH1, TIM1_CH2 and TIM1_CH3 DMA requests mapped on DMA channel 2, 3 and 4 respectively"]
NOTREMAPPED,
#[doc = "TIM1_CH1, TIM1_CH2 and TIM1_CH3 DMA requests mapped on DMA channel 6"]
REMAPPED,
}
impl TIM1_DMA_RMPR {
#[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 {
TIM1_DMA_RMPR::NOTREMAPPED => false,
TIM1_DMA_RMPR::REMAPPED => true,
}
}
#[allow(missing_docs)]
#[doc(hidden)]
#[inline(always)]
pub fn _from(value: bool) -> TIM1_DMA_RMPR {
match value {
false => TIM1_DMA_RMPR::NOTREMAPPED,
true => TIM1_DMA_RMPR::REMAPPED,
}
}
#[doc = "Checks if the value of the field is `NOTREMAPPED`"]
#[inline(always)]
pub fn is_not_remapped(&self) -> bool {
*self == TIM1_DMA_RMPR::NOTREMAPPED
}
#[doc = "Checks if the value of the field is `REMAPPED`"]
#[inline(always)]
pub fn is_remapped(&self) -> bool {
*self == TIM1_DMA_RMPR::REMAPPED
}
}
#[doc = "Values that can be written to the field `TIM1_DMA_RMP`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum TIM1_DMA_RMPW {
#[doc = "TIM1_CH1, TIM1_CH2 and TIM1_CH3 DMA requests mapped on DMA channel 2, 3 and 4 respectively"]
NOTREMAPPED,
#[doc = "TIM1_CH1, TIM1_CH2 and TIM1_CH3 DMA requests mapped on DMA channel 6"]
REMAPPED,
}
impl TIM1_DMA_RMPW {
#[allow(missing_docs)]
#[doc(hidden)]
#[inline(always)]
pub fn _bits(&self) -> bool {
match *self {
TIM1_DMA_RMPW::NOTREMAPPED => false,
TIM1_DMA_RMPW::REMAPPED => true,
}
}
}
#[doc = r"Proxy"]
pub struct _TIM1_DMA_RMPW<'a> {
w: &'a mut W,
}
impl<'a> _TIM1_DMA_RMPW<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: TIM1_DMA_RMPW) -> &'a mut W {
{
self.bit(variant._bits())
}
}
#[doc = "TIM1_CH1, TIM1_CH2 and TIM1_CH3 DMA requests mapped on DMA channel 2, 3 and 4 respectively"]
#[inline(always)]
pub fn not_remapped(self) -> &'a mut W {
self.variant(TIM1_DMA_RMPW::NOTREMAPPED)
}
#[doc = "TIM1_CH1, TIM1_CH2 and TIM1_CH3 DMA requests mapped on DMA channel 6"]
#[inline(always)]
pub fn remapped(self) -> &'a mut W {
self.variant(TIM1_DMA_RMPW::REMAPPED)
}
#[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 = "Possible values of the field `TIM2_DMA_RMP`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum TIM2_DMA_RMPR {
#[doc = "TIM2_CH2 and TIM2_CH4 DMA requests mapped on DMA channel 3 and 4 respectively"]
NOTREMAPPED,
#[doc = "TIM2_CH2 and TIM2_CH4 DMA requests mapped on DMA channel 7"]
REMAPPED,
}
impl TIM2_DMA_RMPR {
#[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 {
TIM2_DMA_RMPR::NOTREMAPPED => false,
TIM2_DMA_RMPR::REMAPPED => true,
}
}
#[allow(missing_docs)]
#[doc(hidden)]
#[inline(always)]
pub fn _from(value: bool) -> TIM2_DMA_RMPR {
match value {
false => TIM2_DMA_RMPR::NOTREMAPPED,
true => TIM2_DMA_RMPR::REMAPPED,
}
}
#[doc = "Checks if the value of the field is `NOTREMAPPED`"]
#[inline(always)]
pub fn is_not_remapped(&self) -> bool {
*self == TIM2_DMA_RMPR::NOTREMAPPED
}
#[doc = "Checks if the value of the field is `REMAPPED`"]
#[inline(always)]
pub fn is_remapped(&self) -> bool {
*self == TIM2_DMA_RMPR::REMAPPED
}
}
#[doc = "Values that can be written to the field `TIM2_DMA_RMP`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum TIM2_DMA_RMPW {
#[doc = "TIM2_CH2 and TIM2_CH4 DMA requests mapped on DMA channel 3 and 4 respectively"]
NOTREMAPPED,
#[doc = "TIM2_CH2 and TIM2_CH4 DMA requests mapped on DMA channel 7"]
REMAPPED,
}
impl TIM2_DMA_RMPW {
#[allow(missing_docs)]
#[doc(hidden)]
#[inline(always)]
pub fn _bits(&self) -> bool {
match *self {
TIM2_DMA_RMPW::NOTREMAPPED => false,
TIM2_DMA_RMPW::REMAPPED => true,
}
}
}
#[doc = r"Proxy"]
pub struct _TIM2_DMA_RMPW<'a> {
w: &'a mut W,
}
impl<'a> _TIM2_DMA_RMPW<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: TIM2_DMA_RMPW) -> &'a mut W {
{
self.bit(variant._bits())
}
}
#[doc = "TIM2_CH2 and TIM2_CH4 DMA requests mapped on DMA channel 3 and 4 respectively"]
#[inline(always)]
pub fn not_remapped(self) -> &'a mut W {
self.variant(TIM2_DMA_RMPW::NOTREMAPPED)
}
#[doc = "TIM2_CH2 and TIM2_CH4 DMA requests mapped on DMA channel 7"]
#[inline(always)]
pub fn remapped(self) -> &'a mut W {
self.variant(TIM2_DMA_RMPW::REMAPPED)
}
#[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 = "Possible values of the field `TIM3_DMA_RMP`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum TIM3_DMA_RMPR {
#[doc = "TIM3_CH1 and TIM3_TRIG DMA requests mapped on DMA channel 4"]
NOTREMAPPED,
#[doc = "TIM3_CH1 and TIM3_TRIG DMA requests mapped on DMA channel 6"]
REMAPPED,
}
impl TIM3_DMA_RMPR {
#[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 {
TIM3_DMA_RMPR::NOTREMAPPED => false,
TIM3_DMA_RMPR::REMAPPED => true,
}
}
#[allow(missing_docs)]
#[doc(hidden)]
#[inline(always)]
pub fn _from(value: bool) -> TIM3_DMA_RMPR {
match value {
false => TIM3_DMA_RMPR::NOTREMAPPED,
true => TIM3_DMA_RMPR::REMAPPED,
}
}
#[doc = "Checks if the value of the field is `NOTREMAPPED`"]
#[inline(always)]
pub fn is_not_remapped(&self) -> bool {
*self == TIM3_DMA_RMPR::NOTREMAPPED
}
#[doc = "Checks if the value of the field is `REMAPPED`"]
#[inline(always)]
pub fn is_remapped(&self) -> bool {
*self == TIM3_DMA_RMPR::REMAPPED
}
}
#[doc = "Values that can be written to the field `TIM3_DMA_RMP`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum TIM3_DMA_RMPW {
#[doc = "TIM3_CH1 and TIM3_TRIG DMA requests mapped on DMA channel 4"]
NOTREMAPPED,
#[doc = "TIM3_CH1 and TIM3_TRIG DMA requests mapped on DMA channel 6"]
REMAPPED,
}
impl TIM3_DMA_RMPW {
#[allow(missing_docs)]
#[doc(hidden)]
#[inline(always)]
pub fn _bits(&self) -> bool {
match *self {
TIM3_DMA_RMPW::NOTREMAPPED => false,
TIM3_DMA_RMPW::REMAPPED => true,
}
}
}
#[doc = r"Proxy"]
pub struct _TIM3_DMA_RMPW<'a> {
w: &'a mut W,
}
impl<'a> _TIM3_DMA_RMPW<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: TIM3_DMA_RMPW) -> &'a mut W {
{
self.bit(variant._bits())
}
}
#[doc = "TIM3_CH1 and TIM3_TRIG DMA requests mapped on DMA channel 4"]
#[inline(always)]
pub fn not_remapped(self) -> &'a mut W {
self.variant(TIM3_DMA_RMPW::NOTREMAPPED)
}
#[doc = "TIM3_CH1 and TIM3_TRIG DMA requests mapped on DMA channel 6"]
#[inline(always)]
pub fn remapped(self) -> &'a mut W {
self.variant(TIM3_DMA_RMPW::REMAPPED)
}
#[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 = "Possible values of the field `IR_MOD`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum IR_MODR {
#[doc = "TIM16 selected"]
TIM16,
#[doc = "USART1 selected"]
USART1,
#[doc = "USART4 selected"]
USART4,
#[doc = r"Reserved"]
_Reserved(u8),
}
impl IR_MODR {
#[doc = r"Value of the field as raw bits"]
#[inline(always)]
pub fn bits(&self) -> u8 {
match *self {
IR_MODR::TIM16 => 0,
IR_MODR::USART1 => 0x01,
IR_MODR::USART4 => 0x02,
IR_MODR::_Reserved(bits) => bits,
}
}
#[allow(missing_docs)]
#[doc(hidden)]
#[inline(always)]
pub fn _from(value: u8) -> IR_MODR {
match value {
0 => IR_MODR::TIM16,
1 => IR_MODR::USART1,
2 => IR_MODR::USART4,
i => IR_MODR::_Reserved(i),
}
}
#[doc = "Checks if the value of the field is `TIM16`"]
#[inline(always)]
pub fn is_tim16(&self) -> bool {
*self == IR_MODR::TIM16
}
#[doc = "Checks if the value of the field is `USART1`"]
#[inline(always)]
pub fn is_usart1(&self) -> bool {
*self == IR_MODR::USART1
}
#[doc = "Checks if the value of the field is `USART4`"]
#[inline(always)]
pub fn is_usart4(&self) -> bool {
*self == IR_MODR::USART4
}
}
#[doc = "Values that can be written to the field `IR_MOD`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum IR_MODW {
#[doc = "TIM16 selected"]
TIM16,
#[doc = "USART1 selected"]
USART1,
#[doc = "USART4 selected"]
USART4,
}
impl IR_MODW {
#[allow(missing_docs)]
#[doc(hidden)]
#[inline(always)]
pub fn _bits(&self) -> u8 {
match *self {
IR_MODW::TIM16 => 0,
IR_MODW::USART1 => 1,
IR_MODW::USART4 => 2,
}
}
}
#[doc = r"Proxy"]
pub struct _IR_MODW<'a> {
w: &'a mut W,
}
impl<'a> _IR_MODW<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: IR_MODW) -> &'a mut W {
unsafe { self.bits(variant._bits()) }
}
#[doc = "TIM16 selected"]
#[inline(always)]
pub fn tim16(self) -> &'a mut W {
self.variant(IR_MODW::TIM16)
}
#[doc = "USART1 selected"]
#[inline(always)]
pub fn usart1(self) -> &'a mut W {
self.variant(IR_MODW::USART1)
}
#[doc = "USART4 selected"]
#[inline(always)]
pub fn usart4(self) -> &'a mut W {
self.variant(IR_MODW::USART4)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits &= !(0x03 << 6);
self.w.bits |= ((value as u32) & 0x03) << 6;
self.w
}
}
#[doc = "Possible values of the field `TIM16_DMA_RMP2`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum TIM16_DMA_RMP2R {
#[doc = "TIM16 DMA request mapped according to TIM16_DMA_RMP bit"]
NOTALTERNATEREMAPPED,
#[doc = "TIM16_CH1 and TIM16_UP DMA request mapped on DMA channel 6"]
ALTERNATEREMAPPED,
}
impl TIM16_DMA_RMP2R {
#[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 {
TIM16_DMA_RMP2R::NOTALTERNATEREMAPPED => false,
TIM16_DMA_RMP2R::ALTERNATEREMAPPED => true,
}
}
#[allow(missing_docs)]
#[doc(hidden)]
#[inline(always)]
pub fn _from(value: bool) -> TIM16_DMA_RMP2R {
match value {
false => TIM16_DMA_RMP2R::NOTALTERNATEREMAPPED,
true => TIM16_DMA_RMP2R::ALTERNATEREMAPPED,
}
}
#[doc = "Checks if the value of the field is `NOTALTERNATEREMAPPED`"]
#[inline(always)]
pub fn is_not_alternate_remapped(&self) -> bool {
*self == TIM16_DMA_RMP2R::NOTALTERNATEREMAPPED
}
#[doc = "Checks if the value of the field is `ALTERNATEREMAPPED`"]
#[inline(always)]
pub fn is_alternate_remapped(&self) -> bool {
*self == TIM16_DMA_RMP2R::ALTERNATEREMAPPED
}
}
#[doc = "Values that can be written to the field `TIM16_DMA_RMP2`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum TIM16_DMA_RMP2W {
#[doc = "TIM16 DMA request mapped according to TIM16_DMA_RMP bit"]
NOTALTERNATEREMAPPED,
#[doc = "TIM16_CH1 and TIM16_UP DMA request mapped on DMA channel 6"]
ALTERNATEREMAPPED,
}
impl TIM16_DMA_RMP2W {
#[allow(missing_docs)]
#[doc(hidden)]
#[inline(always)]
pub fn _bits(&self) -> bool {
match *self {
TIM16_DMA_RMP2W::NOTALTERNATEREMAPPED => false,
TIM16_DMA_RMP2W::ALTERNATEREMAPPED => true,
}
}
}
#[doc = r"Proxy"]
pub struct _TIM16_DMA_RMP2W<'a> {
w: &'a mut W,
}
impl<'a> _TIM16_DMA_RMP2W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: TIM16_DMA_RMP2W) -> &'a mut W {
{
self.bit(variant._bits())
}
}
#[doc = "TIM16 DMA request mapped according to TIM16_DMA_RMP bit"]
#[inline(always)]
pub fn not_alternate_remapped(self) -> &'a mut W {
self.variant(TIM16_DMA_RMP2W::NOTALTERNATEREMAPPED)
}
#[doc = "TIM16_CH1 and TIM16_UP DMA request mapped on DMA channel 6"]
#[inline(always)]
pub fn alternate_remapped(self) -> &'a mut W {
self.variant(TIM16_DMA_RMP2W::ALTERNATEREMAPPED)
}
#[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 `TIM17_DMA_RMP2`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum TIM17_DMA_RMP2R {
#[doc = "TIM17 DMA request mapped according to TIM16_DMA_RMP bit"]
NOTALTERNATEREMAPPED,
#[doc = "TIM17_CH1 and TIM17_UP DMA request mapped on DMA channel 7"]
ALTERNATEREMAPPED,
}
impl TIM17_DMA_RMP2R {
#[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 {
TIM17_DMA_RMP2R::NOTALTERNATEREMAPPED => false,
TIM17_DMA_RMP2R::ALTERNATEREMAPPED => true,
}
}
#[allow(missing_docs)]
#[doc(hidden)]
#[inline(always)]
pub fn _from(value: bool) -> TIM17_DMA_RMP2R {
match value {
false => TIM17_DMA_RMP2R::NOTALTERNATEREMAPPED,
true => TIM17_DMA_RMP2R::ALTERNATEREMAPPED,
}
}
#[doc = "Checks if the value of the field is `NOTALTERNATEREMAPPED`"]
#[inline(always)]
pub fn is_not_alternate_remapped(&self) -> bool {
*self == TIM17_DMA_RMP2R::NOTALTERNATEREMAPPED
}
#[doc = "Checks if the value of the field is `ALTERNATEREMAPPED`"]
#[inline(always)]
pub fn is_alternate_remapped(&self) -> bool {
*self == TIM17_DMA_RMP2R::ALTERNATEREMAPPED
}
}
#[doc = "Values that can be written to the field `TIM17_DMA_RMP2`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum TIM17_DMA_RMP2W {
#[doc = "TIM17 DMA request mapped according to TIM16_DMA_RMP bit"]
NOTALTERNATEREMAPPED,
#[doc = "TIM17_CH1 and TIM17_UP DMA request mapped on DMA channel 7"]
ALTERNATEREMAPPED,
}
impl TIM17_DMA_RMP2W {
#[allow(missing_docs)]
#[doc(hidden)]
#[inline(always)]
pub fn _bits(&self) -> bool {
match *self {
TIM17_DMA_RMP2W::NOTALTERNATEREMAPPED => false,
TIM17_DMA_RMP2W::ALTERNATEREMAPPED => true,
}
}
}
#[doc = r"Proxy"]
pub struct _TIM17_DMA_RMP2W<'a> {
w: &'a mut W,
}
impl<'a> _TIM17_DMA_RMP2W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: TIM17_DMA_RMP2W) -> &'a mut W {
{
self.bit(variant._bits())
}
}
#[doc = "TIM17 DMA request mapped according to TIM16_DMA_RMP bit"]
#[inline(always)]
pub fn not_alternate_remapped(self) -> &'a mut W {
self.variant(TIM17_DMA_RMP2W::NOTALTERNATEREMAPPED)
}
#[doc = "TIM17_CH1 and TIM17_UP DMA request mapped on DMA channel 7"]
#[inline(always)]
pub fn alternate_remapped(self) -> &'a mut W {
self.variant(TIM17_DMA_RMP2W::ALTERNATEREMAPPED)
}
#[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 `PA11_PA12_RMP`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum PA11_PA12_RMPR {
#[doc = "Pin pair PA9/PA10 mapped on the pins"]
NOTREMAPPED,
#[doc = "Pin pair PA11/PA12 mapped instead of PA9/PA10"]
REMAPPED,
}
impl PA11_PA12_RMPR {
#[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 {
PA11_PA12_RMPR::NOTREMAPPED => false,
PA11_PA12_RMPR::REMAPPED => true,
}
}
#[allow(missing_docs)]
#[doc(hidden)]
#[inline(always)]
pub fn _from(value: bool) -> PA11_PA12_RMPR {
match value {
false => PA11_PA12_RMPR::NOTREMAPPED,
true => PA11_PA12_RMPR::REMAPPED,
}
}
#[doc = "Checks if the value of the field is `NOTREMAPPED`"]
#[inline(always)]
pub fn is_not_remapped(&self) -> bool {
*self == PA11_PA12_RMPR::NOTREMAPPED
}
#[doc = "Checks if the value of the field is `REMAPPED`"]
#[inline(always)]
pub fn is_remapped(&self) -> bool {
*self == PA11_PA12_RMPR::REMAPPED
}
}
#[doc = "Values that can be written to the field `PA11_PA12_RMP`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum PA11_PA12_RMPW {
#[doc = "Pin pair PA9/PA10 mapped on the pins"]
NOTREMAPPED,
#[doc = "Pin pair PA11/PA12 mapped instead of PA9/PA10"]
REMAPPED,
}
impl PA11_PA12_RMPW {
#[allow(missing_docs)]
#[doc(hidden)]
#[inline(always)]
pub fn _bits(&self) -> bool {
match *self {
PA11_PA12_RMPW::NOTREMAPPED => false,
PA11_PA12_RMPW::REMAPPED => true,
}
}
}
#[doc = r"Proxy"]
pub struct _PA11_PA12_RMPW<'a> {
w: &'a mut W,
}
impl<'a> _PA11_PA12_RMPW<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: PA11_PA12_RMPW) -> &'a mut W {
{
self.bit(variant._bits())
}
}
#[doc = "Pin pair PA9/PA10 mapped on the pins"]
#[inline(always)]
pub fn not_remapped(self) -> &'a mut W {
self.variant(PA11_PA12_RMPW::NOTREMAPPED)
}
#[doc = "Pin pair PA11/PA12 mapped instead of PA9/PA10"]
#[inline(always)]
pub fn remapped(self) -> &'a mut W {
self.variant(PA11_PA12_RMPW::REMAPPED)
}
#[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 `I2C_PA9_FMP`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum I2C_PA9_FMPR {
#[doc = "PA9 pin operate in standard mode"]
STANDARD,
#[doc = "I2C FM+ mode enabled on PA9 and the Speed control is bypassed"]
FMP,
}
impl I2C_PA9_FMPR {
#[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 {
I2C_PA9_FMPR::STANDARD => false,
I2C_PA9_FMPR::FMP => true,
}
}
#[allow(missing_docs)]
#[doc(hidden)]
#[inline(always)]
pub fn _from(value: bool) -> I2C_PA9_FMPR {
match value {
false => I2C_PA9_FMPR::STANDARD,
true => I2C_PA9_FMPR::FMP,
}
}
#[doc = "Checks if the value of the field is `STANDARD`"]
#[inline(always)]
pub fn is_standard(&self) -> bool {
*self == I2C_PA9_FMPR::STANDARD
}
#[doc = "Checks if the value of the field is `FMP`"]
#[inline(always)]
pub fn is_fmp(&self) -> bool {
*self == I2C_PA9_FMPR::FMP
}
}
#[doc = "Values that can be written to the field `I2C_PA9_FMP`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum I2C_PA9_FMPW {
#[doc = "PA9 pin operate in standard mode"]
STANDARD,
#[doc = "I2C FM+ mode enabled on PA9 and the Speed control is bypassed"]
FMP,
}
impl I2C_PA9_FMPW {
#[allow(missing_docs)]
#[doc(hidden)]
#[inline(always)]
pub fn _bits(&self) -> bool {
match *self {
I2C_PA9_FMPW::STANDARD => false,
I2C_PA9_FMPW::FMP => true,
}
}
}
#[doc = r"Proxy"]
pub struct _I2C_PA9_FMPW<'a> {
w: &'a mut W,
}
impl<'a> _I2C_PA9_FMPW<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: I2C_PA9_FMPW) -> &'a mut W {
{
self.bit(variant._bits())
}
}
#[doc = "PA9 pin operate in standard mode"]
#[inline(always)]
pub fn standard(self) -> &'a mut W {
self.variant(I2C_PA9_FMPW::STANDARD)
}
#[doc = "I2C FM+ mode enabled on PA9 and the Speed control is bypassed"]
#[inline(always)]
pub fn fmp(self) -> &'a mut W {
self.variant(I2C_PA9_FMPW::FMP)
}
#[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 = "Possible values of the field `I2C_PA10_FMP`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum I2C_PA10_FMPR {
#[doc = "PA10 pin operate in standard mode"]
STANDARD,
#[doc = "I2C FM+ mode enabled on PA10 and the Speed control is bypassed"]
FMP,
}
impl I2C_PA10_FMPR {
#[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 {
I2C_PA10_FMPR::STANDARD => false,
I2C_PA10_FMPR::FMP => true,
}
}
#[allow(missing_docs)]
#[doc(hidden)]
#[inline(always)]
pub fn _from(value: bool) -> I2C_PA10_FMPR {
match value {
false => I2C_PA10_FMPR::STANDARD,
true => I2C_PA10_FMPR::FMP,
}
}
#[doc = "Checks if the value of the field is `STANDARD`"]
#[inline(always)]
pub fn is_standard(&self) -> bool {
*self == I2C_PA10_FMPR::STANDARD
}
#[doc = "Checks if the value of the field is `FMP`"]
#[inline(always)]
pub fn is_fmp(&self) -> bool {
*self == I2C_PA10_FMPR::FMP
}
}
#[doc = "Values that can be written to the field `I2C_PA10_FMP`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum I2C_PA10_FMPW {
#[doc = "PA10 pin operate in standard mode"]
STANDARD,
#[doc = "I2C FM+ mode enabled on PA10 and the Speed control is bypassed"]
FMP,
}
impl I2C_PA10_FMPW {
#[allow(missing_docs)]
#[doc(hidden)]
#[inline(always)]
pub fn _bits(&self) -> bool {
match *self {
I2C_PA10_FMPW::STANDARD => false,
I2C_PA10_FMPW::FMP => true,
}
}
}
#[doc = r"Proxy"]
pub struct _I2C_PA10_FMPW<'a> {
w: &'a mut W,
}
impl<'a> _I2C_PA10_FMPW<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: I2C_PA10_FMPW) -> &'a mut W {
{
self.bit(variant._bits())
}
}
#[doc = "PA10 pin operate in standard mode"]
#[inline(always)]
pub fn standard(self) -> &'a mut W {
self.variant(I2C_PA10_FMPW::STANDARD)
}
#[doc = "I2C FM+ mode enabled on PA10 and the Speed control is bypassed"]
#[inline(always)]
pub fn fmp(self) -> &'a mut W {
self.variant(I2C_PA10_FMPW::FMP)
}
#[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
}
}
impl R {
#[doc = r"Value of the register as raw bits"]
#[inline(always)]
pub fn bits(&self) -> u32 {
self.bits
}
#[doc = "Bits 0:1 - Memory mapping selection bits"]
#[inline(always)]
pub fn mem_mode(&self) -> MEM_MODER {
MEM_MODER::_from(((self.bits >> 0) & 0x03) as u8)
}
#[doc = "Bit 8 - ADC DMA remapping bit"]
#[inline(always)]
pub fn adc_dma_rmp(&self) -> ADC_DMA_RMPR {
ADC_DMA_RMPR::_from(((self.bits >> 8) & 0x01) != 0)
}
#[doc = "Bit 9 - USART1_TX DMA remapping bit"]
#[inline(always)]
pub fn usart1_tx_dma_rmp(&self) -> USART1_TX_DMA_RMPR {
USART1_TX_DMA_RMPR::_from(((self.bits >> 9) & 0x01) != 0)
}
#[doc = "Bit 10 - USART1_RX DMA request remapping bit"]
#[inline(always)]
pub fn usart1_rx_dma_rmp(&self) -> USART1_RX_DMA_RMPR {
USART1_RX_DMA_RMPR::_from(((self.bits >> 10) & 0x01) != 0)
}
#[doc = "Bit 11 - TIM16 DMA request remapping bit"]
#[inline(always)]
pub fn tim16_dma_rmp(&self) -> TIM16_DMA_RMPR {
TIM16_DMA_RMPR::_from(((self.bits >> 11) & 0x01) != 0)
}
#[doc = "Bit 12 - TIM17 DMA request remapping bit"]
#[inline(always)]
pub fn tim17_dma_rmp(&self) -> TIM17_DMA_RMPR {
TIM17_DMA_RMPR::_from(((self.bits >> 12) & 0x01) != 0)
}
#[doc = "Bit 16 - Fast Mode Plus (FM plus) driving capability activation bits."]
#[inline(always)]
pub fn i2c_pb6_fmp(&self) -> I2C_PB6_FMPR {
I2C_PB6_FMPR::_from(((self.bits >> 16) & 0x01) != 0)
}
#[doc = "Bit 17 - Fast Mode Plus (FM+) driving capability activation bits."]
#[inline(always)]
pub fn i2c_pb7_fmp(&self) -> I2C_PB7_FMPR {
I2C_PB7_FMPR::_from(((self.bits >> 17) & 0x01) != 0)
}
#[doc = "Bit 18 - Fast Mode Plus (FM+) driving capability activation bits."]
#[inline(always)]
pub fn i2c_pb8_fmp(&self) -> I2C_PB8_FMPR {
I2C_PB8_FMPR::_from(((self.bits >> 18) & 0x01) != 0)
}
#[doc = "Bit 19 - Fast Mode Plus (FM+) driving capability activation bits."]
#[inline(always)]
pub fn i2c_pb9_fmp(&self) -> I2C_PB9_FMPR {
I2C_PB9_FMPR::_from(((self.bits >> 19) & 0x01) != 0)
}
#[doc = "Bit 20 - FM+ driving capability activation for I2C1"]
#[inline(always)]
pub fn i2c1_fmp(&self) -> I2C1_FMPR {
I2C1_FMPR::_from(((self.bits >> 20) & 0x01) != 0)
}
#[doc = "Bit 21 - FM+ driving capability activation for I2C2"]
#[inline(always)]
pub fn i2c2_fmp(&self) -> I2C2_FMPR {
I2C2_FMPR::_from(((self.bits >> 21) & 0x01) != 0)
}
#[doc = "Bit 24 - SPI2 DMA request remapping bit"]
#[inline(always)]
pub fn spi2_dma_rmp(&self) -> SPI2_DMA_RMPR {
SPI2_DMA_RMPR::_from(((self.bits >> 24) & 0x01) != 0)
}
#[doc = "Bit 25 - USART2 DMA request remapping bit"]
#[inline(always)]
pub fn usart2_dma_rmp(&self) -> USART2_DMA_RMPR {
USART2_DMA_RMPR::_from(((self.bits >> 25) & 0x01) != 0)
}
#[doc = "Bit 26 - USART3 DMA request remapping bit"]
#[inline(always)]
pub fn usart3_dma_rmp(&self) -> USART3_DMA_RMPR {
USART3_DMA_RMPR::_from(((self.bits >> 26) & 0x01) != 0)
}
#[doc = "Bit 27 - I2C1 DMA request remapping bit"]
#[inline(always)]
pub fn i2c1_dma_rmp(&self) -> I2C1_DMA_RMPR {
I2C1_DMA_RMPR::_from(((self.bits >> 27) & 0x01) != 0)
}
#[doc = "Bit 28 - TIM1 DMA request remapping bit"]
#[inline(always)]
pub fn tim1_dma_rmp(&self) -> TIM1_DMA_RMPR {
TIM1_DMA_RMPR::_from(((self.bits >> 28) & 0x01) != 0)
}
#[doc = "Bit 29 - TIM2 DMA request remapping bit"]
#[inline(always)]
pub fn tim2_dma_rmp(&self) -> TIM2_DMA_RMPR {
TIM2_DMA_RMPR::_from(((self.bits >> 29) & 0x01) != 0)
}
#[doc = "Bit 30 - TIM3 DMA request remapping bit"]
#[inline(always)]
pub fn tim3_dma_rmp(&self) -> TIM3_DMA_RMPR {
TIM3_DMA_RMPR::_from(((self.bits >> 30) & 0x01) != 0)
}
#[doc = "Bits 6:7 - IR Modulation Envelope signal selection"]
#[inline(always)]
pub fn ir_mod(&self) -> IR_MODR {
IR_MODR::_from(((self.bits >> 6) & 0x03) as u8)
}
#[doc = "Bit 13 - TIM16 alternate DMA request remapping bit"]
#[inline(always)]
pub fn tim16_dma_rmp2(&self) -> TIM16_DMA_RMP2R {
TIM16_DMA_RMP2R::_from(((self.bits >> 13) & 0x01) != 0)
}
#[doc = "Bit 14 - TIM17 alternate DMA request remapping bit"]
#[inline(always)]
pub fn tim17_dma_rmp2(&self) -> TIM17_DMA_RMP2R {
TIM17_DMA_RMP2R::_from(((self.bits >> 14) & 0x01) != 0)
}
#[doc = "Bit 4 - PA11 and PA12 remapping bit for small packages (28 and 20 pins)"]
#[inline(always)]
pub fn pa11_pa12_rmp(&self) -> PA11_PA12_RMPR {
PA11_PA12_RMPR::_from(((self.bits >> 4) & 0x01) != 0)
}
#[doc = "Bit 22 - Fast Mode Plus (FM+) driving capability activation bits"]
#[inline(always)]
pub fn i2c_pa9_fmp(&self) -> I2C_PA9_FMPR {
I2C_PA9_FMPR::_from(((self.bits >> 22) & 0x01) != 0)
}
#[doc = "Bit 23 - Fast Mode Plus (FM+) driving capability activation bits"]
#[inline(always)]
pub fn i2c_pa10_fmp(&self) -> I2C_PA10_FMPR {
I2C_PA10_FMPR::_from(((self.bits >> 23) & 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 = "Bits 0:1 - Memory mapping selection bits"]
#[inline(always)]
pub fn mem_mode(&mut self) -> _MEM_MODEW {
_MEM_MODEW { w: self }
}
#[doc = "Bit 8 - ADC DMA remapping bit"]
#[inline(always)]
pub fn adc_dma_rmp(&mut self) -> _ADC_DMA_RMPW {
_ADC_DMA_RMPW { w: self }
}
#[doc = "Bit 9 - USART1_TX DMA remapping bit"]
#[inline(always)]
pub fn usart1_tx_dma_rmp(&mut self) -> _USART1_TX_DMA_RMPW {
_USART1_TX_DMA_RMPW { w: self }
}
#[doc = "Bit 10 - USART1_RX DMA request remapping bit"]
#[inline(always)]
pub fn usart1_rx_dma_rmp(&mut self) -> _USART1_RX_DMA_RMPW {
_USART1_RX_DMA_RMPW { w: self }
}
#[doc = "Bit 11 - TIM16 DMA request remapping bit"]
#[inline(always)]
pub fn tim16_dma_rmp(&mut self) -> _TIM16_DMA_RMPW {
_TIM16_DMA_RMPW { w: self }
}
#[doc = "Bit 12 - TIM17 DMA request remapping bit"]
#[inline(always)]
pub fn tim17_dma_rmp(&mut self) -> _TIM17_DMA_RMPW {
_TIM17_DMA_RMPW { w: self }
}
#[doc = "Bit 16 - Fast Mode Plus (FM plus) driving capability activation bits."]
#[inline(always)]
pub fn i2c_pb6_fmp(&mut self) -> _I2C_PB6_FMPW {
_I2C_PB6_FMPW { w: self }
}
#[doc = "Bit 17 - Fast Mode Plus (FM+) driving capability activation bits."]
#[inline(always)]
pub fn i2c_pb7_fmp(&mut self) -> _I2C_PB7_FMPW {
_I2C_PB7_FMPW { w: self }
}
#[doc = "Bit 18 - Fast Mode Plus (FM+) driving capability activation bits."]
#[inline(always)]
pub fn i2c_pb8_fmp(&mut self) -> _I2C_PB8_FMPW {
_I2C_PB8_FMPW { w: self }
}
#[doc = "Bit 19 - Fast Mode Plus (FM+) driving capability activation bits."]
#[inline(always)]
pub fn i2c_pb9_fmp(&mut self) -> _I2C_PB9_FMPW {
_I2C_PB9_FMPW { w: self }
}
#[doc = "Bit 20 - FM+ driving capability activation for I2C1"]
#[inline(always)]
pub fn i2c1_fmp(&mut self) -> _I2C1_FMPW {
_I2C1_FMPW { w: self }
}
#[doc = "Bit 21 - FM+ driving capability activation for I2C2"]
#[inline(always)]
pub fn i2c2_fmp(&mut self) -> _I2C2_FMPW {
_I2C2_FMPW { w: self }
}
#[doc = "Bit 24 - SPI2 DMA request remapping bit"]
#[inline(always)]
pub fn spi2_dma_rmp(&mut self) -> _SPI2_DMA_RMPW {
_SPI2_DMA_RMPW { w: self }
}
#[doc = "Bit 25 - USART2 DMA request remapping bit"]
#[inline(always)]
pub fn usart2_dma_rmp(&mut self) -> _USART2_DMA_RMPW {
_USART2_DMA_RMPW { w: self }
}
#[doc = "Bit 26 - USART3 DMA request remapping bit"]
#[inline(always)]
pub fn usart3_dma_rmp(&mut self) -> _USART3_DMA_RMPW {
_USART3_DMA_RMPW { w: self }
}
#[doc = "Bit 27 - I2C1 DMA request remapping bit"]
#[inline(always)]
pub fn i2c1_dma_rmp(&mut self) -> _I2C1_DMA_RMPW {
_I2C1_DMA_RMPW { w: self }
}
#[doc = "Bit 28 - TIM1 DMA request remapping bit"]
#[inline(always)]
pub fn tim1_dma_rmp(&mut self) -> _TIM1_DMA_RMPW {
_TIM1_DMA_RMPW { w: self }
}
#[doc = "Bit 29 - TIM2 DMA request remapping bit"]
#[inline(always)]
pub fn tim2_dma_rmp(&mut self) -> _TIM2_DMA_RMPW {
_TIM2_DMA_RMPW { w: self }
}
#[doc = "Bit 30 - TIM3 DMA request remapping bit"]
#[inline(always)]
pub fn tim3_dma_rmp(&mut self) -> _TIM3_DMA_RMPW {
_TIM3_DMA_RMPW { w: self }
}
#[doc = "Bits 6:7 - IR Modulation Envelope signal selection"]
#[inline(always)]
pub fn ir_mod(&mut self) -> _IR_MODW {
_IR_MODW { w: self }
}
#[doc = "Bit 13 - TIM16 alternate DMA request remapping bit"]
#[inline(always)]
pub fn tim16_dma_rmp2(&mut self) -> _TIM16_DMA_RMP2W {
_TIM16_DMA_RMP2W { w: self }
}
#[doc = "Bit 14 - TIM17 alternate DMA request remapping bit"]
#[inline(always)]
pub fn tim17_dma_rmp2(&mut self) -> _TIM17_DMA_RMP2W {
_TIM17_DMA_RMP2W { w: self }
}
#[doc = "Bit 4 - PA11 and PA12 remapping bit for small packages (28 and 20 pins)"]
#[inline(always)]
pub fn pa11_pa12_rmp(&mut self) -> _PA11_PA12_RMPW {
_PA11_PA12_RMPW { w: self }
}
#[doc = "Bit 22 - Fast Mode Plus (FM+) driving capability activation bits"]
#[inline(always)]
pub fn i2c_pa9_fmp(&mut self) -> _I2C_PA9_FMPW {
_I2C_PA9_FMPW { w: self }
}
#[doc = "Bit 23 - Fast Mode Plus (FM+) driving capability activation bits"]
#[inline(always)]
pub fn i2c_pa10_fmp(&mut self) -> _I2C_PA10_FMPW {
_I2C_PA10_FMPW { w: self }
}
}