moondancer_pac/generated/usb2_ep_control/
ev_enable.rs1#[doc = "Register `ev_enable` reader"]
2pub type R = crate::R<EV_ENABLE_SPEC>;
3#[doc = "Register `ev_enable` writer"]
4pub type W = crate::W<EV_ENABLE_SPEC>;
5#[doc = "Field `mask` reader - mask field"]
6pub type MASK_R = crate::BitReader;
7#[doc = "Field `mask` writer - mask field"]
8pub type MASK_W<'a, REG> = crate::BitWriter<'a, REG>;
9impl R {
10 #[doc = "Bit 0 - mask field"]
11 #[inline(always)]
12 pub fn mask(&self) -> MASK_R {
13 MASK_R::new((self.bits & 1) != 0)
14 }
15}
16impl W {
17 #[doc = "Bit 0 - mask field"]
18 #[inline(always)]
19 pub fn mask(&mut self) -> MASK_W<EV_ENABLE_SPEC> {
20 MASK_W::new(self, 0)
21 }
22}
23#[doc = "A CSR register. Parameters ---------- fields : :class:`dict` or :class:`list` or :class:`Field` Collection of register fields. If ``None`` (default), a dict is populated from Python :term:`variable annotations <python:variable annotations>`. ``fields`` is used to create a :class:`FieldActionMap`, :class:`FieldActionArray`, or :class:`FieldAction`, depending on its type (dict, list, or Field). Interface attributes -------------------- element : :class:`Element` Interface between this register and a CSR bus primitive. Attributes ---------- field : :class:`FieldActionMap` or :class:`FieldActionArray` or :class:`FieldAction` Collection of field instances. f : :class:`FieldActionMap` or :class:`FieldActionArray` or :class:`FieldAction` Shorthand for :attr:`Register.field`. Raises ------ :exc:`TypeError` If ``fields`` is neither ``None``, a :class:`dict`, a :class:`list`, or a :class:`Field`. :exc:`ValueError` If ``fields`` is not ``None`` and at least one variable annotation is a :class:`Field`. :exc:`ValueError` If ``element.access`` is not readable and at least one field is readable. :exc:`ValueError` If ``element.access`` is not writable and at least one field is writable.\n\nYou can [`read`](crate::Reg::read) this register and get [`ev_enable::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`ev_enable::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
24pub struct EV_ENABLE_SPEC;
25impl crate::RegisterSpec for EV_ENABLE_SPEC {
26 type Ux = u8;
27}
28#[doc = "`read()` method returns [`ev_enable::R`](R) reader structure"]
29impl crate::Readable for EV_ENABLE_SPEC {}
30#[doc = "`write(|w| ..)` method takes [`ev_enable::W`](W) writer structure"]
31impl crate::Writable for EV_ENABLE_SPEC {
32 type Safety = crate::Unsafe;
33 const ZERO_TO_MODIFY_FIELDS_BITMAP: u8 = 0;
34 const ONE_TO_MODIFY_FIELDS_BITMAP: u8 = 0;
35}
36#[doc = "`reset()` method sets ev_enable to value 0"]
37impl crate::Resettable for EV_ENABLE_SPEC {
38 const RESET_VALUE: u8 = 0;
39}