stm32f1/stm32f102/sdio/fifocnt.rs
1///Register `FIFOCNT` reader
2pub type R = crate::R<FIFOCNTrs>;
3///Field `FIFOCOUNT` reader - Remaining number of words to be written to or read from the FIFO.
4pub type FIFOCOUNT_R = crate::FieldReader<u32>;
5impl R {
6 ///Bits 0:23 - Remaining number of words to be written to or read from the FIFO.
7 #[inline(always)]
8 pub fn fifocount(&self) -> FIFOCOUNT_R {
9 FIFOCOUNT_R::new(self.bits & 0x00ff_ffff)
10 }
11}
12impl core::fmt::Debug for R {
13 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
14 f.debug_struct("FIFOCNT")
15 .field("fifocount", &self.fifocount())
16 .finish()
17 }
18}
19/**FIFO counter register
20
21You can [`read`](crate::Reg::read) this register and get [`fifocnt::R`](R). See [API](https://docs.rs/svd2rust/#read--modify--write-api).
22
23See register [structure](https://stm32-rs.github.io/stm32-rs/STM32F102.html#SDIO:FIFOCNT)*/
24pub struct FIFOCNTrs;
25impl crate::RegisterSpec for FIFOCNTrs {
26 type Ux = u32;
27}
28///`read()` method returns [`fifocnt::R`](R) reader structure
29impl crate::Readable for FIFOCNTrs {}
30///`reset()` method sets FIFOCNT to value 0
31impl crate::Resettable for FIFOCNTrs {}