nrf52811_pac/gpiote/
tasks_set.rs1#[doc = "Register `TASKS_SET[%s]` writer"]
2pub struct W(crate::W<TASKS_SET_SPEC>);
3impl core::ops::Deref for W {
4 type Target = crate::W<TASKS_SET_SPEC>;
5 #[inline(always)]
6 fn deref(&self) -> &Self::Target {
7 &self.0
8 }
9}
10impl core::ops::DerefMut for W {
11 #[inline(always)]
12 fn deref_mut(&mut self) -> &mut Self::Target {
13 &mut self.0
14 }
15}
16impl From<crate::W<TASKS_SET_SPEC>> for W {
17 #[inline(always)]
18 fn from(writer: crate::W<TASKS_SET_SPEC>) -> Self {
19 W(writer)
20 }
21}
22#[doc = "Task for writing to pin specified in CONFIG\\[n\\].PSEL. Action on pin is to set it high.\n\nValue on reset: 0"]
23#[derive(Clone, Copy, Debug, PartialEq)]
24pub enum TASKS_SET_AW {
25 #[doc = "1: Trigger task"]
26 TRIGGER = 1,
27}
28impl From<TASKS_SET_AW> for bool {
29 #[inline(always)]
30 fn from(variant: TASKS_SET_AW) -> Self {
31 variant as u8 != 0
32 }
33}
34#[doc = "Field `TASKS_SET` writer - Task for writing to pin specified in CONFIG\\[n\\].PSEL. Action on pin is to set it high."]
35pub type TASKS_SET_W<'a, const O: u8> = crate::BitWriter<'a, u32, TASKS_SET_SPEC, TASKS_SET_AW, O>;
36impl<'a, const O: u8> TASKS_SET_W<'a, O> {
37 #[doc = "Trigger task"]
38 #[inline(always)]
39 pub fn trigger(self) -> &'a mut W {
40 self.variant(TASKS_SET_AW::TRIGGER)
41 }
42}
43impl W {
44 #[doc = "Bit 0 - Task for writing to pin specified in CONFIG\\[n\\].PSEL. Action on pin is to set it high."]
45 #[inline(always)]
46 pub fn tasks_set(&mut self) -> TASKS_SET_W<0> {
47 TASKS_SET_W::new(self)
48 }
49 #[doc = "Writes raw bits to the register."]
50 #[inline(always)]
51 pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
52 self.0.bits(bits);
53 self
54 }
55}
56#[doc = "Description collection: Task for writing to pin specified in CONFIG\\[n\\].PSEL. Action on pin is to set it high.\n\nThis register you can [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [tasks_set](index.html) module"]
57pub struct TASKS_SET_SPEC;
58impl crate::RegisterSpec for TASKS_SET_SPEC {
59 type Ux = u32;
60}
61#[doc = "`write(|w| ..)` method takes [tasks_set::W](W) writer structure"]
62impl crate::Writable for TASKS_SET_SPEC {
63 type Writer = W;
64}
65#[doc = "`reset()` method sets TASKS_SET[%s]
66to value 0"]
67impl crate::Resettable for TASKS_SET_SPEC {
68 #[inline(always)]
69 fn reset_value() -> Self::Ux {
70 0
71 }
72}