max78000_pac/i2s/
extsetup.rs

1#[doc = "Register `EXTSETUP` reader"]
2pub type R = crate::R<ExtsetupSpec>;
3#[doc = "Register `EXTSETUP` writer"]
4pub type W = crate::W<ExtsetupSpec>;
5#[doc = "Field `EXT_BITS_WORD` reader - Word Length for ch_mode."]
6pub type ExtBitsWordR = crate::FieldReader;
7#[doc = "Field `EXT_BITS_WORD` writer - Word Length for ch_mode."]
8pub type ExtBitsWordW<'a, REG> = crate::FieldWriter<'a, REG, 5>;
9impl R {
10    #[doc = "Bits 0:4 - Word Length for ch_mode."]
11    #[inline(always)]
12    pub fn ext_bits_word(&self) -> ExtBitsWordR {
13        ExtBitsWordR::new((self.bits & 0x1f) as u8)
14    }
15}
16impl W {
17    #[doc = "Bits 0:4 - Word Length for ch_mode."]
18    #[inline(always)]
19    pub fn ext_bits_word(&mut self) -> ExtBitsWordW<ExtsetupSpec> {
20        ExtBitsWordW::new(self, 0)
21    }
22}
23#[doc = "Ext Control.\n\nYou can [`read`](crate::Reg::read) this register and get [`extsetup::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`extsetup::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
24pub struct ExtsetupSpec;
25impl crate::RegisterSpec for ExtsetupSpec {
26    type Ux = u32;
27}
28#[doc = "`read()` method returns [`extsetup::R`](R) reader structure"]
29impl crate::Readable for ExtsetupSpec {}
30#[doc = "`write(|w| ..)` method takes [`extsetup::W`](W) writer structure"]
31impl crate::Writable for ExtsetupSpec {
32    type Safety = crate::Unsafe;
33    const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
34    const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
35}
36#[doc = "`reset()` method sets EXTSETUP to value 0"]
37impl crate::Resettable for ExtsetupSpec {
38    const RESET_VALUE: u32 = 0;
39}