moondancer_pac/generated/user0/
output.rs

1#[doc = "Register `Output` reader"]
2pub type R = crate::R<OUTPUT_SPEC>;
3#[doc = "Register `Output` writer"]
4pub type W = crate::W<OUTPUT_SPEC>;
5#[doc = "Field `pin_0` reader - pin_0 field"]
6pub type PIN_0_R = crate::BitReader;
7#[doc = "Field `pin_0` writer - pin_0 field"]
8pub type PIN_0_W<'a, REG> = crate::BitWriter<'a, REG>;
9impl R {
10    #[doc = "Bit 0 - pin_0 field"]
11    #[inline(always)]
12    pub fn pin_0(&self) -> PIN_0_R {
13        PIN_0_R::new((self.bits & 1) != 0)
14    }
15}
16impl W {
17    #[doc = "Bit 0 - pin_0 field"]
18    #[inline(always)]
19    pub fn pin_0(&mut self) -> PIN_0_W<OUTPUT_SPEC> {
20        PIN_0_W::new(self, 0)
21    }
22}
23#[doc = "Output register. This :class:`csr.Register` contains an array of ``pin_count`` read/write fields. Each field is 1-bit wide and drives the output of its associated pin in the :attr:`Peripheral.pins` array, depending on its associated :class:`~Peripheral.Mode` field. If ``pin_count`` is 8, then the register has the following fields: .. bitfield:: :bits: 8 \\[ { \"name\": \"pin\\[0\\]\", \"bits\": 1, \"attr\": \"RW\" }, { \"name\": \"pin\\[1\\]\", \"bits\": 1, \"attr\": \"RW\" }, { \"name\": \"pin\\[2\\]\", \"bits\": 1, \"attr\": \"RW\" }, { \"name\": \"pin\\[3\\]\", \"bits\": 1, \"attr\": \"RW\" }, { \"name\": \"pin\\[4\\]\", \"bits\": 1, \"attr\": \"RW\" }, { \"name\": \"pin\\[5\\]\", \"bits\": 1, \"attr\": \"RW\" }, { \"name\": \"pin\\[6\\]\", \"bits\": 1, \"attr\": \"RW\" }, { \"name\": \"pin\\[7\\]\", \"bits\": 1, \"attr\": \"RW\" }, \\]
24Parameters ---------- pin_count : :class:`int` Number of GPIO pins.\n\nYou can [`read`](crate::Reg::read) this register and get [`output::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`output::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
25pub struct OUTPUT_SPEC;
26impl crate::RegisterSpec for OUTPUT_SPEC {
27    type Ux = u8;
28}
29#[doc = "`read()` method returns [`output::R`](R) reader structure"]
30impl crate::Readable for OUTPUT_SPEC {}
31#[doc = "`write(|w| ..)` method takes [`output::W`](W) writer structure"]
32impl crate::Writable for OUTPUT_SPEC {
33    type Safety = crate::Unsafe;
34    const ZERO_TO_MODIFY_FIELDS_BITMAP: u8 = 0;
35    const ONE_TO_MODIFY_FIELDS_BITMAP: u8 = 0;
36}
37#[doc = "`reset()` method sets Output to value 0"]
38impl crate::Resettable for OUTPUT_SPEC {
39    const RESET_VALUE: u8 = 0;
40}