#[doc = "Register `APB1SMENR1` reader"]
pub struct R(crate::R<APB1SMENR1_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<APB1SMENR1_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<APB1SMENR1_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<APB1SMENR1_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `APB1SMENR1` writer"]
pub struct W(crate::W<APB1SMENR1_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<APB1SMENR1_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<APB1SMENR1_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<APB1SMENR1_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `LPTIM1SMEN` reader - Low power timer 1 clocks enable during Sleep and Stop modes"]
pub struct LPTIM1SMEN_R(crate::FieldReader<bool, bool>);
impl LPTIM1SMEN_R {
pub(crate) fn new(bits: bool) -> Self {
LPTIM1SMEN_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for LPTIM1SMEN_R {
type Target = crate::FieldReader<bool, bool>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `LPTIM1SMEN` writer - Low power timer 1 clocks enable during Sleep and Stop modes"]
pub struct LPTIM1SMEN_W<'a> {
w: &'a mut W,
}
impl<'a> LPTIM1SMEN_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 31)) | ((value as u32 & 0x01) << 31);
self.w
}
}
#[doc = "Field `OPAMPSMEN` reader - OPAMP interface clocks enable during Sleep and Stop modes"]
pub struct OPAMPSMEN_R(crate::FieldReader<bool, bool>);
impl OPAMPSMEN_R {
pub(crate) fn new(bits: bool) -> Self {
OPAMPSMEN_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for OPAMPSMEN_R {
type Target = crate::FieldReader<bool, bool>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `OPAMPSMEN` writer - OPAMP interface clocks enable during Sleep and Stop modes"]
pub struct OPAMPSMEN_W<'a> {
w: &'a mut W,
}
impl<'a> OPAMPSMEN_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 30)) | ((value as u32 & 0x01) << 30);
self.w
}
}
#[doc = "Field `DAC1SMEN` reader - DAC1 interface clocks enable during Sleep and Stop modes"]
pub struct DAC1SMEN_R(crate::FieldReader<bool, bool>);
impl DAC1SMEN_R {
pub(crate) fn new(bits: bool) -> Self {
DAC1SMEN_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for DAC1SMEN_R {
type Target = crate::FieldReader<bool, bool>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `DAC1SMEN` writer - DAC1 interface clocks enable during Sleep and Stop modes"]
pub struct DAC1SMEN_W<'a> {
w: &'a mut W,
}
impl<'a> DAC1SMEN_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 29)) | ((value as u32 & 0x01) << 29);
self.w
}
}
#[doc = "Field `PWRSMEN` reader - Power interface clocks enable during Sleep and Stop modes"]
pub struct PWRSMEN_R(crate::FieldReader<bool, bool>);
impl PWRSMEN_R {
pub(crate) fn new(bits: bool) -> Self {
PWRSMEN_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for PWRSMEN_R {
type Target = crate::FieldReader<bool, bool>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `PWRSMEN` writer - Power interface clocks enable during Sleep and Stop modes"]
pub struct PWRSMEN_W<'a> {
w: &'a mut W,
}
impl<'a> PWRSMEN_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 28)) | ((value as u32 & 0x01) << 28);
self.w
}
}
#[doc = "Field `CAN1SMEN` reader - CAN1 clocks enable during Sleep and Stop modes"]
pub struct CAN1SMEN_R(crate::FieldReader<bool, bool>);
impl CAN1SMEN_R {
pub(crate) fn new(bits: bool) -> Self {
CAN1SMEN_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for CAN1SMEN_R {
type Target = crate::FieldReader<bool, bool>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `CAN1SMEN` writer - CAN1 clocks enable during Sleep and Stop modes"]
pub struct CAN1SMEN_W<'a> {
w: &'a mut W,
}
impl<'a> CAN1SMEN_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 25)) | ((value as u32 & 0x01) << 25);
self.w
}
}
#[doc = "Field `I2C3SMEN` reader - I2C3 clocks enable during Sleep and Stop modes"]
pub struct I2C3SMEN_R(crate::FieldReader<bool, bool>);
impl I2C3SMEN_R {
pub(crate) fn new(bits: bool) -> Self {
I2C3SMEN_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for I2C3SMEN_R {
type Target = crate::FieldReader<bool, bool>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `I2C3SMEN` writer - I2C3 clocks enable during Sleep and Stop modes"]
pub struct I2C3SMEN_W<'a> {
w: &'a mut W,
}
impl<'a> I2C3SMEN_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 23)) | ((value as u32 & 0x01) << 23);
self.w
}
}
#[doc = "Field `I2C2SMEN` reader - I2C2 clocks enable during Sleep and Stop modes"]
pub struct I2C2SMEN_R(crate::FieldReader<bool, bool>);
impl I2C2SMEN_R {
pub(crate) fn new(bits: bool) -> Self {
I2C2SMEN_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for I2C2SMEN_R {
type Target = crate::FieldReader<bool, bool>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `I2C2SMEN` writer - I2C2 clocks enable during Sleep and Stop modes"]
pub struct I2C2SMEN_W<'a> {
w: &'a mut W,
}
impl<'a> I2C2SMEN_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 22)) | ((value as u32 & 0x01) << 22);
self.w
}
}
#[doc = "Field `I2C1SMEN` reader - I2C1 clocks enable during Sleep and Stop modes"]
pub struct I2C1SMEN_R(crate::FieldReader<bool, bool>);
impl I2C1SMEN_R {
pub(crate) fn new(bits: bool) -> Self {
I2C1SMEN_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for I2C1SMEN_R {
type Target = crate::FieldReader<bool, bool>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `I2C1SMEN` writer - I2C1 clocks enable during Sleep and Stop modes"]
pub struct I2C1SMEN_W<'a> {
w: &'a mut W,
}
impl<'a> I2C1SMEN_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 21)) | ((value as u32 & 0x01) << 21);
self.w
}
}
#[doc = "Field `UART5SMEN` reader - UART5 clocks enable during Sleep and Stop modes"]
pub struct UART5SMEN_R(crate::FieldReader<bool, bool>);
impl UART5SMEN_R {
pub(crate) fn new(bits: bool) -> Self {
UART5SMEN_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for UART5SMEN_R {
type Target = crate::FieldReader<bool, bool>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `UART5SMEN` writer - UART5 clocks enable during Sleep and Stop modes"]
pub struct UART5SMEN_W<'a> {
w: &'a mut W,
}
impl<'a> UART5SMEN_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 20)) | ((value as u32 & 0x01) << 20);
self.w
}
}
#[doc = "Field `UART4SMEN` reader - UART4 clocks enable during Sleep and Stop modes"]
pub struct UART4SMEN_R(crate::FieldReader<bool, bool>);
impl UART4SMEN_R {
pub(crate) fn new(bits: bool) -> Self {
UART4SMEN_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for UART4SMEN_R {
type Target = crate::FieldReader<bool, bool>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `UART4SMEN` writer - UART4 clocks enable during Sleep and Stop modes"]
pub struct UART4SMEN_W<'a> {
w: &'a mut W,
}
impl<'a> UART4SMEN_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 19)) | ((value as u32 & 0x01) << 19);
self.w
}
}
#[doc = "Field `USART3SMEN` reader - USART3 clocks enable during Sleep and Stop modes"]
pub struct USART3SMEN_R(crate::FieldReader<bool, bool>);
impl USART3SMEN_R {
pub(crate) fn new(bits: bool) -> Self {
USART3SMEN_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for USART3SMEN_R {
type Target = crate::FieldReader<bool, bool>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `USART3SMEN` writer - USART3 clocks enable during Sleep and Stop modes"]
pub struct USART3SMEN_W<'a> {
w: &'a mut W,
}
impl<'a> USART3SMEN_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 18)) | ((value as u32 & 0x01) << 18);
self.w
}
}
#[doc = "Field `USART2SMEN` reader - USART2 clocks enable during Sleep and Stop modes"]
pub struct USART2SMEN_R(crate::FieldReader<bool, bool>);
impl USART2SMEN_R {
pub(crate) fn new(bits: bool) -> Self {
USART2SMEN_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for USART2SMEN_R {
type Target = crate::FieldReader<bool, bool>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `USART2SMEN` writer - USART2 clocks enable during Sleep and Stop modes"]
pub struct USART2SMEN_W<'a> {
w: &'a mut W,
}
impl<'a> USART2SMEN_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 17)) | ((value as u32 & 0x01) << 17);
self.w
}
}
#[doc = "Field `SP3SMEN` reader - SPI3 clocks enable during Sleep and Stop modes"]
pub struct SP3SMEN_R(crate::FieldReader<bool, bool>);
impl SP3SMEN_R {
pub(crate) fn new(bits: bool) -> Self {
SP3SMEN_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for SP3SMEN_R {
type Target = crate::FieldReader<bool, bool>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `SP3SMEN` writer - SPI3 clocks enable during Sleep and Stop modes"]
pub struct SP3SMEN_W<'a> {
w: &'a mut W,
}
impl<'a> SP3SMEN_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 15)) | ((value as u32 & 0x01) << 15);
self.w
}
}
#[doc = "Field `SPI2SMEN` reader - SPI2 clocks enable during Sleep and Stop modes"]
pub struct SPI2SMEN_R(crate::FieldReader<bool, bool>);
impl SPI2SMEN_R {
pub(crate) fn new(bits: bool) -> Self {
SPI2SMEN_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for SPI2SMEN_R {
type Target = crate::FieldReader<bool, bool>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `SPI2SMEN` writer - SPI2 clocks enable during Sleep and Stop modes"]
pub struct SPI2SMEN_W<'a> {
w: &'a mut W,
}
impl<'a> SPI2SMEN_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 14)) | ((value as u32 & 0x01) << 14);
self.w
}
}
#[doc = "Field `WWDGSMEN` reader - Window watchdog clocks enable during Sleep and Stop modes"]
pub struct WWDGSMEN_R(crate::FieldReader<bool, bool>);
impl WWDGSMEN_R {
pub(crate) fn new(bits: bool) -> Self {
WWDGSMEN_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for WWDGSMEN_R {
type Target = crate::FieldReader<bool, bool>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `WWDGSMEN` writer - Window watchdog clocks enable during Sleep and Stop modes"]
pub struct WWDGSMEN_W<'a> {
w: &'a mut W,
}
impl<'a> WWDGSMEN_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 11)) | ((value as u32 & 0x01) << 11);
self.w
}
}
#[doc = "Field `LCDSMEN` reader - LCD clocks enable during Sleep and Stop modes"]
pub struct LCDSMEN_R(crate::FieldReader<bool, bool>);
impl LCDSMEN_R {
pub(crate) fn new(bits: bool) -> Self {
LCDSMEN_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for LCDSMEN_R {
type Target = crate::FieldReader<bool, bool>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `LCDSMEN` writer - LCD clocks enable during Sleep and Stop modes"]
pub struct LCDSMEN_W<'a> {
w: &'a mut W,
}
impl<'a> LCDSMEN_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 9)) | ((value as u32 & 0x01) << 9);
self.w
}
}
#[doc = "Field `TIM7SMEN` reader - TIM7 timer clocks enable during Sleep and Stop modes"]
pub struct TIM7SMEN_R(crate::FieldReader<bool, bool>);
impl TIM7SMEN_R {
pub(crate) fn new(bits: bool) -> Self {
TIM7SMEN_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for TIM7SMEN_R {
type Target = crate::FieldReader<bool, bool>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `TIM7SMEN` writer - TIM7 timer clocks enable during Sleep and Stop modes"]
pub struct TIM7SMEN_W<'a> {
w: &'a mut W,
}
impl<'a> TIM7SMEN_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 5)) | ((value as u32 & 0x01) << 5);
self.w
}
}
#[doc = "Field `TIM6SMEN` reader - TIM6 timer clocks enable during Sleep and Stop modes"]
pub struct TIM6SMEN_R(crate::FieldReader<bool, bool>);
impl TIM6SMEN_R {
pub(crate) fn new(bits: bool) -> Self {
TIM6SMEN_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for TIM6SMEN_R {
type Target = crate::FieldReader<bool, bool>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `TIM6SMEN` writer - TIM6 timer clocks enable during Sleep and Stop modes"]
pub struct TIM6SMEN_W<'a> {
w: &'a mut W,
}
impl<'a> TIM6SMEN_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 4)) | ((value as u32 & 0x01) << 4);
self.w
}
}
#[doc = "Field `TIM5SMEN` reader - TIM5 timer clocks enable during Sleep and Stop modes"]
pub struct TIM5SMEN_R(crate::FieldReader<bool, bool>);
impl TIM5SMEN_R {
pub(crate) fn new(bits: bool) -> Self {
TIM5SMEN_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for TIM5SMEN_R {
type Target = crate::FieldReader<bool, bool>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `TIM5SMEN` writer - TIM5 timer clocks enable during Sleep and Stop modes"]
pub struct TIM5SMEN_W<'a> {
w: &'a mut W,
}
impl<'a> TIM5SMEN_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 3)) | ((value as u32 & 0x01) << 3);
self.w
}
}
#[doc = "Field `TIM4SMEN` reader - TIM4 timer clocks enable during Sleep and Stop modes"]
pub struct TIM4SMEN_R(crate::FieldReader<bool, bool>);
impl TIM4SMEN_R {
pub(crate) fn new(bits: bool) -> Self {
TIM4SMEN_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for TIM4SMEN_R {
type Target = crate::FieldReader<bool, bool>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `TIM4SMEN` writer - TIM4 timer clocks enable during Sleep and Stop modes"]
pub struct TIM4SMEN_W<'a> {
w: &'a mut W,
}
impl<'a> TIM4SMEN_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 2)) | ((value as u32 & 0x01) << 2);
self.w
}
}
#[doc = "Field `TIM3SMEN` reader - TIM3 timer clocks enable during Sleep and Stop modes"]
pub struct TIM3SMEN_R(crate::FieldReader<bool, bool>);
impl TIM3SMEN_R {
pub(crate) fn new(bits: bool) -> Self {
TIM3SMEN_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for TIM3SMEN_R {
type Target = crate::FieldReader<bool, bool>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `TIM3SMEN` writer - TIM3 timer clocks enable during Sleep and Stop modes"]
pub struct TIM3SMEN_W<'a> {
w: &'a mut W,
}
impl<'a> TIM3SMEN_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 1)) | ((value as u32 & 0x01) << 1);
self.w
}
}
#[doc = "Field `TIM2SMEN` reader - TIM2 timer clocks enable during Sleep and Stop modes"]
pub struct TIM2SMEN_R(crate::FieldReader<bool, bool>);
impl TIM2SMEN_R {
pub(crate) fn new(bits: bool) -> Self {
TIM2SMEN_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for TIM2SMEN_R {
type Target = crate::FieldReader<bool, bool>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `TIM2SMEN` writer - TIM2 timer clocks enable during Sleep and Stop modes"]
pub struct TIM2SMEN_W<'a> {
w: &'a mut W,
}
impl<'a> TIM2SMEN_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01);
self.w
}
}
#[doc = "Field `RTCAPBSMEN` reader - RTC APB clock enable during Sleep and Stop modes"]
pub struct RTCAPBSMEN_R(crate::FieldReader<bool, bool>);
impl RTCAPBSMEN_R {
pub(crate) fn new(bits: bool) -> Self {
RTCAPBSMEN_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for RTCAPBSMEN_R {
type Target = crate::FieldReader<bool, bool>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `RTCAPBSMEN` writer - RTC APB clock enable during Sleep and Stop modes"]
pub struct RTCAPBSMEN_W<'a> {
w: &'a mut W,
}
impl<'a> RTCAPBSMEN_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 10)) | ((value as u32 & 0x01) << 10);
self.w
}
}
impl R {
#[doc = "Bit 31 - Low power timer 1 clocks enable during Sleep and Stop modes"]
#[inline(always)]
pub fn lptim1smen(&self) -> LPTIM1SMEN_R {
LPTIM1SMEN_R::new(((self.bits >> 31) & 0x01) != 0)
}
#[doc = "Bit 30 - OPAMP interface clocks enable during Sleep and Stop modes"]
#[inline(always)]
pub fn opampsmen(&self) -> OPAMPSMEN_R {
OPAMPSMEN_R::new(((self.bits >> 30) & 0x01) != 0)
}
#[doc = "Bit 29 - DAC1 interface clocks enable during Sleep and Stop modes"]
#[inline(always)]
pub fn dac1smen(&self) -> DAC1SMEN_R {
DAC1SMEN_R::new(((self.bits >> 29) & 0x01) != 0)
}
#[doc = "Bit 28 - Power interface clocks enable during Sleep and Stop modes"]
#[inline(always)]
pub fn pwrsmen(&self) -> PWRSMEN_R {
PWRSMEN_R::new(((self.bits >> 28) & 0x01) != 0)
}
#[doc = "Bit 25 - CAN1 clocks enable during Sleep and Stop modes"]
#[inline(always)]
pub fn can1smen(&self) -> CAN1SMEN_R {
CAN1SMEN_R::new(((self.bits >> 25) & 0x01) != 0)
}
#[doc = "Bit 23 - I2C3 clocks enable during Sleep and Stop modes"]
#[inline(always)]
pub fn i2c3smen(&self) -> I2C3SMEN_R {
I2C3SMEN_R::new(((self.bits >> 23) & 0x01) != 0)
}
#[doc = "Bit 22 - I2C2 clocks enable during Sleep and Stop modes"]
#[inline(always)]
pub fn i2c2smen(&self) -> I2C2SMEN_R {
I2C2SMEN_R::new(((self.bits >> 22) & 0x01) != 0)
}
#[doc = "Bit 21 - I2C1 clocks enable during Sleep and Stop modes"]
#[inline(always)]
pub fn i2c1smen(&self) -> I2C1SMEN_R {
I2C1SMEN_R::new(((self.bits >> 21) & 0x01) != 0)
}
#[doc = "Bit 20 - UART5 clocks enable during Sleep and Stop modes"]
#[inline(always)]
pub fn uart5smen(&self) -> UART5SMEN_R {
UART5SMEN_R::new(((self.bits >> 20) & 0x01) != 0)
}
#[doc = "Bit 19 - UART4 clocks enable during Sleep and Stop modes"]
#[inline(always)]
pub fn uart4smen(&self) -> UART4SMEN_R {
UART4SMEN_R::new(((self.bits >> 19) & 0x01) != 0)
}
#[doc = "Bit 18 - USART3 clocks enable during Sleep and Stop modes"]
#[inline(always)]
pub fn usart3smen(&self) -> USART3SMEN_R {
USART3SMEN_R::new(((self.bits >> 18) & 0x01) != 0)
}
#[doc = "Bit 17 - USART2 clocks enable during Sleep and Stop modes"]
#[inline(always)]
pub fn usart2smen(&self) -> USART2SMEN_R {
USART2SMEN_R::new(((self.bits >> 17) & 0x01) != 0)
}
#[doc = "Bit 15 - SPI3 clocks enable during Sleep and Stop modes"]
#[inline(always)]
pub fn sp3smen(&self) -> SP3SMEN_R {
SP3SMEN_R::new(((self.bits >> 15) & 0x01) != 0)
}
#[doc = "Bit 14 - SPI2 clocks enable during Sleep and Stop modes"]
#[inline(always)]
pub fn spi2smen(&self) -> SPI2SMEN_R {
SPI2SMEN_R::new(((self.bits >> 14) & 0x01) != 0)
}
#[doc = "Bit 11 - Window watchdog clocks enable during Sleep and Stop modes"]
#[inline(always)]
pub fn wwdgsmen(&self) -> WWDGSMEN_R {
WWDGSMEN_R::new(((self.bits >> 11) & 0x01) != 0)
}
#[doc = "Bit 9 - LCD clocks enable during Sleep and Stop modes"]
#[inline(always)]
pub fn lcdsmen(&self) -> LCDSMEN_R {
LCDSMEN_R::new(((self.bits >> 9) & 0x01) != 0)
}
#[doc = "Bit 5 - TIM7 timer clocks enable during Sleep and Stop modes"]
#[inline(always)]
pub fn tim7smen(&self) -> TIM7SMEN_R {
TIM7SMEN_R::new(((self.bits >> 5) & 0x01) != 0)
}
#[doc = "Bit 4 - TIM6 timer clocks enable during Sleep and Stop modes"]
#[inline(always)]
pub fn tim6smen(&self) -> TIM6SMEN_R {
TIM6SMEN_R::new(((self.bits >> 4) & 0x01) != 0)
}
#[doc = "Bit 3 - TIM5 timer clocks enable during Sleep and Stop modes"]
#[inline(always)]
pub fn tim5smen(&self) -> TIM5SMEN_R {
TIM5SMEN_R::new(((self.bits >> 3) & 0x01) != 0)
}
#[doc = "Bit 2 - TIM4 timer clocks enable during Sleep and Stop modes"]
#[inline(always)]
pub fn tim4smen(&self) -> TIM4SMEN_R {
TIM4SMEN_R::new(((self.bits >> 2) & 0x01) != 0)
}
#[doc = "Bit 1 - TIM3 timer clocks enable during Sleep and Stop modes"]
#[inline(always)]
pub fn tim3smen(&self) -> TIM3SMEN_R {
TIM3SMEN_R::new(((self.bits >> 1) & 0x01) != 0)
}
#[doc = "Bit 0 - TIM2 timer clocks enable during Sleep and Stop modes"]
#[inline(always)]
pub fn tim2smen(&self) -> TIM2SMEN_R {
TIM2SMEN_R::new((self.bits & 0x01) != 0)
}
#[doc = "Bit 10 - RTC APB clock enable during Sleep and Stop modes"]
#[inline(always)]
pub fn rtcapbsmen(&self) -> RTCAPBSMEN_R {
RTCAPBSMEN_R::new(((self.bits >> 10) & 0x01) != 0)
}
}
impl W {
#[doc = "Bit 31 - Low power timer 1 clocks enable during Sleep and Stop modes"]
#[inline(always)]
pub fn lptim1smen(&mut self) -> LPTIM1SMEN_W {
LPTIM1SMEN_W { w: self }
}
#[doc = "Bit 30 - OPAMP interface clocks enable during Sleep and Stop modes"]
#[inline(always)]
pub fn opampsmen(&mut self) -> OPAMPSMEN_W {
OPAMPSMEN_W { w: self }
}
#[doc = "Bit 29 - DAC1 interface clocks enable during Sleep and Stop modes"]
#[inline(always)]
pub fn dac1smen(&mut self) -> DAC1SMEN_W {
DAC1SMEN_W { w: self }
}
#[doc = "Bit 28 - Power interface clocks enable during Sleep and Stop modes"]
#[inline(always)]
pub fn pwrsmen(&mut self) -> PWRSMEN_W {
PWRSMEN_W { w: self }
}
#[doc = "Bit 25 - CAN1 clocks enable during Sleep and Stop modes"]
#[inline(always)]
pub fn can1smen(&mut self) -> CAN1SMEN_W {
CAN1SMEN_W { w: self }
}
#[doc = "Bit 23 - I2C3 clocks enable during Sleep and Stop modes"]
#[inline(always)]
pub fn i2c3smen(&mut self) -> I2C3SMEN_W {
I2C3SMEN_W { w: self }
}
#[doc = "Bit 22 - I2C2 clocks enable during Sleep and Stop modes"]
#[inline(always)]
pub fn i2c2smen(&mut self) -> I2C2SMEN_W {
I2C2SMEN_W { w: self }
}
#[doc = "Bit 21 - I2C1 clocks enable during Sleep and Stop modes"]
#[inline(always)]
pub fn i2c1smen(&mut self) -> I2C1SMEN_W {
I2C1SMEN_W { w: self }
}
#[doc = "Bit 20 - UART5 clocks enable during Sleep and Stop modes"]
#[inline(always)]
pub fn uart5smen(&mut self) -> UART5SMEN_W {
UART5SMEN_W { w: self }
}
#[doc = "Bit 19 - UART4 clocks enable during Sleep and Stop modes"]
#[inline(always)]
pub fn uart4smen(&mut self) -> UART4SMEN_W {
UART4SMEN_W { w: self }
}
#[doc = "Bit 18 - USART3 clocks enable during Sleep and Stop modes"]
#[inline(always)]
pub fn usart3smen(&mut self) -> USART3SMEN_W {
USART3SMEN_W { w: self }
}
#[doc = "Bit 17 - USART2 clocks enable during Sleep and Stop modes"]
#[inline(always)]
pub fn usart2smen(&mut self) -> USART2SMEN_W {
USART2SMEN_W { w: self }
}
#[doc = "Bit 15 - SPI3 clocks enable during Sleep and Stop modes"]
#[inline(always)]
pub fn sp3smen(&mut self) -> SP3SMEN_W {
SP3SMEN_W { w: self }
}
#[doc = "Bit 14 - SPI2 clocks enable during Sleep and Stop modes"]
#[inline(always)]
pub fn spi2smen(&mut self) -> SPI2SMEN_W {
SPI2SMEN_W { w: self }
}
#[doc = "Bit 11 - Window watchdog clocks enable during Sleep and Stop modes"]
#[inline(always)]
pub fn wwdgsmen(&mut self) -> WWDGSMEN_W {
WWDGSMEN_W { w: self }
}
#[doc = "Bit 9 - LCD clocks enable during Sleep and Stop modes"]
#[inline(always)]
pub fn lcdsmen(&mut self) -> LCDSMEN_W {
LCDSMEN_W { w: self }
}
#[doc = "Bit 5 - TIM7 timer clocks enable during Sleep and Stop modes"]
#[inline(always)]
pub fn tim7smen(&mut self) -> TIM7SMEN_W {
TIM7SMEN_W { w: self }
}
#[doc = "Bit 4 - TIM6 timer clocks enable during Sleep and Stop modes"]
#[inline(always)]
pub fn tim6smen(&mut self) -> TIM6SMEN_W {
TIM6SMEN_W { w: self }
}
#[doc = "Bit 3 - TIM5 timer clocks enable during Sleep and Stop modes"]
#[inline(always)]
pub fn tim5smen(&mut self) -> TIM5SMEN_W {
TIM5SMEN_W { w: self }
}
#[doc = "Bit 2 - TIM4 timer clocks enable during Sleep and Stop modes"]
#[inline(always)]
pub fn tim4smen(&mut self) -> TIM4SMEN_W {
TIM4SMEN_W { w: self }
}
#[doc = "Bit 1 - TIM3 timer clocks enable during Sleep and Stop modes"]
#[inline(always)]
pub fn tim3smen(&mut self) -> TIM3SMEN_W {
TIM3SMEN_W { w: self }
}
#[doc = "Bit 0 - TIM2 timer clocks enable during Sleep and Stop modes"]
#[inline(always)]
pub fn tim2smen(&mut self) -> TIM2SMEN_W {
TIM2SMEN_W { w: self }
}
#[doc = "Bit 10 - RTC APB clock enable during Sleep and Stop modes"]
#[inline(always)]
pub fn rtcapbsmen(&mut self) -> RTCAPBSMEN_W {
RTCAPBSMEN_W { w: self }
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "APB1SMENR1\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [apb1smenr1](index.html) module"]
pub struct APB1SMENR1_SPEC;
impl crate::RegisterSpec for APB1SMENR1_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [apb1smenr1::R](R) reader structure"]
impl crate::Readable for APB1SMENR1_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [apb1smenr1::W](W) writer structure"]
impl crate::Writable for APB1SMENR1_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets APB1SMENR1 to value 0xf2fe_ca3f"]
impl crate::Resettable for APB1SMENR1_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0xf2fe_ca3f
}
}