1#[doc = "Writer for register PSOR"]
2pub type W = crate::W<u32, super::PSOR>;
3#[doc = "Register PSOR `reset()`'s with value 0"]
4impl crate::ResetValue for super::PSOR {
5 type Type = u32;
6 #[inline(always)]
7 fn reset_value() -> Self::Type {
8 0
9 }
10}
11#[doc = "Port Set Output\n\nValue on reset: 0"]
12#[derive(Clone, Copy, Debug, PartialEq)]
13#[repr(u32)]
14pub enum PTSO_AW {
15 #[doc = "0: Corresponding bit in PDORn does not change."]
16 _0 = 0,
17 #[doc = "1: Corresponding bit in PDORn is set to logic 1."]
18 _1 = 1,
19}
20impl From<PTSO_AW> for u32 {
21 #[inline(always)]
22 fn from(variant: PTSO_AW) -> Self {
23 variant as _
24 }
25}
26#[doc = "Write proxy for field `PTSO`"]
27pub struct PTSO_W<'a> {
28 w: &'a mut W,
29}
30impl<'a> PTSO_W<'a> {
31 #[doc = r"Writes `variant` to the field"]
32 #[inline(always)]
33 pub fn variant(self, variant: PTSO_AW) -> &'a mut W {
34 unsafe { self.bits(variant.into()) }
35 }
36 #[doc = "Corresponding bit in PDORn does not change."]
37 #[inline(always)]
38 pub fn _0(self) -> &'a mut W {
39 self.variant(PTSO_AW::_0)
40 }
41 #[doc = "Corresponding bit in PDORn is set to logic 1."]
42 #[inline(always)]
43 pub fn _1(self) -> &'a mut W {
44 self.variant(PTSO_AW::_1)
45 }
46 #[doc = r"Writes raw bits to the field"]
47 #[inline(always)]
48 pub unsafe fn bits(self, value: u32) -> &'a mut W {
49 self.w.bits = (self.w.bits & !0xffff_ffff) | ((value as u32) & 0xffff_ffff);
50 self.w
51 }
52}
53impl W {
54 #[doc = "Bits 0:31 - Port Set Output"]
55 #[inline(always)]
56 pub fn ptso(&mut self) -> PTSO_W {
57 PTSO_W { w: self }
58 }
59}