1#[doc = "Register `IC_FS_SCL_HCNT` reader"]
2pub type R = crate::R<IC_FS_SCL_HCNT_SPEC>;
3#[doc = "Register `IC_FS_SCL_HCNT` writer"]
4pub type W = crate::W<IC_FS_SCL_HCNT_SPEC>;
5#[doc = "Field `IC_FS_SCL_HCNT` reader - This register must be set before any I2C bus transaction can take place to ensure proper I/O timing. This register sets the SCL clock high-period count for fast mode or fast mode plus. It is used in high-speed mode to send the Master Code and START BYTE or General CALL. For more information, refer to 'IC_CLK Frequency Configuration'.
67 This register goes away and becomes read-only returning 0s if IC_MAX_SPEED_MODE = standard. This register can be written only when the I2C interface is disabled, which corresponds to the IC_ENABLE\\[0\\]
8register being set to 0. Writes at other times have no effect.
910 The minimum valid value is 6; hardware prevents values less than this being written, and if attempted results in 6 being set. For designs with APB_DATA_WIDTH == 8 the order of programming is important to ensure the correct operation of the DW_apb_i2c. The lower byte must be programmed first. Then the upper byte is programmed."]
11pub type IC_FS_SCL_HCNT_R = crate::FieldReader<u16>;
12#[doc = "Field `IC_FS_SCL_HCNT` writer - This register must be set before any I2C bus transaction can take place to ensure proper I/O timing. This register sets the SCL clock high-period count for fast mode or fast mode plus. It is used in high-speed mode to send the Master Code and START BYTE or General CALL. For more information, refer to 'IC_CLK Frequency Configuration'.
1314 This register goes away and becomes read-only returning 0s if IC_MAX_SPEED_MODE = standard. This register can be written only when the I2C interface is disabled, which corresponds to the IC_ENABLE\\[0\\]
15register being set to 0. Writes at other times have no effect.
1617 The minimum valid value is 6; hardware prevents values less than this being written, and if attempted results in 6 being set. For designs with APB_DATA_WIDTH == 8 the order of programming is important to ensure the correct operation of the DW_apb_i2c. The lower byte must be programmed first. Then the upper byte is programmed."]
18pub type IC_FS_SCL_HCNT_W<'a, REG> = crate::FieldWriter<'a, REG, 16, u16>;
19impl R {
20#[doc = "Bits 0:15 - This register must be set before any I2C bus transaction can take place to ensure proper I/O timing. This register sets the SCL clock high-period count for fast mode or fast mode plus. It is used in high-speed mode to send the Master Code and START BYTE or General CALL. For more information, refer to 'IC_CLK Frequency Configuration'.
2122 This register goes away and becomes read-only returning 0s if IC_MAX_SPEED_MODE = standard. This register can be written only when the I2C interface is disabled, which corresponds to the IC_ENABLE\\[0\\]
23register being set to 0. Writes at other times have no effect.
2425 The minimum valid value is 6; hardware prevents values less than this being written, and if attempted results in 6 being set. For designs with APB_DATA_WIDTH == 8 the order of programming is important to ensure the correct operation of the DW_apb_i2c. The lower byte must be programmed first. Then the upper byte is programmed."]
26 #[inline(always)]
27pub fn ic_fs_scl_hcnt(&self) -> IC_FS_SCL_HCNT_R {
28 IC_FS_SCL_HCNT_R::new((self.bits & 0xffff) as u16)
29 }
30}
31impl W {
32#[doc = "Bits 0:15 - This register must be set before any I2C bus transaction can take place to ensure proper I/O timing. This register sets the SCL clock high-period count for fast mode or fast mode plus. It is used in high-speed mode to send the Master Code and START BYTE or General CALL. For more information, refer to 'IC_CLK Frequency Configuration'.
3334 This register goes away and becomes read-only returning 0s if IC_MAX_SPEED_MODE = standard. This register can be written only when the I2C interface is disabled, which corresponds to the IC_ENABLE\\[0\\]
35register being set to 0. Writes at other times have no effect.
3637 The minimum valid value is 6; hardware prevents values less than this being written, and if attempted results in 6 being set. For designs with APB_DATA_WIDTH == 8 the order of programming is important to ensure the correct operation of the DW_apb_i2c. The lower byte must be programmed first. Then the upper byte is programmed."]
38 #[inline(always)]
39 #[must_use]
40pub fn ic_fs_scl_hcnt(&mut self) -> IC_FS_SCL_HCNT_W<IC_FS_SCL_HCNT_SPEC> {
41 IC_FS_SCL_HCNT_W::new(self, 0)
42 }
43#[doc = r" Writes raw bits to the register."]
44 #[doc = r""]
45 #[doc = r" # Safety"]
46 #[doc = r""]
47 #[doc = r" Passing incorrect value can cause undefined behaviour. See reference manual"]
48 #[inline(always)]
49pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
50self.bits = bits;
51self
52}
53}
54#[doc = "Fast Mode or Fast Mode Plus I2C Clock SCL High Count Register
5556You can [`read`](crate::generic::Reg::read) this register and get [`ic_fs_scl_hcnt::R`](R). You can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero) this register using [`ic_fs_scl_hcnt::W`](W). You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
57pub struct IC_FS_SCL_HCNT_SPEC;
58impl crate::RegisterSpec for IC_FS_SCL_HCNT_SPEC {
59type Ux = u32;
60}
61#[doc = "`read()` method returns [`ic_fs_scl_hcnt::R`](R) reader structure"]
62impl crate::Readable for IC_FS_SCL_HCNT_SPEC {}
63#[doc = "`write(|w| ..)` method takes [`ic_fs_scl_hcnt::W`](W) writer structure"]
64impl crate::Writable for IC_FS_SCL_HCNT_SPEC {
65const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
66const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
67}
68#[doc = "`reset()` method sets IC_FS_SCL_HCNT to value 0x06"]
69impl crate::Resettable for IC_FS_SCL_HCNT_SPEC {
70const RESET_VALUE: u32 = 0x06;
71}