#[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::MAPR2 {
#[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 = r"Value of the field"]
pub struct TIM15_REMAPR {
bits: bool,
}
impl TIM15_REMAPR {
#[doc = r"Value of the field as raw bits"]
#[inline(always)]
pub fn bit(&self) -> bool {
self.bits
}
#[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"Proxy"]
pub struct _TIM15_REMAPW<'a> {
w: &'a mut W,
}
impl<'a> _TIM15_REMAPW<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits &= !(0x01 << 0);
self.w.bits |= ((value as u32) & 0x01) << 0;
self.w
}
}
#[doc = r"Value of the field"]
pub struct TIM16_REMAPR {
bits: bool,
}
impl TIM16_REMAPR {
#[doc = r"Value of the field as raw bits"]
#[inline(always)]
pub fn bit(&self) -> bool {
self.bits
}
#[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"Proxy"]
pub struct _TIM16_REMAPW<'a> {
w: &'a mut W,
}
impl<'a> _TIM16_REMAPW<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits &= !(0x01 << 1);
self.w.bits |= ((value as u32) & 0x01) << 1;
self.w
}
}
#[doc = r"Value of the field"]
pub struct TIM17_REMAPR {
bits: bool,
}
impl TIM17_REMAPR {
#[doc = r"Value of the field as raw bits"]
#[inline(always)]
pub fn bit(&self) -> bool {
self.bits
}
#[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"Proxy"]
pub struct _TIM17_REMAPW<'a> {
w: &'a mut W,
}
impl<'a> _TIM17_REMAPW<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits &= !(0x01 << 2);
self.w.bits |= ((value as u32) & 0x01) << 2;
self.w
}
}
#[doc = r"Value of the field"]
pub struct TIM13_REMAPR {
bits: bool,
}
impl TIM13_REMAPR {
#[doc = r"Value of the field as raw bits"]
#[inline(always)]
pub fn bit(&self) -> bool {
self.bits
}
#[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"Proxy"]
pub struct _TIM13_REMAPW<'a> {
w: &'a mut W,
}
impl<'a> _TIM13_REMAPW<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits &= !(0x01 << 8);
self.w.bits |= ((value as u32) & 0x01) << 8;
self.w
}
}
#[doc = r"Value of the field"]
pub struct TIM14_REMAPR {
bits: bool,
}
impl TIM14_REMAPR {
#[doc = r"Value of the field as raw bits"]
#[inline(always)]
pub fn bit(&self) -> bool {
self.bits
}
#[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"Proxy"]
pub struct _TIM14_REMAPW<'a> {
w: &'a mut W,
}
impl<'a> _TIM14_REMAPW<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits &= !(0x01 << 9);
self.w.bits |= ((value as u32) & 0x01) << 9;
self.w
}
}
#[doc = r"Value of the field"]
pub struct FSMC_NADVR {
bits: bool,
}
impl FSMC_NADVR {
#[doc = r"Value of the field as raw bits"]
#[inline(always)]
pub fn bit(&self) -> bool {
self.bits
}
#[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"Proxy"]
pub struct _FSMC_NADVW<'a> {
w: &'a mut W,
}
impl<'a> _FSMC_NADVW<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits &= !(0x01 << 10);
self.w.bits |= ((value as u32) & 0x01) << 10;
self.w
}
}
#[doc = r"Value of the field"]
pub struct CEC_REMAPR {
bits: bool,
}
impl CEC_REMAPR {
#[doc = r"Value of the field as raw bits"]
#[inline(always)]
pub fn bit(&self) -> bool {
self.bits
}
#[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"Proxy"]
pub struct _CEC_REMAPW<'a> {
w: &'a mut W,
}
impl<'a> _CEC_REMAPW<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits &= !(0x01 << 3);
self.w.bits |= ((value as u32) & 0x01) << 3;
self.w
}
}
#[doc = r"Value of the field"]
pub struct TIM1_DMA_REMAPR {
bits: bool,
}
impl TIM1_DMA_REMAPR {
#[doc = r"Value of the field as raw bits"]
#[inline(always)]
pub fn bit(&self) -> bool {
self.bits
}
#[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"Proxy"]
pub struct _TIM1_DMA_REMAPW<'a> {
w: &'a mut W,
}
impl<'a> _TIM1_DMA_REMAPW<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits &= !(0x01 << 4);
self.w.bits |= ((value as u32) & 0x01) << 4;
self.w
}
}
#[doc = r"Value of the field"]
pub struct TIM67_DAC_DMA_REMAPR {
bits: bool,
}
impl TIM67_DAC_DMA_REMAPR {
#[doc = r"Value of the field as raw bits"]
#[inline(always)]
pub fn bit(&self) -> bool {
self.bits
}
#[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"Proxy"]
pub struct _TIM67_DAC_DMA_REMAPW<'a> {
w: &'a mut W,
}
impl<'a> _TIM67_DAC_DMA_REMAPW<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits &= !(0x01 << 11);
self.w.bits |= ((value as u32) & 0x01) << 11;
self.w
}
}
#[doc = r"Value of the field"]
pub struct TIM12_REMAPR {
bits: bool,
}
impl TIM12_REMAPR {
#[doc = r"Value of the field as raw bits"]
#[inline(always)]
pub fn bit(&self) -> bool {
self.bits
}
#[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"Proxy"]
pub struct _TIM12_REMAPW<'a> {
w: &'a mut W,
}
impl<'a> _TIM12_REMAPW<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits &= !(0x01 << 12);
self.w.bits |= ((value as u32) & 0x01) << 12;
self.w
}
}
#[doc = r"Value of the field"]
pub struct MISC_REMAPR {
bits: bool,
}
impl MISC_REMAPR {
#[doc = r"Value of the field as raw bits"]
#[inline(always)]
pub fn bit(&self) -> bool {
self.bits
}
#[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"Proxy"]
pub struct _MISC_REMAPW<'a> {
w: &'a mut W,
}
impl<'a> _MISC_REMAPW<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits &= !(0x01 << 13);
self.w.bits |= ((value as u32) & 0x01) << 13;
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 - TIM15 remapping"]
#[inline(always)]
pub fn tim15_remap(&self) -> TIM15_REMAPR {
let bits = ((self.bits >> 0) & 0x01) != 0;
TIM15_REMAPR { bits }
}
#[doc = "Bit 1 - TIM16 remapping"]
#[inline(always)]
pub fn tim16_remap(&self) -> TIM16_REMAPR {
let bits = ((self.bits >> 1) & 0x01) != 0;
TIM16_REMAPR { bits }
}
#[doc = "Bit 2 - TIM17 remapping"]
#[inline(always)]
pub fn tim17_remap(&self) -> TIM17_REMAPR {
let bits = ((self.bits >> 2) & 0x01) != 0;
TIM17_REMAPR { bits }
}
#[doc = "Bit 8 - TIM13 remapping"]
#[inline(always)]
pub fn tim13_remap(&self) -> TIM13_REMAPR {
let bits = ((self.bits >> 8) & 0x01) != 0;
TIM13_REMAPR { bits }
}
#[doc = "Bit 9 - TIM14 remapping"]
#[inline(always)]
pub fn tim14_remap(&self) -> TIM14_REMAPR {
let bits = ((self.bits >> 9) & 0x01) != 0;
TIM14_REMAPR { bits }
}
#[doc = "Bit 10 - NADV connect/disconnect"]
#[inline(always)]
pub fn fsmc_nadv(&self) -> FSMC_NADVR {
let bits = ((self.bits >> 10) & 0x01) != 0;
FSMC_NADVR { bits }
}
#[doc = "Bit 3 - CEC remapping"]
#[inline(always)]
pub fn cec_remap(&self) -> CEC_REMAPR {
let bits = ((self.bits >> 3) & 0x01) != 0;
CEC_REMAPR { bits }
}
#[doc = "Bit 4 - TIM1 DMA remapping"]
#[inline(always)]
pub fn tim1_dma_remap(&self) -> TIM1_DMA_REMAPR {
let bits = ((self.bits >> 4) & 0x01) != 0;
TIM1_DMA_REMAPR { bits }
}
#[doc = "Bit 11 - TIM67_DAC DMA remapping"]
#[inline(always)]
pub fn tim67_dac_dma_remap(&self) -> TIM67_DAC_DMA_REMAPR {
let bits = ((self.bits >> 11) & 0x01) != 0;
TIM67_DAC_DMA_REMAPR { bits }
}
#[doc = "Bit 12 - TIM12 remapping"]
#[inline(always)]
pub fn tim12_remap(&self) -> TIM12_REMAPR {
let bits = ((self.bits >> 12) & 0x01) != 0;
TIM12_REMAPR { bits }
}
#[doc = "Bit 13 - Miscellaneous features remapping"]
#[inline(always)]
pub fn misc_remap(&self) -> MISC_REMAPR {
let bits = ((self.bits >> 13) & 0x01) != 0;
MISC_REMAPR { bits }
}
}
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 - TIM15 remapping"]
#[inline(always)]
pub fn tim15_remap(&mut self) -> _TIM15_REMAPW {
_TIM15_REMAPW { w: self }
}
#[doc = "Bit 1 - TIM16 remapping"]
#[inline(always)]
pub fn tim16_remap(&mut self) -> _TIM16_REMAPW {
_TIM16_REMAPW { w: self }
}
#[doc = "Bit 2 - TIM17 remapping"]
#[inline(always)]
pub fn tim17_remap(&mut self) -> _TIM17_REMAPW {
_TIM17_REMAPW { w: self }
}
#[doc = "Bit 8 - TIM13 remapping"]
#[inline(always)]
pub fn tim13_remap(&mut self) -> _TIM13_REMAPW {
_TIM13_REMAPW { w: self }
}
#[doc = "Bit 9 - TIM14 remapping"]
#[inline(always)]
pub fn tim14_remap(&mut self) -> _TIM14_REMAPW {
_TIM14_REMAPW { w: self }
}
#[doc = "Bit 10 - NADV connect/disconnect"]
#[inline(always)]
pub fn fsmc_nadv(&mut self) -> _FSMC_NADVW {
_FSMC_NADVW { w: self }
}
#[doc = "Bit 3 - CEC remapping"]
#[inline(always)]
pub fn cec_remap(&mut self) -> _CEC_REMAPW {
_CEC_REMAPW { w: self }
}
#[doc = "Bit 4 - TIM1 DMA remapping"]
#[inline(always)]
pub fn tim1_dma_remap(&mut self) -> _TIM1_DMA_REMAPW {
_TIM1_DMA_REMAPW { w: self }
}
#[doc = "Bit 11 - TIM67_DAC DMA remapping"]
#[inline(always)]
pub fn tim67_dac_dma_remap(&mut self) -> _TIM67_DAC_DMA_REMAPW {
_TIM67_DAC_DMA_REMAPW { w: self }
}
#[doc = "Bit 12 - TIM12 remapping"]
#[inline(always)]
pub fn tim12_remap(&mut self) -> _TIM12_REMAPW {
_TIM12_REMAPW { w: self }
}
#[doc = "Bit 13 - Miscellaneous features remapping"]
#[inline(always)]
pub fn misc_remap(&mut self) -> _MISC_REMAPW {
_MISC_REMAPW { w: self }
}
}