bl602_pac/gpip/
gpdac_tx_fifo_status.rs1#[doc = "Register `gpdac_tx_fifo_status` reader"]
2pub struct R(crate::R<GPDAC_TX_FIFO_STATUS_SPEC>);
3impl core::ops::Deref for R {
4 type Target = crate::R<GPDAC_TX_FIFO_STATUS_SPEC>;
5 #[inline(always)]
6 fn deref(&self) -> &Self::Target {
7 &self.0
8 }
9}
10impl From<crate::R<GPDAC_TX_FIFO_STATUS_SPEC>> for R {
11 #[inline(always)]
12 fn from(reader: crate::R<GPDAC_TX_FIFO_STATUS_SPEC>) -> Self {
13 R(reader)
14 }
15}
16#[doc = "Field `tx_fifo_empty` reader - "]
17pub type TX_FIFO_EMPTY_R = crate::BitReader<bool>;
18#[doc = "Field `tx_fifo_full` reader - "]
19pub type TX_FIFO_FULL_R = crate::BitReader<bool>;
20#[doc = "Field `tx_cs` reader - "]
21pub type TX_CS_R = crate::FieldReader<u8, u8>;
22#[doc = "Field `TxFifoRdPtr` reader - "]
23pub type TX_FIFO_RD_PTR_R = crate::FieldReader<u8, u8>;
24#[doc = "Field `TxFifoWrPtr` reader - "]
25pub type TX_FIFO_WR_PTR_R = crate::FieldReader<u8, u8>;
26impl R {
27 #[doc = "Bit 0"]
28 #[inline(always)]
29 pub fn tx_fifo_empty(&self) -> TX_FIFO_EMPTY_R {
30 TX_FIFO_EMPTY_R::new((self.bits & 1) != 0)
31 }
32 #[doc = "Bit 1"]
33 #[inline(always)]
34 pub fn tx_fifo_full(&self) -> TX_FIFO_FULL_R {
35 TX_FIFO_FULL_R::new(((self.bits >> 1) & 1) != 0)
36 }
37 #[doc = "Bits 2:3"]
38 #[inline(always)]
39 pub fn tx_cs(&self) -> TX_CS_R {
40 TX_CS_R::new(((self.bits >> 2) & 3) as u8)
41 }
42 #[doc = "Bits 4:6"]
43 #[inline(always)]
44 pub fn tx_fifo_rd_ptr(&self) -> TX_FIFO_RD_PTR_R {
45 TX_FIFO_RD_PTR_R::new(((self.bits >> 4) & 7) as u8)
46 }
47 #[doc = "Bits 8:9"]
48 #[inline(always)]
49 pub fn tx_fifo_wr_ptr(&self) -> TX_FIFO_WR_PTR_R {
50 TX_FIFO_WR_PTR_R::new(((self.bits >> 8) & 3) as u8)
51 }
52}
53#[doc = "gpdac_tx_fifo_status.\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [gpdac_tx_fifo_status](index.html) module"]
54pub struct GPDAC_TX_FIFO_STATUS_SPEC;
55impl crate::RegisterSpec for GPDAC_TX_FIFO_STATUS_SPEC {
56 type Ux = u32;
57}
58#[doc = "`read()` method returns [gpdac_tx_fifo_status::R](R) reader structure"]
59impl crate::Readable for GPDAC_TX_FIFO_STATUS_SPEC {
60 type Reader = R;
61}
62#[doc = "`reset()` method sets gpdac_tx_fifo_status to value 0x40"]
63impl crate::Resettable for GPDAC_TX_FIFO_STATUS_SPEC {
64 const RESET_VALUE: Self::Ux = 0x40;
65}