nrf52810_pac/uarte0/
tasks_stoprx.rs

1#[doc = "Register `TASKS_STOPRX` writer"]
2pub struct W(crate::W<TASKS_STOPRX_SPEC>);
3impl core::ops::Deref for W {
4    type Target = crate::W<TASKS_STOPRX_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_STOPRX_SPEC>> for W {
17    #[inline(always)]
18    fn from(writer: crate::W<TASKS_STOPRX_SPEC>) -> Self {
19        W(writer)
20    }
21}
22#[doc = "Stop UART receiver\n\nValue on reset: 0"]
23#[derive(Clone, Copy, Debug, PartialEq)]
24pub enum TASKS_STOPRX_AW {
25    #[doc = "1: Trigger task"]
26    TRIGGER = 1,
27}
28impl From<TASKS_STOPRX_AW> for bool {
29    #[inline(always)]
30    fn from(variant: TASKS_STOPRX_AW) -> Self {
31        variant as u8 != 0
32    }
33}
34#[doc = "Field `TASKS_STOPRX` writer - Stop UART receiver"]
35pub type TASKS_STOPRX_W<'a, const O: u8> =
36    crate::BitWriter<'a, u32, TASKS_STOPRX_SPEC, TASKS_STOPRX_AW, O>;
37impl<'a, const O: u8> TASKS_STOPRX_W<'a, O> {
38    #[doc = "Trigger task"]
39    #[inline(always)]
40    pub fn trigger(self) -> &'a mut W {
41        self.variant(TASKS_STOPRX_AW::TRIGGER)
42    }
43}
44impl W {
45    #[doc = "Bit 0 - Stop UART receiver"]
46    #[inline(always)]
47    pub fn tasks_stoprx(&mut self) -> TASKS_STOPRX_W<0> {
48        TASKS_STOPRX_W::new(self)
49    }
50    #[doc = "Writes raw bits to the register."]
51    #[inline(always)]
52    pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
53        self.0.bits(bits);
54        self
55    }
56}
57#[doc = "Stop UART receiver\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_stoprx](index.html) module"]
58pub struct TASKS_STOPRX_SPEC;
59impl crate::RegisterSpec for TASKS_STOPRX_SPEC {
60    type Ux = u32;
61}
62#[doc = "`write(|w| ..)` method takes [tasks_stoprx::W](W) writer structure"]
63impl crate::Writable for TASKS_STOPRX_SPEC {
64    type Writer = W;
65}
66#[doc = "`reset()` method sets TASKS_STOPRX to value 0"]
67impl crate::Resettable for TASKS_STOPRX_SPEC {
68    #[inline(always)]
69    fn reset_value() -> Self::Ux {
70        0
71    }
72}