moondancer_pac/generated/timer1/
counter.rs1#[doc = "Register `counter` reader"]
2pub type R = crate::R<COUNTER_SPEC>;
3#[doc = "Register `counter` writer"]
4pub type W = crate::W<COUNTER_SPEC>;
5#[doc = "Field `value` reader - value field"]
6pub type VALUE_R = crate::FieldReader<u32>;
7impl R {
8 #[doc = "Bits 0:31 - value field"]
9 #[inline(always)]
10 pub fn value(&self) -> VALUE_R {
11 VALUE_R::new(self.bits)
12 }
13}
14impl W {}
15#[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 [`counter::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`counter::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
16pub struct COUNTER_SPEC;
17impl crate::RegisterSpec for COUNTER_SPEC {
18 type Ux = u32;
19}
20#[doc = "`read()` method returns [`counter::R`](R) reader structure"]
21impl crate::Readable for COUNTER_SPEC {}
22#[doc = "`write(|w| ..)` method takes [`counter::W`](W) writer structure"]
23impl crate::Writable for COUNTER_SPEC {
24 type Safety = crate::Unsafe;
25 const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
26 const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
27}
28#[doc = "`reset()` method sets counter to value 0"]
29impl crate::Resettable for COUNTER_SPEC {
30 const RESET_VALUE: u32 = 0;
31}