1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146
#[doc = "Register `FIFORD` reader"] pub struct R(crate::R<FIFORD_SPEC>); impl core::ops::Deref for R { type Target = crate::R<FIFORD_SPEC>; #[inline(always)] fn deref(&self) -> &Self::Target { &self.0 } } impl core::convert::From<crate::R<FIFORD_SPEC>> for R { fn from(reader: crate::R<FIFORD_SPEC>) -> Self { R(reader) } } #[doc = "Field `RXDATA` reader - Received data from the FIFO."] pub struct RXDATA_R(crate::FieldReader<u16, u16>); impl RXDATA_R { pub(crate) fn new(bits: u16) -> Self { RXDATA_R(crate::FieldReader::new(bits)) } } impl core::ops::Deref for RXDATA_R { type Target = crate::FieldReader<u16, u16>; #[inline(always)] fn deref(&self) -> &Self::Target { &self.0 } } #[doc = "Field `RXSSEL0_N` reader - Slave Select for receive. This field allows the state of the SSEL0 pin to be saved along with received data. The value will reflect the SSEL0 pin for both master and slave operation. A zero indicates that a slave select is active. The actual polarity of each slave select pin is configured by the related SPOL bit in CFG."] pub struct RXSSEL0_N_R(crate::FieldReader<bool, bool>); impl RXSSEL0_N_R { pub(crate) fn new(bits: bool) -> Self { RXSSEL0_N_R(crate::FieldReader::new(bits)) } } impl core::ops::Deref for RXSSEL0_N_R { type Target = crate::FieldReader<bool, bool>; #[inline(always)] fn deref(&self) -> &Self::Target { &self.0 } } #[doc = "Field `RXSSEL1_N` reader - Slave Select for receive. This field allows the state of the SSEL1 pin to be saved along with received data. The value will reflect the SSEL1 pin for both master and slave operation. A zero indicates that a slave select is active. The actual polarity of each slave select pin is configured by the related SPOL bit in CFG."] pub struct RXSSEL1_N_R(crate::FieldReader<bool, bool>); impl RXSSEL1_N_R { pub(crate) fn new(bits: bool) -> Self { RXSSEL1_N_R(crate::FieldReader::new(bits)) } } impl core::ops::Deref for RXSSEL1_N_R { type Target = crate::FieldReader<bool, bool>; #[inline(always)] fn deref(&self) -> &Self::Target { &self.0 } } #[doc = "Field `RXSSEL2_N` reader - Slave Select for receive. This field allows the state of the SSEL2 pin to be saved along with received data. The value will reflect the SSEL2 pin for both master and slave operation. A zero indicates that a slave select is active. The actual polarity of each slave select pin is configured by the related SPOL bit in CFG."] pub struct RXSSEL2_N_R(crate::FieldReader<bool, bool>); impl RXSSEL2_N_R { pub(crate) fn new(bits: bool) -> Self { RXSSEL2_N_R(crate::FieldReader::new(bits)) } } impl core::ops::Deref for RXSSEL2_N_R { type Target = crate::FieldReader<bool, bool>; #[inline(always)] fn deref(&self) -> &Self::Target { &self.0 } } #[doc = "Field `RXSSEL3_N` reader - Slave Select for receive. This field allows the state of the SSEL3 pin to be saved along with received data. The value will reflect the SSEL3 pin for both master and slave operation. A zero indicates that a slave select is active. The actual polarity of each slave select pin is configured by the related SPOL bit in CFG."] pub struct RXSSEL3_N_R(crate::FieldReader<bool, bool>); impl RXSSEL3_N_R { pub(crate) fn new(bits: bool) -> Self { RXSSEL3_N_R(crate::FieldReader::new(bits)) } } impl core::ops::Deref for RXSSEL3_N_R { type Target = crate::FieldReader<bool, bool>; #[inline(always)] fn deref(&self) -> &Self::Target { &self.0 } } #[doc = "Field `SOT` reader - Start of Transfer flag. This flag will be 1 if this is the first data after the SSELs went from deasserted to asserted (i.e., any previous transfer has ended). This information can be used to identify the first piece of data in cases where the transfer length is greater than 16 bits."] pub struct SOT_R(crate::FieldReader<bool, bool>); impl SOT_R { pub(crate) fn new(bits: bool) -> Self { SOT_R(crate::FieldReader::new(bits)) } } impl core::ops::Deref for SOT_R { type Target = crate::FieldReader<bool, bool>; #[inline(always)] fn deref(&self) -> &Self::Target { &self.0 } } impl R { #[doc = "Bits 0:15 - Received data from the FIFO."] #[inline(always)] pub fn rxdata(&self) -> RXDATA_R { RXDATA_R::new((self.bits & 0xffff) as u16) } #[doc = "Bit 16 - Slave Select for receive. This field allows the state of the SSEL0 pin to be saved along with received data. The value will reflect the SSEL0 pin for both master and slave operation. A zero indicates that a slave select is active. The actual polarity of each slave select pin is configured by the related SPOL bit in CFG."] #[inline(always)] pub fn rxssel0_n(&self) -> RXSSEL0_N_R { RXSSEL0_N_R::new(((self.bits >> 16) & 0x01) != 0) } #[doc = "Bit 17 - Slave Select for receive. This field allows the state of the SSEL1 pin to be saved along with received data. The value will reflect the SSEL1 pin for both master and slave operation. A zero indicates that a slave select is active. The actual polarity of each slave select pin is configured by the related SPOL bit in CFG."] #[inline(always)] pub fn rxssel1_n(&self) -> RXSSEL1_N_R { RXSSEL1_N_R::new(((self.bits >> 17) & 0x01) != 0) } #[doc = "Bit 18 - Slave Select for receive. This field allows the state of the SSEL2 pin to be saved along with received data. The value will reflect the SSEL2 pin for both master and slave operation. A zero indicates that a slave select is active. The actual polarity of each slave select pin is configured by the related SPOL bit in CFG."] #[inline(always)] pub fn rxssel2_n(&self) -> RXSSEL2_N_R { RXSSEL2_N_R::new(((self.bits >> 18) & 0x01) != 0) } #[doc = "Bit 19 - Slave Select for receive. This field allows the state of the SSEL3 pin to be saved along with received data. The value will reflect the SSEL3 pin for both master and slave operation. A zero indicates that a slave select is active. The actual polarity of each slave select pin is configured by the related SPOL bit in CFG."] #[inline(always)] pub fn rxssel3_n(&self) -> RXSSEL3_N_R { RXSSEL3_N_R::new(((self.bits >> 19) & 0x01) != 0) } #[doc = "Bit 20 - Start of Transfer flag. This flag will be 1 if this is the first data after the SSELs went from deasserted to asserted (i.e., any previous transfer has ended). This information can be used to identify the first piece of data in cases where the transfer length is greater than 16 bits."] #[inline(always)] pub fn sot(&self) -> SOT_R { SOT_R::new(((self.bits >> 20) & 0x01) != 0) } } #[doc = "FIFO read data.\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 [fiford](index.html) module"] pub struct FIFORD_SPEC; impl crate::RegisterSpec for FIFORD_SPEC { type Ux = u32; } #[doc = "`read()` method returns [fiford::R](R) reader structure"] impl crate::Readable for FIFORD_SPEC { type Reader = R; } #[doc = "`reset()` method sets FIFORD to value 0"] impl crate::Resettable for FIFORD_SPEC { #[inline(always)] fn reset_value() -> Self::Ux { 0 } }