avr_device/devices/atmega4809/bod/
status.rs

1#[doc = "Register `STATUS` reader"]
2pub struct R(crate::R<STATUS_SPEC>);
3impl core::ops::Deref for R {
4    type Target = crate::R<STATUS_SPEC>;
5    #[inline(always)]
6    fn deref(&self) -> &Self::Target {
7        &self.0
8    }
9}
10impl From<crate::R<STATUS_SPEC>> for R {
11    #[inline(always)]
12    fn from(reader: crate::R<STATUS_SPEC>) -> Self {
13        R(reader)
14    }
15}
16#[doc = "Register `STATUS` writer"]
17pub struct W(crate::W<STATUS_SPEC>);
18impl core::ops::Deref for W {
19    type Target = crate::W<STATUS_SPEC>;
20    #[inline(always)]
21    fn deref(&self) -> &Self::Target {
22        &self.0
23    }
24}
25impl core::ops::DerefMut for W {
26    #[inline(always)]
27    fn deref_mut(&mut self) -> &mut Self::Target {
28        &mut self.0
29    }
30}
31impl From<crate::W<STATUS_SPEC>> for W {
32    #[inline(always)]
33    fn from(writer: crate::W<STATUS_SPEC>) -> Self {
34        W(writer)
35    }
36}
37#[doc = "Field `VLMS` reader - Voltage level monitor status"]
38pub type VLMS_R = crate::BitReader<bool>;
39impl R {
40    #[doc = "Bit 0 - Voltage level monitor status"]
41    #[inline(always)]
42    pub fn vlms(&self) -> VLMS_R {
43        VLMS_R::new((self.bits & 1) != 0)
44    }
45}
46impl W {
47    #[doc = "Writes raw bits to the register."]
48    #[inline(always)]
49    pub unsafe fn bits(&mut self, bits: u8) -> &mut Self {
50        self.0.bits(bits);
51        self
52    }
53}
54#[doc = "Voltage level monitor status\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 [status](index.html) module"]
55pub struct STATUS_SPEC;
56impl crate::RegisterSpec for STATUS_SPEC {
57    type Ux = u8;
58}
59#[doc = "`read()` method returns [status::R](R) reader structure"]
60impl crate::Readable for STATUS_SPEC {
61    type Reader = R;
62}
63#[doc = "`write(|w| ..)` method takes [status::W](W) writer structure"]
64impl crate::Writable for STATUS_SPEC {
65    type Writer = W;
66    const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
67    const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
68}
69#[doc = "`reset()` method sets STATUS to value 0"]
70impl crate::Resettable for STATUS_SPEC {
71    const RESET_VALUE: Self::Ux = 0;
72}