moondancer_pac/generated/user0/
set_clr.rs

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